# demon_ppp.dip: connection script for PPP. # Copyright 1994-5 John A. Phillips - john@linux.demon.co.uk # Set the desired serial port name and port speed. port ttyS1 speed 115200 # Set eight-bit clean comms (it's the default, but it can't hurt). databits 8 parity N stopbits 1 # Define the modem initialisation string. This is the string sent to # the modem just prior to dialling. # For USR Courier V.Everything (see Modem.txt): init ATB0C1E1F1Q0V1&A3&B1&C1&D2&H1&I0&K3&N0&R2&S1 # Turn on echoing of the control commands, responses etc. echo on # Reset the modem and terminal line. NB some people report having # problems dialing after using this, but others need it. Uncomment # the next line only if you need to reset the modem here. # reset # If you need a two-stage modem initialisation put the first stage # here and the second stage in the init string above (which is output # to the modem before each dial). This string will be sent once only. send AT&F1\r wait OK 3 if $errlvl != 0 goto error1 dial: # Dial Saffron Walden. # dial T01799-506010 45 # Dial London Energis. dial T0181-338-4848 45 # Dial Luton Energis. # dial T01582-64-4848 45 # Dial London. # dial T0181-343-4848 45 # If we get a successful CONNECT, go on to the login section, else retry. if $errlvl == 0 goto error2 if $errlvl == 1 goto login if $errlvl == 2 goto error2 if $errlvl == 3 goto busy if $errlvl == 4 goto error2 goto error2 busy: # Retry. This does not limit the number of retries. It is for manual # operation only! The next reset may disrupt dialling on some modems, # but is needed by others. Uncomment the next line only if you need to # reset the modem here. # reset print BUSY print Trying again ... # sleep 30 goto dial login: # We are now connected. Log in to the system. You should not normally # need to provoke the login prompt with the next two lines. # sleep 3 # send \r\n\r\n wait ogin: 60 if $errlvl != 0 goto error3 sleep 1 send \n wait word: 60 if $errlvl != 0 goto error4 send \n wait ocol: 60 if $errlvl != 0 goto error5 send ppp,nolqm,idle=240\n wait HELLO 60 if $errlvl != 0 goto error6 # Set the remote end of the link. get $remote demon-du.demon.co.uk # Announce the connection. print print Dial-up and log-on completed. # Initiate PPP and exit. mode PPP exit 0 # Error handling section. error1: print Error resetting modem - OK not received. goto error error2: print Error in dialling. goto error error3: print Error waiting for login prompt. goto error error4: print Error waiting for password prompt. goto error error5: print Error waiting for protocol prompt. goto error error6: print Error waiting for HELLO prompt. goto error error: print Dial-up and log-on failed. exit 1