Adding wifi after initial boot

I’m trying to add Wi-Fi to my Pi after years of using it via Ethernet. I’ve enabled Wi-Fi in dietpi.txt and added credentials in dietpi-wifi and WPA supplicant. It’s still not connecting.

As the instructions are only for adding wifi for initial boot, I wonder if I’m doing something wrong.

Activate Wifi via dietpi-config, there you can also connect to networks and fill in the credentials

Sorry I forgot to mention it is headless.

And? Still go to dietpi-config and configure wifi

and I don’t have access because it’s not on the network, because I can’t get Wi-Fi to work.

and connecting a screen + keybord?

No.. . What I’m wanting to do should be entirely possible. I don’t know why it’s not working. It was very straightforward with raspbian.

Whatever you try on RPi OS should work on DietPi same way.

RPi OS can be pre-configured with the RPi Imager in a somewhat managed way.

@silver007
You did set AUTO_SETUP_NET_WIFI_ENABLED=1 in dietpi.txt and added credentials in dietpi-wifi.txt, like

aWIFI_SSID[0]='myssid'
aWIFI_KEY[0]='mykey'
aWIFI_KEYMGR[0]='WPA-PSK'

before first boot?

As of my understanding it’s a running system and not a new installation/image.