How to set up internal wifi (rpi 3 B)?

hi I did this tutorial

but for aWIFI_KEY[0]=“MyWifiKey” I introduced my password,

am I supposed to introduce username there too? and how is the structure?

please let me know which files to change to make Wifi work (is already enabled in dietpi-config)

Thanks in advance


If your WiFi router is setup with WPA/2-PSK (most common), you simply need to edit:

If the system is already running, you can use the following to setup WiFi connection using scan:

  • dietpi-config
  • Goto: Networking Options: Adapters > WiFi > Scan

yes, I found the SSID, the question is how to fill in this field

is just my wifi password? where goes the user then?

this is an univ so we have login like


I guess?

hi there, I tried a dozen of combinations but didnt work since it is a bit more advanced the password (needs user and password)

It works when use my smartphone with tethering giving WIFI thought

so can anyone tell me how is the structure to fill-in user and password?

If user and password is required, you use WPA-EAP authentication. Please open:
nano /var/lib/dietpi/dietpi-wifi.db

There you should see 5 WiFi credential slots. If you already tried to configure your WiFi and scanned for the SSID, it should be already stored in the first slot, otherwise set:
aWIFI_SSID[0]=‘your_SSID’ # I hope you have no single quote ’ inside your SSID, otherwise you would need to replace it by ‘’’, same for user and password below.

Then there are a bunch of EAP specific settings:

Identity and password are your user and password. You should be able to find the required settings from the access point (router?) or other WiFi devices. For explanations, I just found:
The settings names are the same, just capitalized and with leading “aWIFI_”.
Leave those empty, where you are not sure, check the examples within the link. In many cases there are reasonable defaults, or empty means “any” method is allowed.
Please leave all set values within single quotes and in case of empty values leave the two single quotes in place as well.

After you added the required values, run /DietPi/dietpi/func/dietpi-wifidb 1 to apply changes to wpa_supplicant.
Then run:
ifdown wlan0
ifup wlan0
to reinit your WiFi interface and see if it connects correctly.

Sadly so far we have no GUI to apply WPA-EAP settings. Also it would be great if we could find a way to scan for authentication methods automatically to pre-fill most fields.

Yeah WPA-PSK is much easier, just SSID and key required and you are good to go. WPA-EAP has sooo many different internal and external methods and in many cases (e.g. my university WiFi) many of them need to be set correctly to connect.

thanks buddy, pretty complex, I will give it a try then, and get back to you :slight_smile:

Jep, remember how you configured WiFi for you notebook and/or mobile phone, to connect to your university WiFi, perhaps there was also a certificate required. E.g. on my university it is eduroam, WPA-EAP, aWIFI_EAP[0]=‘TTLS’, I also needed to add an anonymous identity ( and on some systems a certificate (if not pre-installed on the system defaults). Since our settings file does not yet have a field for anonymous identity, in case, after applying via dietpi-wifidb 1, you need to manually add this to /etc/wpa_supplicant/wpa_supplicant.conf.

Please let us know, if/how it works. I anyway aim to enhance WPA-EAP with GUI and such, but I don’t know yet, which values are usually required and how to identify/check which. Note this is pretty new. In the past, via dietpi-config it was not possible to set EAP authentication at all, so this is kinda experimental, due to it’s complexity :wink:.

Also perhaps there is a good package for Debian available that does all the scanning for authentication methods that we can use in the future :thinking:.

I’m having Rpi 3 issues too. I upgraded via the Dietpi upgrade menu and the wifi settings seem to be wiped (I had the default superdooper in the list). Setting via the network settings woks - I had to do manual, scan does not produce results, just goes back to the menu - but the RPi will not connect - thows back the .100 address.

I just tried the /var/lib/dietpi/dietpi-wifi.db and it reports as zero bytes, but, curiously, modified this am.

Thanks for the in-depth description of how to set up said wifi network. I’ve never tried it before, but I did it right now with this thread opened in a tab, and I managed to configurate the network quickly.
I’d have been stuck at the “do not escape any magic characters” stage if not for you guys… Now I’m ready to move on to my next DietPi project!

Thanks for feedback.

Jep, we needed to do the magic character escaping for SSID and passwords within the script itself.
Which one needs to be escaped and which one not, depends on how the strings are handled and stored and how they need to be saved within wpa_supplicant.conf to be read correctly. To avoid any potential issues with that and making it unnecessary complicated for end users, we now simply do it internally. This as well allows us (or wpa_supplicant devs) to update the methods without the need to update the API/docs for users every time.