Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > b925ecbdbd8b3c79875000359b742194 > files > 38

vpnd-1.1.0-2mdk.i586.rpm

#=========================================================
# Note: the modem commands are for an ELINK310 ISDN modem
#=========================================================
#
# wait for modem to become ready
#
dsrwait 2 fail
#
# initialize modem if no dcd
#
dcdwait 1 init
#
# try to synchronize if dcd is already available
#
goto sync
#
# modem initialization
#
:init
send 2 fail AT\\B0\r
wait 2 fail OK
#
# reset modem
#
send 2 fail ATZ\r
wait 5 fail OK
#
sleep
#
# use X.75
#
send 2 fail AT&B49\r
wait 2 fail OK
#
# set 512 byte buffer size
#
send 2 fail AT\\A3\r
wait 2 fail OK
#
# enable full RTS/CTS handshake
#
send 2 fail AT\\Q3\r
wait 2 fail OK
#
# put modem in answer state
#
send 2 fail ATS29.6=0\r
wait 2 fail OK
#
# modem shall not connect automatically
#
send 2 fail AT&D0\r
wait 2 fail OK
#
# set modem to leased line mode and use B channel 0
#
send 2 fail AT\\B1\r
wait 2 fail OK
#
# connect and wait for a maximum of 60 seconds for success
#
send 2 fail ATD\r
wait 60 reset CONNECT
#
# in case of successful connect synchronize
#
goto sync
#
# in case of failure reset modem settings
#
:reset
#
# disable leased line mode
#
send 2 fail AT\\B0\r
wait 2 fail OK
#
# restore dcd handling
#
send 2 fail AT&D2\r
wait 2 fail OK
#
# cause error termination (this will never be sent by modem)
#
wait 1 fail OK
#
# synchronize after dcd is available
#
:sync
#
# check that dcd is now set
#
dcdwait 1 fail
#
# wait a little bit
#
sleep
#
# send initialization message
#
send 2 fail VPND\r\n
#
# wait for answer message
#
expect 10 fail DNPV\r\n