C5: NTP temporarily disabled as it causes crashes

assert failed: udp_new_ip_type udp.c:1278 (Required to lock TCPIP core functionality!)
This commit is contained in:
Frank
2026-03-27 21:26:48 +01:00
parent 61f3c6c379
commit dfba1e97e6
2 changed files with 11 additions and 0 deletions

View File

@@ -667,6 +667,12 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
JsonObject if_ntp = interfaces[F("ntp")];
CJSON(ntpEnabled, if_ntp["en"]);
#ifdef CONFIG_IDF_TARGET_ESP32C5 // ToDO: esp32-c5 crashes on NTP requests
if (ntpEnabled) { DEBUG_PRINTLN("NTP disabled on -C5, as it leads to crashes"); }
// assert failed: udp_new_ip_type /IDF/components/lwip/lwip/src/core/udp.c:1278 (Required to lock TCPIP core functionality!)
ntpEnabled = false; // --> disable NTP support, until the crash is resolved
#warning "enabling NTP lead to crashes on -C5. NTP disabled"
#endif
getStringFromJson(ntpServerName, if_ntp[F("host")], 33); // "1.wled.pool.ntp.org"
CJSON(currentTimezone, if_ntp[F("tz")]);
CJSON(utcOffsetSecs, if_ntp[F("offset")]);

View File

@@ -548,6 +548,11 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
if (subPage == SUBPAGE_TIME)
{
ntpEnabled = request->hasArg(F("NT"));
#ifdef CONFIG_IDF_TARGET_ESP32C5 // ToDO: esp32-c5 crashes on NTP requests: assert failed: udp_new_ip_type udp.c:1278 (Required to lock TCPIP core functionality!)
if (ntpEnabled) { DEBUG_PRINTLN("NTP disabled on -C5, as it leads to crashes"); }
ntpEnabled = false;
#warning "enabling NTP lead to crashes on -C5. NTP disabled"
#endif
strlcpy(ntpServerName, request->arg(F("NS")).c_str(), 33);
useAMPM = !request->hasArg(F("CF"));
currentTimezone = request->arg(F("TZ")).toInt();