Bluetooth® Low Energy GAP Modes and Procedures

Bluetooth® Low Energy (BLE) Generic Access Profile (GAP) modes and procedures form the cornerstone for basic 'control-plane' operations:

  • Discover and connect with peers
  • Broadcast data
  • Establish secure connections

Mode/Procedure pairs are defined for both discovery and connection phases.

GAP Mode(s)

A "state" in which a peripheral device can switch to for a certain time, in order to

  • Achieve a goal, or
  • Allow a peer to perform a "procedure"

Examples

Discovery Modes

  • Non-Discoverable
  • Limited-Discoverable
  • General-Discoverable

Connection Modes

  • Non-Connectable
  • Directed-Connectable
  • Undirected-Connectable

Refer to the Core Bluetooth specification 4.2, Vol 3., Part C, Section 9 for more detailed description of all BLE GAP Modes and Procedures.

GAP Procedure(s)

A sequence of actions undertaken by a central device to attain a goal, such as

  • Discovery of peers
  • Establishing a connection to a specific peer

Examples

Discovery Procedures

  • Limited-Discovery
  • General-Discovery

Connection Procedures

  • General-Connection
  • Direct-Connection

Refer to the Core Bluetooth specification 4.2, Vol 3., Part C, Section 9 for more detailed description of all BLE GAP Modes and Procedures.

Discovery Modes & Applicable Procedures

These are concerned with how a peripheral advertises its presence - and what centrals can/should do with that information. The following table matches several peripheral "discovery" modes with applicable central "discovery" procedures:

discovery-modes-procedures.png

General-Discoverable Mode

This state indicates the peripheral's desire for discovery by peers for connection establishment. It is identified by the transmission of ADV_IND advertising packets at regular intervals. It represents the initial "factory default" state for the peripheral.

Required Peripheral Configuration

The following BLE parameters need to be setup in the peripheral before entering this mode (state):

Finally, advertising must be enabled on the peripheral device to signal entry into this mode for its peers.

Refer to vendor-supplied configuration/programming utilities and/or BLE stack APIs to configure these settings.

Limited-Discoverable Mode

This state indicates the peripheral's desire to reconnect to a specific peer. It is identified by the transmission of ADV_DIRECT_IND advertising packets in short bursts. These packets contain the MAC address of the desired Central device.

Since smartphones use Random/Private addresses, ADV_DIRECT_IND packets are generally not detectable by them. Use General-Discoverable mode on the peripheral device for connection to a smartphone application.

General Discovery Procedure

This procedure has the central device start scanning with no white-list filtering (i.e. analyzes all received "Advertising Packet Type" flags received). If the advertising packet type is "Limited-Discoverable" or "General-Discoverable", the peer device is reported to the application layer for further analysis.

Required Central Configuration

The following BLE parameters need to be setup in the central before beginning this procedure

Finally, scanning needs to be enabled.

Refer to vendor-supplied configuration/programming utilities and/or BLE stack APIs to configure these settings.

Limited Discovery Procedure

This procedure is partially assisted by the BLE Link Layer. During scanning, if the Link Layer detects an ADV_DIRECT_IND packet with a matching MAC address, it will notify the application layer. Other BLE radios in the vicinity will ignore ADV_DIRECT_IND packets not addressed to them.

Connection Establishment Modes & Applicable Procedures

These are primarily concerned with how a Central selects which Peripheral to interact with. The following table matches several peripheral "connection" modes with applicable central "connection" procedures:

connection-modes-procedures.png

Undirected-Connectable Mode

A peripheral is automatically in this "connection mode" when operating in "General-Discoverable" mode as discussed above. It is sending ADV_IND packets (which are promiscuous), and looking for a connection with any peer ("Undirected").

General Connection Establishment Procedure

This is most commonly a 2-step procedure, which has the Central:

Step 1. Accept all ADV_IND packets, and filter on data found in the packet's payload, such as:

  • Local Name
  • Service UUID
  • Custom Data
  • etc.

This step produces the MAC address of the desired Peripheral to connect with.

Step 2. Stop scanning, and connect to that device using the Direct Connection Establishment procedure:

  • Initiate a connection to a single device using its MAC address
    • Uses CONNECT_REQ "Initiating PDU" advertising packet

During the Direct Connection Establishment Procedure, the Central's Link Layer is not aware whether the Peripheral device is available or connectable. Therefore, it should only be triggered upon reception of advertising packets, as discussed above.

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.