Wow thanks for this hint
I have the same problem with my Wemos D1 mini v3.0.0 and I can confirm that the I2C frequency hack works.
It doesnt matter if you use I2C or not but adding these lines made wifi work again:
i2c:
sda: GPIO3
scl: GPIO1
frequency: 800kHz
This problem also accoured only for the v3.0.0. I generally use the v2 wemos boards and none of them had this issue.
Thanks for this! It’s solved my wifi connection issue but now does mean once connected the display refresh is a bit slow. This is normally fine but my screen is reacting to a rotary encoder (with possible gif) so I could do with it being speedy. Is there a way to say “once connected drop this back to 1s” at all?
Edit… For anyone looking for the answer to my post. This is what works for me and allows me to have a display refresh rate of 0.1s. For some reason I still needed the frequency bit, even with the wait on boot.
I had this, and fixed it, by connecting the ESP to a 2.4 GHz network and selecting “Legacy” wireless mode on my router (which is an Asus ZenWiFi AX). My hypothesis is that the WiFi driver is incompatible with one of the 802.11 a/b/g/n/ac protocols.
I recently encountered this sort of issue when making some network changes. All of a sudden 3 esphome devices and 3 tasmota plugs started having connectivity issues. Each esphome device would spew out various “auth expired”, “4-way handshake timeout”, “authentication failed”, “probe request unsuccessful” and other wifi errors.
After trying a bunch of recommended fixes and getting nothing working, I realized that my router had automatically changed to channel 11, near the end of the range. Seeing as some people mentioned noise/interference causing these issues, I tried changing this to channel 5, closer to the middle of the road, and suddenly all of the devices stopped having issues. So, I’m pretty sure that’s part of the problem.
I had this issue and determined mine to be caused by band steering on my wifi/router. That is when the 2.4 Ghz wifi delays its response to your esp32 so that the 5ghz can respond first and try to get you to associate there instead. Unfortunately I could not turn this off on my wifi router but was able to work around it by specifying the BSSID to connect to in the esphome wifi config. And used the BSSID specific to the 2.4 Ghz radio along with fast connect setting.
Ended up ditching that router/wifi though after a while and getting something else.
Not relevant to Mini discussed above, but may help someone with Auth Expired problem on a bigger board that is suposed to be powered via DC barrel jack.
I had the same errors on WeMos D1 R32 (ArduinoUno-ish board with ESP33 and barrel connector for 5-12V power source)
Found this thread and tried to play with fixed IP, channel, etc. But nothing helped.
No matter what I was doing to the yaml - I was getting Auth Expired errors when it reboots after flashing.
Turned out that when this board is powered via Micro-USB port - it gets enough power to flash ESP32, but not enough power for it to work in the normal mode. Basically it was browning out after flashing and rebooting, while still connected to my laptop’s USB.
As soon as I disconnected it from usb and plugged it with 12v power adapter - it happily connected to WiFi. It has been working stable for multiple weeks since then.
Hello! I just dealt with a similar problem with ESP32 and Dallas sensors. Thanks my friend for the advice.
When used with an ESP32, Dallas sensors must be powered strictly at 3.3V, not 5V. If you use 5V, the chip is overloaded and gives 'Auth Expired' error.
power was the cause of my “auth expired” issues with my ESP-WROOM-32 boards. I am working on using one for a hall sensor project and it was very sporadic. Tried multiple boards and wifi networks with same result of “Auth Expired”, tried with board powered via computer usb so could read logs and also direct powered.
I then tried with the power supply cable to the hall sensor disconnected and it connects to wifi right away. Then I can connect the hall sensor and everything works. But it seems it will not boot and connect to wifi and power the hall sensor at the same time. Hall sensor wants 5V and it connected to the VIN pin on board.
So i guess I need to power the hall sensor not through the board?
It’s so stupid idea, but it works and… I don’t understand why.
I had similar problem.
My esphome script worked fine, then I updated esphome, installed new script and it stopped connecting to WiFi. I tried everything what I found, disabled all modules, changing passwords in router etc…, just only WiFi left - no progress. Then switched channel to 2 - no changes, then channel 5 - it started working.
It’s stupid, but simple to do, so please check and forget till next problems.
I tried going through all the channels and it didn’t resolve the issue for me. Still get auth expired attempting to connect.
I tried setting up 3 different esp32s and they can’t connect with esp-home. But the same dev boards with demo sketches from platformio and arduino connect just fine. I currently just can’t use esphome and I don’t understand what’s going on.
[I][wifi:277]: WiFi Connecting to 'MyWiFi2.4'...
[W][wifi_esp32:465]: Event: Disconnected ssid='MyWiFi2.4' bssid=[redacted] reason='Auth Expired'
[W][wifi:591]: Error while connecting to network.
[I][wifi:277]: WiFi Connecting to 'MyWiFi2.4'...
[W][wifi_esp32:465]: Event: Disconnected ssid='MyWiFi2.4' bssid=[redacted] reason='Auth Expired'
[W][wifi:591]: Error while connecting to network.
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.