LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP from LV <--> elsewhere ?

Solved!
Go to solution

 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.  

 

 

0 Kudos
Message 1 of 10
(3,060 Views)

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?

0 Kudos
Message 2 of 10
(3,056 Views)

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

0 Kudos
Message 3 of 10
(3,047 Views)

So, are you using the "UDP multicast open"? We really need more details, e.g. some code to see what you are doing.

0 Kudos
Message 4 of 10
(3,034 Views)

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?

0 Kudos
Message 5 of 10
(3,030 Views)

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.

0 Kudos
Message 6 of 10
(3,026 Views)
Solution
Accepted by topic author asquit

 

How about "nc -b -l 61557" (-b to allow broadcasts)?

 

Have you tried a packet sniffer, such as wireshark?

Message 7 of 10
(3,016 Views)

 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

 

0 Kudos
Message 8 of 10
(3,005 Views)

How about:

nc -l -u 61577

0 Kudos
Message 9 of 10
(2,932 Views)

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.

 

0 Kudos
Message 10 of 10
(2,888 Views)