我正在使用 Ubuntu 20.04.1,并且正在尝试通过蓝牙配对我的 MX Keys 键盘。
我使用蓝牙控制面板启动该过程,然后就卡在这个窗口中。
即使我输入了正确的 PIN 并按下 ENTER,该过程仍未完成。事实上,它卡在了该模式,PIN 窗口无法关闭。
我也尝试过使用“Blueman”,结果也类似。我启动“设置”过程,最后得到的结果如下。
我也尝试过bluetoothctl
➜ bluetoothctl connect CB:DD:B4:5C:4E:E3
Attempting to connect to CB:DD:B4:5C:4E:E3
[CHG] Device CB:DD:B4:5C:4E:E3 Connected: yes
Connection successful
~ took 8s
➜ bluetoothctl trust CB:DD:B4:5C:4E:E3
[CHG] Device CB:DD:B4:5C:4E:E3 Trusted: yes
Changing CB:DD:B4:5C:4E:E3 trust succeeded
~
➜ bluetoothctl pair CB:DD:B4:5C:4E:E3
Attempting to pair with CB:DD:B4:5C:4E:E3
[CHG] Device CB:DD:B4:5C:4E:E3 ServicesResolved: yes
[CHG] Device CB:DD:B4:5C:4E:E3 ServicesResolved: no
[CHG] Device CB:DD:B4:5C:4E:E3 Connected: no
Failed to pair: org.bluez.Error.AuthenticationCanceled
~ took 30s
怎样才能让它发挥作用呢?
更新
我设法通过bluetoothctl
重置 PC 上的蓝牙获取 PIN 码,但即使我输入 PIN 码,身份验证也会失败。就好像它忽略了我输入的内容一样……
[bluetooth]# pair CB:DD:B4:5C:4E:E3
Attempting to pair with CB:DD:B4:5C:4E:E3
[CHG] Device CB:DD:B4:5C:4E:E3 Connected: yes
[agent] Passkey: 610148
[CHG] Device CB:DD:B4:5C:4E:E3 Connected: no
Failed to pair: org.bluez.Error.AuthenticationCanceled
答案1
这就是我在 Xubuntu(Ubuntu 20.04.3 LTS)上的 Logitech MX Keys Mini 所做的事情。
打开终端并运行以下命令:
bluetoothctl
power off
power on
agent KeyboardOnly
default-agent
pairable on
scan on
pair <mac address>
## the passkey will be printed, enter it on your keyboard ##
trust <mac address>
connect <mac address>
quit
答案2
我在使用联想键盘时也遇到了同样的问题。基本上我可以输入密码,但按回车键后什么也没发生。
$bluetoothctl
[bluetooth]# agent KeyboardDisplay
[bluetooth]# default-agent
[bluetooth]# scan on
[bluetooth]# pair <MAC-address>
Attempting to pair with <MAC-address>
[CHG] Device <MAC-address> Connected: yes
[agent] Passkey: xxxxxx
[agent] Passkey: xxxxx
[agent] Passkey: xxxx
[agent] Passkey: xxx
[agent] Passkey: xx
[agent] Passkey: x
[agent] Passkey:
[CHG] Device <MAC-address> Modalias: usb:<ALIAS>
[CHG] Device <MAC-address> UUIDs: <UUID>
[CHG] Device <MAC-address> ServicesResolved: yes
[CHG] Device <MAC-address> Paired: yes
Pairing successful
[CHG] Device <MAC-address> ServicesResolved: no
[CHG] Device <MAC-address> Connected: no
[CHG] Device <MAC-address> Class: 0x00000540
[CHG] Device <MAC-address> Icon: input-keyboard
[CHG] Device <MAC-address> Connected: yes
Authorize service
[agent] Authorize service <UUID> (yes/no): yes
看起来最后一步[agent] Authorize service
没有显示在 GUI 中
答案3
我修复了这个问题,安装了一些缺失的固件。我所要做的就是运行以下命令:
cd /lib/firmware/brcm && sudo wget https://github.com/winterheart/broadcom-bt-firmware/raw/master/brcm/BCM20702A1-0a5c-21e8.hcd
拔下并重新插入我的蓝牙适配器
答案4
就我而言,问题是我关闭了低功耗蓝牙 (LE),键盘没有出现在我的蓝牙设备搜索中。运行此程序解决了这个问题
sudo btmgmt le on
键盘出现在设备列表中,之后我可以成功配对。
积分归因于这个答案。