This is about firmware that needs to be loaded into particular devices attached (usually via USB) to a Raspberry Pi, not the firmware for the Raspberry Pi itself (the GPU firmware).

When the kernel identifies a device I am getting messages (viewed with dmesg, sudo journalctl -f or sudo journalctl -n 100) like this:

r8188eu 1-1.2:1.0: Direct firmware load for rtlwifi/rtl8188eufw.bin failed with error -2
r8188eu 1-1.2:1.0: Firmware rtlwifi/rtl8188eufw.bin not available

or this:

Bluetooth: hci0: BCM20702A1 (001.002.014) build 0000
bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0a5c-21e8.hcd failed with error -2
Bluetooth: hci0: BCM: Patch brcm/BCM20702A1-0a5c-21e8.hcd not found

or this:

bluetooth hci0: Direct firmware load failed with error -2
bluetooth hci0: Falling back to user helper
Bluetooth: hci0: BCM: patch brcm/BCM43142A0-0a5c-21d7.hcd not found

How do I make my device work?

This question has been asked in various forms about various specific devices many times both on this StackExchange[1][2][3][4] and others[5]. I'm looking for instructions on how to debug and fix this problem in the general case so that I don't need top keep coming back with similar questions for every new piece of hardware.

1 Answer 1


The Linux kernel is trying to load firmware from a file under /lib/firmware to install it in to the device and not finding it. (In these cases this usually needs to be done every time the device is initialized.) The path given in the error message is relative to /lib/firmware; you need to find the correct firmware and put it in that file. There are several ways to do this.

Install a Package Containing the Firmware

There are a number of packages that contain open source or freely distributable device firmware; aptitude search firmware will list many of them. The easiest way to see if one of them has what you need is to use the apt-file command to search for a fragment of the name of the missing firmware file:

sudo -s
apt-get update
apt-get install apt-file
apt-file update
apt-file search bcrm/BCM2070    # Example partitial filename

If apt-file search shows a package that has it, installing the package with apt-get should fix your problem.

Use a Firmware Installer Package

Some firmware cannot be distributed in Debian packages themselves, but there are packages that can download the firmware from an authorized source and place it in /lib/firmware for you. One example of this is the firmware-b43-installer package.

Rename an Existing Firmware File

In some cases (such as this one) a newer revision of the device can use the older firmware in which case you can symlink the newer filename to the old one, e.g.

sudo -s
cd /lib/firmware/bcrm
ln -s BCM20702A0-0a5c-21e8.hcd BCM20702A1-0a5c-21e8.hcd 

This additional step may apply to any of the methods given above or below, but try first to ascertain (via searching the web) that the two revisions do indeed use the same firmware.

Copy the Firmware from Another System

If you have a another Linux system that works with the device, copying the firmware file from that system may work. Searching the logs on that device for something along the lines of, e.g. Flash firmware /lib/firmware/BCM43430A1.hcd may lead you to the specific file you need to copy.

Find the Firmware on the Web

Searching the web may lead you to a document or post describing where you can download the firmware you need.

Convert the Windows Firmware File

In some cases you can get proprietary firmware from a Windows machine and use a tool such as hex2hcd to convert the file to a form you can use under Linux. One example:

It is possible to correct it using the firmware extracted by the windows driver package. You can copy BCM20702A1_001_002.014.1443.1453.hex from \windows\system32\driver from your windows installation and you can use hex2hcd (https://github.com/jessesung/hex2hcd) to convert it and copy it on /lib/firmware/brcm/BCM20702A0-0a5c-21e6.hcd

Further Reading

There's more that can cause trouble even if you have the right firmware file, such as having multiple versions of the firmware, multiple drivers, and dealing with different versions of the "same" device. The linuxwireless.org b43 and b43legacy page gives examples with a specific device of the various techniques that can help you to handle this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.