English
Language : 

AN91267 Datasheet, PDF (8/62 Pages) Ramtron International Corporation – Getting Started with PSoC
Getting Started with PSoC® 4 BLE
GATT Data Format
A GATT server uses Attributes, Characteristics, and Services to represent and abstract data in a BLE device.
 Attribute: An Attribute is the fundamental data container of the ATT/GATT layer that represents a discrete piece of
information. The structure of an Attribute consists of the following, as shown in Figure 7.
 Attribute Handle: Used to address the Attribute
 Attribute Type: A 16-bit Universally Unique Identifier (UUID) assigned by the Bluetooth SIG that specifies what is
contained in the Attribute
 Attribute Value: Contains the actual data
 Attribute Permission: Specifies read/write and security requirements for the Attribute
Heart-rate measurement, battery level, battery level units, and device name are a few examples of an Attribute.
A GATT server consists of a number of Attributes that are stored in a firmware database called the “Attribute database.” The
GATT client performs read/write operations on one or more Attributes in the GATT server’s Attribute database using the
Attribute handle.
Figure 7. GATT Attribute Example
2 bytes
2 bytes
0 to 512 bytes
Implementation
specific
Format
Attribute
Handle
Attribute Type
Attribute Value
Attribute
Permission
Example
0x0003
0x2A00
(UUID for
Device Name)
“Cypress HRM”
Read Only, No
Authentication,
No Encryption
 Characteristic: A Characteristic is composed of multiple discrete Attributes that when combined define system
information or meaningful data. A Characteristic consists of a Characteristic Declaration Attribute, a Characteristic Value
Attribute, and optionally one or more Characteristic Descriptor Attributes, as shown in Figure 8. Combining the Battery
Level Attribute of “90” and Battery Level Descriptor Attribute of “%” provides the battery level information of a system as
90%.
The Bluetooth SIG offers a set of predefined standard Characteristics that you can use in your application. Or you can
define your own custom Characteristics.
Figure 8. GATT Characteristic Example
Format
Example
<<Declaration>>
<<Value>>
<<Descriptor>>
Battery Level
Characteristic Declaration
Battery Level (90)
Characteristic Presentation
Format (%)
www.cypress.com
Document No. 001-91267 Rev. *D
8