Stuck on "Connecting to WiFi…" with dots
- ESP32
- ESP8266
You may see
Stay safe: Never share code or a screenshot with your real Wi-Fi password in it.
Why it happens
- The name or password has a typing mistake. Capitals and spaces count.
- The router uses only 5 GHz. These boards use 2.4 GHz.
- School or hotel Wi-Fi that asks you to sign in on a page.
- Too far from the router, or weak power.
How to fix it
- Copy the Wi-Fi name exactly as the phone shows it.
- Make a 2.4 GHz phone hotspot with a simple name and password and try that. On an iPhone switch on Maximise Compatibility.
- Print
WiFi.status(): 1 means the name wasn't found, 4 or 6 usually means the password is wrong. - Move closer and use a good cable.
It worked if: The Serial Monitor prints an IP address like 192.168.1.20.
Related errors
Tutorials where it can happen
- How to make an ESP32 Web Server?
- How to make an ESP8266 Web Server?
- ESP32 / ESP8266 - Realtime Database with Firebase
- ESP32 Async Web Server Code
- ESP32 DHT11 Web Server: Show Temperature and Humidity
- ESP32 Web Server: Control LED Brightness with a Slider
8 more
- ESP32/ESP8266 Data Logging to Firebase with Login
- ESP8266 NodeMCU Relay: Control AC Appliances
- How to use the BLE on the ESP32?
- Log DHT11 Data to Firebase Realtime Database: the Code
- Put Your Web Page on a Real ESP32
- Send Emails with ESP8266 NodeMCU
- Smart Plant Pot with ESP32 (IoT)
- What is a Web Socket Server?
From the official documentation. Status numbers from the ESP32 core source; 2.4 GHz from the chip datasheets. Sources: ESP32 core: WiFiType.h.
Didn't help? Search another error or ask us.

