The Bluetooth® Low Energy (BLE) Link Layer has only one packet format used for both advertising channel packets and data channel packets:
BLE packet Protocol Data Unit (PDU) size in specification v4.0 and v4.1 is 2-39 bytes.
Advertising Channel PDUs
Advertising channel PDUs serve two purposes:
- Broadcast data for applications that do not require a full connection
- Discover slaves and connect to them
Advertising Channel PDU Types
There are seven advertising channel PDU types, each having a different payload format and function:
- Advertising PDUs
- ADV_IND, ADV_DIRECT_IND, ADV_NONCONN_IND, ADV_SCAN_IND
- Scanning PDUs
- SCAN_REQ, SCAN_RSP
- Initiating PDUs
ADV_IND, ADV_NONCONN_IND, ADV_SCAN_IND packets are used for broadcasting data in broadcast applications (e.g., Beacons)
|ADV Packet Type||Type of Advertising Supported|
|ADV_IND||Connectable Undirected Advertising|
|ADV_DIRECT_IND||Connectable Directed Advertising|
|ADV_NONCONN_IND||Non-Connectable Undirected Advertising|
|ADV_SCAN_IND||Scannable Undirected Advertising|
This packet type supports connectable, undirected advertising and is used when a slave/peripheral device is powered up for the first time (i.e. has never connected with a master) and is looking to connect with any node (it's promiscuous). This typically represents a factory default state.
The payload consists of:
- Advertiser device address (6 bytes)
- A number of Advertisement Data Structures having the following format:
Common AD Data Types
Typically, ADV_IND packets contain the Complete Local Name (Type id 0x09) and 128-bit Service UUID (Type id 0x07).
A single 128-bit UUID consumes 16/29 of the bytes available in the ADV_IND payload. If you need to send more advertising data, consider initializing and enabling SCAN_RSP packets in your application.
This packet type supports connectable, directed advertising and would typically be used after a slave/peripheral has connected with a master/central. It is not looking to be discovered, rather, it already has the device address of its peer and wishes to re-connect quickly to a specific master/central device.
Only one Master/Central device (with matching MAC address) will receive/pass ADV_IND_DIRECT messages to its application layer.
The advertising interval is based on whether Low Duty Cycle or High Duty Cycle mode is used:
- Low Duty Cycle Directed Advertising
- The time between the start of two consecutive ADV_DIRECT_PDUs is <= 10 ms
- High Duty Cycle Directed Advertising
- The time between the start of two consecutive ADV_DIRECT_PDUs is <= 3.75 ms
The Link Layer exits this advertising state after 1.28 s. If no Central responds, the Advertiser will need to re-trigger this advertising mode.
Refer to the BLE 4.2 Specification, Vol 6, Part B, Section 126.96.36.199
The payload consists of:
The Master/Central device must be in the SCANNING state to detect ADV_DIRECT_IND advertising packets.
Data Channel PDUs
Once in a connection, devices can send data to one another. This is achieved by exchanging data channel PDUs during regularly scheduled connection events. Due to protocol overhead of the higher layers, the maximum data payload is 246 bytes as shown:
|Data Channel PDU Field ID||Full Name|
|PDU He||Data PDU Header|
|MIC||Message Integrity Check|
|L2 He||L2CAP Header|
|Op||ATT Operation Code|
|Par/Pay||ATT Parameters & Payload|
In BLE v4.0 and v4.1 the maximum ATT Parameter+Payload size is 22 bytes.