2

I decided to build a tool to display the battery level of a pair of Bluetooth headphones, since I got this feature on Android, but not on Windows. For some reason, it just doesn't display in the settings. I'm using UWP and with the Device Enumerator I managed to pull a list of connected devices. Is there any way to get the battery level from this point? I've seen that people are using RFCom or GATT, but their issue involves connecting to the device, which I think is redundant since the tool is supposed to work on already connected devices.

  • You must connect to Battery Service (BLE GATT service) to be able to read and notified about batt level information. No other way to do that. Of course, if that is BLE device. it is is Classic Bluetooth device than you have to connec to its RFCOMM control channel (for HandsFree) or use L2CAP (not available on Windows) to read information from Audio service channel 9for A2DP device). – Mike Petrichenko Apr 27 '20 at 17:16
  • I think it's a BLE. Cause since I've used them Microsoft BLE is listed in Device Manager. – Tudor-Gabriel Vieru Apr 27 '20 at 17:35
  • It is always listed there if your Bluetooth dongle supports BLE features. It is just a BLE driver. – Mike Petrichenko Apr 27 '20 at 18:02
  • My bad then, didn't notice it as I haven't been so much interested in this domain. – Tudor-Gabriel Vieru Apr 27 '20 at 19:40
  • I enumerated the bluetooth device and checked its properties but didn't find the relevant power information, so currently, there is no method can get the battery level. – Faywang - MSFT Apr 28 '20 at 08:00
  • I have no experience in this field. Never worked with Bluetooth devices. I searched Google (obviously) for this, but any answers were for totally different issues. – Tudor-Gabriel Vieru Apr 28 '20 at 08:32
  • Currently there is no api can directly get the battery level of your bluetooth devices in uwp. – Faywang - MSFT Apr 28 '20 at 09:53
  • Oh, ok. Thank you. – Tudor-Gabriel Vieru Apr 28 '20 at 18:01

0 Answers0