BLE Advertising and Data Packet Formats
Advertisement
This document describes the Bluetooth Low Energy (BLE) packet formats, specifically the BLE advertising packet format and the BLE data packet format, as defined by BLE specifications v4.2 and v5.1.
Introduction
Bluetooth is a standard defined by the Bluetooth SIG (Special Interest Group). This technology enables wireless communication between devices such as mobile phones, tablets, laptops, PDAs, printers, and digital cameras. Bluetooth provides secure connections using the 2.4 GHz ISM frequency band.
BLE Packet Format (v4.2)
- Bluetooth Low Energy (BLE) protocol architecture includes a link layer that defines packet formats for both advertising and data channels.
- The BLE packet format illustrated in the figure above is specified in Bluetooth Low Energy specification document v4.2, Vol.6, Part B, Sec.2.1.
The BLE packet format consists of the following fields:
Preamble
Used by the receiver for synchronization (time and frequency) and to perform AGC (Automatic Gain Control). It’s a predefined 1-byte pattern known to the receiver.
- Advertising Packets: Use “10101010” in binary.
- Data Packets: Use either “10101010” (if the LSB of the access address is 0) or “01010101” (if the LSB of the access address is 1) in binary form.
Access Address
- Advertising Packets: Use a fixed pattern “0x8E89BED6” in hexadecimal form (4 octets or 32 bits).
- Data Packets: Consists of a 32-bit random value generated by the BLE device in the “initiating state.” This same value is used in a “connection request (CONNECT_REQ)” message.
PDU (Protocol Data Unit)
Contains either an “advertising channel PDU” or a “data channel PDU,” as defined in the BLE specification.
CRC (Cyclic Redundancy Check)
A 24-bit field calculated over the PDU. It’s used for error detection within the packet. The CRC is calculated using a polynomial of the form x24 + x10 + x9 + x6 + x4 + x3 + x + 1.
BLE Advertising Packet
Advertising channel PDUs serve the following purposes:
- Broadcasting data.
- Discovering slaves to connect with them.
- Different types of advertising PDUs exist, each with different payload formats and functions:
- Advertising PDUs: (ADV_IND, ADV_DIRECT_IND, ADV_NONCONN_IND, ADV_SCAN_IND)
- Scanning PDUs: (SCAN_REQ, SCAN_RSP)
- Initiating PDUs: (CONNECT_REQ)
BLE Data Packet
- Facilitates the transmission and reception of data between BLE devices after a connection has been established.
- Data channel PDUs are exchanged during scheduled “connection events.”
- The maximum data payload is 246 bytes, after deducting the header, MIC (Message Integrity Check), and other useful information carried by the data channel PDU.
BLE Packet Format (v5.1)
The BLE packet format shown in the figure is specified in Bluetooth Low Energy specification document v5.1, Vol.6, Part B, Sec.2.1.
BLE Advertising Packet (v5.1)
The figure above depicts the BLE advertising packet format as per the v5.1 document. For more detailed information, refer to the Bluetooth Core Specification V5.1.
BLE Data Packet (v5.1)
The figure above depicts the BLE data packet format as per the v5.1 document. For more detailed information, refer to the Bluetooth Core Specification V5.1.
References
- BLUETOOTH CORE SPECIFICATION Version 5.1
- Previous versions of Bluetooth 5.0 or Bluetooth Low Energy (BLE)