Android在连接BLE设备的时候,遇到连接没多久就自动断开的情况。通过HCI来分析一下。
BLE设备发送连接参数更新请求
390915:53:01.224737TexasIns_f0:d3:41 (Hon-RFID3)HandHeld_e0:e5:4f (EDA)L2CAP21Rcvd Connection Parameter Update Request
回复BLE发送过来的请求
391015:53:01.225744HandHeld_e0:e5:4f (EDA)TexasIns_f0:d3:41 (Hon-RFID3)L2CAP15Sent Connection Parameter Update Response (Accepted)
发送连接更新请求,host通过hci发给controller
391115:53:01.227044hostcontrollerHCI_CMD18Sent LE Connection Update
更新参数操作执行成功。controller发给host。这条命令之后,协议栈会发送命令给出去,给对面的BLE设备。
396315:53:01.566723controllerhostHCI_EVT13Rcvd LE Meta (LE Connection Update Complete)
这边在等待BLE设备的回复,等待超时了。后面就断开。
541015:53:12.491452controllerhostHCI_EVT7Rcvd Disconnect Complete
最后一个帧的内容,显示连接超时。
Frame 5410: 7 bytes on wire (56 bits), 7 bytes captured (56 bits)
Encapsulation type: Bluetooth H4 with linux header (99)
Arrival Time: Apr 25, 2019 23:53:12.491452000 China Standard Time
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1556207592.491452000 seconds
[Time delta from previous captured frame: 0.001655000 seconds]
[Time delta from previous displayed frame: 0.001655000 seconds]