heehaw1900
Posts: 13
Joined: Mon Aug 08, 2016 8:34 pm

wpa_passphrase hostapd problem

Fri Aug 12, 2016 2:18 am

Hello,

When I try to connect my smartphone to my pi 3 through wifi using hostapd, the password for some reason isn't recognized. It says password is 'incorrect' although I have double checked that I am indeed typing in the right passphrase. In the hostapd code it looks like this

Code: Select all

wpa_passphrase=raspberry
.

Your help would be appreciated

epoch1970
Posts: 7732
Joined: Thu May 05, 2016 9:33 am
Location: France

Re: wpa_passphrase hostapd problem

Fri Aug 12, 2016 8:07 am

I've seen this, I suspect this is due to a timeout when turning the clear text password into the hash used for authentication.
You could try using "wpa_passphrase <ssid> <password>" to generate the hash offline and then use that string directly in hostapd (replace "wpa_passphrase=... with "wpa_psk=<hash>")
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

heehaw1900
Posts: 13
Joined: Mon Aug 08, 2016 8:34 pm

Re: wpa_passphrase hostapd problem

Sat Sep 03, 2016 11:52 pm

Could you give an example

User avatar
rpdom
Posts: 20045
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: wpa_passphrase hostapd problem

Sun Sep 04, 2016 6:39 am

Ok, assuming your SSID is "MY_PI_WIFI" and your passphrase is "Raspberry"

Code: Select all

pi@raspi5 ~ $ sudo wpa_passphrase MY_PI_WIFI raspberry
network={
	ssid="MI_PI_WIFI"
	#psk="raspberry"
	psk=1bc02284224c758bfd2f26c1e2ba7e7111a68137ee9790707da1d155d2b1c13d
}
Now you can set

Code: Select all

wpa_psk="1bc02284224c758bfd2f26c1e2ba7e7111a68137ee9790707da1d155d2b1c13d"
instead of

Code: Select all

wpa_passphrase=raspberry

heehaw1900
Posts: 13
Joined: Mon Aug 08, 2016 8:34 pm

Re: wpa_passphrase hostapd problem

Sat Jan 06, 2018 6:06 am

Thanks

tpaullee
Posts: 5
Joined: Fri Feb 07, 2020 5:06 pm

Re: wpa_passphrase hostapd problem

Thu Mar 12, 2020 6:35 pm

rpdom wrote:
Sun Sep 04, 2016 6:39 am
Ok, assuming your SSID is "MY_PI_WIFI" and your passphrase is "Raspberry"

Code: Select all

pi@raspi5 ~ $ sudo wpa_passphrase MY_PI_WIFI raspberry
network={
	ssid="MI_PI_WIFI"
	#psk="raspberry"
	psk=1bc02284224c758bfd2f26c1e2ba7e7111a68137ee9790707da1d155d2b1c13d
}
Now you can set

Code: Select all

wpa_psk="1bc02284224c758bfd2f26c1e2ba7e7111a68137ee9790707da1d155d2b1c13d"
instead of

Code: Select all

wpa_passphrase=raspberry
You are amazing in pointing out possible time-out problem with p3. Every once a while, password can work and I think that's the timing issue,
I ended up not using " .... " in wpa_psk in my .conf file for it to work.
Thanks!

Return to “Raspberry Pi OS”