I have 5 ESP32-WROOM-32D model esp32 devices. Two of them connect and work perfectly fine on my own Wi-Fi network. I'm testing them individually, not all at once. However, three of them cannot connect to my home Wi-Fi network, but they can connect to my hotspot network. Both Wi-Fi networks operate at 2.4GHz.
Here are the details of my home network:
ssid = "TP5"
pass="123123Dyg+"
I've set my phone's hotspot settings to the same ssid and password for debugging purposes can connect also , but it couldn't connect to my home Wi-Fi network.
WiFi.status() constantly returns 0.g.
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(1000);
WiFi.mode(WIFI_STA);
delay(500);
WiFi.begin(ssid, pass);
Serial.println(ssid);
Serial.println(pass);
static int connectionCount = 0;
//Serial.println("\nConnecting...",ssid,pass);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
setLedColor(LED_RED_COLOR);
// WiFi.mode (WIFI_AP_STA);
Serial.println("Connecting to WiFi..");
connectionCount++;
if (Serial.available() > 0) {
processCommand("command");
}
else{
if(connectionCount > 8){
connectionCount = 0;
delay(100);
ESP.restart();
break;
}
}
}
if (WiFi.status() != WL_CONNECTED) {
Serial.println("Wifi Connection not found");
return false;
}
Serial.println("Connected to the WiFi network");
connectionCount = 0;
//setLedColor(LED_GREEN_COLOR);
return true;
}
kodu buraya yazın veya yapıştırın
I moved your topic to a more appropriate forum category @duyci.
The Nano ESP32 category you chose is only used for discussions directly related to the Arduino Nano ESP32 board.
In the future, please take the time to pick the forum category that best suits the subject of your question. There is an "About the _____ category" topic at the top of each category that explains its purpose.
I had similar problems with connecting with the main Wifi network, I worked on a project last year and connected all the ESP 8266 modules to the laptop hotspot which was then connected to the main Wifi. The project worked perfectly. If you are having issues I recommend to type in the 192.168.1.1 IP on your Browser to access the Main Router settings, but you will need to know the password, you will most likely get the password to your network on the packaging of the Router
I didn't change anything, when I tried it the next day it connected to the wifi network. I wonder if the MAC address was temporarily banned by the wifi network?