I have WiFi working in PiCore 13.1.0 with the Raspberry Pi Zero W, but I can't get it to work with the Pi Zero 2 W. I'm connecting to unencrypted 802.11b/g wifi from my router.
From the top of onboot.lst I have:
firmware-rpi-wifi.tcz
wireless-KERNEL.tcz
wireless_tools.tcz
With the Zero W, WiFi works with these commands:
iwconfig wlan0 essid [my wifi network name]
udhcpc -i wlan0
On the Pi Zero 2 W udhcpc fails to obtain an IP address (keeps trying endlessly). Manually configuring a fixed IP just results in "network is unreachable" errors. It seems that the driver just isn't working, even though there's a wlan0 device and if I load wifi.tcz and run "sudo wifi.sh" it finds the name of my WiFi network, but also fails to connect to it.
"tce-status -i" confirms that all the extensions are loaded, including wireless-5.10.77-piCore-v7.tcz. Based on
this thread, it seems like that should be enough.
I've done a lot of tests:
- Wrote the stock PiCore 13.1.0 image to a different Micro SD card, added the extensions for wifi (firmware-rpi-wifi.tcz, wireless-5.10.77-piCore-v7.tcz, and wireless_tools.tcz), and modified onboot.lst to include them. No other changes. Same problem.
- Checked the MD5sums of firmware-rpi-wifi.tcz, wireless-5.10.77-piCore-v7.tcz, and wireless_tools.tcz, and they all match the .md5.txt files.
- Tried booting RPi OS and WiFi worked there, so not a hardware fault.
- Tried rfkill from util-linux.tcz, but it reports that the wlan0 interface is unblocked.
- Loaded the sha256_generic module from 5.10.77-piCore-v7_modules.tar.xz, which prevents the error in dmesg about the "X.509 certificate", before loading any of the wifi extensions, but it didn't affect this problem.
- I think I got PiCore to also say "cfg80211: loaded regulatory.db is malformed or signature is missing/invalid" (like RPi OS) instead of "cfg80211: failed to load regulatory.db" in dmesg at one point as well, by loading extra extensions, but it didn't help. This error is also there with the Pi Zero W anyway.
Hardware stats:
Hardware : BCM2835
Revision : 902120
Serial : 0000000091c31ace
Model : Raspberry Pi Zero 2 W Rev 1.0
Attached is a comparison of relevent bits from dmesg for PiCore on the Pi Zero 2 W and Pi Zero W, plus RPi OS on the Pi Zero 2 W where WiFi works (got a forum error when I tried to include it in my post).
I don't know what the problem could be. Is my Pi Zero 2 W different to others? RPi OS claims to be using the same "brcmfmac" driver, and has similar logs in dmesg, so I'm confused. Is there some trick that I'm missing here?