Skip to content

AUTH_FAIL loop following disconnect until ESP32 is power cycled. #918

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lonerzzz opened this issue Dec 11, 2017 · 9 comments
Closed

AUTH_FAIL loop following disconnect until ESP32 is power cycled. #918

lonerzzz opened this issue Dec 11, 2017 · 9 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@lonerzzz
Copy link
Contributor

Hardware:

Board: ESP32 Dev Module
Core Installation/update date: 2017/11/26
IDE name: Arduino IDE
Flash Frequency: 40Mhz
Upload Speed: 115200

Description:

Not sure if this issue already exists here or in the ESP32-IDF issues, but didn't see it.

After one of the recent core updates, I have noticed that in the event that the WiFi gets disconnected or the application calls WiFi.disconnect(true|false) such as when a WiFi.scan() has to be called (due to a known bug #758), that it is often no longer possible to reconnect to the WiFi router until the ESP32 is power cycled. The problem happens about 1 in 3 times. Sometimes a simple reboot fixes the problem, but generally the power cycle is required.

Every attempt to make a connection with WiFi.begin results in AUTH_FAIL in this scenario despite the WiFi.begin parameters being correct:

[W][WiFiGeneric.cpp:270] _eventCallback(): Reason: 201 - AUTH_FAIL

The following message sometimes occurs as well, but not always so it is not clear :
[W][WiFiGeneric.cpp:270] _eventCallback(): Reason: 8 - ASSOC_LEAVE

@ctruter
Copy link

ctruter commented Feb 1, 2018

@lonerzzz I have a simmilar issue, perhaps try to use a version before the 2017/11/24 update (81a9c45) - that worked for me.

I think the update of the IDF to e5b2c1c might have caused this behavior with the WiFi

@lonerzzz
Copy link
Contributor Author

lonerzzz commented Feb 12, 2018

@ctruter Thanks for the suggestion. Unfortunately, I need other functionality later than that date so I am stuck on this one.

UPDATE: Finally managed to get both by doing a reset to the 23rd and readding the specific changes we need

@me-no-dev Do you know if this issue is addressed in IDF or should be on the list of tasks for Arduino. I will add a bug to IDF if needed.

@projectgus
Copy link
Contributor

@lonerzzz I think this issue was addressed earlier in the year in IDF. Are you still seeing any problems like this with recent Arduino versions?

@chegewara
Copy link
Contributor

chegewara commented Jan 25, 2019

Hi @projectgus , its long time ago closed issue, but im having similar problem now with v1.0.1.
What is very strange all has been working for quite some time, but after teens of flashing during development process i have ASSOC_LEAVE and other errors during connect using WiFiMulti.

Another weird thing is that after changing esp32 all is working now (yes, ive been doing make erase_flash, but it wont help).

Because its commercial project with OTA update implemented, im afraid it can happen after some time.

@stickbreaker
Copy link
Contributor

stickbreaker commented Jan 25, 2019

@chegewara compare the NVS data from the non working one to your new working one. In my github i have a nvs display repo.
Show NVS

Chuck.

@projectgus
Copy link
Contributor

@chegewara What AP are you connecting to? Is it possible to test with a different AP (maybe set up a phone hotspot or something) and see if the problem only happens with a certain AP vendor or some other hardware variable?

@chegewara
Copy link
Contributor

@projectgus I am using smartphone AP, from samsung S9+. I dont have any issue with this AP and esp32, only problem is with that particular esp32 board, but this board worked earlier with the same code.
I flashed other esp32 board and all is ok.

Maybe i flashed that one board too many times and flash/nvs is faulty now.

@stale
Copy link

stale bot commented Aug 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Aug 1, 2019
@stale
Copy link

stale bot commented Aug 15, 2019

This stale issue has been automatically closed. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

5 participants