我正在尝试通过蓝牙将 Xbox Elite 控制器连接到 Ubuntu 22.04。该控制器在除 Ubuntu 之外的所有设备上均能正常工作。按下配对按钮,它会显示在列表中,单击它,然后继续。
在 Ubuntu 上,我进入蓝牙配对菜单:
我什么也没看到。控制器从未出现在列表中。在 Ubuntu 上配对有什么技巧吗?
更新
我在journalctl
几个与蓝牙服务器故障相关的条目中看到了这些内容,但我不知道这些是什么:
Apr 12 03:55:08 linux-desktop systemd[1]: Starting Bluetooth service...
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Bluetooth daemon 5.64
Apr 12 03:55:08 linux-desktop systemd[1]: Started Bluetooth service.
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Starting SDP server
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Bluetooth management interface 1.22 initialized
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: src/adapter.c:reset_adv_monitors_complete() Failed to reset Adv Monitors: Failed (0x03)
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: profiles/audio/avctp.c:avctp_server_socket() setsockopt(L2CAP_OPTIONS): Invalid argument (22)
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Failed to clear UUIDs: Failed (0x03)
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Failed to add UUID: Failed (0x03)
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Failed to add UUID: Failed (0x03)
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Failed to add UUID: Failed (0x03)
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: src/profile.c:ext_start_servers() L2CAP server failed for Message Notification: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: src/profile.c:ext_start_servers() L2CAP server failed for Message Access: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: src/profile.c:ext_start_servers() L2CAP server failed for Phone Book Access: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: src/profile.c:ext_start_servers() L2CAP server failed for File Transfer: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: src/profile.c:ext_start_servers() L2CAP server failed for Object Push: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSink/sbc
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSource/sbc
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSink/sbc_xq_453
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSource/sbc_xq_453
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSink/sbc_xq_512
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSource/sbc_xq_512
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSink/sbc_xq_552
Apr 12 03:55:08 linux-desktop bluetoothd[1055664]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSource/sbc_xq_552
答案1
Ubuntu 的蓝牙模块肯定存在某种错误,但我能够让控制器运行。以下是我所做的。
- 打开 GUI 蓝牙窗口(这在以后很重要 - 您必须打开它)
- 使用以下方式运行蓝牙服务
systemctl start bluetooth
- Ran
bluetoothctl
后跟scan on
将启动发现扫描。这将为您提供该区域内蓝牙设备的 MAC 地址列表。它将如下所示:
[bluetooth]# scan on
Discovery started
[CHG] Controller XX:XX:XX:3E:42:06 Discovering: yes
[NEW] Device XX:XX:XX:F1:EC:53 XX:XX:XX:F1:EC:53
[NEW] Device XX:XX:XX:79:EB:18 XX:XX:XX:79:EB:18
[NEW] Device XX:XX:XX:0C:69:AD 55S450G
[NEW] Device XX:XX:XX:30:19:66 XX:XX:XX:30:19:66
[CHG] Device XX:XX:XX:0C:69:AD RSSI: -86
[CHG] Device XX:XX:XX:0C:69:AD UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
[CHG] Device XX:XX:XX:0C:69:AD UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device XX:XX:XX:0C:69:AD UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device XX:XX:XX:0C:69:AD UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device XX:XX:XX:0C:69:AD UUIDs: 00000000-0000-0000-0000-000000000000
[NEW] Device XX:XX:XX:76:ED:CD XX:XX:XX:76:ED:CD
[NEW] Device XX:XX:XX:7A:CB:27 XX:XX:XX:7A:CB:27
[NEW] Device XX:XX:XX:98:73:66 XX:XX:XX:98:73:66
[NEW] Device XX:XX:XX:86:69:72 XX:XX:XX:86:69:72
[NEW] Device XX:XX:XX:0E:C1:3A XX:XX:XX:0E:C1:3A
[NEW] Device XX:XX:XX:85:56:65 XX:XX:XX:85:56:65
[NEW] Device XX:XX:XX:25:65:DE XX:XX:XX:25:65:DE
[DEL] Device XX:XX:XX:0C:69:AD 55S450G
[DEL] Device XX:XX:XX:7A:CB:27 XX:XX:XX:7A:CB:27
[DEL] Device XX:XX:XX:F1:EC:53 XX:XX:XX:F1:EC:53
[DEL] Device XX:XX:XX:79:EB:18 XX:XX:XX:79:EB:18
[DEL] Device XX:XX:XX:98:73:66 XX:XX:XX:98:73:66
[NEW] Device XX:XX:XX:83:AB:0C XX:XX:XX:83:AB:0C
[DEL] Device XX:XX:XX:76:ED:CD XX:XX:XX:76:ED:CD
[DEL] Device XX:XX:XX:86:69:72 XX:XX:XX:86:69:72
[DEL] Device XX:XX:XX:30:19:66 XX:XX:XX:30:19:66
[CHG] Device XX:XX:XX:85:56:65 RSSI: -93
[NEW] Device XX:XX:XX:98:73:66 XX:XX:XX:98:73:66
[DEL] Device XX:XX:XX:0E:C1:3A XX:XX:XX:0E:C1:3A
[DEL] Device XX:XX:XX:25:65:DE XX:XX:XX:25:65:DE
[NEW] Device XX:XX:XX:79:EB:18 XX:XX:XX:79:EB:18
[DEL] Device XX:XX:XX:83:AB:0C XX:XX:XX:83:AB:0C
[NEW] Device XX:XX:XX:E9:66:A1 XX
- 我把所有新的 MAC 地址都转储到批量 MAC 地址标识符并找到了属于微软公司的
- 从那里我做了
trust <MAC address>
接下来connect <MAC address>
的事情:
[bluetooth]# connect A8:8C:3E:79:EB:18
Attempting to connect to A8:8C:3E:79:EB:18
[CHG] Device A8:8C:3E:79:EB:18 Connected: yes
Connection successful
[NEW] Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service0008
00001801-0000-1000-8000-00805f9b34fb
Generic Attribute Profile
[NEW] Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service0009
0000180a-0000-1000-8000-00805f9b34fb
Device Information
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service0009/char000a
00002a29-0000-1000-8000-00805f9b34fb
Manufacturer Name String
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service0009/char000c
00002a50-0000-1000-8000-00805f9b34fb
PnP ID
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service0009/char000e
00002a26-0000-1000-8000-00805f9b34fb
Firmware Revision String
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service0009/char0010
00002a25-0000-1000-8000-00805f9b34fb
Serial Number String
[NEW] Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service0012
0000180f-0000-1000-8000-00805f9b34fb
Battery Service
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service0012/char0013
00002a19-0000-1000-8000-00805f9b34fb
Battery Level
[NEW] Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service0012/char0013/desc0015
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[NEW] Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service002c
00000001-5f60-4c4f-9c83-a7953298d40d
Vendor specific
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service002c/char002d
00000002-5f60-4c4f-9c83-a7953298d40d
Vendor specific
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service002c/char002f
00000003-5f60-4c4f-9c83-a7953298d40d
Vendor specific
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service002c/char0031
00000004-5f60-4c4f-9c83-a7953298d40d
Vendor specific
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service002c/char0033
00000005-5f60-4c4f-9c83-a7953298d40d
Vendor specific
[NEW] Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service002c/char0033/desc0035
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service002c/char0036
00000006-5f60-4c4f-9c83-a7953298d40d
Vendor specific
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_A8_8C_3E_79_EB_18/service002c/char0038
00000008-5f60-4c4f-9c83-a7953298d40d
Vendor specific
[CHG] Device A8:8C:3E:79:EB:18 UUIDs: 00000001-5f60-4c4f-9c83-a7953298d40d
[CHG] Device A8:8C:3E:79:EB:18 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device A8:8C:3E:79:EB:18 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device A8:8C:3E:79:EB:18 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device A8:8C:3E:79:EB:18 UUIDs: 0000180f-0000-1000-8000-00805f9b34fb
[CHG] Device A8:8C:3E:79:EB:18 UUIDs: 00001812-0000-1000-8000-00805f9b34fb
[CHG] Device A8:8C:3E:79:EB:18 ServicesResolved: yes
[CHG] Device A8:8C:3E:79:EB:18 WakeAllowed: yes
- 我一输入
connect
命令就出现了下面的奇怪连接窗口。我点击了“允许”,之后一切正常。