5

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?

kukrt
  • 2,117
  • 3
  • 21
  • 32
  • 1
    I always go to the Bluetooth SIG site, find profile specifications (https://www.bluetooth.com/specifications/gatt/) and read it carryfully. It gives all the details you may need. – Mike Petrichenko Oct 22 '20 at 02:55

2 Answers2

2

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

ukBaz
  • 6,985
  • 2
  • 8
  • 31
1

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

Simpler
  • 1,317
  • 2
  • 16
  • 31
  • Thank you for your answer. It is however not the official. – kukrt Apr 18 '21 at 00:39
  • You're correct. This is not the official documentation, and probably won't be updated, but it has helped me tremendously in understanding the structure of the services/characteristics/descriptors/values/properties/etc. – Simpler Apr 18 '21 at 00:41