32feet icon indicating copy to clipboard operation
32feet copied to clipboard

Use the component to obtain the battery information of the device corresponding to bluetooth, please help, thank you

Open jzeb opened this issue 2 years ago • 3 comments

I want to use the service to obtain the electric quantity information corresponding to bluetooth device, using the headset of the latest version 5.2 of Bluetooth. Under the platform of WIN11 operating system, the electric quantity information can be displayed normally, but I use the debugging software "nRF Connect" of mobile phone, and the screenshot is as follows. How do I obtain the electric quantity information of Bluetooth device now? Please give me an example. Thank you. ** image **

jzeb avatar May 24 '22 12:05 jzeb

If it supports the Battery service it will have a service with id 0x180F. The characteristic 0x2A19 contains a single byte with the battery percentage,

peterfoot avatar May 24 '22 12:05 peterfoot

However, some (such as the part of my screenshot) do not have this service, but the bluetooth list of WIN11 can display the battery information, may I ask, is there any other way?

jzeb avatar May 25 '22 13:05 jzeb

Some classic profiles (such as headset/handsfree) can expose battery levels via an AT command.

peterfoot avatar May 25 '22 13:05 peterfoot