03-18-2013 11:22 AM - edited 03-18-2013 11:31 AM
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
Solved! Go to Solution.
03-18-2013 03:57 PM
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.
03-19-2013 02:58 AM
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
03-19-2013 03:29 AM
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?
03-19-2013 05:48 AM
Ok tst i'll look into VPN and see if i can do something, thanks.
MGarry
03-19-2013 10:21 AM
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.
03-19-2013 02:42 PM
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
03-19-2013 03:05 PM
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.
03-19-2013 03:09 PM
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.
03-19-2013 03:18 PM
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.