You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you double check this with a freshly flashed ESP32 or delete the wifi network from an existing one? It appears that ESP-NOW only doesn't work if the ESP isn't actively connected to a wifi network. If the ESP does have an active wifi connection, ESP-NOW will function correctly.
I've been connecting to the WLED AP, and trying to setup the remote. This works on 0.15 without an active WiFi connection.
Unfortunately the project I'm trying to use it for, won't be anywhere near a WiFi network to connect to.
I found a better workaround as well, if you set the network SSID and password to random characters and 'save & connect' it enables ESP-NOW without needing a real WiFi network. Until you do that, ESP-NOW is never actually enabled.
@A6uh how far have you researched ESP-NOW? It will help you understand where the problem is after you do that.
Brief recap: As WiFi and ESP-NOW share same circuitry they can't work independently. If you want uninterrupted ESP-NOW packets between two ESP devices they have to:
be connected to the same WiFi channel
must have WiFi disabled and still use same channel for ESP-NOW
be in AP mode on the same channel
Once these are fulfilled, ESP-NOW will work as expected. WLED is designed to operate either in 1) or in 3) mode.
I've been working on correct ESP-NOW implementation for over a year now and best take is available in my fork but it may still have quirks.
As for Wizmote: It is an interesting beast. It uses ESP32 inside which will broadcast (proprietary) message on every possible channel in brief bursts. This allows any ESP device to pick ESP-NOW packet on the channel it is currently connected (or configured) to. However if a device has WiFi configured but is not connected to it will switch channels several times per second while searching for WiFi SSID it is configured to. This makes working ESP-NOW difficult as channels change very often.
(3) is actually where I think the issue is. If you look at line 451 in those logs, ESP-NOW doesn't actually enter AP mode at all until you try connecting to a WiFi network. Up until then, it doesn't initialize. Shortly after on 487 it stops ESP-NOW, then reenables it in STA mode on 494. I assume STA mode is (1).
I figure it should have been initializing ESP-NOW's AP mode once it was enabled in the UI.
Oh and to answer @DedeHai 's question, yes it did work correctly on 0.15. That's how I originally solved it in the meantime.
It looks like your fork kind of has the same issue. Once ESP-NOW is enabled in the UI, ESP-NOW isn't initialized and put into AP mode. However, if you restart the ESP32 afterwards, it puts ESP-NOW into AP mode while it's starting up. Then it works great!
Unfortunately just restarting the ESP32 doesn't fix it for WLED 0.16.0
I was trying ESP NOW remote with the latest code and found that is not working with AP mode only. It was working that way in 0.15.0
There are situations where you don't want to connect your board to wifi and just use the remote. (or AP for configuration)
configuring a bogus ssid not a solution as I think that the board tries all the time to find that network.
@DedeHai ESP-NOW is stable together with WiFi on WLED 0.15.2 (this repo's 0_15_x branch). The issue with disconnection of the remote only happens if the user's controller has an Ethernet port which is enabled at the same time as a WiFi network SSID is configured.
Apparently the 0.16/main code has changed things and is more broken? I haven't been checking the 0.16 code, since it's too unstable for use at home on my devices, and Blaz is also working on a rewrite of that code. I've been waiting on that to be merged to main so I can port my ESP-NOW + Ethernet combination fixes to the new system.
Regarding ESP-NOW: It just requires the WiFi antenna to be enabled. It works together with, and also totally without, WiFi AP/other network client modes. The way it receives signals is interleaved with regular WiFi operation.
So in short, if things are broken in 0.16 where ESP-NOW suddenly won't even work together with WiFi mode, then something new has broken...
@Arcitec IIRC you mentioned the issue somewhere in the lengthy discussions: in AP only mode, ESP-Now code is skipped, the solution proposed above is to enter a bogus SSID so the ESP-Now code gets executed. So in short, the actual issue is known, I was just wondering if there is already a solution in progress.
@DedeHai Oh yeah thanks for the reminder. It's been a few months since we had that part of the discussions. If the user hasn't configured the controller to connect to either a WiFi network or connected an Ethernet cable (which also works), then I think it won't initialize the ESP-NOW code, since that's done as part of the "connect to a network" handling. Putting any random SSID into the network config will make WLED attempt to find that network and then initialize ESP-NOW.
And yeah as you say, Blaz has been working on some code to initialize ESP-NOW even when the controller doesn't connect to any WiFi network. I remember hearing about that.
The state of the networking code in WLED is very bad. It's an intermixed spaghetti mess across half a dozen different files that all compete for control over the network. Various configuration handlers abruptly kill the network, force reinitializations, etc. There's no separation of concerns. Everything just writes directly to the state and messes things up and competes for control. It's crazy to say the least. So I'm looking forward to Blaz's improvements, no matter what they might be. I've got a decent solution for the bigger Ethernet + WiFi + ESP-NOW conflict in 0.15.x's codebase (where they don't work together at all), but since a lot of the network code is being changed, I've been waiting to see what happens first.
@blazoncek is there an easy code change that would allow ESPNow to be initialized even if there is not wifi credentials configured? If yes, can we add that to 0.16 and if needed to 0.15.2?
Activity
DedeHai commentedon Apr 23, 2025
works perfectly fine. make sure you have wifi sleep disabled.
A6uh commentedon Apr 23, 2025
Could you double check this with a freshly flashed ESP32 or delete the wifi network from an existing one? It appears that ESP-NOW only doesn't work if the ESP isn't actively connected to a wifi network. If the ESP does have an active wifi connection, ESP-NOW will function correctly.
I've been connecting to the WLED AP, and trying to setup the remote. This works on 0.15 without an active WiFi connection.
Unfortunately the project I'm trying to use it for, won't be anywhere near a WiFi network to connect to.
A6uh commentedon Apr 23, 2025
Here are some logs I collected. ESP-NOW was enabled and wifi sleep was disabled by default. When I connect to a wifi network is on line 446.
https://pastebin.com/jUeNbRmz
I found a better workaround as well, if you set the network SSID and password to random characters and 'save & connect' it enables ESP-NOW without needing a real WiFi network. Until you do that, ESP-NOW is never actually enabled.
DedeHai commentedon Apr 24, 2025
interesting find, not sure that is a bug or intentional or a HW limitation. Did this ever work in older versions?
blazoncek commentedon Apr 24, 2025
@A6uh how far have you researched ESP-NOW? It will help you understand where the problem is after you do that.
Brief recap: As WiFi and ESP-NOW share same circuitry they can't work independently. If you want uninterrupted ESP-NOW packets between two ESP devices they have to:
Once these are fulfilled, ESP-NOW will work as expected. WLED is designed to operate either in 1) or in 3) mode.
I've been working on correct ESP-NOW implementation for over a year now and best take is available in my fork but it may still have quirks.
As for Wizmote: It is an interesting beast. It uses ESP32 inside which will broadcast (proprietary) message on every possible channel in brief bursts. This allows any ESP device to pick ESP-NOW packet on the channel it is currently connected (or configured) to. However if a device has WiFi configured but is not connected to it will switch channels several times per second while searching for WiFi SSID it is configured to. This makes working ESP-NOW difficult as channels change very often.
A6uh commentedon Apr 24, 2025
(3) is actually where I think the issue is. If you look at line 451 in those logs, ESP-NOW doesn't actually enter AP mode at all until you try connecting to a WiFi network. Up until then, it doesn't initialize. Shortly after on 487 it stops ESP-NOW, then reenables it in STA mode on 494. I assume STA mode is (1).
I figure it should have been initializing ESP-NOW's AP mode once it was enabled in the UI.
Oh and to answer @DedeHai 's question, yes it did work correctly on 0.15. That's how I originally solved it in the meantime.
Edit:
These are logs from WLED 0.15
As soon as you enable ESP-NOW and save, it enters AP mode. (line 74 and 79) This isn't happening on 0.16
https://pastebin.com/3G5nQueF
Also, it seems the only reason using a dummy network on 0.16 is because each time it tries to connect, it also initializes ESP-NOW AP mode. So probably not a stable workaround lol. These are logs showing that.
https://pastebin.com/eTXXvZgM
blazoncek commentedon Apr 24, 2025
Dare to take my fork for a spin? Use stable branch.
A6uh commentedon Apr 24, 2025
It looks like your fork kind of has the same issue. Once ESP-NOW is enabled in the UI, ESP-NOW isn't initialized and put into AP mode. However, if you restart the ESP32 afterwards, it puts ESP-NOW into AP mode while it's starting up. Then it works great!
Unfortunately just restarting the ESP32 doesn't fix it for WLED 0.16.0
blazoncek commentedon Apr 24, 2025
That is "normal" and as "designed". I'm not saying that it is correct.
However, ESP-NOW in my fork is designed to work in "temporary AP mode".
marcobrianza commentedon Jun 18, 2025
I was trying ESP NOW remote with the latest code and found that is not working with AP mode only. It was working that way in 0.15.0
There are situations where you don't want to connect your board to wifi and just use the remote. (or AP for configuration)
configuring a bogus ssid not a solution as I think that the board tries all the time to find that network.
1 remaining item
Arcitec commentedon Aug 31, 2025
@DedeHai ESP-NOW is stable together with WiFi on WLED 0.15.2 (this repo's
0_15_xbranch). The issue with disconnection of the remote only happens if the user's controller has an Ethernet port which is enabled at the same time as a WiFi network SSID is configured.Apparently the 0.16/main code has changed things and is more broken? I haven't been checking the 0.16 code, since it's too unstable for use at home on my devices, and Blaz is also working on a rewrite of that code. I've been waiting on that to be merged to main so I can port my ESP-NOW + Ethernet combination fixes to the new system.
Regarding ESP-NOW: It just requires the WiFi antenna to be enabled. It works together with, and also totally without, WiFi AP/other network client modes. The way it receives signals is interleaved with regular WiFi operation.
So in short, if things are broken in 0.16 where ESP-NOW suddenly won't even work together with WiFi mode, then something new has broken...
DedeHai commentedon Aug 31, 2025
@Arcitec IIRC you mentioned the issue somewhere in the lengthy discussions: in AP only mode, ESP-Now code is skipped, the solution proposed above is to enter a bogus SSID so the ESP-Now code gets executed. So in short, the actual issue is known, I was just wondering if there is already a solution in progress.
Arcitec commentedon Aug 31, 2025
@DedeHai Oh yeah thanks for the reminder. It's been a few months since we had that part of the discussions. If the user hasn't configured the controller to connect to either a WiFi network or connected an Ethernet cable (which also works), then I think it won't initialize the ESP-NOW code, since that's done as part of the "connect to a network" handling. Putting any random SSID into the network config will make WLED attempt to find that network and then initialize ESP-NOW.
And yeah as you say, Blaz has been working on some code to initialize ESP-NOW even when the controller doesn't connect to any WiFi network. I remember hearing about that.
The state of the networking code in WLED is very bad. It's an intermixed spaghetti mess across half a dozen different files that all compete for control over the network. Various configuration handlers abruptly kill the network, force reinitializations, etc. There's no separation of concerns. Everything just writes directly to the state and messes things up and competes for control. It's crazy to say the least. So I'm looking forward to Blaz's improvements, no matter what they might be. I've got a decent solution for the bigger Ethernet + WiFi + ESP-NOW conflict in 0.15.x's codebase (where they don't work together at all), but since a lot of the network code is being changed, I've been waiting to see what happens first.
DedeHai commentedon Sep 1, 2025
@blazoncek is there an easy code change that would allow ESPNow to be initialized even if there is not wifi credentials configured? If yes, can we add that to 0.16 and if needed to 0.15.2?
blazoncek commentedon Sep 2, 2025
Don't hold your breath for my ESP-NOW code. It has been put on hold as priorities have changed.
DedeHai commentedon Sep 2, 2025
No worries.
I found where this bug was added: aed03cd
part of #4495
@netmindz this line was added to fix a DMX input crash, see commit above:
WLED/wled00/wled.cpp
Line 652 in 87092cc
is there a better way to fix the issue mentioned in the commit instead of returning early and with it disable ESPNow in AP only mode?
netmindz commentedon Sep 2, 2025
Good spot. I'm unsure why the early return was added as well as the enable/disable
Maybe @arneboe can answer