Metrics Service
Service UUID: 00001554-1212-efde-1523-785feabcd123
Characteristics
Usecase
The metrics service is used to retrieve data about the bike and be notified when the data changes.
Subscribe to ```UUID_CHARACTERISTIC_REGISTER_NOTIFIER``` to receive notifications when values change.
Write a 2-byte identifier to ```UUID_CHARACTERISTIC_REGISTER_ID``` and then read ```UUID_CHARACTERISTIC_REGISTER``` to get the data at any time.
Values can be changed by writing to ```UUID_CHARACTERISTIC_REGISTER```.
Known register & notification IDs
WSPEED : UInt16, wheel speed (km/h) ~= ```WSPEED / 100```
CADENCE : UInt8, pedal RPM ~= ```5 * PSPEED```
TOTAL : UInt16, total (km) ~= ```TOTAL / 10```
ASSIST : pedal assist level (0-4)
WALK : walk (push along) assist (0/90?)
LIGHT : headlight on (1/0)
MODE : riding power mode (0-7)
RANGE : remaining range from battery in km
CAMP : UInt16, charging current (A) ~= ```CAMP / 1000```
(1) Flickers between 0x4E and 0x4D when motor is running
(2) Seems related to pedalling torque
Known register-only IDs
These were found by brute-force registering ids (0x00 0x00 to 0x09 0x09).
Only the following ones returned a corresponding register.
Known writable IDs
New writable IDs were found brute-force writing ```UUID_CHARACTERISTIC_REGISTER``` with IDs (0x00 0x00 to 0x00 0xFF) and all data bytes at 0x00. Listed IDs produce a 3-0 notification when written: