Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Fix for Kernel bug affecting brcmfmac #1652

Open
8 tasks done
frankozland opened this issue Aug 25, 2024 · 6 comments
Open
8 tasks done

[Bug]: Fix for Kernel bug affecting brcmfmac #1652

frankozland opened this issue Aug 25, 2024 · 6 comments

Comments

@frankozland
Copy link

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Issue reporting checklist

Operating System

Raspberry Pi OS (64-bit) Lite Bookworm

Quick install or Manual setup?

Quick install

Onboard wireless chipset or external adapter?

Onboard wireless chipset

Hardware

Raspberry Pi 4 Model B

RaspAP version

3.1.3 (Latest)

Other software or services running with RaspAP?

Yes (specify below)

Contact details (optional)

[email protected]

Bug description

#1606

I think the problem is in the latest kernel merge the broadcom clm blob didnt make it.
And its broke stuff across the board.

How to fix:

  1. put attached file into /tmp
  2. cp /tmp/brcmfmac43455-sdio.clm_blob.txt /lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
    cp /tmp/brcmfmac43455-sdio.clm_blob /cypress/cyfmac43455-sdio.clm_blob
    I poked thru the source code of the driver - country code is a really big deal to driver maintainers.
    They store a "blob" file with frequencies allowed per country. I think its like a ini file, but encrypted somehow.
    https://community.murata.com/s/question/0D55F000096RY5sSAG/what-is-clm-blob

The clm blob is one piece - the reason i think we still get errors is there is a second piece - the txt file driver.
If you go to https://github.com/murata-wireless/cyw-fmac-nvram/blob/master
image

There are multiple .txts for the same chip - probably also need to be updated?

This looks relevant:
https://forums.raspberrypi.com/viewtopic.php?t=225906
https://community.infineon.com/t5/Wi-Fi-Bluetooth-for-Linux/Outdated-brcmfmac-firmware-for-Raspberry-Pi-4-in-OpenWrt-21-02-1/td-p/331547#
https://archlinuxarm.org/forum/viewtopic.php?f=64&t=15142

https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

There is a tool to open these clm blobs and view them:
https://github.com/openwrt/firmware-utils/blob/master/src/bcmclm.c

clm file source: https://drive.google.com/file/d/1AN7lC_kMJGGg5AJLhSRtlTRgIh9qJlaI/view?pli=1
source notes for fix: raspberrypi/linux#3768
brcmfmac43455-sdio.clm_blob.txt

reference: https://github.com/armbian/firmware/blob/master/brcm/config.txt

Steps to reproduce

see #1606

Screenshots

happy dance
image

Additional context

Error still shows in log, but raspap does come up and wifi ssid broadcast

image

Relevant log output

No response

@frankozland
Copy link
Author

Latest broadcomm drivers here
https://community.infineon.com/t5/Wi-Fi-Bluetooth-for-Linux/Cypress-Linux-WiFi-Driver-Release-FMAC-2024-05-14/td-p/768037
(just create free infineon account)

@frankozland
Copy link
Author

probably fix in final form

as suspected - the driver itself is fine and sha256sum confirms that.
The problem seems that the blob file and the txt file that supports the firmware was deployed incorrectly w/ latest kernel.

I dont know how raspAP would maintain this short of documentation update on install - or - check firmware and warn user these extra steps are necessary else no 5g?

The below just fixes the problem - there is a new driver available with patches but i have no idea how to apply that at the moment.

No need to reboot after fix.
Just stop hotspot and restart.

Confirmed error goes away.

# mkdir ~/firmware_backup
# cp -p /lib/firmware/brcm/brcmfmac43455* ~/firmware_backup
# wget --no-check-certificate -O /lib/firmware/brcm/brcmfmac43455-sdio.bin https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/cypress/cyfmac43455-sdio.bin
# wget --no-check-certificate -O /lib/firmware/brcm/brcmfmac43455-sdio.clm_blob https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/cypress/cyfmac43455-sdio.clm_blob
# wget --no-check-certificate -O /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt

# sha256sum /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt ~/firmware_backup/brcmfmac43455-sdio.raspberrypi,4-model-b.txt 
edb6f4e4fb19e18940004124feb4ffe160d72fc607243a07a4480338a28b2748  /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
ca709be81a78bdb6932936374f39943acbd7af07fae6151011127599a3ce9e3d  /root/firmware_backup/brcmfmac43455-sdio.raspberrypi,4-model-b.txt

# sha256sum /lib/firmware/brcm/brcmfmac43455-sdio.clm_blob ~/firmware_backup/brcmfmac43455-sdio.clm_blob
15f50a27020b263d1bea215c8f68d0550d912932d1d9ef19ffd59f18d82dd460  /lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
843e14219c80aa3805a8b1255642c9d36e56471e9b7d5a5689b0e3ffbfa9b47f  /root/firmware_backup/brcmfmac43455-sdio.clm_blob

# sha256sum ~/firmware_backup/brcmfmac43455-sdio.bin /lib/firmware/brcm/brcmfmac43455-sdio.bin
d408faa9d0d5b1a2f9912dcea53ab0be48217288e398406d117f0edafe7c3edd  /root/firmware_backup/brcmfmac43455-sdio.bin
d408faa9d0d5b1a2f9912dcea53ab0be48217288e398406d117f0edafe7c3edd  /lib/firmware/brcm/brcmfmac43455-sdio.bin

@frankozland
Copy link
Author

I did another install just to see where the brcm errors show up - i noticed as soon as vnstat was installed the errors began appearing - no where else were they in the journal until vnstat was applied at install.

image

@frankozland
Copy link
Author

no dice - trying again - more notes.

There was a wpasupplicant patch that was released into the wild that broke linux, macs, raspberry - you name it.

the patch that broke the world
NixOS/nixpkgs@af5b477
https://lore.kernel.org/asahi/[email protected]/T/#u

found you can downgrade a package - so attempting to downgrade to 2.10

sudo vi /etc/apt/sources.list.d/backports.list

add line "deb http://deb.debian.org/debian bullseye-backports main"

sudo apt update
sudo apt install wpasupplicant/bullseye-backports

confirm the downgrade

$ wpa_supplicant -v

wpa_supplicant v2.10
Copyright (c) 2003-2022, Jouni Malinen <[email protected]> and contributors

@frankozland
Copy link
Author

frankozland commented Aug 25, 2024

sudo vi /etc/apt/sources.list.d/backports.list
add line "deb http://deb.debian.org/debian bullseye-backports main"

the whole process -

sudo apt update
sudo apt purge wpasupplicant
sudo apt purge hostapd
sudo apt purge dhcpcd5
sudo apt-get install -t bullseye-backports wpasupplicant
sudo apt-get install -t bullseye-backports dhcpd
sudo apt-get install -t bullseye-backports  hostapd

restart hostspot and you should now get a broadcast ssid

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant