English
Language : 

AN91267 Datasheet, PDF (55/62 Pages) Ramtron International Corporation – Getting Started with PSoC
Getting Started with PSoC® 4 BLE
 Attribute Permission: This specifies the Attribute access, authentication, and authorization requirements.
Attribute permission is set by the higher layer specification and is not discoverable through the Attribute protocol.
Figure 64 shows the structure of a Device Name Attribute as an example.
Figure 64. Attribute Format Example
Format
Example
2 bytes
2 bytes
Attribute
Handle
Attribute Type
0x0003
0x2A00
(UUID for
Device Name)
0 to 512 bytes
Attribute Value
“Cypress HRM”
Implementation
specific
Attribute
Permission
Read Only, No
Authentication,
No Encryption
Attribute Hierarchy
Attributes are the building blocks for representing data in ATT/GATT. Attributes can be broadly classified into the
following two groups to provide hierarchy and abstraction of data:
 Characteristic: A collection of Attributes that exposes the system information or meaningful data. A
Characteristic consists of the following Attributes:
 Characteristic Declaration Attribute: This defines the beginning of a Characteristic.
 Characteristic Value Attribute: This holds the actual data.
 Characteristic Descriptor Attributes: These are optional Attributes, which provide additional information about
the Characteristic value.
“Battery Level” is an example of a Characteristic in the Battery Service (BAS). Representing the battery level in
percentage values is an example of a Characteristic descriptor.
Figure 65 shows the structure of a Characteristic with Battery Level as an example.
 The first part of a Characteristic is the declaration of the Characteristic (it marks the beginning of a
Characteristic) indicated by the Battery Level Characteristic in Figure 65.
 Next is the actual Characteristic value or the real data, which in the case of the Battery Level Characteristic is
the current battery level. The battery level is expressed as a percentage of full scale, for example “65,” “90,”
and so on.
 Characteristic descriptors provide additional information that is required to make sense of the Characteristic
value. For example, the Characteristic Presentation Format Descriptor for Battery Level indicates that the
battery level is expressed as a percentage. Therefore, when “90” is read, the GATT client knows this is 90
percent and not 90 mV or 90 mAh. Similarly, the Valid Range Characteristic descriptor (not shown in Figure
65) indicates that the battery level range is between 0 and 100 percent.
 A Client Characteristic Configuration Descriptor (CCCD) is another commonly used Characteristic descriptor
that allows a GATT client to configure the behavior of a Characteristic on the GATT server. When the GATT
client writes a value of 0x01 to the CCCD of a Characteristic, it enables asynchronous notifications (described
in the next section) to be sent from the GATT server. In the case of a Battery Level Characteristic, writing
0x01 to the Battery Level CCCD enables the Battery Service to notify its battery level periodically or on any
change in battery-level value.
www.cypress.com
Document No. 001-91267 Rev. *D
55