这是我在 bluetoothctl 中看到的内容:
[bluetooth]# pair 11:21:EC:00:00:02
Attempting to pair with 11:21:EC:00:00:02
Failed to pair: org.bluez.Error.AlreadyExists
[bluetooth]# trust 11:21:EC:00:00:02
Changing 11:21:EC:00:00:02 trust succeeded
[bluetooth]# connect 11:21:EC:00:00:02
Attempting to connect to 11:21:EC:00:00:02
[CHG] Device 11:21:EC:00:00:02 Connected: yes
Failed to connect: org.bluez.Error.Failed br-connection-create-socket
[CHG] Device 11:21:EC:00:00:02 Connected: no
鼠标昨天还可以用,今天却不能用了。
如果我多次关闭并打开鼠标(当 bluetoothctl 正在运行时),那么我会看到以下内容:
[CHG] Device 11:21:EC:00:00:02 Connected: yes
[CHG] Device 11:21:EC:00:00:02 Connected: no
[CHG] Device 11:21:EC:00:00:02 Connected: yes
[CHG] Device 11:21:EC:00:00:02 Connected: no
[CHG] Device 11:21:EC:00:00:02 Connected: yes
[CHG] Device 11:21:EC:00:00:02 Connected: no
[CHG] Device 11:21:EC:00:00:02 Connected: yes
[CHG] Device 11:21:EC:00:00:02 Connected: no
[bluetooth]#
因此,它首先连接,然后立即断开连接。
如果我尝试手动连接(通过从 bluetoothctl 输入“连接 MAC”),那么我会在 syslog 中看到以下内容:
Sep 26 10:15:53 vivobook-linux bluetoothd[7134]: profiles/input/device.c:ioctl_is_connected() Can't get HIDP connection info
Sep 26 10:15:59 vivobook-linux bluetoothd[7134]: profiles/input/device.c:control_connect_cb() connect to 11:21:EC:00:00:02: Host is down (112)
说是主机宕机了,但实际上并没有宕机。
如果我将鼠标置于配对模式也无济于事。
更新以下是 btmon 的输出:
$ sudo btmon -w pair.bts
Bluetooth monitor ver 5.64
= Note: Linux version 6.2.0-33-generic (x86_64) 0.286424
= Note: Bluetooth subsystem version 2.22 0.286427
= New Index: AC:12:03:3C:0C:CA (Primary,USB,hci0) [hci0] 0.286430
= Open Index: AC:12:03:3C:0C:CA [hci0] 0.286431
= Index Info: AC:12:03:3C:0C:CA (Intel Corp.) [hci0] 0.286434
@ MGMT Open: bluetoothd (privileged) version 1.22 {0x0001} 0.286436
= bluetoothd: profiles/input/device.c:ioctl_is_connected() Can't get HIDP connection info 20.303463
< HCI Command: Create Connection (0x01|0x0005) plen 13 #1 [hci0] 20.303511
Address: 11:21:EC:00:00:02 (OUI 11-21-EC)
Packet type: 0xcc18
DM1 may be used
DH1 may be used
DM3 may be used
DH3 may be used
DM5 may be used
DH5 may be used
Page scan repetition mode: R2 (0x02)
Page scan mode: Mandatory (0x00)
Clock offset: 0x0000
Role switch: Allow peripheral (0x01)
> HCI Event: Command Status (0x0f) plen 4 #2 [hci0] 20.428572
Create Connection (0x01|0x0005) ncmd 1
Status: Success (0x00)
> HCI Event: Connect Complete (0x03) plen 11 #3 [hci0] 25.645679
Status: Page Timeout (0x04)
Handle: 65535
Address: 11:21:EC:00:00:02 (OUI 11-21-EC)
Link type: ACL (0x01)
Encryption: Disabled (0x00)
@ MGMT Event: Connect Failed (0x000d) plen 8 {0x0001} [hci0] 25.645771
BR/EDR Address: 11:21:EC:00:00:02 (OUI 11-21-EC)
Status: Connect Failed (0x04)
= bluetoothd: profiles/input/device.c:control_connect_cb() connect to 11:21:EC:00:00:02: Host is down (112) 25.646297
答案1
最后我可以让它以这种方式工作
- 删除 11:21:EC:00:00:02
- 关掉鼠标
- 再次打开鼠标,进入配对模式
- 蓝牙扫描
- 信任 11:21:EC:00:00:02
- 对 11:21:EC:00:00:02
- 连接 11:21:EC:00:00:02
我不知道为什么,但我不得不完全移除该设备并再次添加。但不起作用。