我正在尝试将G7BTS蓝牙遥控器/键盘连接到运行 OSMC Linux(版本 5.15.92)的 Raspberry Pi 4B。设备似乎已连接,但未检测到输入。
这是我所做的:
我使用连接bluetoothctl
[bluetooth]# scan on
<....>
[NEW] Device XX:XX:XX:XX:XX:XX G7BTS
[bluetooth]# pair XX:XX:XX:XX:XX:XX
[G7BTS]# trust XX:XX:XX:XX:XX:XX
[CHG] Device XX:XX:XX:XX:XX:X Trusted: yes
Changing XX:XX:XX:XX:XX:X trust succeeded
[G7BTS]# connect XX:XX:XX:XX:XX:XX Attempting to connect to 36:36:05:E1:BE:42
Connection successful
我检查了输入设备
该设备未显示在 /dev/input/ 或 /proc/bus/input/devices 下。仅列出了我的其他 Logitech 外围设备。
osmc@osmc:~$ ls /dev/input/
by-id by-path event0 event1 mice mouse0
osmc@osmc:~$ ls /dev/input/by-id/
usb-Logitech_USB_Receiver-if01-event-kbd usb-Logitech_USB_Receiver-if01-event-mouse usb-Logitech_USB_Receiver-if01-mouse
我也没有看到该设备/proc/bus/input/devices
(列出了其他 Logitech 设备)
到目前为止我已经尝试过:
- 已安装 BlueZ 包
sudo apt-get install bluetooth bluez bluez-tools
- 已加载的 HID 模块:
sudo modprobe hidp
sudo modprobe hid
- 暂时禁用 ERTM
sudo bash -c 'echo 1 > /sys/module/bluetooth/parameters/disable_ertm'
- 在我的电脑上测试了遥控器(没有问题)
- 更新了系统
- 在 Pi 上测试了蓝牙鼠标
- 移除了罗技外设
- 使用另一个 USB 蓝牙适配器
- 重新启动系统(多次)
附加信息
蓝牙设备信息:
[G7BTS]# show Controller B8:27:EB:01:F0:6F (public) Name: osmc Alias: osmc Class: 0x000c0000
Powered: yes
Discoverable: no
DiscoverableTimeout: 0x000000b4
Pairable: yes
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1D6Bp0246d053E
Discovering: no
Roles: central
Roles: peripheral
Advertising Features:
ActiveInstances: 0x00 (0)
SupportedInstances: 0x05 (5)
SupportedIncludes: tx-power
SupportedIncludes: appearance
SupportedIncludes: local-name
[G7BTS]# info XX:XX:XX:XX:XX:XX
Device XX:XX:XX:XX:XX:XX (public)
Name: G7BTS
Alias: G7BTS
Appearance: 0x03c1
Icon: input-keyboard
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
sudo journalctl -u bluetooth
:
-- Journal begins at Tue 2024-11-05 20:20:18 CET, ends at Tue 2024-11-05 21:48:32 CET. --
Nov 05 20:20:20 osmc systemd[1]: Starting Bluetooth service...
Nov 05 20:20:20 osmc bluetoothd[461]: Bluetooth daemon 5.62
Nov 05 20:20:20 osmc systemd[1]: Started Bluetooth service.
Nov 05 20:20:20 osmc bluetoothd[461]: Starting SDP server
Nov 05 20:20:20 osmc bluetoothd[461]: Bluetooth management interface 1.21 initialized
Nov 05 20:20:20 osmc bluetoothd[461]: profiles/audio/avctp.c:avctp_server_socket() setsockopt(L2CAP_OPTIONS): Invalid argument (22)
Nov 05 20:20:20 osmc bluetoothd[461]: Endpoint registered: sender=:1.8 path=/org/bluez/hci0/A2DP/AAC/Source/1
Nov 05 20:20:20 osmc bluetoothd[461]: Endpoint registered: sender=:1.8 path=/org/bluez/hci0/A2DP/AAC/Source/2
Nov 05 20:20:20 osmc bluetoothd[461]: Endpoint registered: sender=:1.8 path=/org/bluez/hci0/A2DP/AAC/Sink/1
Nov 05 20:20:20 osmc bluetoothd[461]: Endpoint registered: sender=:1.8 path=/org/bluez/hci0/A2DP/AAC/Sink/2
Nov 05 20:20:20 osmc bluetoothd[461]: Endpoint registered: sender=:1.8 path=/org/bluez/hci0/A2DP/SBC/Source/1
Nov 05 20:20:20 osmc bluetoothd[461]: Endpoint registered: sender=:1.8 path=/org/bluez/hci0/A2DP/SBC/Source/2
Nov 05 20:20:20 osmc bluetoothd[461]: Endpoint registered: sender=:1.8 path=/org/bluez/hci0/A2DP/SBC/Sink/1
Nov 05 20:20:20 osmc bluetoothd[461]: Endpoint registered: sender=:1.8 path=/org/bluez/hci0/A2DP/SBC/Sink/2
Nov 05 20:21:06 osmc bluetoothd[461]: src/device.c:load_gatt_db() No cache for XX:XX:XX:XX:XX:XX
Nov 05 21:08:04 osmc bluetoothd[461]: src/device.c:search_cb() XX:XX:XX:XX:XX:XX: error updating services: Host is down (112)
Nov 05 21:13:21 osmc bluetoothd[461]: src/device.c:load_gatt_db() No cache for XX:XX:XX:XX:XX:XX
osmc@osmc:~$ sudo journalctl -u bluetoothctl
-- Journal begins at Tue 2024-11-05 20:20:18 CET, ends at Tue 2024-11-05 21:51:29 CET. --
为什么我的 G7BTS 蓝牙键盘无法识别为输入设备?是否有其他步骤可以使其工作?我可以强制将其变为 HID 设备吗?
提前谢谢您,我们将非常感谢您的帮助。
升级 BlueZ 解决了该问题
升级到较新版本的 bluez 后,问题已得到解决。Apt 的版本是,从kernel.org
5.64
切换到 后,问题已得到解决。5.79
构建和安装新版本 BlueZ 的步骤
如果尚不存在则构建工具
然后重启系统并尝试连接键盘。就我而言,一切运行正常。