5.2.1 Overview
The GAP layer of the Bluetooth Low Energy protocol stack defines the behavior of devices performing the following actions:
- Device discovery
- Link establishment
- Link termination
- Initiation of security features
- Device configuration
For an overview of possible device states, see Figure 5-1.
The following describes the possible device states:
- Standby: the initial idle state following reset or when the Bluetooth Low Energy stack is not active
- Advertiser: The device advertises with specific data that signals it can connect to any initiating devices. This advertisement contains the device address and additional data such as the device name.
- Scanner: When receiving the advertisement, the scanning device sends a request to scan the advertiser. The advertiser responds with a scan response. This process outlines how the device discovers other devices. The scanning device reads the advertising device and determines whether or not they can connect.
- Initiator: When initiating, the initiator must specify a peer device address with which to connect. If the initiator receives an advertisement that matches the address of the peer device, the initiator will request to establish a connection with the advertising device. The initiator specifies the initial connection parameters when the connection is formed.
- Master or Slave: If the device was the advertiser , it becomes a slave after connecting. If the device was the initiator, it becomes a master after connecting.