1. 安装抓取蓝牙HCI日志工具
sudo apt-get install bluez-hcidump
2. 设置bluetoothd为debug,方便查看日志
打开/etc/systemd/system/bluetooth.target.wants/bluetooth.server
如下图截图中,截取的这一行加上-d 如:ExecStart=/usr/lib/bluetooth/bluetoothd -d
systemctl restart bluetooth.service
3. 运行工具抓取日志
sudo hcidump -w /tmp/sony1.log
sudo journalctl -f /usr/lib/bluetooth/bluetoothd > /tmp/sony.txt