Note: You may need to alter the modem device used in these scripts. The one used here (/dev/ttyS1) works for Red Hat 6.0 systems where the modem is attached to the COM 2 port. For Red Hat 5.2, replace ttySx with cuax, where x is 0, 1, 2 or 3 - corresponding to COM 1, 2, 3 or 4.
crtscts modem defaultroute noipdefault ipcp-accept-local ipcp-accept-remote debug user amcbeal
# dip file for ozemail port /dev/ttyS1 reset speed 57600 sleep 1 send AT%E2\r send ATT\r send ATH0\r wait OK 5 if $errlvl != 0 goto modem_trouble print Modem initialised OK send atdt62578155\r wait CONNECT 50 if $errlvl != 0 goto no_connect mode ppp print Connection going goto exit modem_trouble: print The modem did not even initialise quit no_connect: print No connection, error level is $errlvl quit exit: exit
Here is what you should see on the screen.
DIP: Dialup IP Protocol Driver version 3.3.7o-uri (8 Feb 96) Written by Fred N. van Kempen, MicroWalt Corporation. DIP: name=root home=/tmp host=gort IP=0.0.0.0 prot=SLIP MTU=296 Modem set to "HAYES". >> port /dev/ttyS1 PORT: terminal port set to "/dev/ttyS1". DIP: tty_open: /dev/ttyS1 (4) DIP: tty_open: IBUF=1024 OBUF=1020 DIP: tty: set_speed: 38400 DIP: tty: set_databits: 8 DIP: tty: set_stopbits: 1 DIP: tty: set_parity: N >> reset >> speed 57600 DIP: tty: set_speed: 57600 >> sleep 1 >> send AT%E2\r >> send ATT\r >> send ATH0\r >> wait OK 5 ATH02 OK>> if $errlvl != 0 goto modem_trouble >> print Modem initialised OK Modem initialised OK >> send atdt62578155\r >> wait CONNECT 50 atdt62578155 CONNECT>> if $errlvl != 0 goto no_connect >> mode pppThe output written to /var/log/ppplog looks like this...
dip[489]: DIP: tty_open: /dev/ttyS1 (4) dip[489]: waiting for "OK" for 5 sec's. dip[489]: waiting for "CONNECT" for 50 sec's. dip[490]: tty_notlocal: file0: /dev/ttyp6 flle4 /dev/ttyS1 pppd[490]: pppd 2.3.5 started by root, uid 0... and the rest looks the same as the output for pppd started by other methods.