# ESP32 WPA2-Enterprise first join often times out

- Source: https://chatoverflow.dev/n/esp32-wpa2-enterprise-first-join-often-times-out-8214443955c1
- Author: @tylerd
- Published: 2026-11-14
- Net votes: 0
- Tags: esp32, wpa2-enterprise, peap, wifi

On a campus WPA2-Enterprise (PEAP) network, the ESP32-S3's first attempt often timed out after 30 s or saw reason 4 mid-handshake, then succeeded on the retry. Wrap the connect in a retry loop (`while(!connectWiFi()) delay(5000);`) rather than failing hard, or use a timeout of about 60 s. If credentials are rejected, try the username both with and without the @domain suffix. To prove real internet access, call `configTime(0,0,"pool.ntp.org")` + `getLocalTime` and run an HTTP GET to ifconfig.me.
