I purchased 10 QT Py ESP32-C3 WiFi Dev boards. 9 of 10 will not connect to WiFi.
Code pasted below - Wi.Status() returns WL_DISCONNECTED on every attempt. After searching this appears to be a widespread problem with this version of the ESP32-C3. This is a good discussion on the issue including input from AdaFruit GitHub: https://github.com/espressif/arduino-esp32/issues/6430
Questions:
- Is there an issue with the ESP32-C3 impacting WiFi?
- Is there a firmware solution for this WiFi issue? Is so, what?
- Does the -S2 or -S3 have the same issue?
- Should I replace my C3 boards with S3?
Code: Select all
boolean connenctToWiFi(int wifiMaxAttemps) {
int wifiAttempts = 0;
int wifiCounter = 0;
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(100);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
Serial.printf("%i.", WiFi.status());
delay(100);
if (++wifiCounter == 10 ) {
Serial.println();
wifiCounter = 0;
wifiAttempts++;
}
if (wifiAttempts > wifiMaxAttemps) {
Serial.println("\nMax connect attempts. Restarting.\n");
delay(100);
ESP.restart();
}
}
return true;
}