ftp.nice.ch/peanuts/GeneralData/Documents/communication/UofO_SLIP_configuration.tar.gz#/UofO_SLIP_configuration/config/DEFAULT-SAMPLES/dial-multitech.tcl

This is dial-multitech.tcl in view mode; [Download] [Up]

#
# tcldiald TCL script used to configure and dial a Multitech MT932EA V.32 modem.
#
# Assumes that the zero'th argument to the top level script is the phone number
# which needs to be dialed.
#
# $Id: dial-multitech.tcl,v 4.6 1992/09/05 01:59:57 louie Rel $
#

# 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 Multitech V.32 9600 bps 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*"

# configure modem with proper parameters 

# V1	verbose codes sent as words
# &Q0	standard result codes (not hayes 2400)
# X4	Hayes result code set with NO DIAL DONE and BUSY
# &E1	MNP auto-reliable mode
# &E4	CTS modem initiated flow control
# &E11	Normal Mode flow control on
# &E13	Pacing on (RTS or XON/XOFF depending on &E4 or &E5)
# $MB9600 modem baud rate
# $MB19200 serial port baud rate
# M0	monitor speaker always off
# $BA0	baud adjust off (speed conversion on)
# &C1	carrier detect acts normally
# &C2	carrier normally asserted, excpet at disconnect
# S24=20 drop time in 50ms increments
#
# (Don't have to escape $ inside of {} quoted string)
#
xmit {ATV1&Q0X4&E1&E4&E11&E13&E15$MB9600$SB19200M0$BA0&C1S24=20\r}
expect timeout {error "waiting for OK"} "*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 9600 RELIABLE COMPRESSED\r*}" {log "Connected"} \
	"{*CONNECT 9600\r*}" {log "Connected NO MNP5!"} \
	"{*CONNECT\r*}" {log "Connected (some random way)"} \
	"{*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.