User's Guide

Table Of Contents
Operational Examples
EZ-Serial BLE Firmware Platform User Guide, Doc. No. 002-11259 Rev. *E 51
Table 3-10. Bluetooth SIG Structural UUIDs
UUID Description
0x2800 Primary Service Declaration
0x2801 Secondary Service Declaration
0x2802 Include Declaration
0x2803 Characteristic Declaration
0x2900 Characteristic Extended Properties
0x2901 Characteristic User Description
0x2902 Client Characteristic Configuration
0x2903 Server Characteristic Configuration
0x2904 Characteristic Format
0x2905 Characteristic Aggregate Format
Further detail on these and other official identifiers can be found on the Bluetooth SIG website.
When defining GATT elements at runtime, you must enter each attribute in the correct order based on the desired
structure. Any entries that do not conform to the correct order requirement will be rejected with a validation error. The only
case where a validation warning is allowed is when you define a new service or characteristic declaration and have not
yet entered the subsequent attributes which must follow. You can use the gatts_validate_db (/VGDB, ID=5/3) API
command at any time to perform an integrity check on the current GATT structure to see whether additional attributes are
expected.
The required order for each complete characteristic definition (declaration, value, and optional descriptors) is dictated by
the internal BLE stack as follows:
Table 3-11. Required Characteristic Attribute Order
Order UUID Description Required
#1 0x2803 Characteristic Declaration
Yes
#2 <custom> Characteristic Value
Yes
#3 0x2900 Characteristic Extended Properties No
#4 0x2901 Characteristic User Description No
#5 0x2902 Client Characteristic Configuration No
#6 0x2903 Server Characteristic Configuration No
#7 0x2904 Characteristic Format No
#8 0x2905 Characteristic Aggregate Format No
Any optional attributes may be omitted as long as all provided attributes are supplied in the above order.
For details on how to use custom GATT creation API commands to add support for Bluetooth SIG official services such as
Device Information, Health Thermometer, and others, refer to Section 10.2 (Adopted Bluetooth SIG GATT Profile
Structure Snippets) and the API reference material for gatts_create_attr (/CAC, ID=5/1).
3.6.1.3 Choosing Correct GATT Permissions
It is critical to use correct permissions when defining any custom GATT structural elements. Refer to Section 10.2
(Adopted Bluetooth SIG GATT Profile Structure Snippets) for example definitions, and you may notice certain patterns.
Here are the recommended guidelines for the most common entries:
Service declarations (type = 0x2800)
o Read permissions = 0x01, to allow structure discovery (no encryption/authentication)
o Write permissions = 0x00, to prevent attempted changes
o Characteristic properties = 0x00, because they do not apply
Characteristic declarations (type = 0x2803)
o Read permissions = 0x01, to allow structure discovery (no encryption/authentication)