After some waiting, it should connect to WiFi automatically and I should be able to connect to the Pi via ssh
Actual behaviour
The Pi does not seem to connect to WiFi so I can’t proceed with the setup. I checked for new devices in my network, pinged dietpi and I usually get an email as soon as some new device connects to my WiFi.
Extra details
If I plug in an HDMI cable and a keyboard to login I get the message that I should use dietpi-config to setup a connection for wlan0. Shouldn’t that be done through the settings in the dietpi-wifi.txt?
When I login I immediately get an error related to checking ipv4 network connectivity via ping 9.9.9.9.
If I look into the adapter Options I can see
Ethernet Not Found | Off | Disconnected (seems right)
WiFi Available | Off | Disconnected (seems odd?)
Onboard WiFi On
After choosing the menu entry stating WiFi available I am able to configure WiFi settings which do work afterwards but I thought that is not necessary since I’ve put the necessary values in the dietpi-wifi.txt.
##### 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
dietpi-wifi.txt
# Entry 0
# - WiFi SSID: required, case sensitive
aWIFI_SSID[0]='TSign-Net'
# - WiFi key: If no key/open, leave this blank
aWIFI_KEY[0]='19*****************'
# - 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]=''
#---------------------------------------------------------------
Only single quotes ' would cause issues and would need to be escaped, like
aWIFI_KEY[0]='Micha'\''sPassword'
Anything else should work, especially since we add it as 64-bit hex-encoded string to /etc/wpa_supplicant/wpa_supplicant.conf. Was/is this file actually created on first boot before you manually setup WiFi via dietpi-config?
I guess the allow-hotplug wlan0 line in /etc/network/interfaces is still commented then, right? Should be if the dietpi-config menu shows [Off]. Since your dietpi.txt and dietpi-wifi.txt look complete in this regards, probably the related firstboot setup log contains a hint:
Well.
I did a fresh install again. Same image (different USB Card Reader, different Power Cable for the Pi) and suprise. It worked.
As it bugged me I did another fresh install with the exactly the same hardware used when it did not work before and suprise. It worked.
I am not sure what went wrong before but I installed the image like about 5 times without any luck - I followed the exact same procedure now and it works. I mean it’s just two files and changing 3 values. Maybe planetary constellation issues?
Would have been happy contributing some edge case but anyways. Thank you guys.
I’ve been setting up a new Zero 2 W and was having similar issues. The image (DietPi_RPi-ARMv8-Bookworm) was working fine on my 4B. Tried start it on the 4B, installing upgrades, then move it onto the Zero 2 W but that didn’t help either.
What ended up solving it was:
Flash a fresh DietPi image with AUTO_SETUP_AUTOMATED, AUTO_SETUP_NET_ETHERNET_ENABLED and AUTO_SETUP_NET_WIFI_ENABLED (and configure WiFi in dietpi-wifi.txt)
Attach a Micro USB Ethernet adapter and connect to the router with internet
Start and let the first boot do the dist-upgrade (including firmware-iwlwifi kernel drivers)
hi all,
same issue here, no connection. I tried to install DietPi_RPi-ARMv8-Bookworm on a pi zero 2w several times, using balena etcher on different pc (windows and linux), different usb card reader, different cables and different power supply. im in italy and i tried to set also “US” in the wifi country mode. tried to use an access point different from Fritzbox. changing the wifi ssid in one using only letter… nothing works!
unfortunately i dont have mini HDMI and eth-to-usb adapter. what can i try?
thanks in advance.
ps: same issue with Raspberry Pi OS.
hard to trouble shoot without any logs or local access. Bet to use a 2.4Ghz wifi, simple SSID and very simple password for testing. If possible connect the SD card to another Linux box to be able to extract some first setup logs.