Skip to content

Commit

Permalink
Increase esp32c3 stability over wifi (meshtastic#5774)
Browse files Browse the repository at this point in the history
* Increase esp32c3 stability over wifi

* only apply the fix on esp32c3 based nodes
  • Loading branch information
macvenez authored Jan 7, 2025
1 parent cdcbf4c commit 3537406
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mesh/wifi/WiFiAPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ static int32_t reconnectWiFi()
delay(5000);

if (!WiFi.isConnected()) {
#ifdef CONFIG_IDF_TARGET_ESP32C3
WiFi.mode(WIFI_MODE_NULL);
WiFi.useStaticBuffers(true);
WiFi.mode(WIFI_STA);
#endif
WiFi.begin(wifiName, wifiPsw);
}
isReconnecting = false;
Expand Down

0 comments on commit 3537406

Please sign in to comment.