Last updated: 28 December 1996 (bug fixes, feature changes)
Most recent version: 3.0 - 28 December 1996
If you add the on-line document to your quick list then you can delete the copy shipped with the original zip file.
Its purpose is to compliment the function of Dial Other Internet Providers (SLIPPM.EXE) by providing an automatic re-dial capability. SLIPPM.EXE, as supplied by IBM, does not currently (Version 2.0 Rev 1.16) provide this function itself. Instead, the user must select the Dial button over and over when busy conditions persist.
I found this to be a great time-waster because my modem was able to report back a busy condition in a matter of seconds and I would be interrupted from my other OS/2 work to start another dial attempt. Obviously this prevented me from doing any other work with OS/2 (or anything else for that matter) while I was trying to get connected.
So, why do I want pppdial.cmd? Because it saves me time. With pppdial.cmd I can request a dial attempt once and pppdial.cmd takes over the task of doing the necessary re-dialing. After the modems connect successfully, pppdial.cmd can respond to host prompts with a login id, a password, data entered directly from the keyboard (if used without slippm.exe), or any other data you care to specify.
I have come to depend on pppdial.cmd to provide the basic redial function thus allowing me to continue other work uninterrupted. When pppdial.cmd finally does get me logged on, a beep brings my attention to the 'net.
[Contents]
[Contents]
After a successful modem connection is established pppdial.cmd watches for the character sequence ogin: and then sends your loginid as specified in the Dial Other Internet Providers notebook on Page 1.
PPPDIAL.CMD watches for the characters ssword: and then sends your password. At that point pppdial.cmd completes with an audible tone to indicate you are connected and logged on.
In this case, it is necessary to enter your password in the SLIPPM.EXE notebook and save the changes. Though you may leave the password field blank and SLIPPM.EXE will prompt for it, SLIPPM.EXE does not make it readily available for the external REXX script and so pppdial.cmd will not know what your password is.
There is an implicit security risk when you keep your password in this manner since anyone with access to you system could log on with your account information. If this is a concern to you, pppdial.cmd may be used from the command line and you can be prompted to enter your login id and/or password from the keyboard. In this case, the password is never kept in a disk file and is therefore more secure.
If your provider does not use the above prompts, or uses a more complex conversation to get logged on, or if you simply want to customize pppdial.cmd a bit then you will want to read the response file section.
[Contents]
If you do not wish to use ppdxit.cmd, you do not need to install a "dummy" version of it. Simply do not put it in the same directory as ppdial.cmd.
[Contents]
Or, if you need to specify more phone numbers than slippm.exe allows you to fit in the phone number field then you may enter a file specification (drive:\path\name) of a file which contains a list of phone numbers, one on each line.
The keyword [PPPDIAL_PHONE] may be used within a response file.
The first line must be GO or WAIT indicating whether pppdial.cmd initiates the host conversation or should wait for a specified prompt.
Comments and blank lines are allowed within the response file. However, they may not appear before the GO or WAIT keyword which must be the first line. [PPPDIAL_REM] begins a comment.
Keywords that use the PPPDIAL_ prefix do not affect the conversation between host and client. Instead, they set options for pppdial.cmd execution. The sequences [LOGINID] and [PASSWORD] will be substituted with your login id and password taken from the Dial Other Internet Providers> ini file.
CTRL- sequences may be sent from the response file by using the ^ (hat) character. i.e. ^M will be sent as a carriage return.
A line consisiting only of \r will cause a carriage return to be sent. Or use ^M
The response file is useful for systems that do not immediately prompt for the userid, instead requiring the user to "press enter" or make a menu selection etc.
The first line of the response file is a synchronization keyword to indicate whether to wait for a prompt, or to start sending. The keyword must be either GO or WAIT.
Generally, lines in the file are used in pairs: assuming we wait for a prompt after getting connected, the first line will be WAIT, the second line is what we wait for, the third line is what we send in response, etc.
If WE must start the conversation after connecting, the first line in the file will be GO and the second line will be sent right away. We will wait for the system to reply with what we have in line 3 and so on.
/* REXX */ call rxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs' call SysLoadFuncs address cmd 'd:\faxworks\fxrcv.exe -off' call syssleep 3 'ppp.exe com1 57600 rtscts modem defaultroute priority 1 exit connect "pppdial.cmd c:\new\myppp.rsp"' say 'PPP return code' rc 'd:\faxworks\fxrcv.exe -on' exitThe response file used is listed below.
GO [PPPDIAL_REM] Don Russell - don_russell@ibm.net - sample pppdial script response file. [PPPDIAL_REM] Note: GO is still required first... and we use GO instead of WAIT [PPPDIAL_REM] because our first action is a [REPEAT] which means WE start. [PPPDIAL_USE_DIALER] [PPPDIAL_PREFIX] ATDT*67W [PPPDIAL_PHONE] 482-7000 [PPPDIAL_REM] I only want to connect at 14400... [PPPDIAL_INIT1] ATZ [PPPDIAL_INIT2] AT&N8 [PPPDIAL_DELAY] 3 [PPPDIAL_REM] Only retry dialing 500 times [PPPDIAL_MAX_REDIAL] 500 [PPPDIAL_REM] OK, parms have been defined... let's get to the prompt/reply part... [REPEAT] ^M ogin: 3 [KEYBOARD] ssword: [OS/2] START /K /B /MIN /I C:\NEW\STARTMAIL.CMD [KEYBOARD_NOECHO]Notice that the OS/2 START command is issued before sending my password. The reason I do this is because after sending my password, my provider is expecting to start the ppp session right away. In many instances I found that the time required to actually process the OS/2 START command after sending my password was too long and my provider dropped carrier. I would have to start the dial script again and usually the second time it would work OK. I presume this is because the necessary OS/2 components were now in memory and did not have to be loaded from my harddrive.
By starting the other session (startmail.cmd) before sending my password, pppdial can terminate very quickly, giving control back to ppp.slippm to establish the IP addresses. Since making this subtle change in my response file, I have never been dropped by my provider like that.
The following keywords are used to set pppdial options. They may appear in any order, in any place within the response file provided they begin in column one. If a keyword is duplicated, the most recent one read is used. (i.e. the one nearest the end of the file.)
[PPPDIAL_PHONE] 482-7000 [PPPDIAL_PHONE] c:\myphone.lstPhone number phrases may also be specifed, with this keyword or in a file. To specify a phone number phrase, append a semicolon (;) to the number and follow it with the number of seconds pause you want before continuing to dial. Do not include the semicolon on the last dial phrase. For example...
[PPPDIAL_PHONE] 1-800-123-4567; 5 604-555-1212; 3 708-555-3570This will dial 1-800-123-4567 and then wait 5 seconds, continue to dial 604-555-1212 and wait 3 seconds. Finally, dialing will continue with 708-555-3570 at which point we expect a modem to answer.
To specify the same information in a phone number file, code the file as
1-800-123-4567; 5 604-555-1212; 3 708-555-3570When this type of dialing is done, the modem must be initialized so that it will dial even when no dial tone is detected. This is because after the first phrase has been dialed, no dialtone will be present for dialing the remaining phrases. Check the various values for the X setting.
[PPPDIAL_PREFIX] ATDT70#W
The following keywords are used as place holders to represent data that sholud be sent to the host system. Except where noted, these keywords may appear anywhere within a line of text to be sent. The surrounding text will be sent to the host as well.
WAIT Login: [PPPDIAL_REM] Allow the user to enter their userid from the keyboard... [KEYBOARD]
[LOGINID]%pppThis avoids having to include the %ppp as part of my userid.
GO [REPEAT] ^M Userid: 10 [LOGINID]%ppp ssword: [KEYBOARD_NOECHO]
[SLEEP] 5
These keywords cause pppdial to watch for IP addresses in decimal-dot notation (i.e. 199.60.228.12). Both should be specified on the same line, in the order your host system sends them to you. For example...
... ssword: [KEYBOARD_NOECHO] [$IPADDR] [$IPDEST]
If you like, othet text may be added as comments, mimicking what your provider sends. As in ...
Session from [$IPADDR] to [$IPDEST] is beginning
In this case, the text is strictly ignored and only the order of the keywords is observed.
---cut --- GO [REPEAT] \r ogin: 10 [LOGINID] Password: [PASSWORD] --- cut ---GO tells pppdial that it must initiate the conversation after the modems connect rather than wait for a response.
[REPEAT] causes pppdial to send a "return" (\r) and wait for ogin: as a prompt. If the requested prompt is not received this will be repeated 10 times. If the count is missing, pppdial will REPEAT up to 1000 times, after which it will hang up and dial again.
On successful receipt of ogin:, [LOGINID] is substituted with your id from the Dial Other Internet Providers and sent to the host. We wait for Password: and finally [PASSWORD] is obtained from the Dial Other Internet Providers and sent to the host.
--- cut --- WAIT ogin: [LOGINID] ssword: [PASSWORD] --- cut ---This has almost the same effect as the above example except pppdial waits for the desired text instead of sending a carriage return first. (This is how pppdial behaves if no response file is used)
--- cut --- GO [PPPDIAL_REM] Note: GO is still required first... and we use GO instead of WAIT [PPPDIAL_REM] because our first action is a [REPEAT] which means WE start. [PPPDIAL_REM] I only want to connect at 14400... [PPPDIAL_INIT1] AT&N8 [PPPDIAL_REM] Only retry dialing 20 times [PPPDIAL_MAX_REDIAL] 20 [PPPDIAL_REM] the 10 second default is too long... use 5 seconds... [PPPDIAL_DELAY] 5 [PPPDIAL_REM] My modem S7 value is 35, but my modem won't tell pppdial that properly [PPPDIAL_CARRIER_TIMEOUT] 35 [PPPDIAL_REM] OK, parms have been defined... let's get to the prompt/reply part... [PPPDIAL_REM] My provider wants me to "press enter" until the Login: prompt appears [PPPDIAL_REM] (By leaving out the 10 (number of times to try) pppdial.cmd will try [PPPDIAL_REM] 1000 times) [REPEAT] \r Login: 10 [LOGINID] Password: [PASSWORD] [OS/2] START /K /B /MIN /I C:\NEW\STARTMAIL.CMD --- cut ---
[Contents]
GO [PPPDIAL_REM] Make sure our modem is in auto-answer mode... [PPPDIAL_INIT1] ATS0=1 [REPEAT] ^M ogin: 3 [LOGINID] ssword: [PASSWORD] [PPPDIAL_REM] Now that we've passed the security, wait for the call [PPPDIAL_REM] The modem will answer and give us a new CONNECT message CONNECT
[Contents]
If you can't get to the sites mentioned above perhaps try using Archie to find another site. If you'd like another site listed here, let me know what it is and I'll add it to the list.
[Contents]
There is no charge for the use of this script. If you decide you like it and continue to use it, I'd appreciate hearing from you via e-mail... just a brief note saying which site you got it from and where you are using it. A sort of electronic postcard from your home town. :-) Please include your city and country as it's kind of hard to tell from some e-mail addresses.
I've tested this as well as I can with a single provider. Given the many providers and configurations, this may not work properly for you the first time.
Specific things to watch for are the EXACT prompts used when the host system is asking for a userid and password.
To change the script after it's been installed, use the EPM or E editor.
EPM d:\TCPIP\BIN\PPPDIAL.CMD or E d:\TCPIP\BIN\PPPDIAL.CMD
In general I discourage this because if you want to use a future version then you have to make your changes again. Instead, I try to offer "customization" through the use of the resposne file.
[Contents]
The response file I use starts another task just prior to entering my password.
GO [PPPDIAL_REM] Don Russell - don_russell@ibm.net - sample pppdial script response file. [PPPDIAL_REM] Note: GO is still required first... and we use GO instead of WAIT [PPPDIAL_REM] because our first action is a [REPEAT] which means WE start. [PPPDIAL_QUIET] [PPPDIAL_DO_NOT_USE_DIALER] [PPPDIAL_PREFIX] ATDT [PPPDIAL_PHONE] 482-7000 [PPPDIAL_REM] I only want to connect at 14400... [PPPDIAL_MIN_CARRIER] 14400 [PPPDIAL_INIT1] ATZ [PPPDIAL_INIT2] AT&N8S7=15 [PPPDIAL_DELAY] 3 [PPPDIAL_HOST_TIMEOUT] 30 [PPPDIAL_REM] Only retry dialing 500 times [PPPDIAL_MAX_REDIAL] 500 [PPPDIAL_REM] OK, parms have been defined... let's get to the prompt/reply part... [REPEAT] ^M ogin: 3 [LOGINID]%ppp ssword: [OS/2] START "Auto-Ping" /K /B /MIN \NEW\AUTOPING.CMD [PASSWORD] [PPPDIAL_REM] the following causes pppdial to wait for some text from the host. [PPPDIAL_REM] Doing this seems to help with preventing fcs errors etc. [PPPDIAL_REM] the "b" has no special meaning, it is just the character to wait for... [PPPDIAL_REM] in the phrase... PPP session is now beginning... bThe reason for issuing the OS/2 START command prior to sending my password to the host is that since the host is waiting, it won't mind waiting a little longer while the other session starts.
A problem I used to have was that the connection would fail when I started the session after sending my password. On dialing back the connection would work. I have no real proof but it seems reasonable that the overhead of the START command was too much when ppp was trying to establish a connection and negotiate the IP addresses etc.
This is not likely to be a problem on many machines today, but my poor little 20Mhz 486 can only do so much.
So, now that auto-ping has been started, what does it do?
/* REXX */ /* heh heh heh - we'll stay connected by using ping ... */ /* The necessary REXX functions were added by pppdial.cmd */ address cmd signal on halt /* Get our domain name ... */ HostName = value( 'hostname', , 'OS2ENVIRONMENT' ) say 'Will PING to' HostName call time('R') do until rc = 0 if time('E') > 15 then '@exit' call syssleep 3 'ping' HostName '100 1' end /* do */ /* We got a valid PING reply... we must be connected... */ /* Start mail. web, news, etc. */ /* we're connected... ring a bell :-) */ call beep 262, 250 call beep 294, 250 /* Set the workstation clock from NIST */ 'D:\UTILS\NISTIME\NISTIME.EXE -s1 -m2' /* start the web explorer minimized...*/ 'START /B /MIN EXPLORE.EXE -p -q -t 8' /* Start the news reader minimized... */ 'START /B /MIN NR2.EXE' /* start pmmail... "regular" for now, until that "bug" is fixed */ '@D:' '@CD \PMMAIL' 'START /B PMMAIL.EXE' do until rc \= 0 delay = random( 11, 841 ) say time() 'Waiting' delay 'seconds until next ping...' call syssleep delay 'ping' HostName '100 1' end /* do */ say 'Stopping because of return code' rc 'from Ping.' halt: say 'Auto ping stopped' 'exit'This sessions is started before the internet connection has been made. (Obvious, since it is started before I've even sent my password.) It uses the ping command to determine if there is a connection to the network. A ping command is issued every 3 seconds up to 15 seconds. If unsuccessful after 15 seconds, it exits, assuming that the connection attempt is not going to work.
Once connected, the nistime program queries the correct time from a server. If the server reports back a known valid time then nistime adjusts the workstation clock. After that, various other sessions are started.
nistime.zip is available from Hobbes.
If you do not save your password in the entry field in the SLIPPM.EXE application, then you must code the password either in the script itself, or in a response file. (Or use pppdial.cmd without SLIPPM.EXE) Unfortunately, when SLIPPM.EXE prompts for the password, it doesn't put it anywhere readily available to pppdial.cmd :-(
When you specify any *.cmd file in the login sequence field IBM chose to disable some of the fields on the modem info page and even erase some of the info from the ini file pppdial reads to get information. So, if you need a modem init string of something other than ATH0Z then you need to use the [PPPDIAL_INIT1] and/or [PPPDIAL_INIT2] commands in the response file.
I solved this by issuing only one OS/2 START command at the end of the script. The cmd file I start then begins with a 3 seconds "sleep" (call syssleep 3) which gives ppp.exe enough time to get stable (get the IP addresses).
The "intermediate" file then issues the start commands I want for starting mail, web, news reader etc...
If you have a modem init string different from ATH0Z and don't want to use a response file to define [PPPDIAL_INIT1] then you may put it in the prefix in the dialer (page 4). For example if you want to turn off the speaker...
ATM0DT is a good prefix :-)
If you want to be sure that you are always connecting at the highest speed, your modem may support a command to enforce that. (My USR Courier supports an &N command that says what speed to connect at - do not negotiate down! (Or UP) )
By putting the &N (or your modem command) in the prefix like AT&N8DT then if the connection WOULD be slow, the modem does not connect and pppdial will dial again, with the idea that line conditions will be better next time.