BLE channel and packet structure

 

 

1. Channel (channel)

 

For wireless communication, data is transmitted on a certain frequency, the frequency of use of the BLE is 2.4GHz, the frequency range is 2.4000 GHz - 2.4835GHz, in this context, and for the 40 channels, wherein the channel is a broadcast 37,38,39 aisle. The remaining 37 channels are data channels, as shown below:

 

Can be seen from the figure, the channel 40 is not linearly increasing distribution, broadcast channels 3 are scattered, the BLE data transmission using frequency-hopping techniques, frequency hopping is calculated to be considered to skip a broadcast channel, 3 another benefit is that there is broadcast dispersed beneficial to avoid interference.

As shown below, the broadcast channel to avoid the channel portion 802.11WIFI, which still has nine data channels and 802.11 do not coincide.

 

 

 

 

2. BLE interaction between data devices

 

BLE devices before establishing a connection between them can, for example, a broadcast transmission, and scanning by the scanning response (37,38,39 channel) interactive data broadcast channel, after the connection is established, interaction data on the data path between the BLE devices .

BLE data can be summarized as a data transmission on the data transmitted on the broadcast channels and data channels:

  • Broadcast Channel PDU: data transfer on the broadcast channel.

  • Data Channel PDU: data transmission on the data channel.

     

 

3. BLE packet structure

BLE specification only one fixed packet structure:

 

 

Each packet has four components:
  • 1-2 preamble byte preamble

  • 4-byte access address Access Address,

  • 2-257 bytes of data packets PDU,

  • A 3-byte CRC checksum PDU

 

Preamble: for synchronizing the frequency of the timing estimator and an automatic gain control (AGC) and the like, the data broadcast channel, the preamble is: 0xAA, the data channel, a preamble is 0xAA or 0x55, when the access address is the least significant bit 1, the preamble is 0x55, otherwise 0xAA.

1M PHY when it is time, preamble is a byte;

 2M PHY when it is time, preamble bytes is two;

Access Address (Access Address): for a data broadcast channel, the access address is defined as 0x8E89BED6, and the address data for the access channel, different every time the device is connected, to meet the specific needs of a certain rule, reference may Version 4.2 [Vol 6, Part B] 2.1 . Access address and Bluetooth address are two different concepts, the access address is used for synchronization, the real address is the establishment of a Bluetooth address to use when connecting. PDU: divided into two categories: broadcast type PDU (transmitted on the broadcast channel PDU) and the data type of PDU (data transmitted on the channel PDU)  CRC: is a 24-bit PDU data for verification, a CRC algorithm may be defined reference PACKET FORMAT.

4. BLE PDU classification of

BLE a PDU divided into two categories, broadcast and data PDU type PDU type, the following structure:

 

 

PDU is the first two bytes of the header, the content of the header, can expand the PDU type, analyze specific payload, unfolding in a later section, e.g., a broadcast channel PDU further expanded:

 

 

 

 

 

PDU data on the broadcast channel a total of seven types, namely 4 Advertising + 2 Scanning +1 Connect-request.

And so on, can be decomposed BLE all packets.

 

Let's look at a large BLE PDU expanded view:

 

 

 

 

Further, the PDU to be analyzed on the broadcast channel, the packet belongs to analysis which category PDU, the PDU of the type found in the data structure, and further analytical specific meaning.

 

 

 

 
 
 

 

Guess you like

Origin www.cnblogs.com/someone-device/p/12148055.html