Dear Community,
I switched from WiFi LoRa 32 V2 to V3. With V3 I have problems with connecting to WIFI.
Example Code:
// connect Wifi
WiFi.mode(WIFI_STA);
WiFi.persistent(false);
WiFi.setAutoReconnect(true);
WiFi.setSleep(false);
Serial.println("\nConnecting");
WiFi.begin(ssid, password);
int timeout_counter = 0;
while (WiFi.status() != WL_CONNECTED) {
// failed, retry
Serial.print(".");
delay(500);
timeout_counter++;
if(timeout_counter >= CONNECTION_TIMEOUT*5){
ESP.restart();
}
}
Serial.println("You're connected to the network");
Serial.print("Connected, IP address: ");
Serial.println(WiFi.localIP());
Serial.println(WiFi.getHostname());
Serial.println();
delay(1000);
bool success = Ping.ping("www.google.com", 3);
if(!success){
Serial.println("Ping failed");
return;
}
Serial.println("Ping succesful.");
delay(1000);
I now put in the ESP.restart(), sometimes it connects after 5s, sometimes after 3 minutes.
I had a look at the logs of the WIFI controller, it gives the following error:
WPA2 Key message 4 from Station xx:xx:xx:xx:xx:xx xx:xx:xx:xx:xx:xx ap2661 did not match the replay counter 01 vs 02
Reason Ptk Challenge Failed
SO there is an error with syncing the WIFI Key, with V2 there is completely no problem, so there is something wrong with WIFO with ESP32 S3 Chip.
DO you have any Idea? Is there a firmware update for that Board?
Thanks in Advance,
BR Mark