Wifi STA disconnect with error 203 - WIFI_REASON_ASSOC_FAIL

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Wifi STA disconnect with error 203 - WIFI_REASON_ASSOC_FAIL

Postby fly135 » Fri Aug 31, 2018 12:01 am

I'm getting disconnections when trying to connect to wifi using WPA2. The disconnect error is 203. The correct SSID/BSSID and password are provided to the AP and normally it will eventually connect. Now I'm getting reports from a tester that it never connects. I've asked this question on the board before and no one responded.

viewtopic.php?f=2&t=6349&p=28444

I did think that it resolved itself at the end of that thread, but it hadn't. I just never posted a follow up because nobody responded anyway.

Since we don't have access to the wifi source code there is nothing I can do to further diagnosis this error. Can I get some help on this and perhaps an explanation of why an error 203 WIFI_REASON_ASSOC_FAIL is randomly happening? Is there an identifiable reason why it should fail?

BTW, this happens with the DEVKIT as well as our HW.

John A

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

203 "system not ready" errors in WiFi

Postby fly135 » Tue Sep 04, 2018 8:44 pm

mikemoy wrote:
I'd like for the next chip to not have unknown failures connecting to wifi.
Really? I have not had one issue with the Wi-Fi. It's been a rock for me.
I get a random amount of 203 errors while trying to connect to WPA2. Sometimes none. Sometimes 20. If you aren't looking then you would only see it as slow to connect. If you aren't connecting to WPA2 then you probably won't get them at all.

Can't even get the guys from Espressif to acknowledge the problem. And since the Wifi is binary only, there is no code to even examine for a clue.

John A

Code: Select all

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (3258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (4258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (5258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (6258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (7258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (8258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (9258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (10258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (11258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (12258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (13258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (14258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (15258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (16258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (17258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (18258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (19258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (20258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (21258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (22258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203
system not ready
E (23258) wifi: Set status to INIT.

SYSTEM_EVENT_STA_DISCONNECTED, ssid:motive3, ssid_len:7, bssid:00:14:d1:3f:d1:ad, reason:203

mikemoy
Posts: 626
Joined: Fri Jan 12, 2018 9:10 pm

Re: What would you like to see in The Next Chip?

Postby mikemoy » Tue Sep 04, 2018 10:33 pm

I get a random amount of 203 errors while trying to connect to WPA2
I have always used WPA2, are you talking about WPA2 Enterprise ?
I have not tried Enterprise. But with WPA2 I have never seen anything like that.

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: What would you like to see in The Next Chip?

Postby fly135 » Tue Sep 04, 2018 10:35 pm

mikemoy wrote:
I get a random amount of 203 errors while trying to connect to WPA2
I have always used WPA2, are you talking about WPA2 Enterprise ?
I have not tried Enterprise. But with WPA2 I have never seen anything like that.
No, not Enterprise. But you are not necessarily looking for it either. The print out is my code in the wifi event handler. If you had error level debugging turned on you would see this...

E (5258) wifi: Set status to INIT.

mikemoy
Posts: 626
Joined: Fri Jan 12, 2018 9:10 pm

Re: What would you like to see in The Next Chip?

Postby mikemoy » Wed Sep 05, 2018 12:53 am

No, not Enterprise. But you are not necessarily looking for it either. The print out is my code in the wifi event handler. If you had error level debugging turned on you would see this...

E (5258) wifi: Set status to INIT.
I set it set for Verbose. I mean I saw it once when it initialized, but not repetitively. I'll give a close look next time.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Wifi disconnect error 203

Postby ESP_Angus » Wed Sep 05, 2018 2:55 am

(I've split this topic off from the Next Chip discussion and merged it with this post, to try and keep the discussion together.)

Sorry I didn't notice your posts about this before.

As you mention, reason 203 is WIFI_REASON_ASSOC_FAIL (wifi_err_reason_t), which is non-specific but means the ESP32 failed to associate for some reason. (The lower "reason" numbers are part of the 802.11 spec and are sent by the router if an association is rejected, but in this case the ESP32 is giving up.)

Is there some common factor in the model or config of the APs which the ESP32 is associating to? I don't see it on the WPA2-enabled APs I connect to, so my guess is there's some other factor which triggers it. Individual AP models and chipsets can have their own "quirks".

If you grab this main.c file and replace the main.c in the IDF template project, then set the ssid and password in the source file, build and flash with latest IDF master branch, do you get the association failures? If so, please copy the full output from the console.

If possible, the best thing for debugging would be a "monitor mode" frame capture of the ESP32 associating with the router. This is a capture of raw 802.11 frames so it's possible to see what the ESP32 is telling the router and what the router is saying back (apart from the encrypted parts, but you can see the basic structure of what's happening and often this is quite illuminating.) Many USB WiFi dongles and some internal WiFi cards can be switched into monitor mode and frames captured with Wireshark.

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Wifi STA disconnect with error 203 - WIFI_REASON_ASSOC_FAIL

Postby fly135 » Wed Sep 05, 2018 2:57 pm

Thanks for responding. I will use your test code and see if I can get one of my wifi's on the computer to capture packets off the air and report back.

John A

Who is online

Users browsing this forum: Bing [Bot] and 100 guests