Chapter 2. Protocol Basics

Although users will usually interface directly only with the upper layers of the Bluetooth Low Energy protocol stack, it’s probably best to begin with a basic overview of the complete stack, which provides a solid foundation to understanding how and why things operate the way they do.

As shown in Figure 2-1, a complete single-mode BLE device is divided into three parts: controller, host, and application.

Each of these basic building blocks of the protocol stack is split into several layers that provide the functionality required to operate:

Application
The application, like in all other types of systems, is the highest layer and the one responsible for containing the logic, user interface, and data handling of everything related to the actual use-case that the application implements. The architecture of an application is highly dependent on each particular implementation.
Host

Includes the following layers:

  • Generic Access Profile (GAP)
  • Generic Attribute Profile (GATT)
  • Logical Link Control and Adaptation Protocol (L2CAP)
  • Attribute Protocol (ATT)
  • Security Manager (SM)
  • Host Controller Interface (HCI), Host side
Controller

Includes the following layers:

  • Host Controller Interface (HCI), Controller side
  • Link Layer (LL)
  • Physical Layer (PHY)

In this chapter, the order of sections will describe the different parts that make up a BLE device from bottom (antenna) to top (user interface).

Figure 2-1. The BLE protocol stack

Physical Layer

The physical ...

Get Getting Started with Bluetooth Low Energy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.