How do you build a BLE app when you don't have access to the official GATT XML files?

784 views Asked by At

To build a BLE app, you need

  1. service UUID
  2. the service's characteristic UUIDs
  3. the characteristic's permissions (read / write / notify ...)
  4. If you are sending any data, you need to know the value type (uint8_t, uint16_t ...)

For an instance, if it was environment sensing service, I can read this PDF from this page, and find Environmental Sensing under GATT Service and the UUID is 0x181A. Then I can go on reading the same PDF and find Temperature (although it's T emperature in text for some reasons, and it can't be searched by Temperature) under GATT Characteristic and Object Type, and the UUID is 0x2A6E.

OK, so far so good. Then I hit a wall. How about the data size (e.g. uint16_t or whatever) to notify or which permissions are allowed (e.g. read / write ...)?

After hours of googling, I finally found this github and this github. But this is not official, somebody copied and evacuated them.

How do you efficiently program a BLE app when you don't have official XML files to look up?

2

There are 2 answers

0
ukBaz On BEST ANSWER

From the GATT Specification page there is the GATT Specification Supplement document where it has the information on the structure of the temperature characteristic:

enter image description here

Environmental Sensing Service document also on GATT Specification page details if a characteristic can have notifications:

enter image description here

I also found the XML documents presented the information in a more compact manner and I have bought this to the attention of the Bluetooth SIG but the links don't seem to get fixed. The data is still there on the site if you can workout the URL. I have no idea if that data is being maintained.

https://www.bluetooth.com/wp-content/uploads/Sitecore-Media-Library/Gatt/Xml/Services/org.bluetooth.service.environmental_sensing.xml

https://www.bluetooth.com/wp-content/uploads/Sitecore-Media-Library/Gatt/Xml/Characteristics/org.bluetooth.characteristic.temperature.xml

2
Simpler On

All of the GATT xml specifications can be found here: https://github.com/oesmith/gatt-xml