Skip to content

UDP Sound sync receive stops after 260 seconds (TP-Link Deco router) #4408

Closed as not planned

Description

@TechFreak93

What happened?

The UDP Sound sync receive stop after 260 seconds with a TP-Link Deco Router.
ESP32

To Reproduce Bug

The Sound Receive stop after 260 seconds with a TP-Link Deco Router.
When in the Info Box turn off and on the Sound Reaktive it works again for 260 seconds

Expected Behavior

Pleas Fix it

Install Method

Binary from WLED.me

What version of WLED?

All

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. DedeHai commented on Dec 19, 2024

    @DedeHai
    Collaborator

    what versions did you try? if it happens on any version, this may be a router setting issue. any debug output info on this?
    also: using HA? if yes, does it work if you disable it?

  2. TechFreak93 commented on Dec 19, 2024

    @TechFreak93
    Author

    Screenshot 2024-12-19 154210
    Screenshot 2024-12-19 154150

    i'm test Vesion v0.14.4 and v0.15.0.

    Yes at my Network running HomeAssistant, but in a clean new Network only for WLED is the same problem.
    The TP-Link Deco series have not a lot af Settings :( , NAT forwarding does not solve the problem.
    It works great with Fritzbox or Netgear, but on TP-Link Deco works only for 260 seconds!
    Where can I get debug output?

  3. DedeHai commented on Dec 19, 2024

    @DedeHai
    Collaborator

    for debug output you need to upload a debug build and monitor the serial output.
    you can also check the "Free heap" in the info to see if it shrinks. WLED (or rather the ESP core wifi library) does not like it if something in the network sends too many requests, it will stop working. if your router does some kind of polling, that may be it.

  4. TechFreak93 commented on Dec 19, 2024

    @TechFreak93
    Author

    Is there a guide for this?
    The free heap is always at 160‐170kb see Screenshots

  5. softhack007 commented on Dec 19, 2024

    @softhack007
    Member

    @TechFreak93 it might be that your router does not handle multicast groups well. I used to have a german Telekom "speedport" router and always had connections cut very quickly, together with router log messages like "intercepted a udp syn flood attack".

    We never found out how to solve this - from WLED point of view we simply open the multicast channel, and somehow no more multicast packages are arriving (sound sync idle).

    There is some technical info here https://github.com/atuline/WLED/wiki/UDP-Sound-Sync#what-else-

    But unfortunately I can only say "sound sync does not work with all routers". In fact a workaround could be to use DDP to tranmit the led effect to other esp32 boards, instead of sharing the audio data. Esp32 has enough power to run several effects in parallel (use segments) and send led data to a handful of "clients".

  6. netmindz commented on Dec 20, 2024

    @netmindz
    Member

    Yeah as mentioned already, we can't fix an issue with broken UDP multicast support, you need to get assistance from the maker or support community of that hardware.

    I have an experimental branch of WLED that uses ESP-NOW rather than multicast, but as it didn't deliver any significantly lower latency I didn't continue this into a full feature, but if you are familiar with building from source please feel free to try that branch and get back to me with your feedback.

    Otherwise you just need to fix your WiFi. It's not about needing ports to be opened or forwarded, just proper implementation of multicast and no firewall feature that is trying to limit usage of multicast.

  7. TechFreak93 commented on Dec 20, 2024

    @TechFreak93
    Author

    FB_IMG_1734715012843.jpg

    I found this for the TP-Link 260 seconds problem, but i cant fix this on the Roter, i have no Settings for this.

  8. TechFreak93 commented on Dec 20, 2024

    @TechFreak93
    Author

    curl -X POST "http://10.0.0.122/json/state" -d '{"AudioReactive":{"enabled":false}' -H "Content-Type: application/json"

    curl -X POST "http://10.0.0.122/json/state" -d '{"AudioReactive":{"enabled":true}}' -H "Content-Type: application/json"

    Now i'm send this command every 259 sec from Home Assistant to restore the timer, so it work's but this is not a good solution.

    Maybe you could add a restore timer to the firmware in the future versions to avoid such problems.
    Best regards.

  9. netmindz commented on Dec 22, 2024

    @netmindz
    Member

    That snippet is for ipv6 and we are using ipv4, but I'm guessing they might also have very aggressive cleanup of multicast groups for v4 as well

  10. changed the title [-]UDP Sound sync[/-] [+]UDP Sound sync receive stops after 260 seconds[/+] on Jan 6, 2025
  11. softhack007 commented on Jan 6, 2025

    @softhack007
    Member

    https://stackoverflow.com/questions/76867834/how-to-avoid-multicast-timeout-due-to-igmp-snooping
    The router needs to periodically send IGMP query messages. Having a device that joins the group for a while, then drops out, is exactly the behavior you get when there is no device sending the query messages. Devices send an initial membership message when they join the group, so everything works for a while, but then get expired out of the group because they never send another one, at which point they appear to stop working. Not all routers implement IGMP queriers, and it might be a feature you have to explicitly enable.

    I guess the best way to go if I wanted to keep multicast would have been to make the device send free membership message without waiting for queries.
    Yes. That's what linux appears to be doing too.

    So it looks like something with IGMP queries ... Unfortunately, igmp is not exposed on the WiFiUDP class interface; we only have beginMulticast() and beginMulticastPacket(). Everything else is inside the framework (=not under WLED control) 🤷 .

  12. softhack007 commented on Jan 6, 2025

    @softhack007
    Member

    Maybe you could add a restore timer to the firmware in the future versions to avoid such problems.

    This will periodically switch the usermod OFF and back ON. I think its not a general solution because each off/on will reset the audio processing task (mic sampling and FFT) -> Local effects will switch to simulated sound while AR is off --> leads to randomly flashing colors because AR and soundSim are not synchronized (and not designed to work "in sync").

  13. changed the title [-]UDP Sound sync receive stops after 260 seconds[/-] [+]UDP Sound sync receive stops after 260 seconds (TP-Link Deco router)[/+] on Jan 6, 2025
  14. netmindz commented on Jan 8, 2025

    @netmindz
    Member

    Possibly only an issue for AC and not MM - older library issue most likely but not specifically confirmed

    https://discord.com/channels/473448917040758787/701215722373906503/1325638584438489141

  15. github-actions commented on May 8, 2025

    @github-actions

    Hey! This issue has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs.
    Thank you for using WLED! ✨

  16. added
    stale
    on May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughelp wantedstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions