New PI ZeroW, unable to setup via wifi with DietPI

Hi,
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!
AUTO_SETUP_LOCALE=C.UTF-8

# Keyboard Layout eg: "gb" / "us" / "de" / "fr"
AUTO_SETUP_KEYBOARD_LAYOUT=it

# Timezone eg: "Europe/London" / "America/New_York" | Full list (TZ*): https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
AUTO_SETUP_TIMEZONE=Europe/Rome

##### 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.
AUTO_SETUP_NET_ETHERNET_ENABLED=0
AUTO_SETUP_NET_WIFI_ENABLED=1

# 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.
AUTO_SETUP_NET_ETH_FORCE_SPEED=0

# WiFi country code: 2 uppercase character value (e.g. GB US DE JP): https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
AUTO_SETUP_NET_WIFI_COUNTRY_CODE=US

# Enter your static network details below, if applicable.
AUTO_SETUP_NET_USESTATIC=0
AUTO_SETUP_NET_STATIC_IP=192.168.1.5
AUTO_SETUP_NET_STATIC_MASK=255.255.255.0
AUTO_SETUP_NET_STATIC_GATEWAY=192.168.1.100
AUTO_SETUP_NET_STATIC_DNS=192.168.1.4

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

# Hostname
AUTO_SETUP_NET_HOSTNAME=DietPi

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

My dietpi-wifi.txt

# Entry 0
# - WiFi SSID: required, case sensitive
aWIFI_SSID[0]='Magnifico'
# - WiFi key: If no key/open, leave this blank
aWIFI_KEY[0]='s6......'
# - Key type: NONE (no key/open) | WPA-PSK | WEP | WPA-EAP (then use settings below)
aWIFI_KEYMGR[0]='WPA-PSK'
# - WPA-EAP options: Only fill if WPA-EAP is set above
aWIFI_PROTO[0]=''
aWIFI_PAIRWISE[0]=''
aWIFI_AUTH_ALG[0]=''
aWIFI_EAP[0]=''
aWIFI_IDENTITY[0]=''
aWIFI_PASSWORD[0]=''
aWIFI_PHASE1[0]=''
aWIFI_PHASE2[0]=''
# - Path to the certificate file, e.g.: /boot/mycert.cer
aWIFI_CERT[0]=''
#---------------------------------------------------------------

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.....'

root@R7800:~#

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.

Thanks!

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:

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
  ssid="NETWORK-NAME"
  psk="NETWORK-PASSWORD"
}

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: