Chapter 3. GAP (Advertising and Connections)

The Generic Access Profile (GAP) is the cornerstone that allows Bluetooth Low Energy devices to interoperate with each other. It provides a framework that any BLE implementation must follow to allow devices to discover each other, broadcast data, establish secure connections, and perform many other fundamental operations in a standard, universally understood manner. It’s important to understand GAP thoroughly, because many BLE protocol stacks use it as one of the lowest-level entry points when providing a functional API to application developers.

As mentioned previously, the sections of the GAP chapter in the core specification that apply to Bluetooth Low Energy define the following different aspects of device interaction:

Roles
Each device can operate in one or more roles at the same time. Each role imposes restrictions and enforces certain behavioral requirements. Certain combinations of roles allow devices to communicate with each other, and GAP establishes the interactions between those roles precisely. Although not always, roles tend to be associated with specific device types, and for many (though not all) implementations, they are also tightly bound with their use case and do not change at all.
Modes
Further refining the concept of a role, a mode is a state in which the device can switch to for a certain amount of time to achieve a particular goal or, more especifically, to allow a peer to perform a particular procedure. ...

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.