无法连接到蓝牙设备(org.bluez.Error.ConnectionAttemptFailed)

无法连接到蓝牙设备(org.bluez.Error.ConnectionAttemptFailed)

我无法连接*蓝牙设备。扫描将在几分钟后找到我的设备,但配对将失败。使用设置 GUI 时,它会将我的设备显示为“未设置”。单击它会显示一个旋转的轮子一分钟,之后它将返回到“未设置”。

使用 bluetoothctl,当尝试配对设备时,出现“org.bluez.Error.ConnectionAttemptFailed”

尝试将几种不同的蓝牙设备(耳机、扬声器、手机)与计算机配对时发生这种情况。

当前运行的是 Ubuntu 20.04(从 18.04 升级而来),内核为 5.4.0-37-generic

我在这台计算机上运行 18.04 时遇到了同样的问题,同时使用 20.04 live-USB 也排除了我可能对默认值所做的任何更改。

我的蓝牙设备是: 03:00.0 Network controller: Intel Corporation Dual Band Wireless-AC 3168NGW [Stone Peak] (rev 10)

user@computer:~$ dmesg | grep -i blue
[   21.690128] Bluetooth: Core ver 2.22
[   21.690138] Bluetooth: HCI device and connection manager initialized
[   21.690141] Bluetooth: HCI socket layer initialized
[   21.690142] Bluetooth: L2CAP socket layer initialized
[   21.690147] Bluetooth: SCO socket layer initialized
[   21.755854] Bluetooth: hci0: read Intel version: 370810225019140f00
[   21.758971] Bluetooth: hci0: Intel Bluetooth firmware file: intel/ibt-hw-37.8.10-fw-22.50.19.14.f.bseq
[   22.083912] Bluetooth: hci0: Intel firmware patch completed and activated
[   23.196241] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   23.196242] Bluetooth: BNEP filters: protocol multicast
[   23.196245] Bluetooth: BNEP socket layer initialized
[   23.318920] Bluetooth: RFCOMM TTY layer initialized
[   23.318924] Bluetooth: RFCOMM socket layer initialized
[   23.318927] Bluetooth: RFCOMM ver 1.11
user@computer:~$ systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2020-06-16 10:34:31 PDT; 39min ago
       Docs: man:bluetoothd(8)
   Main PID: 1115 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 19013)
     Memory: 2.3M
     CGroup: /system.slice/bluetooth.service
             └─1115 /usr/lib/bluetooth/bluetoothd

Jun 16 10:34:30 computer systemd[1]: Starting Bluetooth service...
Jun 16 10:34:30 computer bluetoothd[1115]: Bluetooth daemon 5.53
Jun 16 10:34:31 computer bluetoothd[1115]: Starting SDP server
Jun 16 10:34:31 computer systemd[1]: Started Bluetooth service.
Jun 16 10:34:31 computer bluetoothd[1115]: Bluetooth management interface 1.14 initialized
Jun 16 10:35:35 computer bluetoothd[1115]: Endpoint registered: sender=:1.83 path=/MediaEndpoint/A2DPSink/sbc
Jun 16 10:35:35 computer bluetoothd[1115]: Endpoint registered: sender=:1.83 path=/MediaEndpoint/A2DPSource/sbc
user@computer:~$ bluetoothctl
Agent registered
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 10:F0:05:XX:XX:XX Discovering: yes
[bluetooth]# pairable on
Changing pairable on succeeded
[CHG] Device 5C:FB:7C:XX:XX:XX RSSI: -84
[CHG] Device 5C:FB:7C:XX:XX:XX TxPower: 4
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 0000110d-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 0000110f-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 00001131-0000-1000-8000-00805f9b34fb
[bluetooth]# trust 5C:FB:7C:XX:XX:XX
Changing 5C:FB:7C:XX:XX:XX trust succeeded
[bluetooth]# pair 5C:FB:7C:XX:XX:XX
Attempting to pair with 5C:FB:7C:XX:XX:XX
Failed to pair: org.bluez.Error.ConnectionAttemptFailed
[bluetooth]# exit

我将不胜感激任何帮助!

*有几次,使用 bluetoothctl 时,我能够让它简短地显示已配对并连接,但之后它会立即显示已断开连接。我目前无法复制此情况。

更新

在解决问题上仍然没有取得任何进展,但我确实听到它说它已连接到设备并立即断开连接:

user@computer:~$ bluetoothctl
Agent registered
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Device 5C:FB:7C:XX:XX:XX RSSI: -80
[CHG] Device 5C:FB:7C:XX:XX:XX RSSI: -84
[CHG] Device 5C:FB:7C:XX:XX:XX RSSI: -77
[bluetooth]# trust 5C:FB:7C:XX:XX:XX
[CHG] Device 5C:FB:7C:XX:XX:XX Trusted: yes
Changing 5C:FB:7C:XX:XX:XX trust succeeded
[bluetooth]# pair 5C:FB:7C:XX:XX:XX
Attempting to pair with 5C:FB:7C:XX:XX:XX
[CHG] Device 5C:FB:7C:XX:XX:XX Connected: yes
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:FB:7C:XX:XX:XX UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:FB:7C:XX:XX:XX ServicesResolved: yes
[CHG] Device 5C:FB:7C:XX:XX:XX Paired: yes
Pairing successful
[CHG] Device 5C:FB:7C:XX:XX:XX ServicesResolved: no
[CHG] Device 5C:FB:7C:XX:XX:XX Connected: no
[bluetooth]# 

任何有关进一步排除故障的想法都将不胜感激!

答案1

请检查以下内容:

  1. 确保该设备完全可用于新连接。
  2. 确保您已断开与所有其他设备的连接。
  3. 然后,重新启动连接的(旧设备)和蓝牙设备。

命令:

$ sudo bluetoothctl
[bluetooth]# power on
[bluetooth]# agent on
[bluetooth]# default-agent
[bluetooth]# scan on
[NEW] Device XX:XX:XX:XX:XX:XX 
[bluetooth]# scan off
[bluetooth]# trust XX:XX:XX:XX:XX:XX
[bluetooth]# pair XX:XX:XX:XX:XX:XX
Attempting to pair with XX:XX:XX:XX:XX:XX
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes

[...]

[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
Connection successful

相关内容