this is the output on the serial after the restart
[W][wifi:604]: Error while connecting to network.
[W][wifi:640]: Restarting WiFi adapter...
[I][wifi:286]: WiFi Connecting to 'Sweet_Spot_IoT'...
[W][wifi_esp32:458]: Event: Disconnected ssid='Sweet_Spot_IoT' bssid=88:B1:E1:2D:12:F2 reason='Auth Expired'
[W][wifi:604]: Error while connecting to network.
[W][wifi:640]: Restarting WiFi adapter...
[I][wifi:286]: WiFi Connecting to 'Sweet_Spot_IoT'...
[W][wifi_esp32:458]: Event: Disconnected ssid='Sweet_Spot_IoT' bssid=88:B1:E1:2D:12:F2 reason='Auth Expired'
[W][wifi:604]: Error while connecting to network.
[W][wifi:640]: Restarting WiFi adapter...
[I][wifi:286]: WiFi Connecting to 'Sweet_Spot_IoT'...
[W][wifi_esp32:458]: Event: Disconnected ssid='Sweet_Spot_IoT' bssid=88:B1:E1:2D:12:F2 reason='Auth Expired'
[W][wifi:604]: Error while connecting to network.
[W][wifi:640]: Restarting WiFi adapter...
[I][wifi:286]: WiFi Connecting to 'Sweet_Spot_IoT'...
I also have the ability to scan the ring buffer on my APs for the client itself and any probes its making, and the MAC that is showing when I erase the chip using esptool is either not the mac it uses in the airspace, or my APs aren’t hearing a packet come out of it. This is looking like a driver issue or something at a much lower level than configuration.
I even tried an ancient (2006) Netgear 802.11g AP. Single SSID basic WPA2 PSK all the same error, and I can’t see anything coming out of the chip in airspace at all. no probes or anything. Something is broken in this things 802.11 it seems. I have also powered it using my benchtop power supply at 3.45v with 10a available on the 3.3v pins. So power is not the issue.
[I][wifi:500]: - 'I'm a rogue 2' (00:14:6C:C6:BE:F1) ▂▄▆█
[D][wifi:501]: Channel: 11
[D][wifi:502]: RSSI: -79 dB
[D][wifi:505]: - 'Sweet_Spot_IoT' (88:B1:E1:29:EB:61) ▂▄▆█
[D][wifi:505]: - 'Sweet Spot' (30:86:2D:B0:70:90) ▂▄▆█
[D][wifi:505]: - 'Sweet_Spot_IoT' (30:86:2D:B0:70:91) ▂▄▆█
[D][wifi:505]: - 'Sweet Spot' (88:B1:E1:29:EB:60) ▂▄▆█
[D][wifi:505]: - 'Sweet_Spot_IoT' (88:B1:E1:2D:12:F2) ▂▄▆█
[D][wifi:505]: - 'Rogue AP' (00:14:6C:C6:BE:F0) ▂▄▆█
[D][wifi:505]: - 'Rogue'n around' (00:14:6C:C6:BE:F2) ▂▄▆█
[I][wifi:286]: WiFi Connecting to 'I'm a rogue 2'...
[W][wifi_esp32:458]: Event: Disconnected ssid='I'm a rogue 2' bssid=00:14:6C:C6:BE:F1 reason='Auth Expired'
[W][wifi:604]: Error while connecting to network.
[W][wifi:640]: Restarting WiFi adapter...
[I][wifi:286]: WiFi Connecting to 'I'm a rogue 2'...
[W][wifi_esp32:458]: Event: Disconnected ssid='I'm a rogue 2' bssid=00:14:6C:C6:BE:F1 reason='Auth Expired'
[W][wifi:604]: Error while connecting to network.
[W][wifi:640]: Restarting WiFi adapter...
[D][wifi:441]: Starting scan...
[D][wifi:456]: Found networks:
[I][wifi:500]: - 'I'm a rogue 2' (00:14:6C:C6:BE:F1) ▂▄▆█
[D][wifi:501]: Channel: 11
[D][wifi:502]: RSSI: -78 dB
[D][wifi:505]: - 'Sweet Spot' (88:B1:E1:29:EB:60) ▂▄▆█
[D][wifi:505]: - 'Sweet_Spot_IoT' (88:B1:E1:29:EB:61) ▂▄▆█
[D][wifi:505]: - 'Sweet Spot' (30:86:2D:B0:70:90) ▂▄▆█
[D][wifi:505]: - 'Sweet_Spot_IoT' (30:86:2D:B0:70:91) ▂▄▆█
[D][wifi:505]: - 'Sweet_Spot_IoT' (88:B1:E1:2D:12:F2) ▂▄▆█
[D][wifi:505]: - 'Rogue AP' (00:14:6C:C6:BE:F0) ▂▄▆█
[D][wifi:505]: - 'Rogue'n around' (00:14:6C:C6:BE:F2) ▂▄▆█
[I][wifi:286]: WiFi Connecting to 'I'm a rogue 2'...
[W][wifi_esp32:458]: Event: Disconnected ssid='I'm a rogue 2' bssid=00:14:6C:C6:BE:F1 reason='Auth Expired'
[W][wifi:604]: Error while connecting to network.
[W][wifi:640]: Restarting WiFi adapter...
[I][wifi:286]: WiFi Connecting to 'I'm a rogue 2'...
[W][wifi_esp32:458]: Event: Disconnected ssid='I'm a rogue 2' bssid=00:14:6C:C6:BE:F1 reason='Auth Expired'
[W][wifi:604]: Error while connecting to network.
[W][wifi:640]: Restarting WiFi adapter...
Having 2 similar D1 mini ESP32s here. One works like a charm (less ble_tracker issues), the other cannot connect to wifi. Same config uploaded via USB.
Extra 1000uF on the 3.3V did not help. Nothing attached.
with software: ESPHome-Flasher-1.4.0-Windows-x64.exe i flashed BOTH with the SAME firmare one of this i have problem with connection to wifi with
reason=‘Auth Expired’
So i think that this is an hardware problem (one modem only the same distance to the modem with both ESP32).
Now i try to contact the manufacturer
I found this thread looking for the same kind of “auth expired” problem.
I had two ESP32 devices (listed on Ali as “ESP32 TYPE-C USB CH340C CP2102 WiFi+Bluetooth Ultra-Low Power Dual Core ESP32-DevKitC-32 ESP-WROOM-32 Expansion Board”).
Neither worked with my config, so I suspected I’d made a mistake.
I switched to a different type of ESP (micro USB instead of USB-C if that matters), and it worked fine.
I then installed WLED on the two non-working ESPs and it installed but could not connect to my network.
I will now contact the seller for a refund on my devices that seem like duds.
Hi, did you get this working?
I have the same situation where after programming using the esphome run xyz.yaml tool (DEBUG on) Wifi connects instantly and everything works fine. Then breaking that link and linking using cutecom it just sits and “Auth Expired” the whole time.
What is weird is going back to using esphome logs xyz.yaml and pressing the modules reset button, Wifi works again.
None of the settings in this thread worked sofar.
Tried that, and it did not resolve my ESP32 connection issues. Tried switching from WPA2-Personal to WPA2/WPA3-Personal (it appears to be a newer option) but it’s not helping. Last option is to disable the logger: section as noted above. No, that did not resolve it, either. Quite aggravating.
The blame for the aggravation rests solely with the module/board/ESP32 manufacturer. Two of three ESP32-S3-WROOM-1 boards in a single purchase were BAD. The first would not register correctly with USB, failing to provide a valid Device Descriptor. The second would not connect via WiFi no matter what was attempted. Only the third would actually load and connect.
After struggling with this for a week I finally solved my issue. I popped the shield off the esp module and it looked awful. The solder paste didn’t look like it had melted all the way and components were askew. I reflowed the board, put the shield back on and I get a fast and reliable connection now.
I had a similar problem with an ESP32-CAM board. The issue turned out to be the power regulation on the ESP32-CAM-MB. When I directly connected the ESP board the issue went away.
I have the same issue here with a brand new ESP8266 nodemcu…
The board SHOULD read 3 dallas temperature sensors (DS18b20)… SAME base-config as already used on 11 other boards of the same type…
BASE-Config is done via a common Package… so typos or similar are nearly impossible, as then ALL others also wouldn’t connect,…
Log of the “new” device directly after flashing with only BASE-Config over usb…
[I][logger:034]: Log initialized
[14:45:20][C][ota:483]: There have been 0 suspected unsuccessful boot attempts.
[14:45:20][I][app:029]: Running through setup()...
[14:45:20][C][wifi:038]: Setting up WiFi...
[14:45:20][C][wifi:051]: Starting WiFi...
[14:45:20][C][wifi:052]: Local MAC: 8C:AA:B5:76:60:4C
[14:45:20][D][wifi:462]: Starting scan...
[14:45:20][W][component:157]: Component wifi set Warning flag: unspecified
[14:45:26][D][wifi:477]: Found networks:
[14:45:26][I][wifi:520]: - 'PRIVAT' [redacted]▂▄▆█
[14:45:26][D][wifi:522]: Channel: 12
[14:45:26][D][wifi:523]: RSSI: -26 dB
[14:45:26][I][wifi:520]: - 'PRIVAT' [redacted]▂▄▆█
[14:45:26][D][wifi:522]: Channel: 5
[14:45:26][D][wifi:523]: RSSI: -59 dB
[14:45:26][I][wifi:520]: - 'PRIVAT' [redacted]▂▄▆█
[14:45:26][D][wifi:522]: Channel: 9
[14:45:26][D][wifi:523]: RSSI: -63 dB
[14:45:26][I][wifi:520]: - 'PRIVAT' [redacted]▂▄▆█
[14:45:26][D][wifi:522]: Channel: 6
[14:45:26][D][wifi:523]: RSSI: -77 dB
[14:45:26][I][wifi:303]: WiFi Connecting to 'PRIVAT'...
[14:45:28][W][wifi_esp8266:504]: Event: Disconnected ssid='PRIVAT' bssid=[redacted] reason='Auth Expired'
[14:45:28][W][wifi:633]: Error while connecting to network.
[14:45:28][D][wifi:677]: Retrying with hidden networks...
[14:45:28][I][wifi:303]: WiFi Connecting to 'PRIVAT'...
[14:45:30][W][wifi_esp8266:504]: Event: Disconnected ssid='PRIVAT' bssid=[redacted] reason='Auth Expired'
[14:45:30][W][wifi:633]: Error while connecting to network.
[14:45:30][D][wifi:677]: Retrying with hidden networks...
[14:45:35][I][wifi:303]: WiFi Connecting to 'PRIVAT'...
[14:45:43][W][wifi_esp8266:504]: Event: Disconnected ssid='PRIVAT' bssid=[redacted] reason='Auth Expired'
[14:45:43][W][wifi:633]: Error while connecting to network.
[14:45:43][D][wifi:677]: Retrying with hidden networks...
[14:45:43][I][wifi:303]: WiFi Connecting to 'PRIVAT'...
[14:45:45][W][wifi_esp8266:504]: Event: Disconnected ssid='PRIVAT' bssid=[redacted] reason='Auth Expired'
[14:45:45][W][wifi:633]: Error while connecting to network.
[14:45:45][D][wifi:677]: Retrying with hidden networks...
I’ve tried to figure out where wifi is setting the “warn-flag” but my “C-experiance” is ways too small for that…
Has anyone any idea how to get a step further?
!!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
EDIT:
Yesterday I tried half the day to get the ESP connected and then decided to post my problem…
A few minutes ago I gave it a next try… and it connected like a charm… No change in equipment, no power cycle anywhere, …
To reproduce the error I reflashed, configured with the desired sensors WITHOUT connecting them and reflashed again… The silly thing connects like a charm…
I think the GREMLINS were visiting me… !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
EDIT 2:
NO There were no Gremlins! There is TP-Link!!!
I have 2 TP-Link TL-WA850RE running here, which I have configured as AccessPoint and 2 as Repeater. If the ESP’s try to connect to the AP they log the mentioned “auth expired” and get no connection… if they try to connect to the Repeater everything is fine… Even if the Repeater is connecting to the TP-Link-AP!!! All TP-Links have same settings and firmware…
About 20 Shellies, some Phones and Laptop’s have NO Problem in connecting to the TP-Link AP’s…
Well, gotta say I struck this problem myself over the past couple of days. For the life of me could not work it out. Thought maybe the esp device needed to be fully erased, but no that didn’t help. Tried removing various settings and eventually went to bare basics - nope. Tried fixed ip address, tried all sorts of things. At one point it seemed to fix itself, but then went bad again. Having recently moved over to a TP-Link switch to provide DHCP I thought maybe that was the problem, but no.
The fix - well, in my case I found that the wifi signal for the thing was weak. It worked as soon as I got closer to one of my APs. The auth error I believe was due to the device trying to authenticate with the network but timing out - due to low bandwidth - during the handshake process where the encryption key is shared, and I had recently relocated the AP it would normally have connected to. Turns out the specific esp32 device I was using has a poor antenna, and it usually worked fine in the location it normally lives (as it’s quite close to an AP) but not where I was configuring it. Note that if you have multiple APs like I do, the device may randomly latch on and try to connect to one with a weaker signal - resulting in intermittent issues like those I was experiencing. Also worth checking from the AP side which AP it is trying to connect to.
Something that can help is to use code such as this to monitor the signal strength to help with diagnostics:
All the suggestions mentioned are correct and useful…
In MY case, it doesn’t matter which ESP I try to connect to which TP-Link AP… The AP that originally caused my problem had an RSSI of about 60 dbm, while the repeater (that I was able to connect to) was showing about 70 dbm… In MANY attempts, I found out that it made no difference if the connection to the AP showed 40 dbm or 80 dbm…