如何调试常见 USB 蓝牙适配器的问题?

如何调试常见 USB 蓝牙适配器的问题?

我有一个 USB 蓝牙适配器。我选择了这个,因为多个网站都建议它开箱即可使用。但它根本不起作用。那么我该如何调试这个问题呢?

当我打开设置时,蓝牙被禁用。我可以点击切换按钮,它会发生变化,但没有效果。关闭设置并重新打开后,切换按钮又恢复为off

运行时我可以看到该设备lsusb

Bus 002 Device 003: ID 0a5c:5801 Broadcom Corp. BCM5880 Secure Applications Processor with fingerprint swipe sensor
Bus 002 Device 002: ID 8087:8000 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0c45:64d0 Microdia Integrated Webcam
Bus 001 Device 002: ID 8087:8008 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 006: ID 0a5c:21e8 Broadcom Corp. BCM20702A0 Bluetooth 4.0  <-- here it is!
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

但当我运行的时候hciconfig --all却没有得到任何结果。

systemctl status bluetooth.service

● bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2021-03-04 13:15:20 CET; 29min ago
       Docs: man:bluetoothd(8)
   Main PID: 241569 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 19028)
     Memory: 976.0K
     CGroup: /system.slice/bluetooth.service
             └─241569 /usr/lib/bluetooth/bluetoothd

Mär 04 13:15:20 scala bluetoothd[241569]: src/main.c:parse_controller_config() Key file does not have group “Controller”
Mär 04 13:15:20 scala bluetoothd[241569]: src/main.c:parse_controller_config() Key file does not have group “Controller”
Mär 04 13:15:20 scala bluetoothd[241569]: src/main.c:parse_controller_config() Key file does not have group “Controller”
Mär 04 13:15:20 scala bluetoothd[241569]: src/main.c:parse_controller_config() Key file does not have group “Controller”
Mär 04 13:15:20 scala bluetoothd[241569]: src/main.c:parse_controller_config() Key file does not have group “Controller”
Mär 04 13:15:20 scala bluetoothd[241569]: src/main.c:parse_controller_config() Key file does not have group “Controller”
Mär 04 13:15:20 scala bluetoothd[241569]: src/main.c:parse_controller_config() Key file does not have group “Controller”
Mär 04 13:15:20 scala systemd[1]: Started Bluetooth service.
Mär 04 13:15:20 scala bluetoothd[241569]: Starting SDP server
Mär 04 13:15:20 scala bluetoothd[241569]: Bluetooth management interface 1.17 initialized

sudo dmesg | egrep -i 'blue|firm'

[    0.119119] Spectre V2 : Enabling Restricted Speculation for firmware calls
[    0.145598] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[   66.769407] Bluetooth: Core ver 2.22
[   66.769432] Bluetooth: HCI device and connection manager initialized
[   66.769437] Bluetooth: HCI socket layer initialized
[   66.769439] Bluetooth: L2CAP socket layer initialized
[   66.769441] Bluetooth: SCO socket layer initialized
[  248.927546] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[  248.927547] Bluetooth: BNEP filters: protocol multicast
[  248.927550] Bluetooth: BNEP socket layer initialized

rfkill list

1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: brcmwl-0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
3: dell-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
4: dell-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no

附加信息:我已在 BIOS 中禁用板载戴尔蓝牙。

syslog这是我插入加密狗后看到的:

Mar  4 13:37:47 scala kernel: [ 4814.594335] usb 3-2: new full-speed USB device number 7 using xhci_hcd
Mar  4 13:37:47 scala kernel: [ 4814.745408] usb 3-2: New USB device found, idVendor=0a5c, idProduct=21e8, bcdDevice= 1.12
Mar  4 13:37:47 scala kernel: [ 4814.745410] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar  4 13:37:47 scala kernel: [ 4814.745411] usb 3-2: Product: BCM20702A0
Mar  4 13:37:47 scala kernel: [ 4814.745412] usb 3-2: Manufacturer: Broadcom Corp
Mar  4 13:37:47 scala kernel: [ 4814.745412] usb 3-2: SerialNumber: 5CF3709F4FCE
Mar  4 13:37:47 scala mtp-probe: checking bus 3, device 7: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2"
Mar  4 13:37:47 scala mtp-probe: bus: 3, device: 7 was not an MTP device
Mar  4 13:37:47 scala mtp-probe: checking bus 3, device 7: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2"
Mar  4 13:37:47 scala mtp-probe: bus: 3, device: 7 was not an MTP device
Mar  4 13:37:52 scala pcscd[330950]: 66748427 commands.c:1120:CmdPowerOff Card absent or mute
Mar  4 13:37:52 scala systemd[1]: pcscd.service: Succeeded.

下一步要检查什么?

答案1

列表中的“下一步”是查看蓝牙设备上是否存在“软阻止”。通过终端运行以下命令:

rfkill list bluetooth

你可能会看到类似这样的内容:

2: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no

如果您发现蓝牙设备被软阻止,您可以使用以下命令解决问题:

sudo rfkill unblock bluetooth

此外,您可能需要随后重新启动蓝牙服务:

sudo service bluetooth restart

只要您不介意时不时尝试一些可疑的事情,您可以尝试在设备上使用“替代固件”:

  1. 断开蓝牙设备
  2. 下载替代固件并将其放在您的/lib/firmware/brcm目录中,其名称{device model}-{manufacturer id}-{device id}.hcd格式如下:
    sudo wget https://s3.amazonaws.com/plugable/bin/fw-0a5c_21e8.hcd -O /lib/firmware/brcm/BCM20702A0-0a5c-21e8.hcd
    
     
  3. 将蓝牙设备重新插入 USB 端口
  4. (可选)重启蓝牙:
    sudo service bluetooth restart
    

解决方案来自德国 Linux Mint 论坛环顾四周看看这个解决方案的有效性,它似乎对很多人都有效。

希望这能让你轻松使用蓝牙设备

相关内容