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等工具打开即可。

转载于:https://www.cnblogs.com/helloworldtoyou/p/10770839.html

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值