Alpine Linux 上的蓝牙键盘/鼠标问题

Alpine Linux 上的蓝牙键盘/鼠标问题

我正在使用 Alpine Linux,并安装了以下蓝牙相关软件包:

bluez-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-btmgmt-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-btmon-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-doc-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-firmware-1.2-r1 x86_64 {bluez-firmware} (GPL-2.0-or-later) [installed]
bluez-hid2hci-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-libs-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-openrc-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-plugins-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
pipewire-spa-bluez-0.3.74-r0 x86_64 {pipewire} (LGPL-2.1-or-later) [installed]

bluetooth服务正在运行,我还可以使用命令行实用程序连接和使用我的蓝牙耳机bluetoothctl

然而,当涉及 HID 设备(键盘和鼠标)时,它们可以配对、连接和信任,但在按下按键或移动鼠标时不会创建任何输入。

具体来说,我的键盘的蓝牙连接显示:

device CE:FE:50:FA:F7:83 (random)
    Name: TEX-BLE-1
    Alias: TEX-BLE-1
    Appearance: 0x03c1 (961)
    Icon: input-keyboard
    Paired: yes
    Bonded: yes
    Trusted: yes
    Blocked: no
    Connected: yes
    LegacyPairing: no
    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)
    UUID: Battery Service           (0000180f-0000-1000-8000-00805f9b34fb)
    UUID: Human Interface Device    (00001812-0000-1000-8000-00805f9b34fb)
    Modalias: usb:v04D9p2521d0000
    Battery Percentage: 0x63 (99)

然而,按下时绝对没有按键记录。我在全新安装的 Ubuntu 上尝试了相同的键盘和鼠标,并且可以正常工作。它们的键盘还可以通过 USB-C 连接完美运行。我猜测我缺少蓝牙堆栈的软件包或特定配置选项。

答案1

经过大量的尝试和错误后,我正在浏览蓝牙指南https://wiki.alpinelinux.org/wiki/蓝牙再次发现错误。正如指南底部所述,我安装hidapi并加载了uhid内核模块。

apk add hidapi
modprobe uhid

之后我取下键盘bluetoothctl并再次配对。现在密钥注册。为了使更改永久生效,我将模块添加uhid到了/etc/modules.

现在,即使重新启动后键盘也可以工作。

相关内容