# OrangePi Zero2W does not recognize onboard wifi on first boot

**URL:** <https://dietpi.com/forum/t/orangepi-zero2w-does-not-recognize-onboard-wifi-on-first-boot/21782>\
**Category:** Troubleshooting\
**Tags:** wifi\
**Created:** [25 October 2024 18:09 UTC](https://dietpi.com/forum/t/orangepi-zero2w-does-not-recognize-onboard-wifi-on-first-boot/21782 "2024-10-25T18:09:37Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![metaprax](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/m/47e85d/32.png) [@metaprax](https://dietpi.com/forum/u/metaprax)\
**Post date:** [25 October 2024 18:09 UTC](https://dietpi.com/forum/t/orangepi-zero2w-does-not-recognize-onboard-wifi-on-first-boot/21782/1 "2024-10-25T18:09:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [25 October 2024 18:33 UTC](https://dietpi.com/forum/t/orangepi-zero2w-does-not-recognize-onboard-wifi-on-first-boot/21782/2 "2024-10-25T18:33:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![metaprax](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/m/47e85d/32.png) [@metaprax](https://dietpi.com/forum/u/metaprax)\
**Post date:** [25 October 2024 18:35 UTC](https://dietpi.com/forum/t/orangepi-zero2w-does-not-recognize-onboard-wifi-on-first-boot/21782/3 "2024-10-25T18:35:04Z")

</div>

did not try to modify dietpi.txt

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [25 October 2024 20:10 UTC](https://dietpi.com/forum/t/orangepi-zero2w-does-not-recognize-onboard-wifi-on-first-boot/21782/4 "2024-10-25T20:10:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Arrafar](https://dietpi.com/forum/user_avatar/dietpi.com/arrafar/32/6976_2.png) [@Arrafar](https://dietpi.com/forum/u/Arrafar)\
**Post date:** [26 October 2024 06:50 UTC](https://dietpi.com/forum/t/orangepi-zero2w-does-not-recognize-onboard-wifi-on-first-boot/21782/5 "2024-10-26T06:50:38Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Arrafar](https://dietpi.com/forum/user_avatar/dietpi.com/arrafar/32/6976_2.png) [@Arrafar](https://dietpi.com/forum/u/Arrafar)\
**Post date:** [26 October 2024 07:23 UTC](https://dietpi.com/forum/t/orangepi-zero2w-does-not-recognize-onboard-wifi-on-first-boot/21782/6 "2024-10-26T07:23:57Z")

</div>

[![](https://dietpi.com/forum/uploads/default/original/2X/b/b17fa92257d249422024c754db9ca134b1b0ad77.jpeg "Headless install of Dietpi | No Monitor, No LAN, No router login | Pre Configure WiFi") ](https://www.youtube.com/watch?v=vlMpn9u0Y4o)

Found it. Cheers!

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [26 October 2024 12:33 UTC](https://dietpi.com/forum/t/orangepi-zero2w-does-not-recognize-onboard-wifi-on-first-boot/21782/7 "2024-10-26T12:33:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![metaprax](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/m/47e85d/32.png) [@metaprax](https://dietpi.com/forum/u/metaprax)\
**Post date:** [26 October 2024 13:09 UTC](https://dietpi.com/forum/t/orangepi-zero2w-does-not-recognize-onboard-wifi-on-first-boot/21782/8 "2024-10-26T13:09:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [26 October 2024 23:28 UTC](https://dietpi.com/forum/t/orangepi-zero2w-does-not-recognize-onboard-wifi-on-first-boot/21782/9 "2024-10-26T23:28:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Arrafar](https://dietpi.com/forum/user_avatar/dietpi.com/arrafar/32/6976_2.png) [@Arrafar](https://dietpi.com/forum/u/Arrafar)\
**Post date:** [27 October 2024 07:07 UTC](https://dietpi.com/forum/t/orangepi-zero2w-does-not-recognize-onboard-wifi-on-first-boot/21782/10 "2024-10-27T07:07:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)\
**Post date:** [25 January 2025 07:07 UTC](https://dietpi.com/forum/t/orangepi-zero2w-does-not-recognize-onboard-wifi-on-first-boot/21782/11 "2025-01-25T07:07:31Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
