-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Can't create a UDP Socket and Multicast Socket #105
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
Might be useful to distinguish between normal and multicast packets arriving at the same port (#105)
With lwIP network stack you can only bind one PCB to a given port. I've added Here's my test sketch:
I send some packets using nc:
And here's the output:
|
But I was not receiving a unicast packet to the "context" that was created with the Multicast Join. Could you include your setup for that here so I can confirm I wasn't doing something wrong. |
Might be useful to distinguish between normal and multicast packets arriving at the same port (#105)
Confirmed I am receiving both types with correct destination addresses. |
Might be useful to distinguish between normal and multicast packets arriving at the same port (#105)
I need to have two listening sockets (Contexts in Esp8266/Arduiino speak) for my CoapServer. One for the Multicast and one for a unicast. They both use the same port by CoAp standards.
Which ever one is created first succeeds, but the second one created fails in UdpContext::Listen. The call to udp_bind within UdpContext::Listen returns error code is ERR_USE; meaning the address is in use?
Coap Port is 5684
Coap Multicast Address is 224.0.1.187
By normal socket concepts this should be doable, not so sure by Esp8266 context concepts.
Further, if I just create a multicast socket, while it will receive multicast packets, it will not receive packets sent directly to the ipaddress of the device. This works as I would expect IF I can create the two functional sockets.
here are snippits of the code, just for completeness, they work independently but not when called back to back.
multicast
unicast
The text was updated successfully, but these errors were encountered: