DietPi fresh install WiFi issues on Raspberry Pi Zero 2 W

Required Information

  • DietPi version
  • Distro version
  • Kernel version
    Linux DietPi 6.1.21-v8+ …
  • Architecture
  • SBC model
    RPi Zero 2 W (aarch64)
  • Power supply used 5V 3A MacBook, Bosh 5V 1A
  • SD card used SanDisk ultra 32Gb

Steps to reproduce

  1. Followed instructions found here: How to install DietPi - Docs to flash, configure wifi (dietpi.txt, dietpi-wifi.txt)
  2. inserted the SD, plugged the power usb cable

Expected behaviour

  • 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

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.

What am I missing here?


Can you share the configuration you changed on both files?

Usually connecting WiFi is working during initial boot. There might be an incorrect configuration.


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


# 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

Do you use any special characters on the WiFi password?

Nope. Just dots, letters and numbers.

Maybe dots are causing issues during script execution.

@MichaIng could you check pls

Only single quotes ' would cause issues and would need to be escaped, like


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:

cat /var/tmp/dietpi/logs/dietpi-firstboot.log

I‘m gonna do a fresh install so we can debug it. I’ll get back with the logs.

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. :slight_smile:

indeed strange if it is working now. Hard to troubleshoot.