-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
ESP-NOW not functioning on latest build #4655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
works perfectly fine. make sure you have wifi sleep disabled. |
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. |
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. 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. |
interesting find, not sure that is a bug or intentional or a HW limitation. Did this ever work in older versions? |
@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. |
(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: 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. |
Dare to take my fork for a spin? Use stable branch. |
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 |
That is "normal" and as "designed". I'm not saying that it is correct. |
What happened?
Wizmote not being detected on latest build. Manually inputting the known Wizmote address also doesn’t yield any results when pressing buttons.
To Reproduce Bug
Flash WLED 0.16.0-alpha (build 2412040) to ESP-32
Attempt to pair ESP-NOW remote
Expected Behavior
It should be detecting the ESP-NOW remote address, and after pairing, should respond to button input.
Install Method
Binary from WLED.me
What version of WLED?
WLED 0.16.0-alpha (build 2412040)
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
Anything else?
Reverting to WLED 0.15 release resolves the issue.
Code of Conduct
The text was updated successfully, but these errors were encountered: