Comment 180 for bug 1065400

Revision history for this message
Jesse Sung (wenchien) wrote :

@xnor:

Naming rule of the firmware has been changed for some historical reasons...

* In 14.04, it is "/lib/firmware/brcm/fw-<VID>_<PID>.hcd". ( https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/trusty/tree/drivers/bluetooth/btusb.c#n1410 )
* In 16.04, it is "/lib/firmware/brcm/<CHIP_NAME>.hcd". ( https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/xenial/tree/drivers/bluetooth/btbcm.c#n323 )
* In 18.04, it is either "/lib/firmware/brcm/<CHIP_NAME>.hcd" or "/lib/firmware/brcm/<CHIP_NAME>-<VID>-<PID>.hcd". ( https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/bionic/tree/drivers/bluetooth/btbcm.c#n478 and https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/bionic/tree/drivers/bluetooth/btbcm.c#n499 )

Unfortunately because of its incompatible license, we're not able to include the firmware in linux-firmware package. Even in the linux-firmware upstream, there are only a very small amount of such bluebooth firmware files and those should already be included in 18.04 linux-firmware package. ( https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/brcm )

If it used to work on 14.04 but stops working after upgrade, you may already have "/lib/firmware/brcm/fw-<VID>_<PID>.hcd" in your 14.04 installation (maybe either from a preload Ubuntu system or it was downloaded from somewhere). Filename of the firmware needs to be changed after upgrade so that driver can find it. In this case:

$ sudo mv /lib/firmware/brcm/fw-0a5c_21e6.hcd /lib/firmware/brcm/BCM20702A1-0a5c-21e6.hcd

If you wiped the whole system before installing 18.04, you have to find the file elsewhere though.

If you are not sure what the correct hcd filename is, please check the output of dmesg and you'll see the driver complaining about missing firmware.

$ dmesg

-----

For converting the hex formatted firmware to hcd, hex2hcd is included in newer bluez. In 18.04, simply install bluez then you'll have the tool:

$ sudo apt-get install bluez

Still you can use dmesg to determine the hcd filename to use:

$ dmesg

You'll have to find the hex firmware in Windows driver provided by laptop vendors, then convert it and place the output to the right place. For example:

$ sudo hex2hcd -o /lib/firmware/brcm/BCM20702A1-0a5c-21e6.hcd <HEX_FILENAME>

Hope this helps.