bt-mqtt-gateway icon indicating copy to clipboard operation
bt-mqtt-gateway copied to clipboard

Battery status for Oral B toothbrush

Open MortenVinding opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like Support for battery status

Describe alternatives you've considered None

Additional context According to: https://gitlab.com/snippets/1928948 battery status should be available on UUID a0f0ff0550474d5382084f72616c2d42 Also the IOS app "LightBlue" calls this "Battery Level"

This is what I have found: pi@raspberrypi:/opt/bt-mqtt-gateway $ sudo hcitool -i hci0 leinfo 6C:C3:74:F7:48:DB Requesting information ... Handle: 64 (0x0040) LMP Version: 4.0 (0x6) LMP Subversion: 0x130 Manufacturer: Texas Instruments Inc. (13) Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 pi@raspberrypi:/opt/bt-mqtt-gateway $ sudo gatttool -i hci0 -b 6C:C3:74:F7:48:DB -I [6C:C3:74:F7:48:DB][LE]> connect Attempting to connect to 6C:C3:74:F7:48:DB Connection successful [6C:C3:74:F7:48:DB][LE]> primary attr handle: 0x0001, end grp handle: 0x000b uuid: 00001800-0000-1000-8000-00805f9b34fb attr handle: 0x000c, end grp handle: 0x000f uuid: 00001801-0000-1000-8000-00805f9b34fb attr handle: 0x0010, end grp handle: 0x001d uuid: a0f0fff0-5047-4d53-8208-4f72616c2d42 attr handle: 0x001e, end grp handle: 0x004f uuid: a0f0ff00-5047-4d53-8208-4f72616c2d42 attr handle: 0x0050, end grp handle: 0xffff uuid: a0f0ff20-5047-4d53-8208-4f72616c2d42 [6C:C3:74:F7:48:DB][LE]> char-read-uuid a0f0ff05-5047-4d53-8208-4f72616c2d42 handle: 0x002d value: 54 a3 12 00

The first byte (54) seems to be the battery level in percentage (in Hex).

MortenVinding avatar Apr 05 '21 22:04 MortenVinding

2nd this. I was able to read the same attributes and char-read-hnd of 0x002d seems to mirror my brush's battery state level.

snhnry avatar May 03 '21 22:05 snhnry

+1

groenmarsmannetje avatar Aug 17 '21 18:08 groenmarsmannetje