############################################################################### # # # Connection script for SLIP to gate.demon.co.uk # # # ############################################################################### ################################### # # # Get IP addresses of ends # # # ################################### get $local danae.demon.co.uk get $remote gate.demon.co.uk ################################### # # # Set port # # # ################################### # Set the port print dip: INFO: locking the port ... port cua0 if $errlvl == 0 goto portset print dip: ERROR: port is in use exit 1 portset: print dip: INFO: port locked ################################### # # # Set port speed # # # ################################### print dip: INFO: setting port speed ... speed 38400 print dip: INFO: port speed set to 38400 ################################### # # # Initialise modem # # # ################################### # Prepare for dialing. print dip: INFO: initialising modem ... # send ATQ0\\V1E1\\J0!E0\r send ATZ\r wait OK 2 send ATQ0E1M1\r wait OK 2 if $errlvl == 0 goto initok print dip: ERROR: modem initialisation failed exit 1 initok: print dip: INFO: modem initialised ################################### # # # Dial # # # ################################### print dip: INFO: dialing ... # dial T081-343-4848 dial T0813434848 if $errlvl == 0 goto dialok print dip: ERROR: dial failed exit 1 dialok: print dip: INFO: number dialed ################################### # # # Connect # # # ################################### print dip: INFO: waiting for connection ... # wait 9600/REL 30 wait 14400 30 if $errlvl == 0 goto connectok print dip: ERROR: failed to connect exit 1 connectok: print dip: INFO: modem connected ################################### # # # Log in # # # ################################### print dip: INFO: waiting for login prompt ... sleep 3 send \r\n\r\n wait ogin: 60 if $errlvl == 0 goto loginpromptok print dip: ERROR: no login prompt exit 1 loginpromptok: send danae\n print dip: INFO: sent login ################################### # # # Send password # # # ################################### print dip: INFO: waiting for password prompt ... wait ord: 60 if $errlvl == 0 goto passwdpromptok print dip: ERROR: no password prompt exit 1 passwdpromptok: send duino9\n print dip: INFO: sent password ################################### # # # Set comms protocol # # # ################################### print dip: INFO: waiting for protocol prompt ... wait ocol: 60 if $errlvl == 0 goto protpromptok print dip: ERROR: no protocol prompt exit 1 protpromptok: send slip,idle=0\n print dip: INFO: sent protocol request ################################### # # # Wait for connection confirm # # # ################################### print dip: INFO: awaiting SLIP connection confirmation ... wait HELLO 60 if $errlvl == 0 goto slipok print dip: ERROR: SLIP connection NOT confirmed exit 1 slipok: print dip: INFO: SLIP connection confirmed ################################### # # # Set SLIP paramters # # # ################################### print dip: INFO: setting SLIP parameters ... default get $mtu 1500 mode CSLIP sleep 2 print dip: INFO: SLIP connection established exit 0