Repository navigation
With ESPNow remote and no wifi WLED reboots every 15-20min (fixed in 17.0.0-dev) #5614
Description
Activity
not sure if this is related: #5336 I will have to try disabling mdns
@hez please also check if stability improves without the esp-now remote (remove it from settings).
@hez please also check if stability improves without the esp-now remote (remove it from settings).
Without a wifi AP and no remote the lights will become very hard to control. 😬
Yes, but it's a test. I want to know if esp-now freaks out without wifi connection (the esp-now service is still running even when you don't press buttons on your remote)
- addedcannot reproduceDevelopers are not able reproduce. Might be fixed already, or report is missing important detailsDevelopers are not able reproduce. Might be fixed already, or report is missing important details
on May 14, 2026 @hez please also check if stability improves without the esp-now remote (remove it from settings).
I tested it a few times here and quite repeatedly with the ESPNow remote set it reboots.
- with ESPNow remote configured AND wifi: ✅
- with no ESPNow configured AND wifi: ✅
- with no ESPNow configured AND no wifi: ✅
- with ESPNow remote configured AND no wifi: 🛑 reboots every 15-20min
Reacted by Frank Möhle- changed the title
[-]When no wifi WLED reboots every 15-20min[/-][+]With ESPNow remote and no wifi WLED reboots every 15-20min[/+]on May 14, 2026 Ok, managed to get a crash dump with the latest source code in
main
the condition seems to be- ESP-NOW enabled
- Wifi connection credential stored, but invalid (= WLED cannot connect to the network)
---DEBUG INFO--- Runtime: 1351891 Unix time: 1351,891 === Memory Info === DRAM 8-bit: Free: 26236 bytes | Largest block: 9716 bytes DRAM 32-bit: Free: 49356 bytes | Largest block: N/A TX power: 60/78 Wifi state: 1 ESP-NOW state: 1 State time: 1351902 NTP last sync: 999000000 Client IP: 0.0.0.0 Loops/sec: 1499 Loop time[ms]: 0/76 UM time[ms]: 0/1 Strip time[ms]:0/2 Segments: 0 -> 0/0B Modes: 4*220=880B Data: 4*220=880B Map: 2*0=0B Web server status: Idle [1351925][E][WiFiUdp.cpp:251] endPacket(): could not send data: 118 Not connected AP (@ 1353s). Opening access point WLED-AP WiFi-E: AP Started Init AP interfaces [1354138][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1356995][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1359852][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND Last reconnect (1341s) too old (@ 1359s). initConnection() called @ 1359s. ESP-NOW stopping. WiFi-E: Event 3 getWLEDHostname: 'wled-9cef3c' WiFi-E: AP Stopped WiFi-E: Event 0 WiFi-E: Event 2 Access point disabled (init). Connecting to WLAN233... ESP-NOW initing in STA mode. Not connected AP (@ 1359s). Opening access point WLED-AP WiFi-E: AP Started Init AP interfaces [1362877][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1365734][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1368591][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1371448][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1374304][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1377162][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND Last reconnect (1360s) too old (@ 1378s). initConnection() called @ 1378s. ESP-NOW stopping. WiFi-E: Event 3 getWLEDHostname: 'wled-9cef3c' WiFi-E: AP Stopped WiFi-E: Event 0 WiFi-E: Event 2 Access point disabled (init). Connecting to WLAN233... ESP-NOW initing in STA mode. Not connected AP (@ 1378s). Opening access point WLED-AP WiFi-E: AP Started Init AP interfaces Local time: 00:23 [1380925][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND ---DEBUG INFO--- Runtime: 1381924 Unix time: 1381,924 === Memory Info === DRAM 8-bit: Free: 19144 bytes | Largest block: 5108 bytes DRAM 32-bit: Free: 49356 bytes | Largest block: N/A TX power: 60/78 Wifi state: 1 ESP-NOW state: 1 State time: 1351902 NTP last sync: 999000000 Client IP: 0.0.0.0 Loops/sec: 1365 Loop time[ms]: 0/75 UM time[ms]: 0/1 Strip time[ms]:0/2 Segments: 0 -> 0/0B Modes: 4*220=880B Data: 4*220=880B Map: 2*0=0B Web server status: Idle [1383784][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1386642][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1389501][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1392359][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1395216][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND Last reconnect (1378s) too old (@ 1396s). initConnection() called @ 1396s. ESP-NOW stopping. WiFi-E: Event 3 getWLEDHostname: 'wled-9cef3c' WiFi-E: AP Stopped WiFi-E: Event 0 WiFi-E: Event 2 Access point disabled (init). Connecting to WLAN233... ESP-NOW initing in STA mode. Not connected AP (@ 1396s). Opening access point WLED-AP WiFi-E: AP Started Init AP interfaces [1398977][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND Loop delayed more than 8ms. [1401835][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1404692][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1407549][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1410406][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND ---DEBUG INFO--- Runtime: 1411957 Unix time: 1411,957 === Memory Info === DRAM 8-bit: Free: 26444 bytes | Largest block: 8180 bytes DRAM 32-bit: Free: 49356 bytes | Largest block: N/A TX power: 60/78 Wifi state: 1 ESP-NOW state: 1 State time: 1351902 NTP last sync: 999000000 Client IP: 0.0.0.0 Loops/sec: 1329 Loop time[ms]: 0/76 UM time[ms]: 0/1 Strip time[ms]:0/2 Segments: 0 -> 0/0B Modes: 4*220=880B Data: 4*220=880B Map: 2*0=0B Web server status: Idle [1413263][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND Last reconnect (1396s) too old (@ 1414s). initConnection() called @ 1414s. ESP-NOW stopping. Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled. Core 1 register dump: PC : 0x4008ec9b PS : 0x00060333 A0 : 0x801cba1e A1 : 0x3ffb1f50 A2 : 0x3fff9af4 A3 : 0x3ffcdee8 A4 : 0x3ffcdeec A5 : 0x0000abab A6 : 0x00060323 A7 : 0x00060320 A8 : 0xffffffff A9 : 0x00000000 A10 : 0x3fff9b40 A11 : 0x3f404931 A12 : 0x00000011 A13 : 0x0000ff00 A14 : 0x003fffff A15 : 0xff000000 SAR : 0x0000001f EXCCAUSE: 0x0000001d EXCVADDR: 0x00000004 LBEG : 0x4008c685 LEND : 0x4008c695 LCOUNT : 0xfffffffb Backtrace: 0x4008ec98:0x3ffb1f50 0x401cba1b:0x3ffb1f70 0x4013d259:0x3ffb1f90 0x40121f5a:0x3ffb1fb0 0x401223a2:0x3ffb20d0 0x4012258c:0x3ffb21c0 0x40122bda:0x3ffb2270 0x4014522d:0x3ffb2290 ELF file SHA256: 2c2b1eb2f530cf5d Rebooting... ets Jul 29 2019 12:21:46 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:184 load:0x40078000,len:12732 ho 0 tail 12 room 4 load:0x40080400,len:2908 entry 0x400805c4 ---WLED 17.0.0-dev 2605011 INIT--- esp32 4.4.8.240628 arduino-esp32 v2.0.17 CPU: ESP32-D0WD-V3 rev.3, 2 core(s), 240 MHz. FLASH: 4 MB, Mode 2 (DIO), speed 40 MHz. heap 214240 [ 48][W][WiFiGeneric.cpp:1413] getTxPower(): Neither AP or STA has been started TX power: 78/78 PIN ALLOC: Pin 1 successfully allocated by 0x89. PIN ALLOC: 0x0000000000000lX. heap 214240 checking for bootloop: time 72, counter 0, action 0 crash detected! Valid JSON file /cfg.json Reading config Reading settings from /wsec.json... JSON buffer locked. (3) JSON buffer released. (3) JSON buffer locked. (1) Reading settings from /cfg.json... Heap before buses: 211996 PIN ALLOC: Pin 0 successfully allocated by 0x85. PIN ALLOC: 0x0000000000000lX. All timers cleared Starting usermod config. JSON buffer released. (1) heap 211864 Initializing stripStoreProhibited (Exception 29: Access to invalid address: STORE (wild pointer?))
Core: 1
PC: 0x4008ec9b
Fault Address: 0x00000004
Fault Code: 29Address Function Location 0x4008ec98 uxListRemove list.c:190 0x401cba1b vTaskDelete tasks.c:1345 0x4013d259 QuickEspNow::stop() QuickEspNow_esp32.cpp:55 0x40121f5a WLED::initConnection() wled.cpp:689 0x401223a2 WLED::handleConnection() wled.cpp:941 0x4012258c WLED::loop() wled.cpp:64 0x40122bda loop() wled_main.cpp:23 0x4014522d loopTask(void*) main.cpp:50 The crash is inside the
QickEspNowexternal library:void QuickEspNow::stop () { DEBUG_INFO (QESPNOW_TAG, "-------------> ESP-NOW STOP"); vTaskDelete (espnowTxTask); /// <<----- crash is HERE vTaskDelete (espnowRxTask); esp_now_unregister_recv_cb (); esp_now_unregister_send_cb (); esp_now_deinit (); }
Reacted by Hez- addedconfirmedThe bug is reproducable and confirmedThe bug is reproducable and confirmedand removedcannot reproduceDevelopers are not able reproduce. Might be fixed already, or report is missing important detailsDevelopers are not able reproduce. Might be fixed already, or report is missing important details
on May 14, 2026 @coderabbitai please review the main repo of QuickEspNow for known problems with frequent start/stop in AP mode. We are using this fork of the library https://github.com/blazoncek/QuickESPNow.git#optional-debug. Also check the debug output above (WLED_DEBUG + CORE_DEBUG_LEVEL=1) for "smoking guns" that might help explain the problem.
Reacted by coderabbitaicoderabbitai commented
on May 14, 2026 coderabbitaiboton May 14, 2026 – with coderabbitaiContributorMore actions@softhack007— here's a thorough analysis of the crash and the upstream library's known problems:
Root Cause Analysis
The Crash
The
StoreProhibitedexception atEXCVADDR: 0x00000004insideuxListRemoveis a classic stale/danglingTaskHandle_tcrash. At offset 4 of a FreeRTOS TCB lies thexStateListItemmember; writing to it means the TCB was already freed (the task deleted itself or was already deleted), butespnowTxTaskstill holds the old pointer.The call chain is:
vTaskDelete(espnowTxTask) → uxListRemove(&tcb->xStateListItem) ^^^^ TCB already freed → crashSmoking Guns in the Debug Log
-
Memory leak per stop/start cycle:
- At
t=1351s: free DRAM = 26 236 bytes - At
t=1381s: free DRAM = 19 144 bytes (−7 KB in 30 s) - At
t=1411s: free DRAM = 26 444 bytes (recovers slightly — but the leak is real and cumulative across longer runs) - This matches the pattern of
xTaskCreateallocating stack+TCB on eachbegin(), andvTaskDeleteon a stale handle not actually freeing anything — the stack of the previously created task leaks.
- At
-
Rapid stop/start cycling (~every 18 s):
ESP-NOW stopping. ... (WiFi init) ... ESP-NOW initing in STA mode.WLED calls
initConnection()roughly every 18 s when the configured WiFi AP is unreachable. Each cycle triggers astop()→begin()pair. -
espnowTxTaskhandle is never reset to NULL:
Ifbegin()fails part-way through (e.g.xTaskCreatereturns an error because there's not enough heap),espnowTxTaskretains its old stale value from the previous successfulbegin(). The nextstop()then passes this dangling pointer tovTaskDelete().
Known Issue in the Upstream Library
Repeating FreeRTOS task creation and deletion without a pause is known to crash the ESP32 FreeRTOS implementation. Adding a pause of at least 3 ticks after
vTaskDeleteis required for safe operation.A
TaskHandle_tis a pointer to an internal task structure; whenvTaskDeleteis called, that structure is freed — meaning the handle now points to effectively uninitialized memory, and any further operation on it is undefined.The upstream
gmag11/QuickESPNowstop()function has no guard against:- Calling
vTaskDeleteon an already-deleted handle - Calling
vTaskDeleteon a NULL handle (from a failedxTaskCreate) - Leaving handles non-NULL after deletion
The Fix
The
QuickEspNow::stop()in the fork needs at minimum:void QuickEspNow::stop () { DEBUG_INFO (QESPNOW_TAG, "-------------> ESP-NOW STOP"); if (espnowTxTask) { vTaskDelete (espnowTxTask); espnowTxTask = nullptr; // ← MUST reset to avoid dangling handle } if (espnowRxTask) { vTaskDelete (espnowRxTask); espnowRxTask = nullptr; } esp_now_unregister_recv_cb (); esp_now_unregister_send_cb (); esp_now_deinit (); }
And
begin()/start()must also set handles tonullptrbeforexTaskCreate, and check the return value:espnowTxTask = nullptr; // clear before create if (xTaskCreate(..., &espnowTxTask, ...) != pdPASS) { // handle error — do not proceed }
Recommendation
It would be worth:
- Patching the fork (
blazoncek/QuickESPNow) with the NULL-guards above. - Reducing the stop/start frequency on WLED's side — e.g. avoid restarting ESP-NOW if it was already stopped, or add a minimum interval between
initConnection()calls when the AP is known to be unreachable. - Checking the
begin()return value in WLED's ESP-NOW init code and skippingstop()ifbegin()never succeeded.
-
more problems .... i've added
nullptrchecks into the library (my own local copy), but now the crash is just in another location---DEBUG INFO--- Runtime: 1261737 Unix time: 1261,737 === Memory Info === DRAM 8-bit: Free: 32592 bytes | Largest block: 10228 bytes DRAM 32-bit: Free: 49356 bytes | Largest block: N/A TX power: 61/78 Wifi state: 1 ESP-NOW state: 1 State time: 1261748 Opening access point WLED-AP WiFi-E: AP Started Init AP interfaces Local time: 00:23 [1381027][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND ---DEBUG INFO--- Runtime: 1381865 Unix time: 1381,865 === Memory Info === DRAM 8-bit: Free: 19156 bytes | Largest block: 404 bytes DRAM 32-bit: Free: 49356 bytes | Largest block: N/A TX power: 61/78 Wifi state: 1 ESP-NOW state: 1 State time: 1261748 NTP last sync: 999000000 Client IP: 0.0.0.0 Loops/sec: 1327 Loop time[ms]: 0/78 UM time[ms]: 0/1 Strip time[ms]:0/9 Segments: 0 -> 0/0B Modes: 4*220=880B Data: 4*220=880B Map: 2*0=0B Web server status: print buffer failure [1383885][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1386743][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1389599][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1392456][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND [1395312][W][WiFiGeneric.cpp:1058] _eventCallback(): Reason: 201 - NO_AP_FOUND Last reconnect (1378s) too old (@ 1396s). initConnection() called @ 1396s. ESP-NOW stopping. WiFi-E: Event 3 getWLEDHostname: 'wled-9cef3c' WiFi-E: AP Stopped WiFi-E: Event 0 WiFi-E: Event 2 Access point disabled (init). Connecting to WLAN233... ESP-NOW initing in STA mode. Not connected AP (@ 1396s). Opening access point WLED-AP Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled. Core 0 register dump: PC : 0x4018c3a5 PS : 0x00060730 A0 : 0x8018dbd6 A1 : 0x3ffbbff0 A2 : 0x00000000 A3 : 0x3ffcedd4 A4 : 0x3ffd02d8 A5 : 0x00000000 A6 : 0x3fffcba8 A7 : 0x00000001 A8 : 0x8018c39d A9 : 0x3ffbbf80 A10 : 0x3ffbe680 A11 : 0x3ffc0ed4 A12 : 0x00000002 A13 : 0x3f43ab65 A14 : 0x00000000 A15 : 0x00000000 SAR : 0x0000001b EXCCAUSE: 0x0000001c EXCVADDR: 0x0000002c LBEG : 0x4008b8f9 LEND : 0x4008b91b LCOUNT : 0xffffffff Backtrace: 0x4018c3a2:0x3ffbbff0 0x4018dbd3:0x3ffbc050 0x40191b89:0x3ffbc080 0x40192d3c:0x3ffbc0a0 0x401915f0:0x3ffbc0d0 0x401c6b99:0x3ffbc0f0
# Address Function Location 0 0x4018c3a2 ieee80211_hostap_attach ?? 1 0x4018dbd3 wifi_softap_start ?? 2 0x40191b89 _do_wifi_start ?? 3 0x40192d3c wifi_set_mode_process ?? 4 0x401915f0 ieee80211_ioctl_process ?? 5 0x401c6b99 ppTask ?? The DRAM decrease is unusual 🤔 We know that any ESP32 will get unstable if the smallest HEAP chunk is less than 10Kb.
@coderabbitai every call of QuickEspNow::begin() seems to create two new FreeRTOS queues, but I did not see where these queuey would be deleted in QuickEspNow::end(). Please check if this might explain the RAM decrease over time.
Reacted by coderabbitai16 remaining items
I have a working version to replace quickespnow, it's just a bit "buggy" on ESP8266, need to figure out why - most likely need some addintonal msg buffer. It works flawless on ESP32 and C3 in my test.
@hez can you please test if https://github.com/wled/WLED/actions/runs/25970426965 works in your scenario?
@hez can you please test if https://github.com/wled/WLED/actions/runs/25970426965 works in your scenario?
Tested that build, been running it for 12hrs without wifi connected and ESPNow configured. Looks stable so far! 👍
@hez thanks for the feedback. does everything ESPNow related still work as it should? I removed the buggy library and rewrote a new ESPNow "driver" from scratch.
@hez thanks for the feedback. does everything ESPNow related still work as it should? I removed the buggy library and rewrote a new ESPNow "driver" from scratch.
I am only using a ESPNow Remote, don't have any other devices. From my testing so far, it seems to work.
I am unsure how the channel gets set, the ESPNow channel needs to be the same as the wifi channel the WLED device connects to. Thoughts?
The way I have set it up ESPNow follows the wifi channel - either of the wifi or the AP. I am not sure what happens if you have both disabled or if that is even an allowed state. The remote sends its message on every channel so it does not really matter what channel WLED is actually on but if the channel it ends up using has a lot of traffic, the remote messages can drown in noise.
Reacted by HezThe way I have set it up ESPNow follows the wifi channel - either of the wifi or the AP. I am not sure what happens if you have both disabled or if that is even an allowed state. The remote sends its message on every channel so it does not really matter what channel WLED is actually on but if the channel it ends up using has a lot of traffic, the remote messages can drown in noise.
Strange, that hasn't been my experience, even in quiet environments if the WLED device is connected to wifi the remote has to be pressed for a long time or multiple times. If the WLED device is disconnected from wifi the remote works as expected.
@hez do you have "WiFi sleep" enabled in wifi settings? If you do the ESP will power down its antenna between beacon intervals once connected to a wifi, meaning it will miss a lot of messages.
@hez do you have "WiFi sleep" enabled in wifi settings? If you do the ESP will power down its antenna between beacon intervals once connected to a wifi, meaning it will miss a lot of messages.
That does indeed look to solve it, totally missed its a "disabled" check instead of the other way round. Thanks!
- addedfixed in sourceThis issue is unsolved in the latest release but fixed in masterThis issue is unsolved in the latest release but fixed in master
on Jun 16, 2026 - linked a pull request that will close this issueReplace QuickESPNow with local library #5624
on Jun 16, 2026 - addedworkaroundThe issue contains a workaroundThe issue contains a workaround
on Jul 4, 2026 - changed the title
[-]With ESPNow remote and no wifi WLED reboots every 15-20min[/-][+]With ESPNow remote and no wifi WLED reboots every 15-20min (fixed in 17.0.0-dev)[/+]on Jul 4, 2026
What happened?
Without wifi to connect to the device is rebooting every 15-20min, if the AP it connects to is available then it appears to be stable over multiple days.
Runs fine on 14. As per #3685 (comment) this bug is being opened.
possibly related to: #3685
To Reproduce Bug
Connect the device to a wifi access point then turn off the AP.
Expected Behavior
Should be stable without wifi.
Install Method
Binary from WLED.me
What version of WLED?
WLED_16.0.0-beta_ESP32
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
Anything else?
This is in a VERY isolated area, the wifi it connects to is literally the only wifi around.
It is paired with an ESPNow remote, but during the 15-20 before the reboot no buttons have been pressed.
Code of Conduct