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

drewlark
Posts: 4
Joined: Tue Jan 29, 2019 10:28 am

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

Postby drewlark » Tue Jan 29, 2019 10:34 am

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() {

}

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

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

Postby fly135 » Tue Jan 29, 2019 4:29 pm

The ESP32 only supports 2.4GHz wifi.

John A

drewlark
Posts: 4
Joined: Tue Jan 29, 2019 10:28 am

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

Postby drewlark » Tue Jan 29, 2019 4:34 pm

This shouldn't be an issue as my home wifi has both 2.4 and 5 ghz bands?
Last edited by drewlark on Wed Jan 30, 2019 10:42 pm, edited 1 time in total.

drewlark
Posts: 4
Joined: Tue Jan 29, 2019 10:28 am

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

Postby drewlark » Tue Jan 29, 2019 4:52 pm

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.

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

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

Postby jcsbanks » Wed Jan 30, 2019 9:22 am

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?

drewlark
Posts: 4
Joined: Tue Jan 29, 2019 10:28 am

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

Postby drewlark » Wed Jan 30, 2019 7:05 pm

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.

serlarra
Posts: 1
Joined: Tue Jul 07, 2020 12:16 am

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

Postby serlarra » Tue Jul 07, 2020 12:18 am

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

markevens
Posts: 38
Joined: Sat Aug 01, 2020 6:31 am

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

Postby markevens » Thu Dec 24, 2020 5:52 am

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

gmcrawford
Posts: 1
Joined: Sun Mar 10, 2024 7:46 pm

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

Postby gmcrawford » Sun Mar 10, 2024 7:56 pm

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...

Who is online

Users browsing this forum: Bing [Bot] and 75 guests