seemoo-lab / fitness-app

Other
70 stars 19 forks source link

Using extracted key to read out fitness data from Linux? #3

Closed alfredkrohmer closed 6 years ago

alfredkrohmer commented 6 years ago

Hi,

would it be possible to read out the fitness data from the tracker with some Linux program that talks to the tracker via BLE and knows the extracted secret key (and save and process the data in some sane format)? Have you tried that already and maybe documented anywhere?

My idea for that would be to use a Raspberry Pi simultaneously as the "smartphone app" and as the Fitbit "cloud server". It could connect to the dongle nightly to extract the fitness data into some time series DB and push a notification to your smartphone when the battery is low. This way you wouldn't need to use the cloud service of Fitbit at all.

jiska2342 commented 6 years ago

Hi,

you're probably looking for something like the Galileo[1] project. Note that they have BLE support, but back then when I tested it, this was not stable. For my first tests I was using Galileo as a code base. I'm lacking time to integrate these things, but posted to the project's mailing list a month ago[2].

Implementing your own cloud server is feasible. Most protocol fields of server responses are understood, and encryption is XTEA in EAX mode. The process is very similar to what our fitness app does to generate firmware updates. Note that battery readings are available in plain from trackers on the standard BLE service UUID for this.

Instead of implementing your own Fitbit cloud server, it would also possible to extend our fitness app to locally interpret megadumps---megadump reception and decryption are already implemented, the new thing to implement would only be a parser for the fields and adding a database.

Best, Jiska

[1] https://bitbucket.org/benallard/galileo/ [2] https://www.freelists.org/post/galileo/34C3-Talk-Wireless-Firmware-Modifications