New PI ZeroW, unable to setup via wifi with DietPI

I’m trying to installing DietPI also on a rpi ZeroW (1), I have both the rj45-microusb and wifi, but both aren’t working:

My dietpi.txt

##### Language/Regional Options #####
# Locale: eg: "en_GB.UTF-8" / "de_DE.UTF-8" | One entry and UTF-8 ONLY!

# Keyboard Layout eg: "gb" / "us" / "de" / "fr"

# Timezone eg: "Europe/London" / "America/New_York" | Full list (TZ*):

##### Network Options #####
# Enable Ethernet or WiFi adapter: 1=enable | 0=disable
# - If both Ethernet and WiFi are enabled, WiFi will take priority and Ethernet will be disabled.
# - If using WiFi, please edit dietpi-wifi.txt to pre-enter credentials.

# Force Ethernet speeds: 0=automatic speed | 10 = 10Mbit | 100 = 100Mbit etc
# - This is mainly aimed at PINE A64 which may have an HW issue that causes unstable 1Gbit link.

# WiFi country code: 2 uppercase character value (e.g. GB US DE JP):

# Enter your static network details below, if applicable.

# Set to "1" to convert DHCP leased network settings into static settings automatically on first boot.

# Hostname

# Delay service starts at boot until network is established: 0=disabled | 1=enabled

My dietpi-wifi.txt

# Entry 0
# - WiFi SSID: required, case sensitive
# - WiFi key: If no key/open, leave this blank
# - Key type: NONE (no key/open) | WPA-PSK | WEP | WPA-EAP (then use settings below)
# - WPA-EAP options: Only fill if WPA-EAP is set above
# - Path to the certificate file, e.g.: /boot/mycert.cer

My R7800 OpenWRT wifi (both 2.4 and 5g have the same SSID and same pswd, MAC address allowed are only 5ghz, it’s disabled on 2.4)

root@R7800:~# uci export wireless
package wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'soc/1b500000.pci/pci0000:00/0000:00:00.0/0000:01:00.0'
	option band '5g'
	option htmode 'VHT80'
	option cell_density '0'
	option country 'US'
	option channel '36'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option mode 'ap'
	option network 'lan'
	option ssid 'Magnifico'
	option encryption 'sae-mixed'
	option key 's6...'
	option macfilter 'allow'
	list maclist '24:E8:53:40:8A:D4'
	list maclist '1C:91:80:EA:46:61'
	list maclist 'EC:2C:E2:8C:53:57'
	list maclist 'F8:FF:C2:4C:5A:46'
	list maclist 'a0:FB:C5:15:20:15'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'soc/1b700000.pci/pci0001:00/0001:00:00.0/0001:01:00.0'
	option band '2g'
	option htmode 'HT20'
	option cell_density '0'
	option channel 'auto'
	option country 'US'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'Magnifico'
	option encryption 'sae-mixed'
	option key 's6.....'
	option isolate '1'

config wifi-iface 'guest'
	option device 'radio0'
	option mode 'ap'
	option network 'guest'
	option ssid 'Magnifico Guest'
	option encryption 'sae-mixed'
	option key '.nMZ.....'


The router is sending the DHCP to the connected devices, I also tested with static IP on pi but is the same.

What is the trouble?! :thinking:

If I attach the rj45-microusb and change the dietpi.txt to [1] (and 0 wifi) is the same: I can’t see any new devices on my network.

On my others rPIs with DietPI all went okay using the ethernet cable.


Did you tried to change encryption to WPA2 only? And does the password contain special characters? If yes, maybe you can simplify it?

Do you have access to the ZeroW even if not connected to WiFi?

Yes I tried wpa2 and I don’t use special characters but I’m still unable to connect it to my wireless network.

Yes I have access to it but also with the eth network adapter didn’t show up in the network.

what is the status of onboard WiFi in dietpi-config network settings?

What do you mean for dietpi-config? If I’m unable to make a first boot, connect to it and setup, how can I use the dietpi-config command? :face_with_raised_eyebrow:

Well well, after I lost my patience I formatted the SD card, reinstalled DietPI on the card, re-made all the processes to edit the dietpi.txt and dietpi-wifi.txt with the same settings as before and now…everything work perfect :thinking:

Maybe my trouble was because at the first time, I thought to set-up a headless rpi I had to modify the config.txt in the SD card, like on raspbian, I added the common config text:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev


But this messed up everything, I don’t know what was going on, when I read the dietpi headless setup I deleted those lines and edited the dietpi*.txt files. But something was already messed, only after a reinstall of dietpi (with balena etcher of course) fixed it.

So, remember to never use the “normal/raspbian” way on first start with dietpi because it screws up everything also if you revert back the files :thinking:

That was most probably the issue. Setting up WiFi would need to be done before first initial work. If system has already been booted, this is not working anymore this way. :slight_smile: