Page 1 of 1

ESP32 won't connect to home WiFi, but connects to hotspot

Posted: Tue Jan 29, 2019 10:34 am
by drewlark
I recently acquired an ESP32 Arduino-Style board, and intend on using it with my home wifi. However, after doing a very simple initial test with some tutorial code I found online, I found that the board will simply loop forever, unable to connect to my home wifi. I have rigorously checked that I am using the correct SSID and password. In addition, I have found that the ESP32 connects just fine to a mobile hotspot. The simple example code is below:

Code: Select all

#include <WiFi.h>

const char* ssid = "REDACTED";
const char* password =  "REDACTED";

void setup() {

  Serial.begin(115200);

  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.println("Connecting to WiFi..");
  }

  Serial.println("Connected to the WiFi network");

}

void loop() {

}

Re: ESP32 won't connect to home WiFi, but connects to hotspot

Posted: Tue Jan 29, 2019 4:29 pm
by fly135
The ESP32 only supports 2.4GHz wifi.

John A

Re: ESP32 won't connect to home WiFi, but connects to hotspot

Posted: Tue Jan 29, 2019 4:34 pm
by drewlark
This shouldn't be an issue as my home wifi has both 2.4 and 5 ghz bands?

Re: ESP32 won't connect to home WiFi, but connects to hotspot

Posted: Tue Jan 29, 2019 4:52 pm
by drewlark
That isn't the problem,

My home internet has both 5.0GHz and 2.4 GHz bands. But since you said that I even tried making them separate networks and only connecting the esp32 to the 2.4GHz one - I am still unable to connect.

Re: ESP32 won't connect to home WiFi, but connects to hotspot

Posted: Wed Jan 30, 2019 9:22 am
by jcsbanks
Does your SSID or password have special characters? Password over 8 characters? WPA2-PSK? Do you have multiple access points with the same SSID? Restarted the router? Using MAC address filtering on router and forgot?

Re: ESP32 won't connect to home WiFi, but connects to hotspot

Posted: Wed Jan 30, 2019 7:05 pm
by drewlark
The password has an asterisk and 9 characters. Is this an issue? I have checked every setting on the router, im certain it is not using MAC address filtering. But if the above password issues are a problem then that could well be it.


EDIT: Well, I changed the name of the 2.4 channel to something short and different from 5.0. then I set the password to 8 characters all lowercase alpha. Still I am getting the same result sadly. I'm starting to think maybe I should just buy a raspberry pi and plug it in to my router and then use it as an access point for the ESP. Ugh.

Re: ESP32 won't connect to home WiFi, but connects to hotspot

Posted: Tue Jul 07, 2020 12:18 am
by serlarra
What brand is your router? I'm having the same issue but only with TP-Link routers. I tried both hotspots and different brands of routers and it works fine, only with TP-Link I get this problem and havne't been able to solve

Re: ESP32 won't connect to home WiFi, but connects to hotspot

Posted: Thu Dec 24, 2020 5:52 am
by markevens
I have same problem like that when i try to connect my TP-LINK router with C code it work. and after that i make only two changes for making c++ program

extern "C" void app_main(void)

before main function
and change file name from main.c to main.cpp

program compile upload success
and debug log show connected to router
but can't get IP from router

Re: ESP32 won't connect to home WiFi, but connects to hotspot

Posted: Sun Mar 10, 2024 7:56 pm
by gmcrawford
Has anyone found a solution to this issue? I'm using a esp32-wroom-ud dev board with the Arduino IDE. I can connect with no problem to a hot spot I created with my cell phone but I cannot connect to my home wifi network. I have verified my password is correct; I'm using 2.4g and the wifi signal strength is excellent. Thanks for any suggestions...