Bluetooth profiles

Applications interface with various Bluetooth devices using profiles. Profiles define the functionality and features for each layer of the Bluetooth stack. Essentially, profiles tie the stack together and define how layers interface with each other. A profile describes the discovery characteristics that the device advertises. They are also used to describe the data formats of services and characteristics that applications use to read and write to devices. A profile doesn't exist on a device; rather, they are predefined constructs maintained and governed by the Bluetooth SIG.

The basic Bluetooth profile must contain a GAP as stated by the specification. The GAP defines the radio, baseband layer, link manager, L2CAP, and service discovery for BR/EDR devices. Likewise, for a BLE device, the GAP will define the radio, link layer, L2CAP, security manager, attribute protocol, and generic attribute profile.

The ATT attribute protocol is a client-server wire protocol optimized for low-power devices (for example, the length is never transmitted over BLE, it is implied by the PDU size). ATT is also very generic and much is left to the GATT to provide assistance. The ATT profile consists of:

  • A 16-bit handle
  • A UUID to define the attribute type
  • A value containing the length

The GATT logically resides on top of ATT and is used primarily, if not exclusively, for BLE devices. The GATT specifies the roles of the server and client. A GATT client is usually a peripheral device and the GATT server is the host (PC, smartphone). A GATT profile contains two components:

  • Services: A service breaks up data into logical entities. There can be multiple services in a profile and each service has a unique UUID to distinguish it from others.
  • Characteristics: A characteristic is the lowest level of a GATT profile and contains raw data associated with the device. Data formats are distinguished by 16-bit or 128-bit UUIDs. The designer is free to create their own characteristics that only their application can interpret.

The image below represents an example of a Bluetooth GATT profile with corresponding UUIDs for various services and characteristics. 

GATT Profile Hierarchy and example GATT used on Texas Instruments CC2650 SensorTag

The Bluetooth SIG maintains a collection of many GATT profiles. At the time of writing, there are 57 GATT profiles supported on the Bluetooth SIG: https://www.bluetooth.com/specifications/gatt. Profiles supported by the SIG include everything from health monitors, cycling and fitness devices, environmental monitors,  human interface devices, indoor positioning, object transfer, and location and navigation services, along with many others. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset