BT HCI分析神器CPAS 入门
簡介
ComProbe Protocol Analysis System (CPAS) 是Frontline提供的一款 藍牙 協(xié)議 log 分析 工具,Frontine這家公司主要是做抓取 藍牙 Air sniff log 設備
安裝
購買他們的抓包工具就會附帶log分析工具,也可以在Frontine官網(wǎng)上下載,下載的時候需要填一些信息.如果嫌麻煩掃描文章后面的二維碼 回復 cpas
問題背景
藍牙音箱開始正常,電量用完后,配對一直失敗, 提示PIN碼不正確。分析定位該問題 請來了CPAS 分析HCI日志。CPAS 使用指導
獲取HCI日志文件
本文主要MTK平臺 ,通過MTKLogger開啟保存HCI日志。
導出日志又 cfa文件
打開日志文件分析
雙擊該文件 可以在Frame Display 看到如下界面
點擊 message seq 可以看到 如下界面
問題定位分析
Android日志分析
查看logcat 搜索到關鍵log
01-20 10:07:55.403760 978 1075 V bt_stack: [VERBOSE2:btm_inq.cc(2032)] BDA 74:a3:4a:0f:e3:2b 01-20 10:07:55.403878 978 1075 V bt_stack: [VERBOSE2:btm_inq.cc(2035)] Inquire BDA 74:a3:4a:0f:e3:2b 01-20 10:07:55.403948 978 1075 V bt_stack: [VERBOSE1:btm_inq.cc(951)] BTM_InqDbRead: bd addr 74:a3:4a:0f:e3:2b 01-20 10:07:55.403981 978 1075 D bt_btm : btm_find_dev_type - device_type = 1 addr_type = 0 01-20 10:07:55.404019 978 1075 I bt_btm : btm_sec_rmt_name_request_complete 01-20 10:07:55.404041 978 1075 D bt_btm : btm_acl_resubmit_page 01-20 10:07:55.404081 978 1075 I bt_btm : btm_sec_rmt_name_request_complete PairState: GET_REM_NAME RemName: status: 19 State:0 p_dev_rec: 0x9ffc9000 01-20 10:07:55.404137 978 1075 I bt_btm : btm_sec_rmt_name_request_complete() continue bonding sm4: 0x0000, status:0x13 01-20 10:07:55.404160 978 1075 I bt_btm : btm_sec_change_pairing_state() Old: GET_REM_NAME 01-20 10:07:55.404181 978 1075 I bt_btm : btm_sec_change_pairing_state() New: IDLE pairing_flags:0x1 01-20 10:07:55.404336 978 1075 V bt_stack: [VERBOSE1:btm_inq.cc(951)] BTM_InqDbRead: bd addr 74:a3:4a:0f:e3:2b 01-20 10:07:55.404381 978 1075 D bt_btm : btm_find_dev_type - device_type = 1 addr_type = 0 01-20 10:07:55.404414 978 1075 D bt_btif : btif_transfer_context event 3, len 280 01-20 10:07:55.404527 978 1018 D bt_btif : btif task fetched event a001 01-20 10:07:55.404553 978 1018 D bt_btif : btif_context_switched 01-20 10:07:55.404574 978 1018 I bt_btif : btif_dm_upstreams_evt: ev: BTA_DM_AUTH_CMPL_EVT 01-20 10:07:55.404596 978 1018 D bt_btif : btif_dm_auth_cmpl_evt: bond state=1, success=0, key_present=0 01-20 10:07:55.404619 978 1018 D bt_btif : btif_dm_auth_cmpl_evt() Authentication fail reason 19關鍵: Authentication fail reason 19 ,PairState: GET_REM_NAME ,bd addr 74:a3:4a:0f:e3:2b
HCI 分析定位
根據(jù)這些信息,配對是鏈路層的行為 即在HCI中搜索
進行搜索
一目了然,看到對端主動 斷開連接。
對比驗證
連接其他音箱進行對比
JBL
總結
研發(fā)過程中,善于找到工具,利用工具定位 分析問題,提升效率。同時可以用工具加深知識點,進行歸納整理。
參考
https://blog.csdn.net/ylangeia/article/details/108400659
https://cloud.tencent.com/developer/article/1689586
下載 掃碼,回復"cpas" 獲取百度盤鏈接
總結
以上是生活随笔為你收集整理的BT HCI分析神器CPAS 入门的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: s3cmd用法总结
- 下一篇: 低压差线性稳压器(LDO)设计与仿真