Hardware Reference
In-Depth Information
CHAPTER 4
GATT (Services and Characteristics)
The Generic Attribute Profile (GATT) establishes in detail how to exchange all profile
and user data over a BLE connection. In contrast with GAP ( Chapter 3 ), which defines
the low-level interactions with devices, GATT deals only with actual data transfer pro‐
cedures and formats.
GATT also provides the reference framework for all GATT-based profiles (discussed in
“SIG-defined GATT-based profiles” on page 14 ), which cover precise use cases and
ensure interoperability between devices from different vendors. All standard BLE pro‐
files are therefore based on GATT and must comply with it to operate correctly. This
makes GATT a key section of the BLE specification, because every single item of data
relevant to applications and users must be formatted, packed, and sent according to its
rules.
GATT uses the Attribute Protocol (detailed in “Attribute Protocol (ATT)” on page 26 )
as its transport protocol to exchange data between devices. This data is organized hi‐
erarchically in sections called services , which group conceptually related pieces of user
data called characteristics . This determines many fundamental aspects of GATT dis‐
cussed in this chapter.
Roles
As with any other protocol or profile in the Bluetooth specification, GATT starts by
defining the roles that interacting devices can adopt:
Client
The GATT client corresponds to the ATT client discussed in “Attribute Protocol
(ATT)” on page 26 . It sends requests to a server and receives responses (and server-
initiated updates) from it. The GATT client does not know anything in advance
about the server's attributes, so it must first inquire about the presence and nature
of those attributes by performing service discovery. After completing service
 
Search WWH ::




Custom Search