emmet62h
Posts: 3
Joined: Wed Jun 16, 2021 1:41 am

Using RSP-Zero WH with WPA2-PSK

Wed Jun 16, 2021 1:44 am

Hi all,

I am haven't connected to wifi yet with this board! I am having a pretty rough time. Here is my WPA_Supplicant code below. My wifi is 2.4Ghz with WPA-Personal wifi (WPA2-PSK should work). Please help.

File:
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid="Damon's Wi-Fi Network"
#ssid="ComputerCenter"
scan_ssid=1
psk="@@123"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
group=TKIP
auth_alg=OPEN
#key_mgmt=NONE
}
Last edited by emmet62h on Wed Jun 16, 2021 8:01 pm, edited 1 time in total.

drgeoff
Posts: 12062
Joined: Wed Jan 25, 2012 6:39 pm

Re: Using RSP-Zero WH with WPA2-PSK

Wed Jun 16, 2021 2:25 pm

Your wpa_suplicant.conf file is not in your post.
Quis custodiet ipsos custodes?

emmet62h
Posts: 3
Joined: Wed Jun 16, 2021 1:41 am

Re: Using RSP-Zero WH with WPA2-PSK

Wed Jun 16, 2021 8:02 pm

Thank you for letting me know. I put in text rather than attaching the file.

jbudd
Posts: 1839
Joined: Mon Dec 16, 2013 10:23 am

Re: Using RSP-Zero WH with WPA2-PSK

Wed Jun 16, 2021 8:12 pm

For WPA2-PSK you should only need

Code: Select all

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
	ssid="Damon's Wi-Fi Network"
	psk="@@123"
}
And if you are unfortunate enough to be dealing wih a hidden SSID add scan_ssid=1

Get rid of all those other lines including the comments and try again.
Make sure that the quotes have not been "enhanced" by a word processor.

Edit - I don't think it's a very good idea to have an apostrophe in your SSID. Maybe try changing that too.

emmet62h
Posts: 3
Joined: Wed Jun 16, 2021 1:41 am

Re: Using RSP-Zero WH with WPA2-PSK

Thu Jun 17, 2021 12:03 am

Thank you Jbudd for your quick response. I have tried that and it doesn't seem to work.

jbudd
Posts: 1839
Joined: Mon Dec 16, 2013 10:23 am

Re: Using RSP-Zero WH with WPA2-PSK

Thu Jun 17, 2021 12:14 am

If you use sudo raspi-config , System Options, Wireless LAN, does it let you enter an SSID and password without an error?
Does it create a new network={} stanza in wpa_supplicant.conf?

NB I think you must enter at least 8 characters for the password.
I wonder if that's a limitation of raspi-config or a requirement of wpa_supplicant.

Edit - following the suggestion from bls below, I tried

Code: Select all

pi@BlackPi:~ $ wpa_passphrase "Damon's Wi-Fi Network" <<< "@@123"
# reading passphrase from stdin
Passphrase must be 8..63 characters
So the example password from your original post is illegal. But I expect it's not your real password!
Last edited by jbudd on Thu Jun 17, 2021 12:28 am, edited 3 times in total.

bls
Posts: 1582
Joined: Mon Oct 22, 2018 11:25 pm
Location: Seattle, WA

Re: Using RSP-Zero WH with WPA2-PSK

Thu Jun 17, 2021 12:20 am

I couldn't find a definitive list of "special characters" to determine if a single quote is a special character, but in case it is, you could look at using a passphrase instead:

Code: Select all

bash$ wpa_passphrase SSID <<< "WiFiPassword"
network={
        ssid="SSID"
        #psk="WiFiPassword"
        psk=c9c3405ecf541762bdeadbeef68c05cb106d69112f604c9b2199effacefffeed
}
You can then paste the appropriate lines (e.g., the psk= line) into your wpa_supplicant.conf. If it works, then you'll know tha a single quote is a "special" character. Please let us know!
Pi tools:
Quickly and easily build customized-just-for-you SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure strongSwan VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo

Return to “General discussion”