01-22-2013 01:01 AM
I am trying to make labview program to replace a java program on a pc(192.168.1.88).
The first step is the program will start a tcp server, then a client(192.168.1.44) will connect in. The java program works fine, but my program all the time waiting and no connection in.
I tried wireshark. When java program receive the connection, it only give 4 lines, my program got many lines and no connection as attached.
Any suggestion, thank.
Solved! Go to Solution.
01-22-2013 01:55 AM
01-22-2013 03:33 AM
I have followed the example.
I tried when both program run, the port 5001 will be open, and the client package will be arrive.
But only the java program will response.
The PC has 2 network interfaces with different subnet.
01-22-2013 03:42 AM
Also, in the labview tcp server creation, I have specified the network interface.
This may be a bug.
01-22-2013 10:26 AM - edited 01-22-2013 10:26 AM
Post your code. I have not experienced any issues with the TCP servers written in LabVIEW and I use them quite often. Other things to look for are firewall settings. Make sure you are not blocking the port of the application.
01-22-2013 08:23 PM
I tried to connect from a local client. Both labview and java tcp server works. But if connect from remote, only java will work.
And the 2 interface is 192.168.1.88 and 172.16.5.95.
01-22-2013 08:38 PM
netstat log as attached.
01-22-2013 11:05 PM
Don't wire the net address. This is forcing it to only listen on the one interface. The Java code is listening on all interfaces and your LabVIEW code is only listening on the 192 interface. I suspect your remote PC is actually coming in on the other interface.
01-22-2013 11:30 PM
The pc has 2 network ports. The remote embedded device is also in 192 and is direct link
I tried no't wire the net address, but still not work.
Any suggestion, thanks.
01-24-2013 04:49 AM
Showing some relevant section of the Java program source would probably help. Or from the client program. There might be a number of things. As to the wireshark log, all those entries in there are from many things, which could be in some ways related to LabVIEW but none but one line are related to your actual problem. And looking at your example you posted later, you should not let the listen socket get closed right away. Think dataflow!Another recommendation since you are not using the address information anyhow, set the resolve remote address to false. It could add a huge delay accepting the incoming connection request, since it will cause a name resolution request on your network which will possibly timeout because of no DNS server being available, and even if you have a DNS server it is not clear if it will contain a name record for that device.