LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   error with driver in a raspberry pi4 Raspbian; how to overwrite with a better one? (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/error-with-driver-in-a-raspberry-pi4-raspbian%3B-how-to-overwrite-with-a-better-one-4175688895/)

floppy_stuttgart 01-19-2021 12:09 PM

error with driver in a raspberry pi4 Raspbian; how to overwrite with a better one?
 
hello,
following errors appear in the dmesg; how to get rid of it? any advice is welcome (dont disturb for now; just the red color disturb a bit).
Thanks a lot.
dmesg
Quote:

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.10.7-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1395 SMP Mon Jan 18 16:17:57 GMT 2021
[ 0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 4 Model B Rev 1.2
...
[ 4.861336] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 4.863125] usbcore: registered new interface driver brcmfmac
[ 4.889043] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2
[ 5.124373] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 5.134759] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar 23 2020 02:19:54 version 7.45.206 (r725000 CY) FWID 01-88ee44ea
...

business_kid 01-20-2021 06:52 AM

Ah, that's a familiar name, as I had my own issues there. It's in /lib/firmware/brcm/. Is the wifi working? I'm on RazPi OS, I see you're on Ubuntu. A kernel firmware upgrade might sort it. That's done every time you upgrade the kernel firmware. Razpi OS has patched firmware, so I can't really help you more

floppy_stuttgart 01-20-2021 02:21 PM

Thanks.
I dont use wifi on that raspberry. It will be a small server for testing an expert system accessible via web interface. its reachable via ssh.
In /lib/firmware/brcm/ are several files. Perhaps I should download the
Quote:

brcmfmac43455-sdio.bin
brcmfmac43455-sdio.clm_blob
brcmfmac43455-sdio.txt
from anywhere (where? how?) and just overwrite?

Update: according https://www.raspberrypi.org/forums/v...c.php?t=225906
Quote:

sudo rmmod brcmfmac
works
Quote:

sudo insmod /lib/modules/5.10.7-v7+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko
gives insmod: ERROR: could not insert module /lib/modules/5.10.7-v7+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko: Invalid module format
and dmesg show brcmfmac: disagrees about version of symbol module_layout
brcmfmac.ko is perhaps wrong and should be updated with a new one?

ondoho 01-21-2021 12:54 AM

^ Don't use insmod/rmmod if you can use modprobe instead.

floppy_stuttgart, please use CODE tags for code and output, not quote tags. See my signature.

I assume you are refering to this line:
Code:

[ 4.889043] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2
Here's a search for the edited error message - if your device has wifi hardware but you don't use it, you could blacklist the driver?

business_kid 01-21-2021 05:29 AM

Quote:

Originally Posted by floppy_stuttgart (Post 6210023)
Thanks.
I dont use wifi on that raspberry. It will be a small server for testing an expert system accessible via web interface. its reachable via ssh.
In /lib/firmware/brcm/ are several files. Perhaps I should download the

from anywhere (where? how?) and just overwrite?

Update: according https://www.raspberrypi.org/forums/v...c.php?t=225906
works

gives insmod: ERROR: could not insert module /lib/modules/5.10.7-v7+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko: Invalid module format
and dmesg show brcmfmac: disagrees about version of symbol module_layout
brcmfmac.ko is perhaps wrong and should be updated with a new one?

As I said
Quote:

Originally Posted by business_kid
A kernel firmware upgrade might sort it.


floppy_stuttgart 01-21-2021 01:10 PM

Since I did not know how to upgrade that firmware (all available raspbian standard upgrade were not working), I just blacklisted the module as indicated
Quote:

sudo nano /etc/modprobe.d/blacklist-diverse.conf
and included the line
Quote:

blacklist brcmfmac
the error message is gone after reboot. All fine.
Thanks for the support.

business_kid 01-22-2021 03:50 AM

Most probably i9t's from a different kernel version.

floppy_stuttgart 01-23-2021 07:48 AM

despite it works, I am searching for a better solution in case the wifi is used later (copy a working bin to the driver area).I will document my tries here.
here are some advices https://github.com/raspberrypi/firmware/issues/1403
any remark from anyone is welcome in case I am bullshitting here ;-)

Try a)
lets try the download of https://drive.google.com/file/d/1vz3...kUK3rh8fC/view
how to download a file ? see there https://stackoverflow.com/questions/...ive-using-wget and there https://www.matthuisman.nz/2019/01/d...wget-curl.html
Quote:

sudo wget -O brcmfmac43455-sdio.bin "https://drive.google.com/uc?export=downlod&id=1vz30u4UFWWA8Uh5ivo78ppYkUK3rh8fC"
sudo cp brcmfmac43455-sdio.bin /lib/firmware/brcm/
sudo md5sum /lib/firmware/brcm/brcmfmac43455-sdio.bin
0a45a7a828e49e20fee2fe0438149523 /lib/firmware/brcm/brcmfmac43455-sdio.bin
Quote:

dmesg |grep "brcmfmac.*Firmware"
[ 5.111749] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: May 20 2020 00:36:51 version manifest (de496ab CY) FWID 01-12aa6092
sudo reboot
.. small "red" still there in dmesg output. But "error -2" gone. looks better.

Try b)
Quote:

sudo wget -O brcmfmac43455-sdio-88ee44ea.bin "https://drive.google.com/uc?export=downlod&id=10ivocg5PrOwVxAYFKOzJEdv_gdCd-IUF"
sudo mv brcmfmac43455-sdio-88ee44ea.bin brcmfmac43455-sdio.bin
sudo cp brcmfmac43455-sdio.bin /lib/firmware/brcm/
Quote:

sudo md5sum /lib/firmware/brcm/brcmfmac43455-sdio.bin
c4d098fdac7b453408341d5709481b10 /lib/firmware/brcm/brcmfmac43455-sdio.bin
Quote:

dmesg |grep "brcmfmac.*Firmware"
[ 4.936618] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar 23 2020 02:19:54 version 7.45.206 (r725000 CY) FWID 01-88ee44ea
sudo reboot
.. error still there.. oh no. I was coming back to previous driver. Forget Try b.

Try c) .. perhaps to come. However, since I am not using wifi, I cannot test Try a) and "error -2" is gone. lets stop here for now.

business_kid 01-23-2021 10:39 AM

I never got your error, but I did have wifi weirdness.

I got one of the arm-specific kernel releases periodically linked on the Slackware Arm list, which gave me the vanilla firmware blobs. I also had the installed RazPi (=Debian) firmware, which was different. The Debian one was bigger. But they both worked. I tested them.

I found it insensitive, slow, and the aluminium case I had it in as an alternative to some gutless, noisy and dead cheap fan actually acted as a Faraday shield and made the wifi slow. I think the wifi crowding locally prevented it being sensitive.I haven't looked back with an external one.

floppy_stuttgart 01-23-2021 01:45 PM

Quote:

Originally Posted by business_kid (Post 6211000)
I never got your error, but I did have wifi weirdness.

I got one of the arm-specific kernel releases periodically linked on the Slackware Arm list, which gave me the vanilla firmware blobs. I also had the installed RazPi (=Debian) firmware, which was different. The Debian one was bigger. But they both worked. I tested them.

I found it insensitive, slow, and the aluminium case I had it in as an alternative to some gutless, noisy and dead cheap fan actually acted as a Faraday shield and made the wifi slow. I think the wifi crowding locally prevented it being sensitive.I haven't looked back with an external one.

Haha. My pi4 server has a good looking aluminium case. https://www.reichelt.de/gehaeuse-fue...s_0&nbc=1&&r=1
it could be an issue? That would be no wonder for me, a wifi behind an aluminium shield. Good thinking; changing to a plastic case when I will use wifi.

HappyTux 01-23-2021 07:04 PM

Quote:

Originally Posted by floppy_stuttgart (Post 6211062)
Haha. My pi4 server has a good looking aluminium case. https://www.reichelt.de/gehaeuse-fue...s_0&nbc=1&&r=1
it could be an issue? That would be no wonder for me, a wifi behind an aluminium shield. Good thinking; changing to a plastic case when I will use wifi.

For you or anyone else reading who may want to be rid of the wifi, bluetooth or audio on the install.


Code:

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
#dtparam=audio=on
# Added by me to disable audio
dtparam=audio=off

[all]
#dtoverlay=vc4-fkms-v3d
# Added by me to disable wifi and bluetooth
dtoverlay=disable-wifi
dtoverlay=disable-bt

Will do it and my wifi worked out of the box on the default kernel in Raspian Buster, until I disabled it.

Edit: settings are made in the /boot/config.txt near the bottom for the audio and at the bottom for the wifi and bluetooth edits.

floppy_stuttgart 01-24-2021 02:54 AM

Fine. I will disconnect the whole internal stuff since I dont use it and it's damaged by the aluminium case.
Looks like my aluminium case is the worst of all for the PI 4 wifi behaviour; see link/analysis below (no wonder.. metal around wifi.. the dead of wifi).
So, if the PI 4 should have a multipurpose use, my recommendation would be NEVER BUY A METAL CASE if the internal wifi should be used (an additional external wifi is possible anytime).
https://www.martinrowan.co.uk/2019/0...ry-pi-4-cases/

business_kid 01-24-2021 06:22 AM

I have the Flirc case for my Pi 4, and started with 500Kbps to 2Mbps. The Flirc case has 5 metal sides and one plastic one. By pointing the plastic in the (nearest to) line of sight, I got a significant improvement Not only has inbuilt wifi a lower capability, but it also has less sensitivity. Th neuter it, in /boot/config.txt, add
Code:

dtoverlay=pi3-disable-wifi

ondoho 01-25-2021 12:32 AM

Quote:

Originally Posted by business_kid (Post 6211293)
The Flirc case has 5 metal sides and one plastic one. By pointing the plastic in the (nearest to) line of sight, I got a significant improvement

So it works like a "cantenna", possibly even boosting the signal? Clever.

business_kid 01-25-2021 05:55 AM

Quote:

Originally Posted by ondoho (Post 6211607)
So it works like a "cantenna", possibly even boosting the signal? Clever.

Not really, it nearly kills wifi unless you give it line of sight, then it acts as an attenuator. And it wasn't a fast wifi to begin with. The Pi is too small to have it's own wifi aerial, with digital tracks adjacent to the aerial on 2 layers.


All times are GMT -5. The time now is 01:55 PM.