LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot open connection in a peer-to-peer netword

Solved!
Go to solution

I created a peer-to-peer network between two PDAs loaded with Windows Mobile 5.0. It is shown that both of them were connected, and their IPs were assigned automatically. 

 

But when I used TCP/IP Open function, it returns an error 10060 'Cannot open connection'. DO I miss something here? It should be a simple connection.  

0 Kudos
Message 1 of 13
(3,385 Views)

anybody help PLZ.

 

0 Kudos
Message 2 of 13
(3,360 Views)

The error you are receiving is become the timeout on the connection has been exceeded.  If your time out is too short (or non-existant) you can get this error without proper time to establish a connection.  Check out these two articles for more information regarding how to establish a TCP/IP connection with your PDA.

 

http://digital.ni.com/public.nsf/allkb/7A02D810EE88A23F86256EEB005B6283?OpenDocument

http://digital.ni.com/public.nsf/websearch/7D98C202FEC3F39086256D1E007A7609?OpenDocument

 

Let me know if you have any questions.

National Instruments
Applications Engineer
0 Kudos
Message 3 of 13
(3,337 Views)

Thanks very much. I did noticed that PDA requires longer time to connect. 

 

I will try this soon and post the results here. Thx again.  

0 Kudos
Message 4 of 13
(3,321 Views)

I tried, I put a 20s time out instead of 2s. It still timed out with an error 'TCP open connection 10060'. 

 

I think it is probably the IP problem. It's a seperated local network. 

0 Kudos
Message 5 of 13
(3,306 Views)

If you put them on the same sub-net and it works and then does NOT work when moved to seperate subnets...

 

Then your code works it is the network that needs configured OR you need to get routing IPs from your network people.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 13
(3,297 Views)

Here is the follow up. I tried a little more.

 

I put another computer into the LAN. So now two pcs and one SmartPhone (Windows Mobile 5.0) connected through peer-to-peer wireless signal.

 

All three devices were connected, IP assigned to each (169.254.30.37, 169,254.139.208, and 169.254.239.193). They are local IPs, since the LAN is seperated to the Internet.

 

I used the TCP example programs Passive and Acitve VIs to test the connection. Two PCs communicated fine on port 828. But when trying to connect to SmartPhone, it does not work. Always an error "TCP open connection 10060". 

 

Anybody tried similar setups with SmartPhones? Help PLZ. Thanks much.  

0 Kudos
Message 7 of 13
(3,232 Views)
Instead of using the self-assigned IP addresses, try setting them to 192.168.0.x and use the subnet mask of 255.255.255.0 and let us know if you are still experiencing problems.
National Instruments
Applications Engineer
0 Kudos
Message 8 of 13
(3,205 Views)

Scott, it worked now after changing the IPs. Can you explain why the previous '169.xxxxxx' IPs did not work?

 

I thought IP was an address to a specific computer. As long as it is assigned, you should be able to find the computer with that IP. Apparently that's not correct.  

0 Kudos
Message 9 of 13
(3,099 Views)
Solution
Accepted by topic author MengHuiHanTang
The IP address 169.254.x.x is what is refered to as a "self-assigned IP."  What that means is that the device is configured to get an IP address from a DHCP server, but when it cannot find a DHCP server, it assigns itself an IP.  This allows the computer to have an address on the network, but the chances of being on the same subnet are not likely.  Also, the 169.254.x.x will change everytime the computer reboots, or the network card decides to try and get an IP address again.  It's never a good idea to use a self-assigned IP in data communication, because of these undelining problems.  If you are not connecting to a DHCP server, it is always better to set a static IP address.
National Instruments
Applications Engineer
0 Kudos
Message 10 of 13
(3,083 Views)