90030500B Configuring Modem Connections Page 135
A script to initialize a Hayes-compatible modem
The following script initializes the modem and sets the data speed for 115.2Kbps. If
the modem does not initialize correctly, it prints
setup failed
, otherwise it prints
setup
succeeded
.
s1=”M{at\r} [OK} s3 T4”
s2=”M{at$k1&y0&f\r} [OK]3 T4”
s3=”M{at13&d3$B11520m1s0=1s2=0s11=50*w\r} [OK]5 T4”
s4=”E{setup failed} G-”
s5=”E{setup succeeded} G+”
A script to test a specific modem
The following script tests a Microcomm DeskPort Fast modem and connecting cable.
Note:
If you are using the
altpin
option, temporarily disable it using the
set
flow
altpin=off port=<number>
command, otherwise the test will fail.
s1=”C0 F M{at&f\r} [OK]2 S5 T3” //no hangup, flush, set modem to
//factory defaults, wait for OK
s2=”T4 W-1 T5 W+2 G6” //wait for DCD low, CTS high
s3=”E{Error Condition} G-” // s1 didn't get OK, or other
//error
s4=”E{DCD stuck high} G-”
s5=”E{CTS stuck low} G-”
s6=”M{at\\q0 \\d2 \r} T7 W-2 G8” //no flow control, CTS follows
//DCD, detect CTS low
s7=”E{CTS stuck high} G-”
s8=”M{at &C0 \\d0 \r} T9 W+1 G10”//DCD on, detect DCD high
s9=”E{DCD stuck low} G-”
s10=”M{at &f\r} {OK}11 S5 T3” //reset to factory defaults
s11=”M{at &d3s0=7so?\r} [7]12 T3” //dtr transition clears
//modem, set so=7, read so
s12=”D-1 P2 D+1 M{at so?\r} [0] 14 T13”//raise and lower dtr to
//clear modem, s0 goes to 0
s13=”E{DTR undetected} G-”
s14=”M{at &f\r} E{Cable test complete} G+”
To run the script, enter the following commands:
set port devtype=mout range=port#
set modem test=testmicrocom range=port#
wan testmodem=port#
If the test is successful, it will display “Cable test complete”.