-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
AsyncUDP ipv6 Multicast not working #9970
Comments
|
Yes i have printed all these informations like IP-Adress and return values from listenMulticast and writeTo. listen_multicast_v6 is true, yes i have checked this. I also added some more debug output to listenMulticast but it does not throw any error. if changed also the return values from writeTo so i can extract the error codes from inside the async udp library. I have set "-DCORE_DEBUG_LEVEL=5" for my build flags but it does not give me many informations. Is there another way to enable debug output? I sadly dont have an minimalized example. I could try to change the multicast example from the framework to use ipv6 instead of ipv4. Strange is that normal ipv6 with directed adresses are working fine. I would also suppose that i could send to the multicast address directy without joining the multicast group. Because send and receive should be seperated. But i can also not sent to an multicast adress only with listening to udp and enable listenv6. |
You also need to add Please devise a minimal example that we can use to exactly reproduce the issue. From code perspective, everything in our lib looks fine. After all it's not much being done, but joining the multicast group and listening. |
Ok, i have added a simple sketch basically with all part i think are needed. I hope i didnt forget anything. https://github.com/friedrichengel/esp32_multicast_sample I hope it is ok that i put it in an extra repo for easier access. Quick and Dirty. Debug Output:
|
Board
ESP-32-Wrover-E
Device Description
Own Hardware, uses Etehrnet (Rj45)
Hardware Configuration
nothing i would think that it has something to do with multicast Ethernet. Ehernet + Webserver in general is working fine.
Version
v3.0.1
IDE Name
VSCode with Platformio
Operating System
Windows 11
Flash frequency
40 Mhz
PSRAM enabled
yes
Upload speed
922190
Description
Settingup an UDP Listener to use IPv6 Multicast dont seem to work.
if you setup your listener with:
IPAddress udp_ip_v6;
udp_ip_v6.fromString("ff02::1"); //"ff02::1"
listen_multicast_v6 = udp.listenMulticast(udp_ip_v6, udp_port, 0, TCPIP_ADAPTER_IF_ETH);
It seems to setup this listener and it seems fine. Return Value says it is ok.
If you then wants to send something to this multicast Adress it returns an error. I have tried different ways to send:
udp_ip_2.fromString("ff02::1");
udp_send_rv = udp.writeTo((uint8_t*)(temp_casambi_command.c_str()),temp_casambi_command.length(), udp_ip_2, udp_port, TCPIP_ADAPTER_IF_ETH);
udp_send_rv = udp.print(temp_casambi_command.c_str());
udp_message.write((uint8_t*)(temp_casambi_command.c_str()), temp_casambi_command.length());
But it always returned an error code in most cases it is:
ERR_VAL = -6,
or
ERR_RTE = -4,
If i do it on an non multicast way like
listen_v4 = udp.listen(udp_port);
listen_v6 = udp.listenIPv6();
and sending it to an known working ip it seems to be fine and i can receive the Packet.
If i send commands directed in ipv4 it also works and if i send it in broadcast in ipv4 it works too.
Sketch
Debug Message
Other Steps to Reproduce
I have tried it with different adresses and also changing between TCPIP_ADAPTER_IF_ETH and TCPIP_ADAPTER_IF_MAX or letting it empty. In Multicast it seems not to send something.
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: