FAQ
TL;DR: ESP32 Wi‑Fi needs >=500 mA headroom; "Provide at least 500 mA." Most "won’t connect" cases trace to power, antenna, or blocking code. Use a stable 5 V source, short cable, decoupling, and retry logic. For makers whose ESP32 sees SSIDs but won’t associate. [“ESP32 Hardware Design Guidelines”]
Why it matters: You’ll fix flaky ESP32 Wi‑Fi fast and avoid chasing phantom firmware bugs.
Quick Facts
- Power integrity: ensure a 3.3 V rail capable of >=500 mA and place 10 µF + 0.1 µF decouplers close to VDD. [“ESP32 Hardware Design Guidelines”]
- Don’t trust random USB ports; test with a stable 5 V supply instead of PC USB. [Elektroda, khoam, post #17998673]
- Antenna sanity-check: run AP mode and measure RSSI on a phone Wi‑Fi scanner. [Elektroda, khoam, post #17998747]
- Clone risk: many “WEMOS‑style” ESP32 boards aren’t Espressif modules; originals are documented as ESP‑WROOM‑32. [Elektroda, khoam, post #18002606]
- Tasking: Arduino‑ESP32 loopTask runs on core 1; Wi‑Fi driver runs on core 0 by default. [Elektroda, khoam, post #18003054]
Why does my ESP32 see Wi‑Fi but never connect on USB power?
Brownouts and noise from weak USB ports cause handshake failures. Use a stable 5 V supply, a short cable, and add a capacitor at the power pin. Reflow suspect solder joints on clone boards. “WiFi problems are usually power‑supply related.” [Elektroda, kaczakat, post #17998944]
How can I test if the antenna or module is the problem?
Put the ESP32 in AP mode and measure signal strength from a phone. Move a few meters away and compare RSSI with a known‑good board. If RSSI is far lower, suspect antenna layout or damage.
- Flash AP example.
- Scan with a phone and note RSSI.
- Compare vs another ESP32 at the same spot. [Elektroda, khoam, post #17998747]
Will moving Wi‑Fi connect code from setup() to loop() fix it?
Not by itself. setup() and loop() run in the same FreeRTOS task on core 1. The Wi‑Fi stack executes on core 0. Add timeouts and retries rather than an infinite wait. “Arduino HAL in ESP32 is based entirely on RTOS‑SDK.” [Elektroda, khoam, post #18003054]
How should I set a static IP on ESP32 (Arduino) so it actually connects?
Set network parameters before connecting. Call WiFi.config(localIP, gateway, subnet, dns) before WiFi.begin(ssid, password). Ensure gateway and DNS match your router’s subnet. Mismatched settings silently prevent association. [“ESP32 Arduino: WiFi Library”]
Does USB cable length really affect ESP32 Wi‑Fi reliability?
Yes. Long or thin cables drop voltage during Wi‑Fi bursts, causing resets and failed association. Use a short, thick cable and add a local bulk capacitor on 5 V or 3.3 V near the module. [Elektroda, kaczakat, post #17998944]
Could my board be a bad clone or faulty ESP32 module?
Yes. Many WEMOS‑style ESP32 boards are non‑Espressif clones with weaker power design. Compare against an official ESP‑WROOM‑32 reference board. If the clone misbehaves while a reference board works, suspect the module. [Elektroda, khoam, post #18002606]
What’s a safe retry pattern for Wi‑Fi without freezing my sketch?
Avoid blocking while loops. Periodically check connection status in loop(), and call WiFi.begin() only when disconnected. Add backoff between attempts and log status codes. This mirrors the forum fix of moving logic into loop with retries. [Elektroda, Anonymous, post #18002847]
It connects only once when cold, then fails—what does that indicate?
That pattern was observed: “Always the first one when it is cold.” It suggests marginal hardware or power sensitivity. Swap modules, test with a stable 5 V supply, and recheck antenna as AP. These isolate board versus environment. [Elektroda, Przybyłek, #17998731]
How do I power the board correctly for Wi‑Fi tests?
Feed a regulated 5 V source into the board’s 5 V pin instead of a random USB port. Keep grounds solid and decouple near the module. Then retest association and DHCP to rule out power issues. [Elektroda, khoam, post #17998673]
Do core assignments in FreeRTOS affect Wi‑Fi stability?
Your Arduino loop runs on core 1, while the Wi‑Fi driver runs on core 0. Heavy work pinned to core 0 can hurt Wi‑Fi timing. Keep RF‑critical code non‑blocking. “WiFi stack execute on core 0.” [Elektroda, khoam, post #18003054]
How do I quickly check RF interference on my custom board?
Run the ESP32 as an AP and log RSSI on a phone while moving cables or turning peripherals on. Large RSSI dips near specific parts point to interference or poor antenna clearance. [Elektroda, khoam, post #17998747]
My code blocks on while(WiFi.status()!=WL_CONNECTED)—is that wrong?
Yes. Blocking prevents other tasks from running and masks timeouts. Add a connection timeout, then retry in loop() with delays or backoff. This simple change resolved repeated failures for a forum user. [Elektroda, Anonymous, post #18002847]
What differences between ESP‑WROOM‑32 and ESP‑32S matter for connectivity?
Original ESP‑WROOM‑32 modules follow Espressif’s RF and power guidelines and carry certifications. ESP‑32S and clones can vary in antenna and power components. Prefer documented originals for RF‑critical builds. [Elektroda, khoam, post #18002606]
How much current headroom and decoupling does ESP32 Wi‑Fi need?
Design for >=500 mA available on the 3.3 V rail to handle Wi‑Fi current transients. Place 10 µF bulk and 0.1 µF ceramic decouplers close to the ESP32 power pins with a low‑impedance ground. This prevents association brownouts. [“ESP32 Hardware Design Guidelines”]