AsteroidOS / asteroid-btsyncd

Bluetooth Low Energy synchronization daemon for AsteroidOS.
GNU General Public License v3.0
10 stars 17 forks source link

Add Heart Rate profile and get Workflow for development #18

Open miathedev opened 3 years ago

miathedev commented 3 years ago

Dear AsteroidOS Team,

I really want to add the Health Device Profile for my sportswatch. https://www.bluetooth.com/specifications/assigned-numbers/health-device-profile/ (Heart BPM)

Not sure if it is important. I baught the LG Watch Urbane W150 and im familiar with bitbake due to a lot yocto development in my job.

jrtberlin commented 3 years ago

Hi @miathedev,

Having the Health Device Profile within Asteroid would be awesome!

  1. Workflow, IDE and Tools I think most if not all developers and contributors use Linux for development. It's probably best to set up an AsteroidOS build environment and just re-run the btsyncd recipe and install the generated .ipk package with opkg.

    As for IDEs and tools, I personally use neovim and vscodium. It more or less comes down to your personal preferences. For debugging on the watch I use this strace binary and standard tools like journalctl, dmesg,... If you work on something with Qt/qml it can be useful to use Qt creator instead of a plain text editor.

  2. Testing BLE Profiles This is the ugly part of working with btsyncd. You can only really test your changes of either side of the implementation with the other side or at least a partial implementation. For Linux clients, we have asteroidsyncservice as a component, which makes use of services defined in libasteroid. On Android, we have UUIDs in AsteroidUUIDS and services implemented in the ble package.

  3. Other recommendations If you have not already, you should definitely give our ble profile documentation a read. Feel free to chime in on our IRC (#asteroid on freenode). We are happy to answer specific questions you have (do note that replies can take a while).

As I haven't done much work on btsyncd specifically maybe @FlorentRevest or @MagneFire can add their workflow recommendations.

FlorentRevest commented 3 years ago

Hey @miathedev :)

This sounds great! I'd love to have that profile supported upstream.

For the workflow, in addition to what jrt suggested, I would add that it's possible to setup asteroid-btsyncd in QtCreator using the instructions here https://asteroidos.org/wiki/creating-an-asteroid-app/#install-the-sdk the documentation page is written with QML apps in mind but to be fair it doesn't change much. If you do a lot of yocto dev at work I'm assuming that you'll figure out how to get the generated app to run as root etc...

For testing, I would recommend starting with a BLE scanner phone app, there are a bunch available in your store of choice. Like jrt said, it's a bit awkward to debug over two devices but I guess it's also part of the fun :)

edit: Other recommendations: sure, keep us posted and don't forget to upstream eheh :)