Sakaki Guru


Joined: 21 May 2014 Posts: 409
|
Posted: Mon Dec 16, 2019 2:29 pm Post subject: WiFi performance Pi4B/Pi3B+; please check firmware version |
|
|
Hello,
although you are probably already aware that the CYW43455 WiFi/Bluetooth chip used on the RPi4B/3B+ requires additional files brcmfmac43455-sdio.txt and brcmfmac43455-sdio.clm_blob (in /lib/firmware/brcm) to function correctly (as they are absent from even the most recent sys-kernel/linux-firmware), what is perhaps less obvious (it certainly fooled me!) is that the uploadable firmware file /lib/firmware/brcmfmac43455-sdio.bin, which is provided by sys-kernel/linux-firmware, is older than that used by the Raspbian distribution, and has (in certain situations) significantly worse performance than it (and indeed with some APs, will not associate at all).
Those using my gentoo-on-rpi-64bit bootable Gentoo image should see this post for the fix, but, if you are creating your own from-scratch Gentoo build, you can check if you have the correct version by running: Code: | # md5sum /lib/firmware/brcm/brcmfmac43455-sdio.bin |
If this returns: Code: | 963eb0d4903040974ee88b4f85cb1f4f /lib/firmware/brcm/brcmfmac43455-sdio.bin | then you are already using the Raspbian version, and need take no further action.
However, if it returns instead: Code: | 0324fe9ce34b6c6c44cc5fd77a669d39 /lib/firmware/brcm/brcmfmac43455-sdio.bin | then you are using the vanilla (and out-of-date) sys-kernel/linux-firmware version, and should update.
The first step here is to 'punch out' the file /lib/firmware/brcm/brcmfmac43455-sdio.bin from sys-kernel/linux-firmware, otherwise your new copy will simply be overwritten the next time this package is emerged.
The simplest way to do this is to leverage the savedconfig USE flag of sys-kernel/linux-firmware. To ensure the flag is set, first issue: Code: | # mkdir -p /etc/portage/package.use
# echo "sys-kernel/linux-firmware savedconfig" > /etc/portage/package.use/linux-firmware |
Then re-emerge linux-firmware:
Code: | # emerge -v1 sys-kernel/linux-firmware |
Once this completes, you should find you have the file /etc/portage/savedconfig/sys-kernel/linux-firmware-<version> present (and you can at your option rename this file, to omit the version suffix, if you want it to apply to future versions too). This file contains a list of all firmware files to be installed by the package, so you can next remove the target file from this list: Code: | sed -i '/^brcm\/brcmfmac43455-sdio.bin/d' /etc/portage/savedconfig/sys-kernel/linux-firmware* |
With that done, a re-emerge will now omit the target file: Code: | # emerge -v1 sys-kernel/linux-firmware |
You should now find that the file /lib/firmware/brcm/brcmfmac43455-sdio.bin is absent. To install the Raspbian version in its stead, issue: Code: | # wget https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.bin -O /lib/firmware/brcm/brcmfmac43455-sdio.bin |
Validate that you now have the modern version of the file: Code: | # md5sum /lib/firmware/brcm/brcmfmac43455-sdio.bin
963eb0d4903040974ee88b4f85cb1f4f /lib/firmware/brcm/brcmfmac43455-sdio.bin |
Then, reboot to start using it.
You should (hopefully) find that WiFi performance / stability, particularly on the RPi4B, improves meaningfully.
Thanks to haaldemir for reporting (please see this post, ff) _________________ Regards,
sakaki |
|