Telemetry icon indicating copy to clipboard operation
Telemetry copied to clipboard

Java Implementation

Open zerox1212 opened this issue 7 years ago • 5 comments

I'm looking for a simple way to get some data across a Bluetoother RfComm channel. Telemetry looks like a nice option, but I need the data to be received by an Android phone. If I implemented this would it be accepted into this repository? Or any suggestions on how to pursue this?

zerox1212 avatar Jun 06 '17 16:06 zerox1212

Thanks for the interest you have in telemetry.

I think contributions would a great idea.

Le 6 juin 2017 à 18:08, Andrew [email protected] a écrit :

I'm looking for a simple way to get some data across a Bluetoother RfComm channel. Telemetry looks like a nice option, but I need the data to be received by an Android phone. If I implemented this would it be accepted into this repository? Or any suggestions on how to pursue this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

LucasMahieu avatar Jun 06 '17 20:06 LucasMahieu

If you are using an Arduino or any device supported by Mbed (there are many), then you should be able to send data to the bluetooth serial port pretty easily.

You just need to define the four transport function (see how I've done it for Arduino) read readable write writeable that are used by Telemetry to exchange data with the transport layer (your bluetooth radio). It's just a few lines of code and I think a gist could be enough to share it if you're willing to.

On the Android phone side however, you will need to reimplement the Telemetry protocol to decode the serial data, which will be quite a bit of work, and should be a full repository on its own if you are willing to open-source it.

Sadly, I'm pretty busy atm and I cannot do it myself.

If you know in advance the payloads you need to exchange, you might be interested by Protocol Buffers. It's suitable for end applications, while Telemetry clearly is not, more for prototyping. It's developped by Google and supports a wide range of languages (in your case C++ and Java)

Hope this help, feel free to answer with additional questions

Overdrivr avatar Jun 07 '17 07:06 Overdrivr

I will take a look, but probably won't have time for a full implementation.

Thanks for info about Protocol Buffers, I have not seen that. It's interesting how difficult straight forward communication between two devices can be.

I was also looking at this one. https://github.com/Jeff-Ciesielski/XBVC Or I might change to BLE so that I can use GATT.

zerox1212 avatar Jun 07 '17 07:06 zerox1212

Oh wait, there is one library that might be even more interesting : msgpack I haven't tested it but it's quite popular. It's a portable data exchange protocol, and you get json on the output which is quite convenient in JS, Python, etc.

It's interesting how difficult straight forward communication between two devices can be.

That's exactly why I developed Telemetry :) But so many platforms and uses cases that's it's quite impossible to rule them all

Overdrivr avatar Jun 07 '17 07:06 Overdrivr

msgpack looks interesting. Unfortunate it has Visual Studio dependencies for windows however. My use case is PC running python to PC running python communication, but I will experiment with it. Thanks for the help!

zerox1212 avatar Jun 07 '17 14:06 zerox1212