LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remote DataSocket communication

Solved!
Go to solution

Hello,

 

I'm using DataSocket Labview to perform a remote connexion between two PCs (both running labview) on two different networks (both connected to the internet), i have already developped a program for reading and another one for writing and i made a test  in a private local network, it did work but since i'm trying to go beyond my local network there is no communication, i'll appreciate the help if someone can show me how to establish a datasocket communication between two PCs in two different networks.

 

I'm posting the programs.

 

thank you

 

MGarry

Download All
0 Kudos
Message 1 of 20
(3,941 Views)

You can't connect across networks like that. For this to work, the computers have to be able to find each other. The easiest way to make this work is to put them in the same network by using a virtual private network (VPN). I believe there should be some free VPN software and services.


___________________
Try to take over the world!
0 Kudos
Message 2 of 20
(3,915 Views)

Hi tst,

 

Thank you for your replay, i  was wondering if i can just make some configurations on my PC to make this work, if it worked on LAN i don't see any reason that it doesn't beyond LAN, i'm asking if there is a way to enable the communication only by making some changes on my PC ( to forward requests on the router ) can this be made?

 

Thank you,

 

MGarry

0 Kudos
Message 3 of 20
(3,904 Views)

Working in a LAN is one thing and getting one computer to see the other across the Internet is another. Did you try looking into the VPN option?


___________________
Try to take over the world!
0 Kudos
Message 4 of 20
(3,901 Views)

Ok tst i'll look into VPN and see if i can do something, thanks.

 

MGarry

0 Kudos
Message 5 of 20
(3,895 Views)

How much access do you have to the interent connections at the server side of the connection? If you have control over that you may be able to configure your firewall settings to allow you to establish a connection without using a VPN. There is no issue with using a VPN but if your server has a static IP address or a name in a public DNS you can allow a connection through to your application.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 6 of 20
(3,885 Views)

Hi,

 

I don't understand your question Mark, and in order to be more clear i'll get into details so everyone can understand what all this is about; i'm working on a project that consists on acquiring several level measures from different sites and then send them all to an only and remote machine (mine), obviously these machines would run the DataSocket server and the Writing program, while i'll be doing the same thing but this time with reading program, we can say that the basic topology is "One client, many servers" and the only one who has to connect to distant machines is me so i can get the level value. I have thought that maybe the only router that needs to be reconfigured is ours ( without changing anything on servers routers) and probably i'm wrong since you've been talking about VPN connexion, the option i have considered is to connect to eatch one of the server routers and forward incoming requests on port 3015 (Datasocket server port) to the intern IP addresses of the machines with Datasocket server runing on.

 

Please correct me if i'm wrong.

 

Any other suggestions are welcome.

 

MGarry

0 Kudos
Message 7 of 20
(3,877 Views)

If the routers have a fixed public IP address and port forwarding configured then it might work, but the simplest solution without changing the code would probably still be a VPN.

 

If you don't mind changing the code, then I would suggest trying to minimize the amount of direct communication that you have. You could have the sites regularly upload the data somewhere (e.g. using email or FTP) and then have your station download the updated data. Email is the most convenient in that you can set up accounts with zero configuration and management on your end by using services such as Gmail.


___________________
Try to take over the world!
0 Kudos
Message 8 of 20
(3,867 Views)

One of the things are being asked, do you have a coporate firewall that is connecting between your machine and the internet?

    1. If there, you will need special permission for the corporate system to allow you to talk back and forth. Many

        firewalls are no longer simple systems and can block the connection. This is the reason he is talking about

        a VPN. This allows you to tunnel through the firewall.

    2.  I am not sure if data sockets use TCP/IP or UDP. It has implication on how it can be used. TCP/IP can

        be used and is routable. UDP must exists in the sam subnet and remember, it is a stateless system. It

         will not guarantee the transfer of packets across the network. TCP/IP will.

 

0 Kudos
Message 9 of 20
(3,865 Views)

To minimize the network configuration requirements I would flip your model and have one server and multiple clients. I think I would also use either web services or write my own simple TCP messaging system. I am not sure how easy data sockets work across the internet. Perhaps someone with more experience using them can answer that question. However, the reason that I suggest using web services our writing your own TCP messaging (using port 80) is that almost all router allow outbound traffic on port 80. By making your logging/analysis machine be the server you more than likely will not need to make any changes at the client installations. When I asked how much control over the network I was referring to changing configurations of your router/firewalls. Some IT departments are difficult to convince to change things. If you do use port 80 and you have other web servicers running on your network you may need to use a proxy to redirect your data to your machine. If you choose to use your own port number (or use data sockets) you will have to make sure there are no restrictions on the network running the server that will block traffic on that port. Again, single server with multiple clients is easier to manage in terms of network configurations.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 10 of 20
(3,861 Views)