OrangePi Zero2W does not recognize onboard wifi on first boot

DietPi v9.8.0 : 18:52 - Fri 10/25/24

  • Device model : Orange Pi Zero 2W (aarch64)
  • CPU temp : 59 °C / 138 °F : Running warm, but safe
  • LAN IP : 10.0.0.235 (wlan0)
    Linux DietPi 6.6.44-current-sunxi64 #1 SMP Sat Aug 3 06:54:42 UTC 2024 aarch64 GNU/Linux
    G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=8
    G_DIETPI_VERSION_RC=0
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    arm64
    5V 3A RaspberryPi power supply
  • SD card SanDisk

Steps to reproduce

  1. Download current 9.7.1 from dietpi for OPiZ2W
  2. Burn to SD card with Balena Etcher (Linux Debian 12)
  3. Plug in keyboard and monitor
  4. Plug in power supply
  5. On first run attempt to set-up wifi from dietpi-config
  6. Wifi not found (board does not have Ethernet)

Expected behaviour

  • Should find on-board wifi

Actual behaviour

  • on-board wifi not found

Extra details

  1. Turn off
  2. Plug in USB hub
  3. Plug in generic wifi dongle from Uncle Jeff’s big bamboozle store
  4. Plug in keyboard
  5. Plug in power supply
  6. On first boot wifi is found
  7. Set-up wifi, scan, enter password. Board autoupdates to 9.8.0
  8. Exit dietpi-config
  9. Shutdown
  10. Remove generic USB wifi adapter
  11. Plug in power supply
  12. Board reboots and on-board wifi is found and wifi works
  13. Can logon from keyboard and can SSH into board over wifi.

Did you tried to enable Wifi before first boot using dietpi.txt? On some devices it can be enabled using dietpi-config. There should be no need to use a external USB adapter, usually.

did not try to modify dietpi.txt

@Arrafart best to my knowledge, you are using Orange Pi zero 2w as well. Was wifi working out of the box for you?

After flashing to the SD-card, I amended three text files dietpi.txt, dietpiEnv.txt and dietpi-wifi.txt. One of the 3 contains the wifi address and password. Used ipconfig in windows cmd and I gave it a free static IP address too, which I pinged in windows cmd first.

Got it from a YouTube video. Something like; how to start wifi on a headless dietpi OS.

Only after these adjustments, I started the first installation.

I did not yet try to install/change Wifi through the Dietpi-launcher on or after first boot. It’s on my list.

I can help trouble shooting.
Have a spare SD card.

(I do vaguely remember using an Ethernet cable, but don’t remember why. Maybe before I figured out I needed to preset the txt files)

Found it. Cheers!

On the Zero 3 I remember we need to have the kernel module enabled on first boot, as it somehow does not load successfully otherwise and/or not if it was unloaded once during first boot. I guess for the Zero 2W it is the same. I’ll adjust our installer and create a test image to see whether this makes a difference.

1 Like

If it helps, I reflashed the SD card and modified the following on the DIETPI_SETUP volume. The OPiZ2W booted fine, found the onboard wifi and auto updated without intervention. All seems well.

dietpi-wifi.txt

aWIFI_SSID[0]=‘myrouter’
aWIFI_KEY[0]=‘mypswd’

dietpi.txt

AUTO_SETUP_NET_WIFI_ENABLED=1
AUTO_SETUP_NET_WIFI_COUNTRY_CODE=US

2 Likes

I also just checked that WiFi modules are enabled on first boot already. Problem hence really only is that this particular module cannot be re-enabled when it has been disabled in the same boot session. It always requires a reboot. If WiFi is not enabled via dietpi.txt, the module gets unloaded during early boot. We must prevent this for Orange Pi Zero 3 and 2W and do so only after first run setup finished, if WiFi is not used until then.

This may explain why I had difficulties connecting to my Android wifi #2 and then back to my Home Wifi #1.

I successfully connected to #2 with DHCP selected.
Then I tried to reconnect to my static #1 in the same session but failed, no reboots.

I failed miserably in switching connection on demand and restored backup.

Any advice?