LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Network communication via DSL modem

Hi All,

Want to use CVI to program an application, which will access an embedded device through network. The background is that the device is located in a LAN, but can through a router to communicate with outside, and the device use Linux as its OS, the CVI program is in another city, the only communication way is the DSL modem. Due to there are not a fixed IP address between  the device network and PC which running the CVI program, so please advise if there is a solution to resolve the problem? Thanks.


David
0 Kudos
Message 1 of 6
(3,974 Views)
The CVI application does not need a fixed address if it is the one making the connection to the embedded system.   If the embedded device has a static routable IP you should be able to connect via TCP or Sockets from the CVI application.  If the embedded device is behind a router, you would need to use port forwarding on the embedded device router end to connect to it at the IP address of the router.  If the IP address of the embedded device is dynamically allocated you can;
use a dynamic dns service like http://www.dyndns.com/services/dns/dyndns/ to remap the dynamic ip of the embedded device to a dns entry,
or you would need to keep the "hosts file" of the CVI pc updated with the correct connection IP,
or you would need to run your own DNS at the CVI end to provide name resolution for the CVI application to connect to the embedded device. 
0 Kudos
Message 2 of 6
(3,952 Views)
Hi mvr,

The background is that my CVI PC is also in a LAN, and it connects to the internet with a  shared DSL. We do not have a fixed IP, but just knowing the ISP's DNS address, I'd like to know in this situation, could the CVI PC connect to the embedded device? Thanks.


David
0 Kudos
Message 3 of 6
(3,921 Views)

The CVI PC is doing the "connecting" so the IP of the CVI system or that it is behind a router does not matter that much. The CVI system needs a way to find the embedded device. If the embedded device has a static routable IP and it is not blocked by a firewall, you can connect to it directly from CVI. This address would look something like the form 24.122.xx.xx. There will probably also be a "port" number associated with the connection. How you connect is dependant on what type of connections the embedded device is set up to accept (UDP/Sockets, FTP, TCP). How easy it is to make the connection will depend on the version of CVI you have. FTP and TCP are supported by the CVI Full Development System. UDP is supported directly from windows and can be accessed from the CVI base development system.

There are a lot of different methods and protocols that handle IP based communication. Without some specific information on what the embedded system communication link is looking for it will be difficult to point to a specific path you can take. Here are a few links that may be of some help.

For UDP

http://zone.ni.com/devzone/cda/epd/p/id/4315

For TCP

http://zone.ni.com/devzone/cda/tut/p/id/3067

0 Kudos
Message 4 of 6
(3,906 Views)
Hi mvr,

Thank you for your rreply! But if the two side are all using ADSL to connect with internet, how to set up the communication envirunment?



David
0 Kudos
Message 5 of 6
(3,860 Views)

The ADSL link to the internet is handled by the Operating System.  The setup for the actual ADSL card to internet connection is handled completely by the OS under windows XP.  What you need to know to get started using the connection is:

1) What is the IP address of the embedded system (format xxx.xxx.xxx.xxx) or its DNS entry (format http://xxxxxxx.com).  If the system uses a static IP address you can connect using only the IP.  If the system uses a dynamic IP address a DNS entry is probably going to be required.

2) Is the embedded device behind a firewall or router?  If so how does the administrator of the embedded end handle port forwarding and IP address assignments for external connections.

3) What Internet Protocol is used by the embedded system; FTP (used for file transfer only), UDP (used for basic data streaming), TCP (used for all kinds of data links)?

4) What port is used to connect to the embedded device.? The format will be something like port 80 or :4026.

5) Is your CVI PC behind a firewall?  If yes, make sure it does not block the port you need to connect to the embedded device.

6) Are you using the CVI Full Development System (FDS) or the CVI Basic package?

The next step will be selecting one of the CVI sample programs as a starting point, but the answers to the previous questions will determine which one.

 

Message Edited by mvr on 03-20-2007 07:55 AM

0 Kudos
Message 6 of 6
(3,852 Views)