WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: piCore-11beta wifi problem  (Read 6895 times)

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1063
Re: piCore-11beta wifi problem
« Reply #15 on: April 16, 2020, 01:12:14 PM »
I supplied the firmware package for this.  And all wifi is definitely working.  Make sure the firmware is loaded before the kernel drivers.

Perhaps show us the contents of /mnt/mmcblk0p2/tce/onboot.lst

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: piCore-11beta wifi problem
« Reply #16 on: April 16, 2020, 10:27:21 PM »
When you say "all wifi", does this include RPi4?

I'm having problems getting wifi (firmware) and hardware acceleration to work on an RPi4 - it seems something is not set up correctly in piCore-11.0beta1a as it looks in the armv7 rather than armv7l repo?
« Last Edit: April 16, 2020, 10:33:24 PM by Juanito »

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 402
Re: piCore-11beta wifi problem
« Reply #17 on: April 16, 2020, 11:17:03 PM »
I am not sure if Paul tests everything on the "official" piCore OS, but full support, including wifi, on piCorePlayer for the RPi4B happened a few days after it's release. From memory Paul did the development before he had a RPi4B, I did the RPI4B/wifi testing and have used it ever since.

I think Paul submits the wifi extensions back to Bela for piCore.

So wifi "should" work on piCore.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: piCore-11beta wifi problem
« Reply #18 on: April 16, 2020, 11:50:40 PM »
Here's what I get:
Code: [Select]
$ cat /proc/cpuinfo
Model           : Raspberry Pi 4 Model B Rev 1.2

$ tce-load -i firmware-rpi-wifi
$ tce-load -i wireless-KERNEL
wireless-4.19.81-piCore-v7l.tcz: OK [repo problem]

$ dmesg
...
[ 1355.441188] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1355.453736] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1355.453817] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1355.453822] cfg80211: failed to load regulatory.db
[ 1355.461645] brcmfmac: F1 signature read @0x18000000=0x15264345
[ 1355.465789] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 1355.465981] usbcore: registered new interface driver brcmfmac
[ 1356.583073] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[ 1357.591700] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50

..but no wlan0 created

With an RPi3:
Code: [Select]
[ 3737.522708] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 3737.543585] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 3737.543692] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 3737.543698] cfg80211: failed to load regulatory.db
[ 3737.556288] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[ 3737.560204] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ 3737.560365] usbcore: registered new interface driver brcmfmac
[ 3737.751547] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ 3737.751621] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[ 3737.752178] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f

..and wlan0 created

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 402
Re: piCore-11beta wifi problem
« Reply #19 on: April 17, 2020, 03:57:57 AM »
What version of firmware-rpi-wifi.tcz?

Code: [Select]
Title:          firmware-rpi-wifi.tcz
Description:    Firmware for RPi onboard WiFi adapter
Version:        7.45.98.38
Author:         Cypress
Original-site:  http://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_0.43+rpi6_all.deb
Copying-policy: See LICENCE.broadcom_bcm43xx
Size:           656k
Extension_by:   paul-123
Tags:           FIRMWARE RPI4 RPI3 RPI0W WIFI WIRELESS
Comments:       Binaries only
                ----
                Packed for piCore 10.x / RPi3 and RPi0W
Change-log:     2016/06/28 First version 7.45.41.26
                CVE-2017-9417: Broadpwn issue fix
                Add CY string in the version string.
                AMPDU sequence number deadlock fix (potential fix for this issue)
                CLM version upgrade
                CVE-2017-0572: memory corruption fix
                2017/08/08 version 7.45.41.46 (r666254 CY) FWID 01-f8a78378
                2018/01/24 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f
                2018/03/17 Add RPi3B+ Firmware brcm43455 version: 7.45.154
                2018/08/19 Add NVRAM parameters for BT COEXIST
Current:        2019/07/01 Update brcm43455 firmware for RPi4, v7.45.154

Dependency: crda.tcz

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: piCore-11beta wifi problem
« Reply #20 on: April 17, 2020, 04:46:19 AM »
Thanks - using crda from piCore-10.x armv7, I get this:
Code: [Select]
cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
..and whereas the RPi3 wifi still works with this error, on the RPi4 no wifi interface is created.
« Last Edit: April 17, 2020, 05:12:32 AM by Juanito »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: piCore-11beta wifi problem
« Reply #21 on: April 17, 2020, 05:36:06 AM »
I downloaded a new copy of regulatory.db and the p7s file from https://kernel.googlesource.com/pub/scm/linux/kernel/git/sforshee/wireless-regdb but the error persists.

(I see /usr/local/lib/firmware is not valid for piCore)

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1063
Re: piCore-11beta wifi problem
« Reply #22 on: April 17, 2020, 05:53:06 AM »
Correct, the chipset looks in /lib/firmware, I'm not sure that can be changed.

I should have said I submitted that package back in earlier alpha versions of piCore11.   In its latest beta, Bela upgraded openssl,  I have not built crda against the latest openssl.

Let me take a look at it this weekend.
« Last Edit: April 17, 2020, 05:54:55 AM by Paul_123 »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: piCore-11beta wifi problem
« Reply #23 on: April 17, 2020, 07:05:34 AM »
Thanks - am I right in thinking that the RPi4 WiFi won’t work without the Reg db?

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1063
Re: piCore-11beta wifi problem
« Reply #24 on: April 17, 2020, 08:04:30 AM »
There is a good chance of that.  But I can't totally remember.....I did most of this work with weeks of the 4B+ board coming out.

The other thing that "may" be required is setting country code.  Which wifi.sh does not handle today.  But country code is not what's keeping the interface from showing up.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1063
Re: piCore-11beta wifi problem
« Reply #25 on: April 17, 2020, 08:27:42 PM »
Did some digging.  I would have to say that this is a kernel problem.  I verified I get the same messages as you with piCore11-b1.  So I moved to the piCorePlayer kernel.

Loaded firmware-rpi-wifi.tcz  (With crda not loaded)
Load wireless-KERNEL.tcz

I get this in dmesg, and the wlan0 interface is created.
Code: [Select]
[  101.979732] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[  101.987811] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[  101.987913] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[  101.987918] cfg80211: failed to load regulatory.db
[  102.004738] brcmfmac: F1 signature read @0x18000000=0x15264345
[  102.008958] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[  102.010563] usbcore: registered new interface driver brcmfmac
[  102.226141] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[  102.236540] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Feb 27 2018 03:15:32 version 7.45.154 (r684107 CY) FWID 01-4fbe0b04

then I rebooted, but before loading the drivers, I grabbed regulatory.db and regulatory.db.p7s from git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git and put them in /lib/firmware.

Then loaded wireless-KERNEL.tcz

Code: [Select]
[  145.733574] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[  145.746486] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[  145.768444] brcmfmac: F1 signature read @0x18000000=0x15264345
[  145.772471] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[  145.774052] usbcore: registered new interface driver brcmfmac
[  145.851578] random: crng init done
[  145.990147] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[  146.000295] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Feb 27 2018 03:15:32 version 7.45.154 (r684107 CY) FWID 01-4fbe0b04

And the interface is created.  I did not load the full crda, so that has nothing to do with it.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1063
Re: piCore-11beta wifi problem
« Reply #26 on: April 17, 2020, 09:21:06 PM »
I got through all this and I realized I never checked the firmware md5 against my copy.   The firmware extension in the TC repo has something wrong with it.  If I use the pCP firmware package on piCore11,  then the driver loads.

There is still a problem regulatory.db, which I'm not sure what's going on there.


oh, BTW, if you look at tc-functions, you will see its pointing armv7l to armv7
« Last Edit: April 17, 2020, 09:23:02 PM by Paul_123 »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: piCore-11beta wifi problem
« Reply #27 on: April 17, 2020, 09:51:53 PM »
That's good to know - could you point me to the correct pCP firmware so I can rebuild the piCore firmware extension.

Ref tc-functions, I knew there had to be a problem for RPi4 somewhere...

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: piCore-11beta wifi problem
« Reply #28 on: April 18, 2020, 12:24:21 AM »
I managed to get hold of the pCP firmware-rpi-wifi extension and wifi now works on the RPi4 without the reg db or crda.

Better still, the RPi4 can see both 2.4 and 5ghz access points  8)

I'll post the pCP firmware-rpi-wifi to the piCore 11.x repos without the crda dep for now.

..and now to attack hardware acceleration for the RPi4...

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1063
Re: piCore-11beta wifi problem
« Reply #29 on: April 18, 2020, 06:00:25 AM »
Cool.  Rpi/Broadcom just release new firmware for the rpi 4.....letting it bake a little in Raspbian before I pack it.