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.
char msg; sprintf(msg, "%s,%s", event, data); udp.beginPacket(haServer, serverPort); udp.write(msg); udp.endPacket();
I have a udp.begin(serverPort); in setup.
serverPort is set for 5003 and haServer is set for 192.168.1.255
I even tried adding a delay after the endPacket call but still never returns.