5 years, 9 months ago.

Setting BLE Characteristic Units

Hi All,

I'm going through the bluetooth SIG certification process, and we are currently failing because our battery service fails to give the units for the battery value ( BLE_GATT_UNIT_PERCENTAGE ). However, I cannot figure out how to actually add this information into the characteristic when it is being set up. The battery service is discussed as being BT Sig compliant, but from what I can tell that is not the case when it lacks the units information.

If anyone knows how to edit the battery service.h file to get the GATT Characteristic to include the units, I would greatly appreciate it!

Thanks, Steve

Question relating to:

Bluetooth Low Energy (a.k.a Bluetooth LE, BTLE, Bluetooth Smart)

1 Answer

5 years, 9 months ago.

Hello,

According to https://developer.bluetooth.org/gatt/services/Pages/ServiceViewer.aspx?u=org.bluetooth.service.battery_service.xml, the battery level characteristic can have a 'Characteristic Presentation Format' descriptor to describe type and units of the battery-level value. Our current implementation of the battery level service doesn't support descriptors. This will be a useful extension to the API, and we'll schedule some work for this.

This will be tracked under https://github.com/ARMmbed/ble/issues/77.