Hacker News
Show HN: Fun with bicycle trainers and web APIs
7 points by okayestjoel
ago
|
3 comments
Bringing new life to my indoor bicycle smart trainer using the Web Bluetooth API. Experimental web app - YouTube Hamster Wheel - can be found at: https://joelriley.com/yt-hamster-wheel/
dieselgate
[-]
Is anyone able to explain the cycling power service and other vars? It equals “0x1818” and I’m trying to understand what these mean. Did a web search for this value and a separate site (0) shows up talking about crank/power values. Is this part of a larger standardized unit system?
The partial conclusion I’ve arrived at is these are unsigned 16 bit values in hex form but unsure if this is accurate.
(0) https://devzone.nordicsemi.com/f/nordic-q-a/9479/cumulative-...
okayestjoel
|root
|parent
[-]
You can find the 0x1818 identifier in the Bluetooth Assigned Numbers Document, along with other services:
https://www.bluetooth.com/specifications/assigned-numbers/
The GATT Specification Supplement (3.75) contains details on the data format: https://btprodspecificationrefs.blob.core.windows.net/gatt-s...
I have a pretty narrow understanding of the Bluetooth spec as a whole, though hopefully that sheds some light on this specific use.