Determining if the wifi password is incorrect

arao23
Posts: 30
Joined: Tue Dec 13, 2016 4:44 pm

Determining if the wifi password is incorrect

Postby arao23 » Fri Dec 30, 2016 10:49 pm

I'm trying to determine whether the client-entered WiFi password is correct or not. What I did was listen for the SYSTEM_EVENT_STA_DISCONNECTED event to get the reason code.

I get either WIFI_REASON_AUTH_FAIL or WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT when I enter an invalid password (e.g. too short, or password doesn't match the AP password, etc). I'm not sure if this behavior is just my router or if there are other reasons I should be checking as well :)

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Determining if the wifi password is incorrect

Postby kolban » Tue Jan 03, 2017 1:26 am

I figured I would test your findings and I get exactly the same as you do. When I try to connect to my access point and provide an invalid password, sometimes I get reason code 15 (WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT) and sometimes I get 202 (WIFI_REASON_AUTH_FAIL).

My router is a Netgear WNDR3400v3.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

User avatar
mjahamel
Posts: 2
Joined: Thu Nov 16, 2017 1:32 am

Re: Determining if the wifi password is incorrect

Postby mjahamel » Thu Nov 16, 2017 1:36 am

Under the current build I am for some reason getting WIFI_REASON_AUTH_EXPIRE for incorrect passwords. This is for a NetGear WNDR3700. I'm seeing WIFI_REASON_NO_AP_FOUND if the SSID isn't present, which is OK, but I never see WIFI_REASON_AUTH_FAIL.

patakil
Posts: 8
Joined: Thu Apr 12, 2018 11:32 am

Re: Determining if the wifi password is incorrect

Postby patakil » Mon Sep 03, 2018 1:47 pm

Do we know something about this problem?
I only in some cases got WIFI_REASON_AUTH_EXPIRE, mostly my reason code is 0 with the wrong password.

Thanks

zavovi
Posts: 10
Joined: Thu Aug 10, 2017 10:21 am

Re: Determining if the wifi password is incorrect

Postby zavovi » Fri Mar 08, 2019 9:07 am

Hi all,
I have similar issue. When I try bas password for WiFi AP I get only reason 15 and 201, I have never get 202. Why?

Please, could you help me?

Best Regards,
Vilem

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

Re: Determining if the wifi password is incorrect

Postby jcsbanks » Fri Mar 08, 2019 10:02 pm

I do not get any events at all for wrong password for the last few months of the master branch.

Who is online

Users browsing this forum: abbas1375 and 106 guests