06-15-2011 01:04 AM
'Netstat -an' is just a windows uitility that is already on your pc.
Just open a console window (run -> cmd). Then type netstat -an and you will get a list of all your open connections (and listeners),
You mention that it was working when you were running both wireshark and LV at the same time. Are you 100% sure that this wasn't luck and that there is something wrong in your DaVinci setup so by accident it was not sending any data at the moment you were not running wireshark and in a next attempt it did?
Succes!
06-15-2011 05:39 AM
Thanks for the clarification. What I meant earlier is that I couldn't go online to check the forums so I didn't know to run the command. It's a big pain not to be able to go online at the same time I'm testing...
I am 99.9% sure it was not luck. Every time I started and stopped Wireshark, the packets started and stopped coming into LabVIEW. It was quite strange.
06-15-2011 06:04 AM
strange it is for sure...
I also checked the reponse from netstat -na and if everything works fine your UDP listener should be listed as
UDP 0.0.0.0:<your portnumber> *:*
When the UDP listener is active it should be there, no matter if there is any data coming in. If you stop the listener (either by the close UDP connection vi or closing LV) the listener should be gone.
06-15-2011 10:31 AM
Hmm, so I tried running "netstat -an" and saw the appropriate line
UDP 0.0.0.0:3257 *:*
appear and disappear when I started and stopped the LabVIEW VI.
This line, however, was not correlated to when I started and stopped the Wireshark capture. If this happened, it would have given a bit more insight into the problem.
Still, I only received data when Wireshark was running.
Anyway, it seems it will remain a mystery why I can only receive UDP packets only when Wireshark is running.
Thanks to everyone who responded! If anyone has other ideas, I'll be happy to try them out.
06-15-2011 11:02 AM
hmmm...
Can you try a different port number on your PC. The port you are currently using is also some part of windows... maybe this is eating away your data when you do not run wireshark... altough I cannot understand why....
http://en.wikipedia.org/wiki/Microsoft_Message_Queuing
One of the ports I use without any problem is 14503..
07-14-2013 05:07 AM
is it work? i have same problem to conect another pc to my labview using udp to recive command from there.is any one use it successfully?
07-14-2013 11:11 AM
@mehr wrote:
is it work? i have same problem to conect another pc to my labview using udp to recive command from there.is any one use it successfully?
Yes, properly set up, this works successfully!
We cannot really help unless you tell us what you tried so far and in what way it fails. Have you looked at the shipping examples? How is the windows firewall configured? Is there a NAT router between the PCs? What UDP ports do you use? What kind of error messages do you get?
Please describe the problem in much more details:
"... problem to conect another pc to my labview using udp to recive command from there..." is very ambiguous. Which site acts as client, which as server? Who sends commands? Are the commands send on request or continuoulsy? Where is "from there"? What is the format of the commands?
Can you show us your code?
07-14-2013 02:19 PM
Thanks for your answer and i apologize for my bad English writing
we have two code one implemented in c++ and use opencv for image processing and use as server
another code is implemented to send commands to quad rotor uav and implemented in labview and is client
we connect two pc using cross Ethernet cable directly. And we want send image processing result to labview using udp protocol
server sends data like “forward” ,”backward” ,”turn L” ,”turn R” ,…
i have run example of labview for udp receiver.vi but dont get data any packet from server
also iv disabled firewall in client pc.
port is 5033
server ip is 192.168.1.113 (in c++ program)
and then we run both of programs in one pc and udp connection was successful and labview get data form c++.
but i want to know how can i use udp between two PCs?
thanks
07-14-2013 04:26 PM
@mehr wrote:
also iv disabled firewall in client pc.
You should open the firewall on the server PC instead. Most firewalls allow outgoing connections.