richsmith / sexytopo

The SexyTopo cave surveying app for Android
GNU General Public License v3.0
31 stars 14 forks source link

DistoXBLE not (yet) supported. #189

Closed LadaF closed 1 year ago

LadaF commented 1 year ago

With the unavailability of DistoX2 boards it ill be important to get the support for DistoXBLE which are appearing in the wild (I have now two of them on my desk).

richsmith commented 1 year ago

Sorry, not even heard of these! Got any more info? Probably easy enough to add.

LadaF commented 1 year ago

They were acquired by other members of our clubs so I only know what is available on the TopoDroid website https://sites.google.com/site/speleoapps/home/topodroid the presentation video https://youtu.be/JUHT7ma7G-I

And in some articles like http://jeskynar.cz/nova-perspektiva-pro-distox2/ that is written in Czech and they actually write there that you might already be working on it. The author of TopoDroid apparently received one piece in advance and was able to prepare the support already.

richsmith commented 1 year ago

I'm currently in Thailand for a couple of months (so not getting much chance to do any SexyTopo development), but I'd be interested if anyone can get me a specification for what protocol these use or someone wants to write the code or donate or lend me a unit to integrate it later in the year.

reinhard-brandstaedter commented 1 year ago

Stumbled accross this, as I'm also searching for support of the DistoXBLE. In short the DistoX BLE uses Bluetooth Low Energy for the communication protocol. This is a bit different to communicate on the lower level than normal bluetooth UART. I'm not involved in any of the development but the caver from China who makes them can be found on facebook: Siwei Tian: first_name dot last_name dot digit_seven

theSCRAG commented 1 year ago

TopoDroid has also a GPL3.0 licence. I think it should be possible to copy the source code:

BLE in general: https://github.com/marcocorvi/topodroid/tree/master/src/com/topodroid/dev/ble and DistoXBLE: https://github.com/marcocorvi/topodroid/tree/master/src/com/topodroid/dev/distox_ble

For the future, it might be helpful if there was a common library/component for all surveying devices. It would help the speleology community if not everyone developed everything themselves. Maybe we could get at least 2 of the 4 most important apps (TopoDroid, Qave, CaveSurvey and SexyTopo) together.

richsmith commented 1 year ago

I've been put in contact with Siwei Tian and he's very helpfully provided me with some docs. SexyTopo will support it in the near future - when I get time to update it, which is always the problem! I've also been provided with code for the new SAP.

TopoDroid has also a GPL3.0 licence. I think it should be possible to copy the source code:

Thanks, yes. No problem in theory sharing code between TopoDroid / SexyTopo but in practice there's a fair bit of difference in approach.

For the future, it might be helpful if there was a common library/component for all surveying devices.

It's a nice idea. I'm all for it, but it might be difficult in practice. As there's a real-time element of talking to these things then I'm not sure what such a library would look like. I think SexyTopo's implementation is more library-like than TopoDroid's, and I'm happy if anyone wants to adopt it as such.

It would help the speleology community if not everyone developed everything themselves.

I completely agree - I don't want to write any more code than necessary! However, I can't see how we can move towards that. Last time I looked at the TopoDroid codebase I couldn't see any way of sharing any functionality.

Maybe we could get at least 2 of the 4 most important apps (TopoDroid, Qave, CaveSurvey and SexyTopo) together.

I don't think Qave and CaveSurvey aren't under an open licence? I'm open to sharing any functionality with TopoDroid but they seem to have different approaches.

tswcmpass commented 1 year ago

Firstly I aplogize for not contacting SexyTopo, CaveSurvey and Qave's author at the begining of this year. In the spring, I was busy on producing, testing and distributing the boards. Now I have a little spare time even though I am always very busy. I am very happy to hear that Rich Smith can add support for my boards. For the drivers on SexyTopo of my boards, I can help as much as possible. You can refer the driver codes on Topodroid. I guess the first step is to implement the callback functions of BluetoothLE, in which we can furtherly implement the protocol. Most of the previous codes can be reused.

richsmith commented 1 year ago

Thanks for the docs on the protocol. Experimental support for the new Disto is now in SexyTopo beta version.

richsmith commented 1 year ago

Now supported in released SexyTopo version 1.7.0.