Hardware Reference
In-Depth Information
Table 4-1. Attributes represented as a table
Handle
Type
Permissions
Value
Value length
0x0201
UUID 1 (16-bit)
Read only, no security
2
0x180A
0x0202
UUID 2 (16-bit)
Read only, no security
2
0x2A29
0x0215
UUID 3 (16-bit)
Read/write, authorization required
“a readable UTF-8 string”
23
0x030C
UUID 4 (128-bit)
Write only, no security
4
{0xFF, 0xFF, 0x00,
0x00}
0x030D
UUID 5 (128-bit)
Read/write, authenticated encryption required 36.43
8
0x031A
UUID 1 (16-bit)
Read only, no security
2
0x1801
In this ficticious GATT server, the attributes it contains are represented as rows of a
simple table. This particular GATT server happens to host only five attributes (a rather
low number when compared to real-world devices). Note that, as mentioned earlier in
this section, the handles of the different attributes do not need to be immediately con‐
secutive, but the ordinal sequence must progress increasingly, as in this example.
The Value column of the table is intended to mirror the high diversity of formats that
attribute values can contain in the different GATT-based profiles. The attributes with
handles 0x0201 , 0x0202 , and 0x031A contain 16-bit integers in their respective value
fields. The attribute with handle 0x0215 contains a UTF-8 string, 0x030C contains a 4-
byte buffer, and 0x030D holds an IEEE-754 64-bit floating point number in its value
field.
Attribute and Data Hierarchy
Athough the Bluetooth specification defines attributes in the ATT section, that is as far
as ATT goes when it comes to them. ATT operates in attribute terms and relies on all
the concepts exposed in “Attributes” on page 53 to provide a series of precise protocol
data units (PDUs, commonly known as packets ) that permit a client to access the at‐
tributes on a server.
GATT goes further to establish a strict hierarchy to organize attributes in a reusable and
practical manner, allowing the access and retrieval of information between client and
server to follow a concise set of rules that together consitute the framework used by all
GATT-based profiles.
Figure 4-1 illustrates the data hierarchy introduced by GATT.
 
Search WWH ::




Custom Search