# pragma ident "@(#)bnu:Dialers	1.8 91/11/07 "
#
# Copyright 1991 Apple Computer, Inc.
# All Rights Reserved.
#
# Copyright 1984-85 AT&T
# AT&T K18 bnu:Dialers 2.8.1.6 
# Dialers 1.1 12/10/90 common
# common:Dialers 1.2 1/17/90 10:09:15
#
# 'Dialers' Basic Networking Utilities (BNU) Data Base Support File.
# [Related files: Dialers, Systems and Dialcodes]
# -----------------------------------------------------------------------------
# Entries in this file specify the initial conversation that must take place
# before a line can be made available for transfering data.  This conversation
# is usually a sequence of character strings that is transmitted and expected
# and it is often used to dial a telephone number using an ACU.  Each entry
# has the following format:
#
#     Dialer Substitutions Expect-Send [Expect-Send]
#
#     Dialer
#         This field is a string that identifies this entry. The Dialer
#         field(s) in the 'Devices' file reference this string (unless the
#         Dialer is internal such as TCP).
#
#     Substitutions
#         This field is actually many subfields jammed together:
#
#             s1s2[s1s2]
#
#         The s1 character is substituted with s2 and so on as in this example:
#
#             =,-:
#
#         The above mumbo-jumbo shows two substitution pairs:
#
#             =,  		When we see '=', change it to ','
#             -:		When we see '-', change it to ':'
#
#         You can have as many pairs as you want, but the main purpose of this
#         substitution field is to allow you to change the '=' and '-'
#         characters, grabbed from the Phone field in the 'Systems' file, to
#         codes that have like meaning to the particular modem you're talking
#         to.  As stored in the 'Systems' file, the '=' character says to tell
#         the ACU to wait for a secondary dialtone before dialing the remaining
#         digits and the '-' character tells the ACU to pause 4 seconds before
#         dialing the next digit.  If you don't wish to substitute any
#         characters, just enter "" in this field.
#
#     Expect-Send
#         These are expect-send sequences like in the 'Systems' file and they
#         use the same escape characters as well.  They are two additional
#         escape characters that make sense here:
#
#             \D	- Phone number without 'Dialcodes' translation.
#             \T	- Phone number with 'Dialcodes' translation.

#------------------------------------------------------------------------------
# Direct machine-to-machine connection
#------------------------------------------------------------------------------

direct

#------------------------------------------------------------------------------
# Apple Data Modem 2400
#
# When using this modem for uucico dial-ins, set these parameters:
#
#   AT&F	Restores factory defaults (always a good starting point).
#   AT&D2	Modem will hangup when the DTR is dropped from the computer.
#   AT&K0	Disables flow control (uucico handles this itself).
#   ATS0=1	Answer the phone on the first ring.
#   ATQ1	Disables messages from the modem such as "CONNECT", "OK", ...
#   ATE0	Disables echo.
#   AT&W	Saves all these changes.
#
# If you want to use the modem with 'cu' or 'ct', you should set the parameters
# as above, but instead of the 'AT&K0' which disables flow-control, you want
# Xon/Xoff flow control (which is the factory default), so just skip the
# 'AT&K0' part.
#------------------------------------------------------------------------------

apple_data_modem_2400 \
  =,-, 					# pause/wait are the same here \
  ERROR ERROR 				# It's an error if we see "ERROR" \
  ABORT BUSY 				# Abort if we see "BUSY" \
  ABORT NO\sCARRIER 			# Abort if we see "NO CARRIER" \
  ABORT NO\sDIALTONE 			# Abort if we see "NO DIALTONE" \
  "" \^E5\$\c				# setup a shorter expect time \
  "" AAAAAAAAAAAAAAAA\c			# get modem sync'ed up to our speed \
  "" AT&F\c\r				# go back to factory defaults \
  OK AT&D2\c\r				# have modem hangup on DTR drop \
  OK AT&K0\c\r				# disable any flow control \
  OK ATTD\T\c\r				# dial this phone number (\T) \
  "" \^E0\$\c				# restore original expect time \
  CONNECT \c				# wait for connection \
  HANGUP apple_data_modem_2400		# at hangup, call this script

#------------------------------------------------------------------------------
# Apple Personal Modem
#------------------------------------------------------------------------------

apple_personal_modem \
  =,-, 					# map characters \
  "" \^E5\$\dAT				# shorten expect time \
  OK-AT-OK-AT-OK AT			# got modem's attention? \
  OK ATDT\T				# dialup remote modem \
  "" \^E0\$\c				# restore expect time \
  CONNECT \c				# wait for connection \
  HANGUP apple_personal_modem		# hangup script

#------------------------------------------------------------------------------
# Telebit Trailblazer Plus
#
# Using the factory defaults (AT&F), make these changes (save using AT&W):
#
#   ATS2=128		disable escape character recognition.
#   ATS51=255		automatic speed selection for interface(mac-to-modem).
#   ATS52=1		modem will hangup if DTR is dropped.
#   ATS58=0		no flow control from the modem to A/UX (no RTS).
#   ATS68=2		CTS flow control from A/UX to the modem.
#   ATS111=30		modem will use 'g' protocol (optional setting).
#
#------------------------------------------------------------------------------

telebit \
  =,-, 					# translate characters \
  ERROR ERROR 				# Abort if we get "ERROR" \
  "" \^E5\$\dAT				# shorten expect time \
  OK-AT-OK-AT-OK AT			# got modem's attention? \
  ABORT BUSY 				# Abort if we get "BUSY" \
  ABORT NO\sCARRIER 			# Abort if we get "NO CARRIER" \
  ABORT NO\sDIALTONE 			# Abort if we get "NO DIALTONE" \
  OK ATTD\T				# dialup remote modem \
  "" \^E0\$\c				# restore expect time \
  CONNECT \c				# wait for connection \
  HANGUP hayes				# hangup script

#------------------------------------------------------------------------------
# Apple's PBX system connection via the Data Interface Unit
#------------------------------------------------------------------------------

# set interface speed (\D is the interface speed token from the Devices file)
ibx1 \
  ""					# no character translations \
  ""		\^S\D\$\M\c		# set interface speed, set CLOCAL \
  ""		\L\R\d\c		# wake-up IBX \
  ""		\^E10\$\c		# change timeout to 10 seconds \
  CHANGE(T)\s>  

# set modem speed (\D is the modem speed token from the Devices file)
ibx2 \
  ""					# no character translations \
  ""		\pt             	# change type \
  TYPE\s>       \p\D            	# set modem speed \
  CHANGE(T)\s>  

# dial number
ibx3 \
  ""					# no character translations \
  ""		\po             	# select outside modem \
  NUMBER\s>     \p\T       		# dial this number \
  INITIATED     \^E0\$\^S0\$\m\c	# restore original settings

#------------------------------------------------------------------------------
# Penril Modem
#------------------------------------------------------------------------------

penril	=W-P "" \d > Q\c : \d- > s\p9\c )-W\p\r\ds\p9\c-) y\c : \E\TP > 9\c OK

#------------------------------------------------------------------------------
# Ventel Modem
#------------------------------------------------------------------------------

ventel	=&-% "" \r\p\r\c $ <K\T%%\r>\c ONLINE!

#------------------------------------------------------------------------------
# Racal-Vadic Modem
#------------------------------------------------------------------------------

vadic	=K-K "" \005\p *-\005\p-*\005\p-* D\p BER? \E\T\e \r\c LINE

#------------------------------------------------------------------------------
# Develcon Switch
#------------------------------------------------------------------------------

develcon ""  "" \pr\ps\c est:\007 \E\D\e \n\007

#------------------------------------------------------------------------------
# Micom Modem
#------------------------------------------------------------------------------

micom	 ""  "" \s\c NAME? \D\r\c GO

#------------------------------------------------------------------------------
#  Rixon Intelligent Modem
# 
#  Modem should be set up in the Rixon mode and not the Hayes mode.
#------------------------------------------------------------------------------

rixon	=&-%	"" \r\r\d $ s9\c )-W\r\ds9\c-) s\c : \T\r\c $ 9\c LINE

#------------------------------------------------------------------------------
# Hayes Smartmodem
#
# Modem should be set with the configuration switches as follows:
#
#   S1 - UP		S2 - UP		S3 - DOWN	S4 - UP
#   S5 - UP		S6 - DOWN	S7 - ?		S8 - DOWN
#------------------------------------------------------------------------------

hayes	=,-,	"" \dAT\r\c OK\r \EATDT\T\r\c CONNECT

#------------------------------------------------------------------------------
# AT&T Programmable 300/1200 Modem Model 4000
#
#	Commands:	Explanation:
#	------------	---------------------------------------------------
#	=,-,		Use comma for secondary dial tone & for pause
#	""		expect nothing
#	ATZ\r\p\p	enter command mode, reset modem, 
#	OK\r		expect modem to reply OK
#	ATZ\r		enter command mode, reset modem
#	OK\r		expect modem to reply OK
#	\E		turn on echo check mode
#	ATDT\T\r\c	enter command mode, tone dial the number
#			(substitute 'P' for first 'T' for pulse dialing)
#	\T\r\c		phone number to dial
#	CONNECT		expect "CONNECT" from modem when connected
#------------------------------------------------------------------------------

att4000 =,-, ""  ATZ\r\p\p  OK\r ATZ\r OK\r\c \EATDT\T\r\c CONNECT

#------------------------------------------------------------------------------
# AT&T Model 4024 Modem
#
#	For normal operation, dip switch 4 should be CLOSED.
#	This disables ENTER INTERACTIVE WITH <CR>.
#
#	Commands:	Explanation:
#	------------	---------------------------------------------------
#	=,-,		Use comma for secondary dial tone & for pause
#	""		expect nothing
#	atzod,		enter command mode, reset modem, set options to default
#	o12=y,		set option 12 to 'y' (transparent data mode)
#	o4=n\r\c	set option 4 to 'n' (don't disconnect on rcvd spaces)
#	\006		expect ACK from modem
#	atT\T\r\c	enter command mode, tone dial the number
#	ed		expect "ed" (actually "Answered")
#
#			Once transparent data mode is enabled, you
#			cannot enter the interactive mode from the data mode.
#------------------------------------------------------------------------------

att4024 =+-, "" atzod,o12=y,o4=n\r\c \006 atT\T\r\c ed

#------------------------------------------------------------------------------
# AT&T DATAPHONE II 2212C Modem
#
#	For normal operation, dip switch 4 should be CLOSED.
#	This disables ENTER INTERACTIVE WITH <CR>.
#
#	Commands:	Explanation:
#	------------	---------------------------------------------------
#	=+-,		'+' for secondary dial tone, ',' for pause
#	""		expect nothing
#	atzod,		enter command mode, reset modem, set options to default
#	o12=y,		set option 12 to 'y' (transparent data mode)
#	o4=n,		set option 4 to 'n' (don't disconnect on rcvd spaces)
#	\006		Wait for ACK
#	atT\T\r\c	enter command mode, tone dial the number
#	ed		expect "ed" (actually "Answered")
#
#			Once transparent data mode is enabled, you
#			cannot enter the interactive mode from the data mode.
#------------------------------------------------------------------------------

att2212c =+-, "" atzod,o12=y,o4=n\r\c \006 atT\T\r\c ed
att2212C =+-, "" atzod,o12=y,o4=n\r\c \006 atT\T\r\c ed

#------------------------------------------------------------------------------
# AT&T DATAPHONE II 2224B Modem
#
#	For normal operation dip switch S1 switch 2 should be OPEN.
#	This disables ENTER INTERACTIVE WITH <CR>.
#
#	Commands:	Explanation:
#	------------	---------------------------------------------------
#	=+-,		'+' for secondary dial tone, ',' for pause
#	""		expect nothing
#	atT\T\r\c	enter command mode, tone dial the number
#			(substitute 'P' for first 'T' for pulse dialing)
#	ed		expect "ed" (actually "Answered")
#------------------------------------------------------------------------------

att2224b =+-, "" atT\T\r\c ed
att2224B =+-, "" atT\T\r\c ed

#------------------------------------------------------------------------------
# AT&T DATAPHONE II 2224CEO Modem
#
#	The 2224CEO Modem supports MNP error control protocol.
#	This entry will use MNP if it is also available on the
#	remote end.
#
#	For normal operation, dip switch S1 switch 3 should be UP.
#	This disables ENTER INTERACTIVE WITH <CR>.
#
#	When used with an EPORTS board on a 3B2, it is recommended that
#	hardware flow control be enabled on the board and that the
#	corresponding second set of entries below be used.
#	(i.e. change \\q0 to \\q3 below - use CTS/RTS flow control)
#
#	Commands:	Explanation:
#	------------	---------------------------------------------------
#	=+-,		'+' for secondary dial tone, ',' for pause
#	""		expect nothing
#	atzod,		enter command mode, reset options to default values,
#	o12=y,		set option 12 to 'y' (transparent data mode)
#	o4=n,		set option 4 to 'n' (don't disconnect on rcvd spaces)
#	\\n3		select normal operating mode
#	\\c1		modem does not buffer data
#	\\j0		do not autobaud modem serial port
#	\\q0		no flow control
#	\\g0\r\c	no modem port flow control
#	\006		Wait for ACK
#	atT\T\r\c	enter command mode, tone dial the number
#			(substitute 'P' for first 'T' for pulse dialing)
#	Connected	expect "ed" (actually "Connected")
#
#			Once transparent data mode is enabled, you
#			cannot enter the interactive mode from the data mode.
#------------------------------------------------------------------------------

att2224ceo =+-, "" atzod,o12=y,o4=n,\\n3\\c1\\j0\\q0\\g0\r\c \006 atT\T\r\c \
	Connected
att2224CEO =+-, "" atzod,o12=y,o4=n,\\n3\\c1\\j0\\q0\\g0\r\c \006 atT\T\r\c \
	Connected
#att2224ceo =+-, "" atzod,o12=y,o4=n,\\n3\\c1\\j0\\q3\\g0\r\c \006 atT\T\r\c \
#	Connected
#att2224CEO =+-, "" atzod,o12=y,o4=n,\\n3\\c1\\j0\\q3\\g0\r\c \006 atT\T\r\c \
#	Connected

#------------------------------------------------------------------------------
# AT&T DATAPHONE II 2224G Modem
#
#	The 2224G Modem supports MNP error control protocol.
#	This entry will use MNP if it is also available on the
#	remote end.
#
#	For normal operation, dip switch S1 switch 3 should be RIGHT.
#	This disables ENTER INTERACTIVE WITH <CR>.
#
#	When used with an EPORTS board on a 3B2, it is recommended that
#	hardware flow control be enabled on the board and that the
#	corresponding second set of entries below be used.
#	(i.e. change \\q0 to \\q3 below - use CTS/RTS flow control)
#
#	Commands:	Explanation:
#	------------	---------------------------------------------------
#	=+-,		'+' for secondary dial tone, ',' for pause
#	""		expect nothing
#	atzod,		enter command mode, reset options to default values,
#	o12=y,		set option 12 to 'y' (transparent data mode)
#	o4=n,		set option 4 to 'n' (don't disconnect on rcvd spaces)
#	o1=n\r\c	set option 1 to 'n' (don't wait for far end sense first)
#	\006		Wait for ACK
#	atz		enter command mode
#	\\n3		select auto-reliable operating mode
#	\\c1		select auto-reliable buffering scheme 1
#	\\j0		do not autobaud modem serial port
#	\\q0		no flow control
#	\\g0\r\c	no modem port flow control
#	\datT\T\r\c	delay, enter command mode, tone dial the number
#			(substitute 'P' for first 'T' for pulse dialing)
#	Connected	expect "Connected"
#
#			Once transparent data mode is enabled, you
#			cannot enter the interactive mode from the data mode.
#------------------------------------------------------------------------------

att2224g =+-, "" atzod,o12=y,o4=n,o1=n\r\c \006 atz\\n3\\c1\\j0\\q0\\g0\r\c \
	"" \datT\T\r\c Connected
att2224G =+-, "" atzod,o12=y,o4=n,o1=n\r\c \006 atz\\n3\\c1\\j0\\q0\\g0\r\c \
	"" \datT\T\r\c Connected
#att2224g =+-, "" atzod,o12=y,o4=n,o1=n\r\c \006 atz\\n3\\c1\\j0\\q3\\g0\r\c \
#	"" \datT\T\r\c Connected
#att2224G =+-, "" atzod,o12=y,o4=n,o1=n\r\c \006 atz\\n3\\c1\\j0\\q3\\g0\r\c \
#	"" \datT\T\r\c Connected

#------------------------------------------------------------------------------
# AT&T DATAPHONE II 2224 Modem
#
#	This entry is for 2224 with the optional automatic caller.
#	Is is provided only to provide compatibility with previous
#	releases. The entry for the specific model modem you own
#	should be found above.
#
#	Commands:	Explanation:
#	------------	---------------------------------------------------
#	=+-,		'+' for secondary dial tone, ',' for pause
#	""		expect nothing
#	\r\c		send carriage return to enter interactive mode
#	:--:		expect colon.  if don't see it, send newline
#			and expect colon again.
#	T\T\r\c		dial the given number, using touch-tone signaling
#			(change the first T to P if you want to use pulse
#			dialing).
#	red		expect "red" (actually "Answered")
#------------------------------------------------------------------------------

att2224	=+-,	"" \r\c :--: T\T\r\c red

#------------------------------------------------------------------------------
# AT&T DATAPHONE II 2248A Modem
#
#	Commands:	Explanation:
#	------------	---------------------------------------------------
#	=+-,		'+' for secondary dial tone, ',' for pause
#	""		expect nothing
#	atzod,		enter command mode, reset modem, set options to default
#	o12=y\r\c	set option 12 to 'y' (transparent data mode)
#	\006		Wait for ACK
#	atT\T\r\c	enter command mode, tone dial the number
#			(substitute 'P' for first 'T' for pulse dialing)
#	Connected	expect "Connected"
#------------------------------------------------------------------------------

att2248a =+-, "" atzod,o12=y\r\c \006 atT\T\r\c Connected
att2248A =+-, "" atzod,o12=y\r\c \006 atT\T\r\c Connected

#------------------------------------------------------------------------------
# AT&T DATAPHONE II 2296A Modem
#
#	Commands:	Explanation:
#	------------	---------------------------------------------------
#	=+-,		'+' for secondary dial tone, ',' for pause
#	""		expect nothing
#	atzod,		enter command mode, reset options to default values,
#	o12=y,		set option 12 to 'y' (transparent data mode)
#	o50=y,		set option 50 to 'y'
#	o51=n,		set option 51 to 'n' (don't strap CTS/RTS)
#	o55=n,		set option 55 to 'n' (CD does not indicate carrier)
#	o69=n,\r\c	set option 69 to 'n' 
#	\006		Wait for ACK
#	atz		enter command mode
#	\\n3		select auto-reliable operating mode
#	\\c1		select auto-reliable buffering scheme 1
#	\\j0		do not autobaud modem serial port
#	\\q0		no flow control
#	\\g0\r\c	no modem port flow control
#	\datT\T\r\c	delay, enter command mode, tone dial the number
#			(substitute 'P' for first 'T' for pulse dialing)
#	Connected	expect "Connected"
#
#	When used with an EPORTS board on a 3B2, it is recommended that
#	hardware flow control be enabled on the board and that the
#	corresponding second set of entries below be used.
#	(i.e. change \\q0 to \\q3 below - use CTS/RTS flow control)
#
#------------------------------------------------------------------------------

att2296a =+-, "" atzod,o12=y,o50=y,o51=n,o55=n,o69=n\r\c \006 \
	atz\\n3\\c1\\j0\\q0\\g0\r\c "" \datT\T\r\c Connected
att2296A =+-, "" atzod,o12=y,o50=y,o51=n,o55=n,o69=n\r\c \006 \
	atz\\n3\\c1\\j0\\q0\\g0\r\c "" \datT\T\r\c Connected
#att2296a =+-, "" atzod,o12=y,o50=y,o51=n,o55=n,o69=n\r\c \006 \
#	atz\\n3\\c1\\j0\\q0\\g0\r\c "" \datT\T\r\c Connected
#att2296A =+-, "" atzod,o12=y,o50=y,o51=n,o55=n,o69=n\r\c \006 \
#	atz\\n3\\c1\\j0\\q0\\g0\r\c "" \datT\T\r\c Connected

