Wifi not working with firmware installed in ubuntu 20.04.3

So I would have to recompile the entire kernel for this one driver? Was this patch pushed to mainline yet?

brcmfmac: brcmf_chip_tcm_rambase: unknown chip: BCM43454/6

I think you got the newer ROCK Pi X which is manufactured in 2022. We had to replace the WiFi/BT module to AP6254, which is the only dual band module that is Windows compatible. AP6255 is end of life now. It seems Linux doesn’t have AP6254 support, apply the ID patch, recompile the kernel, put the fw in /lib/firmware should just work.

1 Like


Only to compile ko file. you can follow my readme.

@kagurazakakotori Thanks for your help on the patch.

I believe only recompiling this module is okay since there is no other modules depend on it. @anon39001862 's link has a detailed step-by-step tutorial.

A good news is that just a few hours before I post this reply, the patch has been merged into wireless-next (https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git/commit/?id=ed26edf7bfd9aa3ea23299c949312c5313c115b8). Maybe in next kernel release, appling the patch and recompiling the module is no longer needed.

Credits to @nihui for lending me her board.

1 Like

Thanks Zhao, Jiaqing, this is good news.

When I try to execute
$sudo git apply 0001-brcmfmac-Add-BCM43454-6-support.patch
I get this error message:

luca@luca-ROCK-Pi-X:~/linux-hwe-5.13-5.13.0/drivers/net/wireless/broadcom/brcm80211$ sudo git apply 0001-brcmfmac-Add-BCM43454-6-support.patch
error: patch failed: brcmfmac/Makefile:6
error: brcmfmac/Makefile: patch does not apply
error: patch failed: brcmfmac/chip.c:702
error: brcmfmac/chip.c: patch does not apply
error: patch failed: brcmfmac/feature.c:247
error: brcmfmac/feature.c: patch does not apply
error: patch failed: brcmfmac/sdio.c:641
error: brcmfmac/sdio.c: patch does not apply
error: patch failed: include/brcm_hw_ids.h:32
error: include/brcm_hw_ids.h: patch does not apply

when I try it with the reject option I get this:

luca@luca-ROCK-Pi-X:~/linux-hwe-5.13-5.13.0/drivers/net/wireless/broadcom/brcm80211$ sudo git apply 0001-brcmfmac-Add-BCM43454-6-support.patch --reject
Checking patch brcmfmac/Makefile…
error: while searching for:

ccflags-y +=
-I $(srctree)/$(src)
-I $(srctree)/$(src)/…/include

obj-$(CONFIG_BRCMFMAC) += brcmfmac.o
brcmfmac-objs += \

error: patch failed: brcmfmac/Makefile:6
Checking patch brcmfmac/chip.c…
error: while searching for:
{
switch (ci->pub.chip) {
case BRCM_CC_4345_CHIP_ID:
return 0x198000;
case BRCM_CC_4335_CHIP_ID:
case BRCM_CC_4339_CHIP_ID:

error: patch failed: brcmfmac/chip.c:702
error: while searching for:
case BRCM_CC_4354_CHIP_ID:
case BRCM_CC_4356_CHIP_ID:
case BRCM_CC_4345_CHIP_ID:
/* explicitly check SR engine enable bit /
pmu_cc3_mask = BIT(2);
/
fall-through */

error: patch failed: brcmfmac/chip.c:1388
Checking patch brcmfmac/feature.c…
error: while searching for:
brcmf_feat_firmware_capabilities(ifp);
memset(&gscan_cfg, 0, sizeof(gscan_cfg));
if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID &&
drvr->bus_if->chip != BRCM_CC_4345_CHIP_ID)
brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN,
“pfn_gscan_cfg”,
&gscan_cfg, sizeof(gscan_cfg));

error: patch failed: brcmfmac/feature.c:247
Checking patch brcmfmac/sdio.c…
error: while searching for:
BRCMF_FW_ENTRY(BRCM_CC_43430_CHIP_ID, 0xFFFFFFFE, 43430A1),
BRCMF_FW_ENTRY(BRCM_CC_4345_CHIP_ID, 0x00000200, 43456),
BRCMF_FW_ENTRY(BRCM_CC_4345_CHIP_ID, 0xFFFFFDC0, 43455),
BRCMF_FW_ENTRY(BRCM_CC_4354_CHIP_ID, 0xFFFFFFFF, 4354),
BRCMF_FW_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356),
BRCMF_FW_ENTRY(BRCM_CC_4359_CHIP_ID, 0xFFFFFFFF, 4359),

error: patch failed: brcmfmac/sdio.c:641
Checking patch include/brcm_hw_ids.h…
error: while searching for:
#define BRCM_CC_4339_CHIP_ID 0x4339
#define BRCM_CC_43430_CHIP_ID 43430
#define BRCM_CC_4345_CHIP_ID 0x4345
#define BRCM_CC_43465_CHIP_ID 43465
#define BRCM_CC_4350_CHIP_ID 0x4350
#define BRCM_CC_43525_CHIP_ID 43525

error: patch failed: include/brcm_hw_ids.h:32
Applying patch brcmfmac/Makefile with 1 reject…
Rejected hunk #1.
Applying patch brcmfmac/chip.c with 2 rejects…
Rejected hunk #1.
Rejected hunk #2.
Applying patch brcmfmac/feature.c with 1 reject…
Rejected hunk #1.
Applying patch brcmfmac/sdio.c with 1 reject…
Rejected hunk #1.
Applying patch include/brcm_hw_ids.h with 1 reject…
Rejected hunk #1.

What am I doing wrong?

Your kernel version is a bit newer than the patch version.
You can either edit all file manually or you can share me this folder. And I will edit them and send back to you.

I have no idea what I should do, so if you have time it would be geat. What folder should I send to you over which platform?

I understand that you might not have time to edit the files for me, but it would be nice if you could just tell me what kernel version the patch works with.

i also needed help too on this

I sadly couldn’t test it, because my rock pi x broke unexpectedly and the replacement hasn’t arrived yet. But in the official kernel release notes it says, that the BCM43454/6 has been added to the devices supported by default in the 5.18 release (https://kernelnewbies.org/Linux_5.18#Networking-1 under brcmfmac). So if you update your kernel via ethernet to 5.18 or 5.19 (the latest stable version as of writing), it should work out without any additional tweaking. I would also be glad if you could post your outcome :slight_smile:

Side note:
Long hardware adoption times like this are why I don’t like linux

any updates on your side, did manage to get windows 10 driver working but not linux which i heavily need atm

No, sadly not. My new rock pi should arrive this week though, I’ll update you as soon as i can.

Hey any updates on your side? Cos ive reach to support to see if anything can be done from their side

As of now, I couldn’t get it to work, even with a kernel that had the needed drivers (I double checked manually). it could just be a faulty wifi module though; the last board I had, shipped with a faulty ethernet port. I’ll try to double check in windows.

Oic cos my wifi work in Windows not linux

dmesg | grep brcmfmac will provide some ideas about what’s going wrong with the kernel driver.

You may also need to check if you have the firmware and the config file installed. The firmware file is at /lib/firmware/brcm/brcmfmac43455-sdio.bin. If this file does not exist, check if linux-firmware pacakge is installed. If still not, use the command below to install it manually.

sudo wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/cypress/cyfmac43455-sdio.bin -O /lib/firmware/brcm/brcmfmac43455-sdio.bin
sudo wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/cypress/cyfmac43455-sdio.clm_blob -O /lib/firmware/brcm/brcmfmac43455-sdio.clm_blob

The firmware config file is not included in distros, you need to download it from radxa and install it. The command is:

sudo wget https://raw.githubusercontent.com/radxa/rkwifibt/master/firmware/broadcom/AP6254/wifi/nvram_ap6254.txt -O "/lib/firmware/brcm/brcmfmac43455-sdio.Radxa-ROCK Pi X.txt"

Hopefully Radxa will be interested in adding this to linux-firmware so that there will be no need to install the txt file manually. I would be more than happy to help Radxa upstreaming this txt file.

https://www.armbian.com/uefi-x86/ just works OOB.

iwconfig 
lo        no wireless extensions.

enp1s0    no wireless extensions.

wlan0     IEEE 802.11  ESSID:"XXXX"  
      Mode:Managed  Frequency:5.24 GHz  Access Point: XX:XX:XX:XX:XX:XX   
      Bit Rate=175.5 Mb/s   Tx-Power=31 dBm   
      Retry short limit:7   RTS thr:off   Fragment thr:off
      Encryption key:off
      Power Management:off
      Link Quality=35/70  Signal level=-75 dBm  
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:0   Missed beacon:0

The nvram needs to be named

brcmfmac43455-sdio.ROCK Pi-ROCK Pi X.txt

not

brcmfmac43455-sdio.Radxa-ROCK Pi X.txt

at least on debian testing. dmesg still shows this multiple times

sdio mmc2:0001:1: firmware: failed to load brcm/brcmfmac43455-sdio.ROCK Pi-ROCK Pi X.bin (-2)

but wifi and bluetooth works. debian needs to install firmware-brcm80211 as well

1 Like

I just tested debian firmware testing again and it seems all I need to have working wifi is brcmfmac43455-sdio.ROCK Pi-ROCK Pi X.txt copied to /lib/firmware/brcm/. I guess they added official support for the wifi card, just need the settings file. If using non-firmware install I believe you will need the firmware-brcm80211 package