Wednesday, October 24, 2007

First you need a login script. The login script must be in the
file called dial.ppp. Here is an example script:

DIAL.PPP:

send "at&f2\r" ;select factory default settings
recv 3000 "OK\r\n" ;wait 3 seconds for OK response from modem
send "atdt1234567\r" ;dial your provider; the \r is for RETURN
recv 60000 "login:" ;wait 60 seconds for login prompt
send "\r" ;send your username and RETURN
recv 10000 "Password:" ;wait 1 second for password prompt
send "\r" ;send your password and RETURN

Note: the login and password prompts much match those used by your
provider. If your host uses the prompt "Please login:" you can get
away with telling ppp to look for just "login:". Be very careful
that you use the EXACT same spelling, capitalization, and spacing
that your host's prompt uses. If your host uses "login :" and you
put "login:" in dial.ppp (notice the missing space) the script will
never complete. For the password prompt be sure to match the
host's password prompt (or at least the last word or last few
letters of the prompt). For example, if your host's password
prompt is "Enter you Password:", you could put "Password:" in
dial.ppp. Something shorter like "word:" would also work. If you
changed the capitalization to "password:" the script would not
work.

If the script appears to stop after a certain prompt, there is
probably something wrong with your script. Be patient if it seems
to stop after the password prompt since there is usually a delay of
about 5-30 seconds before the host reports your ip# and ppp returns
to the DOS prompt.