Slow Wifi Connection

mojesp32s
Posts: 4
Joined: Wed Aug 22, 2018 5:01 pm

Slow Wifi Connection

Postby mojesp32s » Sun Sep 02, 2018 9:47 am

Hi

I am having problem with slow connection with my ESP32.

It takes around 10 seconds to connect. Is this normal or is there any other way to speed it up?

ESP-12 was much faster(light speed)! And the code is the same as for ESP32s.

Code: Select all

void WifiSettings() {

      WiFi.begin(ssid, passssss);

      int waitTimeLimit = 15;
      unsigned int startTime = millis()/1000;
      unsigned int endTime= millis()/1000;

      while (WiFi.status() != WL_CONNECTED && (endTime - startTime) <= waitTimeLimit) {
        endTime = millis()/1000;
      }
      
      if (WiFi.status() == WL_CONNECTED) {
        #ifdef DEBUG_WIFI
          Serial.println(String("WIFI - Connected to ") + WiFi.SSID());
        #endif
      }
}

Who is online

Users browsing this forum: No registered users and 111 guests