蓝牙 Broadcom 43142 不工作

Guj*_*501 48 firmware wireless bluetooth broadcom drivers

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

的输出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
Run Code Online (Sandbox Code Playgroud)

的输出lsusb

Bus 003 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0
Run Code Online (Sandbox Code Playgroud)

我该如何解决?

Pil*_*ot6 88

您需要安装固件。

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

  1. 下载Broadcom Windows 8 驱动程序从这里下载。

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

    一些笔记本电脑供应商在他们的网站上有蓝牙驱动程序,但其中一些不能解压缩。所以这是一些追求。我可以从他们的网站下载最新的 Broadcom 驱动程序,但它不再存在了。

  2. 通过存档管理器打开此文件并找到那里的bcbtums-win8x86-brcm.inf文件。某些驱动程序中的文件名可能不同。它可以bcbtums.inf位于 Win32 或 Win64 目录中。下载 32 位或 64 位都没有关系。

  3. 在此文件中搜索 VID_ 0A5C &PID_ 21D7。这些数字来自您的lsusb输出

    0a5c:21d7博通公司 BCM43142 蓝牙 4.0。

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

    你会看到一些以RAMUSB21D7结尾的

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

    [RAMUSB21D7.CopyList]
    bcbtums.sys
    btwampfl.sys
    BCM43142A0_001.001.011.0122.0126.hex
    
    Run Code Online (Sandbox Code Playgroud)

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

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

    然后您需要将此文件从十六进制转换为 hcd 格式。

  5. 下载工具

    git clone git://github.com/jessesung/hex2hcd.git
    cd hex2hcd
    make
    
    Run Code Online (Sandbox Code Playgroud)

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

  6. 将固件文件放入您的主文件夹并运行

    ~/hex2hcd/hex2hcd ~/BCM43142A0_001.001.011.0122.0126.hex ~/BCM43142A0-0a5c-21d7.hcd
    
    Run Code Online (Sandbox Code Playgroud)

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

    重要提示:对于内核 4.2+,您可以BCM.hcd改为调用此文件。

    ~/hex2hcd/hex2hcd ~/BCM43142A0_001.001.011.0122.0126.hex ~/BCM.hcd
    
    Run Code Online (Sandbox Code Playgroud)

    对于内核4.8+的文件名应该是BCM-<VID>-<PID>.hcd一样BCM-0a5c-21d7

    对于内核 5.0,文件名又是 BCM43142A0-0a5c-21d7.hcd

    现在只需BCM43142A0-0a5c-21d7.hcd根据内核版本复制或另一个文件到/lib/firmware/brcm目录

    sudo cp ~/BCM43142A0-0a5c-21d7.hcd /lib/firmware/brcm
    
    Run Code Online (Sandbox Code Playgroud)

    对于内核 4.2+

    sudo cp ~/BCM.hcd /lib/firmware/brcm
    
    Run Code Online (Sandbox Code Playgroud)

    对于内核 4.8+

    sudo cp ~/BCM-0a5c-21d7.hcd  /lib/firmware/brcm
    
    Run Code Online (Sandbox Code Playgroud)

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

    如果请求的文件名与您创建的文件不匹配,请重命名该hcd文件。

  7. 关闭并重新打开计算机。不只是重启!

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

所有这一切看起来都很复杂,但这应该归咎于博通律师。大多数其他供应商允许在随许可证一起完成的情况下重新分发固件。

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

但在博通的情况下则不然。这就是为什么它不是一个简单的方法。

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

但这不合法:-((

  • 大多数情况下,当我唤醒我的笔记本电脑时,蓝牙模块的重新加载失败并显示内核堆栈跟踪。如果您无需重新启动就需要蓝牙,则需要卸载蓝牙模块(`sudo modprobe -r btusb`)并重新加载(`sudo modprobe btusb`)以使蓝牙再次工作。https://bugzilla.kernel.org/show_bug.cgi?id=81821 (7认同)
  • DUALBOOT 用户:请注意,您可以从 Windows 操作系统中提取正确的固件。为此,请转到 Windows 设备管理器,找到您的蓝牙设备,右键单击“属性”、“驱动程序”、“驱动程序详细信息”。在那里你会找到你的 `.hex` 文件的路径,你可以将它复制到你的 Linux 系统中。之后,按照步骤 5-8 进行操作。顺便说一句,这个答案非常好。 (5认同)
  • 感谢@Pilot6 更新主要帖子。就我而言,我查看了 `dmesg` 中的错误以了解我的正确文件。dmesg 输出示例:`[ 3.479417] 蓝牙 hci0:brcm/BCM-0a5c-6410.hcd 的直接固件加载失败,错误为 -2 [3.479421] 蓝牙:hci0:BCM:未找到补丁 brcm/BCM-0a5c-6410.hcd ` (4认同)

Vin*_*ris 20

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

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

在 4.8 上,我不需要重新启动,只需在终端中:

sudo modprobe -r btusb
sudo modprobe btusb

dmesg | grep -i blu
Run Code Online (Sandbox Code Playgroud)

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

lsusb
Run Code Online (Sandbox Code Playgroud)

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

Bus 001 Device 006: ID 105b:e065 Foxconn International, Inc. BCM43142A0 Bluetooth module
Run Code Online (Sandbox Code Playgroud)

我希望有帮助:)


cal*_*ode 16

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

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


更具体地说,我给你我为自己写的说明:

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

它不能用于其他设备,但它不应与其他 Broadcom 设备的此过程有太大差异。所需的 Broadcom 驱动程序以 .hcd 格式位于此GitHub 的存储库文件夹中。

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

    dmesg | grep -i 'firmware load'
    
    Run Code Online (Sandbox Code Playgroud)

    如果没有找到任何内容,请尝试此操作:

    dmesg | grep -i 'bluetooth'
    
    Run Code Online (Sandbox Code Playgroud)

    结果应该是这样的:

    bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2
    
    Run Code Online (Sandbox Code Playgroud)

    Explanation: in my case the kernel is looking for the file BCM.hcd under the directory /lib/firmware/brcm where the Broadcom drivers are expected to be. If the Kernel is looking for another driver name, you must rename the driver file (BCM43142A0-0a5c-216c.hcd in my case for the BCM43142 (0a5c:216d)) to the required name by the kernel.

  2. Move the renamed driver (BCM.hcd) to your home directory (/home/YourUsername/) and run the following command in order to move it to the folder the kernel is looking on while booting:

    sudo mv ~/BCM.hcd /lib/firmware/brcm
    
    Run Code Online (Sandbox Code Playgroud)

    You must use the corresponding driver depending on your device and rename it if requested for the kernel.

  3. Reboot your computer and it should work!* (you can enter dmesg | grep -i 'bluetooth' once again to see if the driver has been loaded)