I'm using IDF v5.3.0 and ESP-WROOM-32
The best way to describe this so that nothing gets lost is to present the scenario step by step:
1. AP is up (be it a router, an Android hotspot or even one created with NetworkManager on an RPi)
2. ESP32 is powered
3. ESP32 finds the AP, then authenticates and connects.
Code: Select all
I (758992) wifi:state: init -> auth (0xb0)
I (758992) wifi:state: auth -> assoc (0x0)
I (759002) wifi:state: assoc -> run (0x10)
4. ESP32 is either reflashed, rebooted or powered down and up again
5. ESP32 finds the AP but cannot authenticate, thus the retry mechanic kicks in but fails every time in the same way:
Code: Select all
I (717462) wifi:state: init -> auth (0xb0)
I (718462) wifi:state: auth -> init (0x200)
- turn off the ESP32, watch the paint dry for about 15 minutes, power it on and "maybe" it will connect (setting the retry count to some ludicrous amounts does not seem to work)
or
- turn the AP off and on again
Now that wouldn't be a problem if it wasn't a thing on practically any kind of AP I tried, which makes me think that naturally the issue must be related to ESP32 and how it handles either the connection or authentication process.
//Note
The problem now only occurs when I connect ESP32 to the RPi hotspot which I set up using nmcli. What's interesting is that ESP32 now has no problems reconnecting to any other AP, and other station devices have no problems reconnecting with the RPi hotspot either. Finally I changed literally nothing, as I rolled back and started from square one. I have no idea why this is a thing now.
I would very much appreciate any guidance, info, or literally anything as right now I'm just getting frustrated that something so simple seems to be so impossible to do.
I tried fixing the problem by changing the settings of the AP, in which case the hotspot set up on RPi given me the most freedom - but to no avail. I believe there is literally nothing else I could have tried, and the example code itself seems to be handling the reconnecting properly - sadly, reality is disappointing.
Cheers!
// Edit: some new revelations forced me to update the details.