BLE Protocol Stack and System Architecture Explained
Advertisement
This page describes the BLE Protocol Stack or system architecture and the functions of BLE (Bluetooth Low Energy) system architecture protocol layers.
Introduction
BLE (Bluetooth Low Energy) is a wireless PAN technology designed and maintained by the Bluetooth Special Interest Group (SIG). Various versions of Bluetooth exist, with version 4.2 and above referred to as BLE. The latest versions are v5.0 and v5.1.
BLE specifications aim to reduce power consumption and device cost while maintaining coverage range. BLE is known as “Bluetooth Smart,” whereas previous versions are known as “Bluetooth Classic.”
- BLE is not backward compatible with BR/EDR protocols.
- BLE uses the 2.4 GHz ISM frequency band in either dual mode or single mode. Dual mode supports both Bluetooth Classic and Low Energy peripherals.
- All BLE devices use the GATT profile (Generic Attribute Profile). The GATT protocol provides a series of commands for the client to discover information about the BLE server.
- The BLE protocol stack architecture consists of two parts: the controller and the host. Both are interfaced using HCI (Host to Controller Interface).
- Profiles and applications run on top of the GAP & GATT protocol layers.
Figure 2: BLE System Architecture
Let’s understand the functions of different layers of this BLE protocol stack:
Physical Layer
- The transmitter uses GFSK modulation and operates at the unlicensed 2.4 GHz frequency band.
- Using this PHY layer, BLE offers data rates of 1 Mbps (Bluetooth v4.2) / 2 Mbps (Bluetooth v5.0).
- It uses a frequency hopping transceiver.
- Two modulation schemes are specified to deliver 1 Msym/s and 2 Msym/s.
- Two PHY layer variants are specified: uncoded and coded.
- A Time Division Duplex (TDD) topology is employed in both of the PHY modes.
Link Layer
This layer sits above the Physical layer and is responsible for advertising, scanning, and creating/maintaining connections. The role of BLE devices changes in peer-to-peer (Unicast) or broadcast modes. Common roles are Advertiser/Scanner (Initiator), Slave/Master, or Broadcaster/Observer. Link layer states are defined in the figure below.
Figure 1: BLE Device States
The device will be in one of these states: Standby, Advertising, Scanning, Initiating, Connection, and Synchronization.
HCI
It provides communication between the controller and the host through standard interface types. This HCI layer can be implemented using either an API or interfaces such as UART/SPI/USB. Standard HCI commands and events are defined in the Bluetooth specifications.
L2CAP
This layer offers data encapsulation services to upper layers, allowing logical end-to-end data communication.
SMP
This Security Manager layer provides methods for device pairing and key distributions. It offers services to other protocol stack layers to securely connect and exchange data between BLE devices.
GAP
This layer directly interfaces with the application layer and/or profiles on it. It handles device discovery and connection-related services for BLE devices. It also manages the initiation of security features.
GATT
This layer is a service framework that specifies sub-procedures to use ATT. Data communications between two BLE devices are handled through these sub-procedures. Applications and/or profiles will use GATT directly.
ATT
This layer allows a BLE device to expose specific pieces of data or attributes.
Application Layer
- The BLE protocol stack layers interact with applications and profiles as desired. Application interoperability in the Bluetooth system is achieved through Bluetooth profiles.
- The profile defines the vertical interactions between the layers as well as the peer-to-peer interactions of specific layers between devices.
- A profile is composed of one or more services to address a particular use case. A service consists of characteristics or references to other services.
- Any profiles/applications run on top of the GAP/GATT layers of the BLE protocol stack. It handles device discovery and connection-related services for the BLE device.
References
- BLUETOOTH CORE SPECIFICATION Version 5.1
- Previous versions of Bluetooth 5.0 or Bluetooth Low Energy (BLE)