LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front Panel DataSocket takes long time to connect

Hi,

I have build a very simple DataSocket application.(Front panel DS only)

I transferring data between two applications running on 2 PC's connected via a wireless network

What hapens to be is when the router is connected to internet (via ADSL modem) the connection between clieant and server is established imidiatly.

However when Modem is disconnected it takes about 1 minute to establish connection.

At both cases I am using the internal IP of the server PC (the PC datasocket server is running on)

1. I used 2 different  wirless routers and result is the same

2. I used static IP addres on both client and server PC's

3. DSTP url I use is "dstp://l192.1.128.106/number" (not computer name but rather ip number)  

4. datasocket server is running on one commputer. The other (client) is running under Runtime (its an "exe" file)

5.When I look at data socket server I see that "process connected" is updated immediately. BUT the front panel controls are waiting for about a minute till datasocked LED is turns green. During this time the datasocket server looks very busy.  

 

I have to emphasis again when the router is connected to internet connection is established immediately.  

 

My gut feeling tels me it has to do with DNS. I don't usderstand why.

Is is related to the server PC DNS?

The client PC DNS?

The router DNS?

 

Any help would be extremely appreciated! 

0 Kudos
Message 1 of 5
(2,818 Views)

Hi Hazkel,

 

When you disconnect the modem, try pinging the other machine to see what the timing is.

 

Are you running any firewalls or antivirus?

 

When you disconnect the modem, do you notice either machine trying to acquire a new IP address?

 

Try connecting the computers directly to the wireless router while the modem is disconnected to see if performance improves.

 

Let me know if any of the above helps! 

0 Kudos
Message 2 of 5
(2,792 Views)

Thanks Kyle,

 

I will give a shot to your suggestion.

 

In the mean wile I have some more information about the problem.

When the modem is disconnected. The two PC's seem to appear on the network. It looks like no problem to transfer any kind of data that is not related to datasocket.

I do use windows standart firwall but doe it make sense it has no efect when modem conected and doeshave effect when modem disconced??

When I look at the datasocket status property at the client PC what I see is: "Connecting: Parsing URL".

This is normal. When the modem is connected it appears for less that a second and then status is getting "active".

BUT When modem is disconnected what I see is:

 

1. On the server PC  when I look at the datasocket server application i see "process connected" IS updated with the new PC

2. The client application status is "Connecting: Parsing URL" for about a minute. (much much longer compared to normal behaviour)

3. During this time the datasocket server looks very busy (consumes a lot of CPU)

4. After a minute (sometimes more) the client status is getting "activ"e and the data server application is running smoothly.

 

In other words, and not with a lot understanding it seems that when modem is disconnected (no internet):

1. The connection between PCs is establish immediately

2. Datasocked is going under "parsing URL" procedure for about a minute. (What doe that mean?)

3. During this time datasocket server gets very busy 

4. After a minute data can be transferred via datasockect

 

hope I was clear

 

Hazkel

 

0 Kudos
Message 3 of 5
(2,784 Views)

Hi Hazkel,

 

When you disconnect the modem, do you see any IP changes occur to the machines?  In most cases, you shouldn't see any changes, but let's see what happens.

 

When you say " It looks like no problem to transfer any kind of data that is not related to datasocket. " does this mean that you can write a VI with say UDP or shared variables and you don't see this issue?

 

Additionally, let's eliminate the router/hub/switch and connect the two PCs directly using a crossover cable.  Does this work?

 

Also, to make sure we're not missing anything simple, attach a copy of the VIs you are testing with. 

0 Kudos
Message 4 of 5
(2,767 Views)
Thanks again Kyle, I have followed up some of you suggestions. With some trial and error (and a fiew bucks...) the problem was solved. The way I solved it: 1. I bought a new router (Edimax BR-6424 ~$40)2. I have configured the PC the Datasocket server was running on, as with dynamic IP and obtain DNS automayicaly. The router was not connected to Modem and everything is working fine. (if you look at atached VI - "time to establish connection was  about 2S. This is the VI I am running on the client PC) Alternate 2. is configure static IP BUT LEAVE DNS VALUES EMPTY. that works fine too. (2S for connection) When I used static IP with some values in DNS the time to establish conection was ~16S. Aperrantly my problem was not related to modem at all.I have made my test with one bad (or misconfigured) router (level one WBR-3406TX).The test I made with the other router (old Edimax I borowed from a friend) were with bad DNS configuration.So I got wrong impression that my problem was related to absence of modem. I am going to use the new router. But just for curiosity. Do you have any Idea what could get wrong with the old router (level one). The DNS was configured correctly. (obtain DNS automaticaly) but still when I ran the attached VI it took 16-20 S to establish connection.??? Best regards, Hazkel 

 

0 Kudos
Message 5 of 5
(2,740 Views)