ESP32 WiFi reason 201: NO_AP_FOUND
The station scanned for the network you configured and did not find one it could connect to. That is not always a missing network: Espressif lists a password mismatch among the causes too.
WIFI_REASON_NO_AP_FOUND (201). Espressif's description: No AP found.
The usual causes
- The network is on 5 GHz only. The ESP32, S2, S3, C3 and C6 only have 2.4 GHz radios (the ESP32-C5 has both). A router with one SSID for both bands is fine; a 5 GHz-only SSID is invisible to them.
- The SSID does not match exactly: case, a trailing space, or a different character in the name.
- A password where there is none, or none where there is one. Espressif lists both: a password set when connecting to an open network, or no password set for an encrypted one, are reported as 201.
- Out of range, or on a channel the country setting does not allow (channels 12 and 13 are not scanned with some country settings).
- A hidden SSID, together with one of the above.
If an access point with that name was found but rejected, newer ESP-IDF versions report 210 (security), 211 (auth mode threshold) or 212 (signal threshold) instead.
Check what the ESP32 sees
Run a scan (esp_wifi_scan_start, or WiFi.scanNetworks() in Arduino) and print each network's SSID, channel, RSSI and auth mode. If your network is not in the list, it is the band, the range or the channel; if it is, compare the name byte by byte.
Where you see the number
In ESP-IDF, the WIFI_EVENT_STA_DISCONNECTED event carries it: ((wifi_event_sta_disconnected_t *) event_data)->reason. In Arduino, the ARDUINO_EVENT_WIFI_STA_DISCONNECTED event has it in info.wifi_sta_disconnected.reason, and WiFi.disconnectReasonName() turns it into a name. Log it every time: the reason is what separates a wrong password from a weak signal.
When it happens at a customer's site
On your desk you see the reason in the log. On a device behind someone else's router you only hear that it "goes offline sometimes". Pinscope keeps the device's logs and its WiFi signal over time, so you can see which reason it disconnected with and whether the signal was dropping before it did. Free for three devices. Remote logging.
Related errors: WiFi reason 210: NO_AP_FOUND_W_COMPATIBLE_SECURITY · WiFi reason 15 / 204: handshake timeout · WiFi reason 202: AUTH_FAIL · WiFi disconnect reasons. All ESP32 errors: the list. Reason codes and their meaning from Espressif's Wi-Fi Driver guide and esp_wifi_types.h.
More
- Remote access to an ESP32 without TLS: what it measured and what it costs
- Reaching an ESP32 web server from outside its network
- Updating ESP32 firmware over the internet, with rollback
- Guru Meditation Error: decoding the backtrace, and crashes from the field
- Remote logging: ESP_LOG without a serial cable
- Heap and stack monitoring in the field
- An ESP32 behind CGNAT, 4G or Starlink
- TLS memory usage on the ESP32, and how to reduce it
- Sharing an ESP32 sensor page with anyone, without port forwarding
- ArduinoOTA over the internet, with a rollback
- ESP32 remote access compared: port forwarding, ngrok, Cloudflare Tunnel, Tailscale
- esp_http_server slow? The 250 ms delay and the fix
- Before the first ESP32 ships: a field support checklist
- ESP32 exception decoder: a Guru Meditation backtrace to lines, in the browser