Previous Contents Next

Dialing into OzEmail using dip

Although dip is often mentioned in connection with SLIP, it can also be used to establish a PPP connection. Read the PPP.README file distributed with the dip-3.3.7p source for more information. Thanks to Andrew Torda for help with this.


Dip Configuration Scripts

The /etc/ppp/pap-secrets file is the same as described previously. This method does not use an ozemail-chat script. This function is performed by the ozemail.dip script below. The dip man page refers to a "chat" script used to set up a link to a remote system. This file is not in the same format as the file used by the chat program. Dip has its own script language and it would be more logical to refer to its script as a "dip script".

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.

 

/etc/ppp/options

crtscts
modem
defaultroute
noipdefault
ipcp-accept-local
ipcp-accept-remote
debug
user amcbeal

 

/etc/ppp/ozemail.dip

# 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

Output from DIP

As root, start DIP by typing
  dip -v /etc/ppp/ozemail.dip
or leave out the -v option for less verbose output.
When finished, terminate the connection by typinging   killall pppd.

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 ppp
The 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.


Previous Contents Next