当前位置:网站首页>Analysis of ble packet capturing debugging information

Analysis of ble packet capturing debugging information

2022-06-26 15:11:00 jim0506

1、l2cap fragment start;l2cap fragment

Segmentation and reorganization (Fragmentation and Recombination)
Some controllers may have limited transmission capacity , And may need to L2CAP Segments create clips of different sizes . therefore ,L2CAP The lower layer may be further to L2CAP PDU Fragment and recombine , To create clips that fit the capabilities of each layer . In the transport L2CAP PDU period , Many different levels of fragmentation and reassembly can occur between two peer devices .

HCI The driver or controller can control L2CAP PDU Go into segments , To comply with the packet size limit of the host controller interface transmission scheme . This leads to HCI The packet payload carries L2CAP PDU The beginning and continuation of . Similarly , The controller can put L2CAP PDU Segment to map them to controller packets . This may cause the controller packet load to carry L2CAP PDU The beginning and continuation of .

Each layer of the protocol stack may pass different sizes of L2CAP PDU Fragmentation , And the partition size created by each layer may be different in each peer device . However ,PDU Be segmented within the stack , receive L2CAP The entity still recombines these segments to get the original L2CAP PDU.
 

2、SERVER CONFIGURATION

This function is client Used to set ATT Of , There is only one setting MTU size The program :Exchange MTU

When client Of ATT_MTU Greater than default ATT_MTU when ,client Will call Exchange MTU Application configuration ATT_MTU, This program is executed only once during the connection process ( In fact, it can also be used in connection ,Android Native CTS In the test, there are changes in the connection ATT_MTU The operation of ). stay BR/EDR physical link Don't execute Exchange MTU,MTU The interaction is L2CAP It's done

The process :

(1)client send out ATT Of Exchange MTU Request to server, Parameters Client Rx MTU Set to the maximum you can receive MTU size

(2)Server There are two possible responses , One is Exchange MTU Response and Error Response, Reply to... Under normal circumstances Exchange MTU Response, Parameters Server Rx MTU by server The maximum amount that the terminal can receive MTU size, then client and server Will take Client Rx MTU and Server Rx MTU The smallest value in is taken as ATT_MTU. Reply in case of abnormality Error Response,error code The reason for the failure will be set , If Error Code by Request Not Supported, be client and server Will use default MTU

As shown in the figure below :

Client send out Exchange MTU Request, Set up Client Rx MTU=0x0200,Server reply Exchange MTU Response, Set up Server Rx MTU=0x0032,server and client City settings ATT_MTU=0x0032
 

原网站

版权声明
本文为[jim0506]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206261451123901.html