07-11-2011 01:42 PM
I need LV to send UDP messages around to applications using UDP on a few different computers, with a mix of OSes and languages. I can't seem to get these other applications to see broadcasts from LV and vice-versa. "nc" and system calls in programs work on all the systems among each other, there are no firewall or router issues . LV examples and little vis talk to each other reliably among the machines in question. It's the same on the different machines running a server and client each on the same host. I don't get why , for example, "UDP Sender.vi" from /examples/comm/UDP.lib
not work with a "nc -l 61557" either on localhost or elsewhere ? What's different about labview UDP ? the LV copies in question are 2009 or '10 , Mac Linux and PC.
Solved! Go to Solution.
07-11-2011 01:54 PM
We probably need more information on what exactly you are doing in LabVIEW. Do you get any errors?
You talk about broadcasts. Are you targeting a broadcast address or are you doing unicasts to the various targets?
07-11-2011 02:06 PM
No errors.
"Broadcasts", sorry I really meant UDP multicasts as in I'd like eventually to let the clients (will include other threads on localhost) listen on some port and have the LV send out UDP multicasts. the LV example vi uses the term "broadcast". So overall I have the feeling that LV terminology is a little different than that which you might see elsewhere , and that this is just a settings issue, not a functional one. I hope ;-).
thanks for your interest
07-11-2011 02:35 PM - last edited on 11-06-2024 03:29 PM by Content Cleaner
So, are you using the "UDP multicast open"? We really need more details, e.g. some code to see what you are doing.
07-11-2011 02:41 PM
Well, the example you quoted uses true broadcasts (dest IP=255.255.255.255) in broadcast mode, so this is different than multicast. Is that what you are using? Does it work using unicast and a correct destination IP?
07-11-2011 02:46 PM
I've tried a few things (including my own stubs) but again, let's take this :
As a server, "UDP Sender.vi" from /examples/comm/UDP.lib and for a listener ">nc -l 61557" whether in broadcast mode or not (front panel switch) , localhost or to a remote machine. Any instances of "UDP Receiver.vi" from the same library works, including remote instances on other OSes.
07-11-2011 02:58 PM
How about "nc -b -l 61557" (-b to allow broadcasts)?
Have you tried a packet sniffer, such as wireshark?
07-11-2011 04:37 PM
Wireshark, no not yet. Since you asked , it now looks like a netCat issue , and I'll need to look at the way LV closes the sockets also. Perhaps a combination of nc bug and not walking a troubleshooting tree down one path . Thanks for your time, I need to think more about what my server needs from the client now before deciding I've got a problem. for one, multicasting may be a better way too.
thanks for your time
Alex
01-23-2012 01:50 AM
How about:
nc -l -u 61577
03-27-2012 04:42 PM
Thanks for the idea, but we ended up with another solution , as the data from the sender had to stay in its original cluster , and get taken apart by a separate CPU, and then distributed. I shoulda closed this out last year.