To build a BLE app, you need
- service UUID
- the service's characteristic UUIDs
- the characteristic's permissions (read / write / notify ...)
- 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?
From the GATT Specification page there is the GATT Specification Supplement document where it has the information on the structure of the temperature characteristic:
Environmental Sensing Service document also on GATT Specification page details if a characteristic can have notifications:
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