蓝牙Broadcom 43142无法正常工作

蓝牙已开启但无法找到或被任何其他设备找到。

输出sudo service bluetooth status

 ● bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: active (running) since ხუთ 2015-06-04 22:33:18 GET; 13min ago Main PID: 26678 (bluetoothd) CGroup: /system.slice/bluetooth.service └─26678 /usr/sbin/bluetoothd -n ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled 

输出lsusb

 Bus 003 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0 

我该如何解决?

您需要安装固件。

Broadcom许可证不允许分发Broadcom固件。 所以你需要自己去做。 这有点复杂,但没有其他合法的方式。

  1. 下载Broadcom Windows 8驱动程序或FROM HERE 。

如果您的设备未在这些驱动程序中列出,则需要在某处找到它的较新版本。 Broadcom从其网站上删除了最新的驱动程序,使其更加困难。

一些笔记本电脑厂商在他们的网站上有蓝牙驱动程序,但其中一些并不是无法解决的。 所以这是一些任务。 我可以从他们的网站下载最新的Broadcom驱动程序,但它已经没有了。

  1. 由Archive Manager打开此文件,然后在那里找到bcbtums-win8x86-brcm.inf文件。 某些驱动程序中的文件名可能有所不同。 它可以是位于Win32或Win64目录下的bcbtums.inf 。 下载32或64位无关紧要。
  2. 在此文件中搜索VID_ 0A5C和PID_ 21D7 。 这些数字来自您的lsusb输出

    0a5c:21d7 Broadcom Corp. BCM43142蓝牙4.0。

评论:某些设备在lsusb中未被识别为Broadcom BT。 如果您不确定哪个是您的BT设备,请运行usb-devices命令,它将提供更详细的信息。 在那里,您可以找到产品和供应商ID。

你会看到一些以RAMUSB21D7结尾的

在此文件中搜索RAMUSB21D7。 你会在那里找到一个类似的部分:

  [RAMUSB21D7.CopyList] bcbtums.sys btwampfl.sys BCM43142A0_001.001.011.0122.0126.hex 

这就是我们正在寻找的。 固件文件的名称。 BCM43142A0_001.001.011.0122.0126.hex

  1. 现在从同一个cab文件中提取该固件。

    然后,您需要将此文件从hex转换为hcd格式。

  2. 下载该工具

     git clone git://github.com/jessesung/hex2hcd.git cd hex2hcd make 

    您将在主目录中获得hex2hcd文件夹。

  3. 将固件文件放入主文件夹并运行

     ~/hex2hcd/hex2hcd ~/BCM43142A0_001.001.011.0122.0126.hex ~/BCM43142A0-0a5c-21d7.hcd 

    您看到0a5c-21d7是来自lsusb的适配器的id。

重要提示:对于内核4.2+,您将此文件称为BCM.hcd

  ~/hex2hcd/hex2hcd ~/BCM43142A0_001.001.011.0122.0126.hex ~/BCM.hcd 

对于内核4.8+文件的名称应该是BCM--.hcd ,如BCM-0a5c-21d7

  1. 现在只需将BCM43142A0-0a5c-21d7.hcd或其他文件根据内核版本/lib/firmware/brcm/lib/firmware/brcm目录中

     sudo cp ~/BCM43142A0-0a5c-21d7.hcd /lib/firmware/brcm 

对于内核4.2+

  sudo cp ~/BCM.hcd /lib/firmware/brcm 

对于内核4.8+

  sudo cp ~/BCM-0a5c-21d7.hcd /lib/firmware/brcm 

您始终可以通过运行dmesg | grep -i blue 来检查文件名是否正确 dmesg | grep -i blue 。 如果找不到该文件,将会出现错误消息。

  1. 关闭计算机然后再打开。 不只是重启!

    您的适配器将获得固件和蓝牙应该工作。

所有这些看起来都很复杂,但Broadcom的律师应该为此负责。 大多数其他供应商允许在与许可证一起完成的情况下重新分发固件。

这允许Linux维护者在发行版中包含固件。

但不是Broadcom的情况。 这就是为什么它不是一个简单的方法。

许多人可以将所有hex文件转换为hcd并使其可用。 或者只是将它们添加到Ubuntu的linux-firmware包中。

但这不合法 : – ((

这是一个旨在自动化流程的项目: https : //github.com/winterheart/broadcom-bt-firmware

根据内核将BCM复制到正确的目录/名称(如上所述)。

在4.8我不需要重启,只需在终端:

 sudo modprobe -r btusb sudo modprobe btusb dmesg | grep -i blu 

应该显示它是否已加载。 确保硬件ID与文件匹配。 它可以找到:

 lsusb 

这显示在我的联想(只有那一行):

 Bus 001 Device 006: ID 105b:e065 Foxconn International, Inc. BCM43142A0 Bluetooth module 

我希望有帮助:)

这就是你所需要的: https : //github.com/winterheart/broadcom-bt-firmware

在此存储库中,您可以找到所需的更多信息和所有Broadcom无线卡驱动程序 。


为了更具体,我给你自己写的指示:

本教程旨在使无线/蓝牙网卡Broadcom Corporation BCM43142 802.11b / g / n(rev 01)(设备ID:0a5c:216d)在Linux系统上运行(我在Elementary OS 0.4.1 Loki上尝试过它,基于在Ubuntu 16.04.3 LTS上)。

它不适用于其他设备,但对于其他Broadcom设备,此过程不应有太大变化。 所需的Broadcom驱动程序位于此.gcd格式的GitHub的reposity文件夹中。

  1. 输入以下命令以发现在引导时加载驱动器时内核所查找的驱动程序名称:

     dmesg | grep -i 'firmware load' 

    如果找不到任何东西,请尝试这个:

     dmesg | grep -i 'bluetooth' 

    结果应该是这样的:

     bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2 

    说明:在我的情况下,内核正在寻找Broadcom驱动程序所在目录/lib/firmware/brcm下的文件BCM.hcd 。 如果内核正在寻找另一个驱动程序名称,则必须将驱动程序文件( BCM43142A0-0a5c-216c.hcd在我的情况下为BCM43142(0a5c:216d))重命名为内核所需的名称。

  2. 将重命名的驱动程序(BCM.hcd)移动到您的主目录(/ home / YourUsername /)并运行以下命令,以便在启动时将其移动到内核正在查找的文件夹:

     sudo mv ~/BCM.hcd /lib/firmware/brcm 

    您必须根据您的设备使用相应的驱动程序,并在内核请求时重命名。

  3. 重新启动计算机,它应该可以工作!*(您可以再次输入dmesg | grep -i 'bluetooth'以查看驱动程序是否已加载)