-
Notifications
You must be signed in to change notification settings - Fork 515
Closed
Labels
waiting for feedbackRequires response from original posterRequires response from original poster
Description
Im trying to connect over C++ / Arduino IDE
If i take the Example code it would connect only every second boot. No matter if just flashed or Hardreset:
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.println("");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
If I write it that way it would always conntect skipping the first try.
WiFi.begin(ssid, password);
if (WiFi.waitForConnectResult() != WL_CONNECTED) {
Serial.printf("STA: Failed!\n");
WiFi.disconnect(false);
delay(1000);
WiFi.begin(ssid, password);
}
it works with a while loop aswell. But he doesnt need more the a second attempt.
Anyone any Ideas? I guess its something about the router, i never experienced this with any ESP.
Thanks!
Metadata
Metadata
Assignees
Labels
waiting for feedbackRequires response from original posterRequires response from original poster