07-29-2010 01:40 AM - edited 07-29-2010 01:42 AM
I have two computers trying to communicate via TCP.
The current problem is the second computer is getting stuck at it's first TCP Read if the timeout is "-1", and never moves past that. It does successfully read from the sender once, but then I have to stop and restart the VI in order to get it to receive again. If I lower the time limit (e.g. not "-1") then I get the error 56.
Two notes on the program:
Please ask questions for clarifications if needed, and any suggestions are appreciated.
-Abe
Sending computer subVI
receiving computer subVI
07-29-2010 01:53 AM
07-29-2010 02:17 AM
That didn't do the trick. The computers can pass the initial data, so I'd be surprised if that is the problem. The receiving one just gets stuck on the TCP read.
07-29-2010 03:19 AM - edited 07-29-2010 03:20 AM
Here's a solution that should work (at least it does for me):
Also make sure to turn off any firewall when you debug such issues.
Ton
07-29-2010 08:22 AM - edited 07-29-2010 08:22 AM
Ton, that didn't solve the problem, unfortunately.
It's worth noting that the code I pasted worked when the two computers were connected by a crossover cable, but now that they're connected through the local network (with internet), it's not.
So, perhaps it not a labview problem but something else? Any ideas?
The firewall is disabled and I've opened the ports used for this. The main problem is that it works once, but then gets stuck on the first TCP Read on the receiving side, which I can't figure out.
Thanks,
07-30-2010 10:59 AM
Hi ajolson,
When the timeout error occurs, are you able to ping each computer's IP address to verify that both are properly connected to the network? Here is some additional explanation on that error along with some helpful related links for your reference.
- Greg J
08-02-2010 03:29 AM - edited 08-02-2010 03:29 AM
@ajolson wrote:
The firewall is disabled and I've opened the ports used for this. The main problem is that it works once, but then gets stuck on the first TCP Read on the receiving side, which I can't figure out.
Thanks,
Could you run my snippet and indicate visually which of the functions times out?
You might need a portsniffer, like portmon to see what happens. It might be that your switch is killing the connection after a succesfull read. Try to get your IT department looking at the settings for the specific switch you use. Perhaps they need to set some rules for the port you are listening on. If you know the brand/type of the switch search the internet for a manual so you can help them.
Ton