DialerFile NOTE: an intellegent choice of name.

A script for opening communications thru a dial-up interface.

APPENDIX B: DIALER file

The following dialer script will perform these steps:

1.drop DTR & RTS to force a hangup
2.wait 2 seconds and then raise DTR & CTS
3.set the port speed to 9600 baud and initialize the modem
4.dial a number
5.turn on continue-after-error mode
6.wait for the modem to return a CONNECT message
7.abort if BUSY was received instead of CONNECT, or dial-out failed
8.try three times to send a CR and obtain a Login: prompt
9.send my login name, password, wait 5 seconds and then exit
Let's assume a BUSY will always be detected within 10s, and a connect ALWAYS takes longer.  Also, if we invoked dialer with the ping options, this gives us an eventual busy redial.  -- n5knx
# verbose off [enable when well-debugged \ eliminate most output]
control down
wait 2000
control up
speed 9600
send "atz\ratm0l0e0\r"
wait 1000
send "atdt555-1212\r"
failmode on
wait 10000 "BUSY"
ifok exit 1
wait 60000 "CONNECT"
iffail exit
wait 2000
send "\r"
wait 5000 "ogin"
iffail begin
 send "\r"
 wait 5000 "ogin"
 iffail begin
  send "\r"
  wait 5000 "ogin"
  iffail begin
   control down
   exit 1
  end
 end
end
wait 1000
send "myname\r"
wait 5000 "assword"
  iffail begin
   control down
   exit 1
  end
wait 1000
send "mypassword\r"
wait 5000
exit

Example dialer files are attached for use.

DialerFile (last edited 2007-03-16 20:39:37 by GeorgeVerDuin)