LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to programmatically make a dial-up internet connection that can be used by Internet Toolkit FTP VIs?

I just paid $500 for the Internet Toolkit because I need to programmatically make a dialup connection and ftp some files.  The FTP VIs worked great out-of-the-box when my Windows XP box has a broadband connection.  But I need to run my app where there is no broadband, only dial-up.  I can send AT commands to the modem comm port that makes the modem dial-up the ISP, and I can also send text username and password to the comm port to connect to the ISP.  But then what?  How do the FTP and other high-level VIs know there's an internet connection over the comm port/modem?  Does Windows XP need to know that there is a connection before the VIs will work?  Am I missing something here?  I hope I didn't waste $500 on the toolkit!
0 Kudos
Message 1 of 5
(4,933 Views)

Hello HawkOwl,

I noticed that you mention using the FTP VIs in your program but you posted this questions under the LabWindows/CVI section of the forum.  The internet toolkit is available for both LabVIEW and CVI, but if you are using the LabVIEW version of the program I would recommend posting under that section of the discussion forum since you will be more likely to get an appropriate answer.  If you are using CVI, or if you want to repost in the LabVIEW forum, I would recommend posting a simplified version of your code to illustrate what you are doing and allow others to easily test your code.

John B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(4,910 Views)

In my opinion you just waisted $500. Modem connections is really simple.

Open a command window. (cmd) and issue AT modem command straight to the modem.

C:\type con >com1
ath1
atdt 011 675 1280

"type con >com1" opens a connection on com port one to the modem, assuming we are connected to com 1 on the modem.

the rest are standard AT modedem commands (http://www.modem.com/general/extendat.html)

ATH1 picks up the line

ATDT instructs the modem to perform tone dailing and it proceeds dailing the number.

You can use the CVI serial port commands to send these command to the modem in a similar way.

Assuming you dailed into an internet connection you can proceed using ftp commands to transfer files or if you're dailing straigt into another PC with a modem you can continue using AT commands and transfer files over.

If you use a terminal session (Hyperterminal from windows for example - "C:\Program Files\Windows NT\hypertrm.exe") you can issue the same AT commands connecting directly to your modem and you can see the responses from the modem. A quick way to test the connection is to issue the at commands AT&i0, AT&i1, AT&i2, AT&i3, this returns information about the modem and it's setting, firmware etc. Use Hyperteminal to test you concepts and then code that into CVI using the serial interface commands.

The internet connections in windows is determined by the setup in IE under Tools, Internet options under the connections tab. If you pick the defaults as dailup it will always use that, so you can even get windows to dail up on demand and just execute the FTP commands, but I always found that to be unreliable and used the AT dailup commands to initiate the connection.

PS: Also take a look at wget or windows (http://gnuwin32.sourceforge.net/packages/wget.htm), this really great open soutrce utility port from unix to get files from anywhere with no hassles.

 



Message Edited by Jattie on 02-04-2008 05:32 AM
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 3 of 5
(4,873 Views)

Thanks everyone, 

I got it working with a system call to RasDial <name of dialup connection in windows>  <username> <password>,   and a  system call to RasDial /disconnect  to end it. 

Thanks, Doug

0 Kudos
Message 4 of 5
(4,861 Views)

...and I should clarify for anyone else going down this road, the string that you wire into the system command needs to begin with a  'cmd /c', so the whole string looks like ' cmd /c RasDial <connection name>  <full username>  <password> '

-Doug

0 Kudos
Message 5 of 5
(4,858 Views)