English
Language : 

AN91267 Datasheet, PDF (58/62 Pages) Ramtron International Corporation – Getting Started with PSoC
Getting Started with PSoC® 4 BLE
Generic Attribute Profile (GATT)
The GATT defines the ways in which Attributes can be found and used. The GATT operates in one of two roles:
 GATT client: The device that requests the data (for example, a smartphone).
 GATT server: The device that provides the data (for example, a heart-rate monitor)
Figure 68 shows the client-server architecture in the GATT layer using a heart-rate monitoring device as an example.
The heart-rate monitoring device exposes multiple Services (HRS, BAS, and Device Information Service); each
Service consists of one or more Characteristics with a Characteristic value and descriptor, as shown in Figure 65.
Figure 68. GATT Client-Server Architecture
GATT Client
(Smartphone)
Requests
Responses
GATT Server
(Heart Rate Sensor)
Heart Rate
Service
Heart Rate
Sensor Location
Battery Level
Service
Battery Level
Device Info
Service
Serial Number
FW Version
After the BLE connection is established at the link-layer level, the GATT client (which initially knows nothing about the
connected BLE device) initiates a process called “service discovery.” As part of the service discovery, the GATT
client sends multiple requests to the GATT server to get a list of all the available Services, Characteristics, and
Attributes in the GATT server. When service discovery is complete, the GATT client has the required information to
modify or read the information exposed by the GATT server using the Attribute operations described in the previous
section.
Generic Access Profile (GAP)
The GAP layer provides device-specific information such as the device address; device name; and the methods of
discovery, connection, and bonding. The Profile defines how a device can be discovered, connected, the list of
Services available, and how the Services can be used. Figure 70 shows an example of a Heart Rate Profile.
The GAP layer operates in one of four roles:
 Peripheral: This is an advertising role that enables the device to connect with a GAP Central. After a connection
is established with the Central, the device operates as a slave. For example, a heart-rate sensor reporting the
measured heart rate to a remote device operates as a GAP Peripheral.
 Central: This is the GAP role that scans for advertisements and initiates connections with Peripherals. This GAP
role operates as the master after establishing connections with Peripherals. For example, a smartphone
retrieving heart-rate measurement data from a Peripheral (heart-rate sensor) operates as a GAP Central.
 Broadcaster: This is an advertising role that is used to broadcast data. It cannot form BLE connections and
engage in data exchange (no request/response operations). This role works similar to a radio station in that it
sends data continuously whether or not anyone is listening; it is a one-way data communication. A typical
example of a GAP Broadcaster is a beacon, which continuously broadcasts information but does not expect any
response.
 Observer: This is a listening role that scans for advertisements but does not connect to the advertising device. It
is the opposite of the Broadcaster role. It works similar to a radio receiver that can continuously listen for
information but cannot communicate with the information source. A typical example of a GAP Observer is a
smartphone app that continuously listens for beacons.
www.cypress.com
Document No. 001-91267 Rev. *D
58