BLE and GAP
Last updated
Last updated
GAP defines a base profile which all Bluetooth devices implement, which ties all the various layers together to form the basic requirements for a Bluetooth device.
GAP also defines generic procedures for connection-related services:
Device Discovery.
Link Establishment.
Link Management.
Link Termination.
Initiation of security features.
The GAP layer works in one of four profile roles:
Broadcaster: an advertiser that is non-connectable.
Observer: scans for advertisements, but cannot initiate connections.
Peripheral: an advertiser that is connectable and can operate as a slave in a single link layer connection.
Central: scans for advertisements and initiates connections; operates as a master in a single or multiple link layer connections.
GAP supports three different discoverable modes:
Non-discoverable Mode: No advertisements.
Limited Discoverable Mode: Device advertises for a limited amount of time before returning to the standby state.
General Discoverable Mode: Devices Advertises continuously.
GAP manages the data that is sent out in advertisement and scan response packets.
Pairing can be initiated by either the central or peripheral device.
The two devices generate and exchange short-term keys (STK) which can be used to decrypt data packets.
Either device can request to enable “bonding” to create a long- term relationship between the two devices.
A long-term key (LTK) is generated, exchanged, and stored allowing device to re-encrypt the link quickly upon re-connection, without going through the complete pairing process once again.
Profile / Service configuration data is remembered, so that the user does not need to re-configure the device every time they re- connect.
Each device also states its input/output capabilities from among these options:
DisplayOnly – no way user can input anything into device, but it can output data.
DisplayYesNo – user can input “yes” or “no” but nothing else; can also display data.
KeyboardOnly – user can input a password or PIN, but no display.
NoInputNoOutput – device has no means for user input, and has no display.
KeyboardDisplay – device has a means for display as well as for input.