90030500B
Configuring Modem Connections
Page 133
Running a script
When a script is invoked, the modem initializes to the state specified by commands
C1 A80 H- D+1 D+2 Q0 T- S10
and the script executes beginning at line
s1
.
As each state is entered, previous
[]
command strings are cleared, and execution
proceeds from left to right.
If a command is encountered which causes a change of state (for example,
G
s), any
remaining commands in the current state are not performed, and execution resumes in
the new state.
Otherwise, when all commands in a state have been executed, and at least one
[]
command has been seen, the communication line is read. Incoming characters are then
matched against previously declared
[]
command strings. If a match is found, the
corresponding state transfer occurs. If carrier sense was enabled by the
C
command
and carrier is lost, the last
H
command is honored. If neither of these events occur
within the timeout specified by the last
S
command, a timeout is detected. Action is
then taken according to the last
T
command.
Examples of scripts that perform specific functions
A login script
The following script uses parameters
p1
and
p2
as login name and password. The
script writes a success or failure message to the log file for each access attempt, using
the trace facility (see Chapter 17, Troubleshooting):
s1=”[ogin:]2 S20 T4”
//wait 20 seconds for ogin:
/if timeout goto s4;if ogin: goto s2
s2='P2 M{%1\r} P1 [sword:]3 T4” //pause 2 seconds, send param1
to //port; wait 1 second for sword:
s3=”M{%2\r} G5”
//send param 2 to port,go to state 5
s4=”E{login failed} G-”
//Write Fail message, Exit indicating
//General failure
s5=”E{login complete} G+”
//Write Success message, Exit indi
//cating Success
Содержание PortServer II
Страница 1: ...8VHU V XLGH PortServer II QWHOOLJHQW 1HWZRUN RPPXQLFDWLRQV DQG 7HUPLQDO 6HUYHU ...
Страница 2: ......
Страница 4: ...90030500B Page ii ...
Страница 20: ...Page xviii About this User s Guide 90030500B ...
Страница 74: ...Page 54 Installation 90030500B ...
Страница 106: ...Page 86 Configuring Terminals 90030500B ...
Страница 144: ...Page 124 Configuring WAN Connections 90030500B ...
Страница 168: ...Page 148 Configuring TCP IP Routing 90030500B ...
Страница 180: ...Page 160 Configuring SNMP 90030500B ...
Страница 206: ...Page 186 Remote Configuration 90030500B ...
Страница 264: ...Page 244 Digi Support Services 90030500B ...
Страница 270: ...Page 250 Glossary 90030500B ...