蓝牙中数据包传输的大小的定义 BLE PACKET FORMAT

SYD8801是一款低功耗高性能蓝牙低功耗SOC,集成了高性能2.4GHz射频收发机、32位ARM Cortex-M0处理器、128kB Flash存储器、以及丰富的数字接口。SYD8801片上集成了Balun无需阻抗匹配网络、高效率DCDC降压转换器,适合用于可穿戴、物联网设备等。具体可咨询:http://www.sydtek.com/

蓝牙数据包大小的请教

    在4.0蓝牙规范的《2 AIR INTERFACE PACKETS》这一节中定义BLE蓝牙链路层数据包的结构,如下:

蓝牙中数据包传输的大小的定义 BLE PACKET FORMAT_第1张图片

     规定了PUD的大小最大是39个byte,这里分析数据通道的PUD大小,我们看看如下定义:

蓝牙中数据包传输的大小的定义 BLE PACKET FORMAT_第2张图片

       而下面关于payload的长度 Length有如下解释:

         也就说明payload长度最大是27个byte!

          再后来在来l2cap的定义如下:

蓝牙中数据包传输的大小的定义 BLE PACKET FORMAT_第3张图片

              这里再减去4个字节,所以真正上层的数据大小只有23个字节!

               而对于notified,att中定义如下:

蓝牙中数据包传输的大小的定义 BLE PACKET FORMAT_第4张图片

                  这里再减去3个字节,所以对于notify真正有效的数据大小就是20个byte

 

                 这里上传上蓝牙4.0规范:http://download.csdn.net/detail/chengdong1314/9780390

 

BLE PACKET FORMAT

 

BLE PACKET FORMAT

蓝牙中数据包传输的大小的定义 BLE PACKET FORMAT_第5张图片

Preamble

Advertising channel packetsshall have 10101010b as the preamble.

The data channel packetpreambleis either 10101010b or 01010101b, depending on the LSB of the AccessAddress. If the LSB of the Access Address is 1, the preamble shall be01010101b,otherwise the preamble shall be 10101010b.

AccessAddress

The Access Address for all advertising channel packets shall be 0x8E89BED6.

The Access Address in data channel packets shall be different foreach Link Layer connection between any two devices with certain restrictionsasdefined .

ADVERTISINGCHANNEL PDU

蓝牙中数据包传输的大小的定义 BLE PACKET FORMAT_第6张图片

Header field

蓝牙中数据包传输的大小的定义 BLE PACKET FORMAT_第7张图片

 

PDU Type

蓝牙中数据包传输的大小的定义 BLE PACKET FORMAT_第8张图片

 

 

TxAdd andRxAdd

The TxAdd and RxAdd fields of the advertising channel PDU that arecontained in the header contain information specific to the PDU type definedfor each advertising channel PDU separately. If the TxAdd orRxAdd fields arenot defined as used in a given PDU then they shall be considered Reserved for FutureUse.

DATA CHANNEL PDU

蓝牙中数据包传输的大小的定义 BLE PACKET FORMAT_第9张图片蓝牙中数据包传输的大小的定义 BLE PACKET FORMAT_第10张图片蓝牙中数据包传输的大小的定义 BLE PACKET FORMAT_第11张图片蓝牙中数据包传输的大小的定义 BLE PACKET FORMAT_第12张图片

 

 

 

 

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(蓝牙知识)