![蓝牙连接然后断开连接 20.04 LTS](https://linux22.com/image/1018928/%E8%93%9D%E7%89%99%E8%BF%9E%E6%8E%A5%E7%84%B6%E5%90%8E%E6%96%AD%E5%BC%80%E8%BF%9E%E6%8E%A5%2020.04%20LTS.png)
在 Ubuntu 20.04 上,我尝试使用 bluetoothctl 来打开和关闭设备,以及使用 rfkill。设备尝试连接,几秒钟后“成功”,然后遇到错误。
[CHG] Device 00:6A:8E:17:14:76 RSSI: -46
...
[bluetooth]# connect 00:6A:8E:17:14:76
Attempting to connect to 00:6A:8E:17:14:76
...
[CHG] Device 00:6A:8E:17:14:76 Connected: yes
...
[CHG] Device 00:6A:8E:17:14:76 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device 00:6A:8E:17:14:76 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device 00:6A:8E:17:14:76 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
[CHG] Device 00:6A:8E:17:14:76 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device 00:6A:8E:17:14:76 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device 00:6A:8E:17:14:76 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 00:6A:8E:17:14:76 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 00:6A:8E:17:14:76 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 00:6A:8E:17:14:76 ServicesResolved: yes
Failed to connect: org.bluez.Error.Failed
(手动删除了它检测到但不是我的所有设备,00:6A:8E:17:14:76)它声称已连接,我的耳机发出哔哔声,然后它一次打印所有 UUID 并因某些错误而失败。(之前耳机工作时会以不同的音调发出两声哔哔声)
我在 18.04 中遇到了这个问题,我升级到 20.04 后似乎可以正常工作,但最终它又停止工作了。多次重置、rfkill、bluetoothctl 等均无效。卸载然后重新安装 bluez 也无效。除了这个之外,我还希望得到其他故障排除说明。谢谢!
$ dmesg | grep -i blue
[ 1.910005] usb 1-4: Product: Bluetooth Radio
[ 27.667675] Bluetooth: Core ver 2.22
[ 27.667697] Bluetooth: HCI device and connection manager initialized
[ 27.667699] Bluetooth: HCI socket layer initialized
[ 27.667701] Bluetooth: L2CAP socket layer initialized
[ 27.667703] Bluetooth: SCO socket layer initialized
[ 28.131838] Bluetooth: hci0: RTL: examining hci_ver=06 hci_rev=000b lmp_ver=06 lmp_subver=8723
[ 28.132853] Bluetooth: hci0: RTL: rom_version status=0 version=1
[ 28.132854] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723b_fw.bin
[ 28.188011] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723b_config.bin
[ 28.188029] bluetooth hci0: Direct firmware load for rtl_bt/rtl8723b_config.bin failed with error -2
[ 28.188033] Bluetooth: hci0: RTL: cfg_sz -2, total sz 22496
[ 28.989897] Bluetooth: hci0: RTL: fw version 0x0e2f9f73
[ 49.341932] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 49.341934] Bluetooth: BNEP filters: protocol multicast
[ 49.351432] Bluetooth: BNEP socket layer initialized
[ 139.520622] Bluetooth: RFCOMM TTY layer initialized
[ 139.520628] Bluetooth: RFCOMM socket layer initialized
[ 139.520633] Bluetooth: RFCOMM ver 1.11
[ 1629.988518] Bluetooth: hci0: HCI reset during shutdown failed
此命令显示我有一个 realtek 8723 蓝牙适配器,内核版本 5.4.0-40-generic