So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Guus
#67824 Hi,

I am currently working on a project where i make my ESP8266 create an access point which users can connect to using their phone.
Theres one problem however, when trying to connect to the Access Point it will take up to 60 seconds or more to fully connect. And sometimes (on iOS at least) it will not connect at all and give an error about being unable to connect.
Code: Select all  WiFi.disconnect();
  WiFi.mode(WIFI_AP);
  Serial.print("Autoconnect status: ");
  Serial.println(WiFi.getAutoConnect());
  WiFi.setAutoReconnect(false);
  WiFi.setAutoConnect(false);
  WiFi.softAPConfig(ip, gateway, subnet);
  if(WiFi.softAP(accessPointSSID, accessPointPassword, 6)) {
    Serial.print("Succesfully setup Access Point with:");
    Serial.print(accessPointSSID);
    Serial.print(", ");
    Serial.println(accessPointPassword);
  } else {
    Serial.print("Failed to setup Acces Point with:");
    Serial.print(accessPointSSID);
    Serial.print(", ");
    Serial.println(accessPointPassword);
  }


My loop function only has a call to handle the webserver (for api calls and such)
Code: Select allvoid loop(void) {
  server.handleClient();
}


This is how i setup the access point in setup function


Does anybody know how to resolve this issue?

Thanks for reading!
User avatar
By QuickFix
#67835 Normally a full connect should only take a couple of seconds.

Does this also occur with the first device that wants to connect or after a couple of devices are already connected?
I can imagine there's a limit of the number of devices that can connect to the ESP in AP mode simultaneously.
User avatar
By Guus
#67871
QuickFix wrote:Normally a full connect should only take a couple of seconds.

Does this also occur with the first device that wants to connect or after a couple of devices are already connected?
I can imagine there's a limit of the number of devices that can connect to the ESP in AP mode simultaneously.

The problem occurs on the very first device that connects and every other that connects afterwards aswell.