I didn't bother to pretty this up, or to remove all the stuff that deals
particularly with me, my computer, and my SLIP server; nor did I make any
attempt to make this script the least bit generic. The redialing part
is quite simple and straightforward. Note that not getting the waited-for
BUSY generates a dip I/O error message which seems to hurt nothing. Timing
may be an issue for some since dip must be finished waiting for BUSY when
CONNECT arrives.
Around here, attempts to make a SLIP connection sometimes fail for reasons
other than BUSY (like getting a poorly configured modem on the other end),
so I run dip from a little tcsh script like the following:
while ( "`ifconfig | grep sl0`" == "" )
rm /var/spool/uucp/LCK..cua2
dip -v /root/Comm/slip.dip
sleep 2
end
-------------------------------------------------------------------------
#
main:
get $mtu 296
get $remote 128.230.1.54
port cua2
speed 57600
parity N
databits 8
stopbits 1
reset
redial:
flush
send ATZ0\r
wait OK 2
send atdt4431320\r
wait BUSY 14
if $errlvl == 0 goto redial
wait CONNECT 30
if $errlvl != 0 goto error
wait sername: 30
if $errlvl != 0 goto error
send vefatica\r
wait ord: 10
if $errlvl != 0 goto error
send PASSWORD\r
wait DIAL> 200
if $errlvl != 0 goto error
send slip\r
wait is 10
get $local remote
if $errlvl != 0 goto error
done:
print CSLIP to $remote with address $local
default
mode CSLIP
goto exit
error:
print SLIP to $remote failed.
reset
exit:
-------------------------------------------------------
Respectfully,
Vince Fatica