[Solved] Pre-configured wifi settings no longer working?

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
ISquishWorms
Posts: 8
Joined: Thu Jan 31, 2019 1:01 am

[Solved] Pre-configured wifi settings no longer working?

Post by ISquishWorms » Thu Jan 31, 2019 1:14 am

Hello,

When I tried to update DietPi earlier today it messed up, so I decided to go for a complete fresh reinstall. I set my pre-configured wifi ssid and password in the relevant config files as I have done several times before when doing a fresh install.

Only this time the details seem to take and work on first boot but after it reboots and auto updates from the downloaded image of 6.17 it will not connect back to the wifi network. I just get the message that it is waiting for valid network connection before continuing. I know the ssid and password I used are correct though as I was able to log in via ssh over wifi initially prior to it then rebooting to apply the latest update.

Am I doing something wrong or is this a known issue?

Thanks for any help. I am using a raspberry pi 3 model b+ should that make a difference.

ISquishWorms
Last edited by ISquishWorms on Mon Feb 11, 2019 11:45 pm, edited 1 time in total.

ISquishWorms
Posts: 8
Joined: Thu Jan 31, 2019 1:01 am

Re: Pre-configured wifi settings no longer working?

Post by ISquishWorms » Thu Jan 31, 2019 12:18 pm

I give up what characters are no longer allowed in wifi passwords?

The latest release seems like a mess to me, things that used to work no longer seem to.

User avatar
MichaIng
Legend
Posts: 1609
Joined: Sat Nov 18, 2017 5:21 pm

Re: Pre-configured wifi settings no longer working?

Post by MichaIng » Tue Feb 05, 2019 12:11 am

@ISquishWorms
Indeed we moved WiFi pre-settings into a new file, to allow adding multiple SSIDs. But this was with v6.17 so the image should already contain it.

You found the dietpi-wifi.txt on flashed SDcard beside the dietpi.txt?
Instead of double quotes, use single quotes around SSID and password, then no escaping is required at all, only for the single quote itself: ' => '\''

Within the WiFi settings GUI later, this will as well be done automatically, so no escaping required at all.

If the file does somehow not exist on your image, create it with content:

Code: Select all

# WiFi SSID (Case Sensitive)
aWIFI_SSID[0]='MySuperDooperWiFi'
# Key options: If no key (open), leave this blank
aWIFI_KEY[0]='0123456789'
# Available options: NONE (no key/open) | WPA-PSK | WEP | WPA-EAP (then use settings below)
aWIFI_KEYMGR[0]='WPA-PSK'
# WPA-EAP Options
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]=''
# Location of the certificate file (eg: /boot/mycert.cer)
aWIFI_CERT[0]=''

ISquishWorms
Posts: 8
Joined: Thu Jan 31, 2019 1:01 am

Re: Pre-configured wifi settings no longer working?

Post by ISquishWorms » Tue Feb 05, 2019 2:05 am

@MichaIng thanks for the reply.

I am not sure if I am understanding you correctly, but my issue is that the wifi password for my network no longer works when using DietPi. It did work on v6.17 but after upgrading to the latest version v6.20 DietPi no longer seems to be able to connect.

The password for my wifi network has the character \ used within it which seems to be causing the issue because when I change this character for a [ instead then DietPi is able to connect to the local wifi again.

I do not understand why characters that previously worked within the wifi password on v6.17 no longer seem to work in v6.20.

A wifi password such as this: aWIFI_KEY[0]="AAAAAAAAAAAAAAAAAAAAAAAAAAAAA\A;" worked on v6.17 but does not seem to work on v6.20.

What symbols are compatible with DietPi when setting a wifi password?

ISquishWorms.

User avatar
MichaIng
Legend
Posts: 1609
Joined: Sat Nov 18, 2017 5:21 pm

Re: Pre-configured wifi settings no longer working?

Post by MichaIng » Fri Feb 08, 2019 3:57 pm

Sorry for the late reply.

As said, when setting a WiFi password via dietpi-config, all characters should work, and, without any escaping. I am not 100% sure about wpa_supplicant, but that should not be an issue as well.
When you set your WiFi password, can you check cat /etc/wpa_supplicant/wpa_supplicant.conf if the password was added there exactly as it is raw, without escaping, only surrounded by double quotes?

ISquishWorms
Posts: 8
Joined: Thu Jan 31, 2019 1:01 am

[Solved] Pre-configured wifi settings no longer working?

Post by ISquishWorms » Mon Feb 11, 2019 4:08 pm

Thank you, changing the dietpi-wifi.txt so that my password was enclosed in " instead of ' worked.

Post Reply