Esp32-WROOM-32D can't connect to my home wifi

trashkev
Posts: 1
Joined: Sun Jan 08, 2023 6:53 am

Esp32-WROOM-32D can't connect to my home wifi

Postby trashkev » Sun Jan 08, 2023 6:56 am

I am trying to get my esp32 to connect to my wifi, but it attempts forever without connecting. I don't think there is anything wrong with the code. I'm thinking the issue is something with my router.

Code: Select all

#include<WiFi.h>

const char *ssid = "mySSID";  
const char *password = "myPW";
        
void initWiFi() {
      WiFi.mode(WIFI_STA);
      WiFi.begin(ssid, password);
      Serial.print("Connecting to WiFi ..");
      while (WiFi.status() != WL_CONNECTED) {
        Serial.print('.');
        delay(1000);
      }
      Serial.println(WiFi.localIP());
    }
    
    void setup() {
      Serial.begin(115200);
      initWiFi();
      Serial.print("RRSI: ");
      Serial.println(WiFi.RSSI());
    }
    
    void loop() {
      // put your main code here, to run repeatedly:
    }
I have a netgear router that puts out a 2.4G and 5G network. I ran a WiFi scan sketch on my esp32 and it successfully saw my 2.4Ghz wifi and identified it was using WPA2. I checked my router log and saw it thought my esp32 connection attempts were DoS attacks so i disabled DoS protection, and added my esp32's mac address to the allow list. None of that worked. any ideas here?

Who is online

Users browsing this forum: Baidu [Spider] and 93 guests