Broadcasting UDP datagrams

G

Guest

Hello,

I am writing a WinForm application that will broadcast a UDP datagram to
multiple of embedded controllers. The controllers in return will send a
response to the WinForm application.

When I create the WinForm socket and assign the remote IP to the broadcast
IP ( “192.168.1.255†or “255.255.255.255†or “0.0.0.0â€) and send the
broadcast datagram I find out that the embedded controllers receive the
datagram and response to the IP address that it came from (in my case
“192.168.1.100â€). However the WinForm application does not receive (or
ignore it since the socket is open for the broadcast IP!?) the response from
the embedded controllers.

Any idea how can I solve that problem?

Thanks
EitanB
 
P

Peter Duniho

Eitan said:
[...] the embedded controllers receive the
datagram and response to the IP address that it came from (in my case
“192.168.1.100”). However the WinForm application does not receive (or
ignore it since the socket is open for the broadcast IP!?) the response from
the embedded controllers.

Any idea how can I solve that problem?

Use a different socket, not configured for broadcasting, to receive the
responses.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top