Android 查看藍牙hci日志


最近在調試android連接ble設備,需要查看hci日志。記錄一下方法。

1. 開發者選項->啟用藍牙HCI信息收集日志。

2. android 8版本,默認位置/data/misc/bluetooth/logs

/data/misc/bluetooth/logs # ls -l
total 3904
-rw-rw-r-- 1 bluetooth bluetooth      16 2019-04-25 17:27 btsnoop_hci.log
-rw-rw-r-- 1 bluetooth bluetooth      16 2019-04-25 17:27 btsnoop_hci.log.last
-rw-rw-r-- 1 bluetooth bluetooth 2755648 2019-04-25 18:16 hci_snoop20190425172740.cfa
-rw-rw-r-- 1 bluetooth bluetooth 1221959 2019-04-25 18:21 hci_snoop20190425173638.cfa

3. android 7, 默認位置 /sdcard/

4. 配置hci路徑:
cat /etc/bluetooth/bt_statck.conf
# BtSnoop log output file
BtSnoopFileName=/sdcard/btsnoop_hci.log

5. 用wireshark等工具打開即可。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM