This is dial-zyxel.tcl in view mode; [Download] [Up]
#
# tcldiald TCL script used to configure and dial a ZyXEL V.32bis external modem.
# This script assumes that the zero'th argument is the phone number to be
# dialed.
#
# $Id: dial-zyxel.tcl,v 4.6 1992/09/05 01:59:45 louie Rel $
#
parity zero
# The phone number to dial is passed as the 0'th argument
set number [lindex $args 0]
# set default timeout for expect/rexpect commands
set timeout 20
log "Start of ZyXEL dialing script, dialing $number"
# flush any pending command
xmit {\r}
sleep 1
# get modems attention
set timeout 2
foreach i {once} {
xmit {AT\r}
expect "{*OK\r*}" break timeout {}
xmit {AT\r}
expect "{*OK\r*}" break timeout {}
xmit {AT\r}
expect "{*OK\r*}" break timeout {}
error "Could not get the modem's attention"
}
set timeout 5
# turn off command echo
xmit {ATE0\r}
expect timeout {error "waiting for OK"} "*OK*"
xmit {ATI\r}
rexpect timeout {} \
"(\[A-Za-z].*\[^\r\n]+) \r.*OK\r\n" {set version $1
# the regsub to strip trailing spaces
regsub {(.*[^ ])\ +$} $version {\1} version
log "Modem firmware version $version" }
# configure modem with proper parameters
# S11=40 - 40 millisecond spacing between dialing tones
# S2=128 - turn off escape into command mode
# &K4 - V.42/V.42bis or MNP4/MNP5
# &N0 - auto-negotiate highest possible link rate
# M0 - speaker off
# V1 - verbose responses
# Q0 - display responses
# X5
# &C1 - CD tracks carrier presence
# &D3 - hang up and reset to profile 0 when DTR dropped
# &H3 - hardware (RTS/CTS) flow control
# &J0 - single phone line RJ11 jack
# &L0 - normal phone line (not leased)
# &M0 - async mode
# &R1 - ignore RTS, assume always on
# &S0 - DSR override, assume always on
# N1 - ring volume
xmit {AT S11=50 S2=128 &K4 &N0 M0 V1 Q0 X5 &C1 &D3 &H3 &J0 &L0 &M0 &R1 &S0 N1\r}
expect timeout {error "waiting for OK"} \
"{*ERROR\r*}" {log "Modem returned ERROR"} \
"{*OK*}" {log "set parameters"}
# dial the phone
log "Dialing $number"
xmit "ATDT$number\r"
# wait for connect message
set timeout 60
expect timeout {error "connecting"} \
"{*CONNECT */V.32*/V42*}" {log "Connected V.32/V.42"} \
"{*CONNECT */V.32*/MNP*}" {log "Connected V.32/MNP"} \
"{*CONNECT */V.32b*/V42*}" {log "Connected V.32bis/V.42"} \
"{*CONNECT */V.32b*/MNP*}" {log "Connected V.32bis/MNP?"} \
"{*CONNECT*\r*}" {log "Connected $expect_match"} \
"{*ERROR\r*}" {error "Modem returned ERROR"} \
"{*NO CARRIER\r*}" {error "Modem returned NO CARRIER"} \
"{*BUSY\r*}" {error "Remote modem busy"}
# set expect timeout back to somethine "reasonable"
set timeout 20
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.