I’ve seen a lot in regards to UDP issues but I couldn’t find anything in regards to the way I am trying to use it.
I want to send a UDP to a broadcast address, eg, 192.168.1.255 to port 5003 so that any listening device on the network can receive this. I then have an application running on the PC listening to that port.
The issue I have is that when I call udp.send(msg); it blocks and never returns. This is the code I am using. Cut and pasted the parts that are relevant.
Thanks bko. The issue actually turned out to be that I was trying to send on the same port I was listening to.
I used 5004 for udp.begin(5004); and then used 5003 in udp.beginPacket(haServer, serverPort); and it works now. It’s been running all afternoon up until now without missing a beat.
Seems that if you use the same port, your receive back your own message. ??
I’d say yes, I can work around the issue and have a working system. It would be nice just to be able to send without having to create a listener but this for now works fine on this network…