User guide

Silicon Labs Page of 11 21
3.3 Defining Characteristics
3.3.1 <characteristic> : Characteristic Definition element
The XML element is used to define define a characteristic, it's UUID and internal ID used in
<characteristic>
applications.
The attributes are described in more detail in the table below.
Attribute Description
uuid
Universally Unique IDentifier. The UUID uniquely identifies a characteristic.
Options:
0000 to 16-bit UUIDs are reserved for the characteristics standardized by the FFFF:
Bluetooth
and must not be used for vendor specific implementations.
SIG
00000000-0000-0000-0000-000000000000 to FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF:
128-bit UUIDs are reserved for vendor specific implementations.
id
The ID is used to identify a characteristic. The ID can be used in the application code (BGScript)
to manage the characteristic instead of using its handle number.
When the project is compiled with the compiler a text file called for BLE BGBuild attributes.txt
and for BT121 is generated. This file contains the s and corresponding handle constants id
values (dec).
The value of an ID can be any UTF-8 string. Every characteristic must use a unique ID.
Examples: A standardized characteristic with UUID 2a00 (corresponding to device name):
Bluetooth SIG
<characteristic uuid="2a00">
Example: A vendor specific characteristic with UUID e7add780-b042-4876-aae1-112855353cc1 and ID
xgatt_data:
<characteristic uuid="e7add780-b042-4876-aae1-112855353cc1" id="xgatt_data">