Modem Chat Script for Calling an ISP
Use the next chat script as a template for calling an ISP from a dial-out
machine with a US Robotics Courier modem.
ABORT BUSY
ABORT 'NO CARRIER'
REPORT CONNECT
TIMEOUT 10
"" AT&F1M0&M5S2=255
SAY "Calling myisp\n"
TIMEOUT 60
OK "ATDT1-123-555-1212"
CONNECT \c
\r \d\c
SAY "Connected; running PPP\n"
|
The following table describes the contents of the chat script.
Script Contents | Explanation |
ABORT BUSY | Abort transmission if the modem receives this message from the
opposite peer. |
ABORT 'NO CARRIER' | Abort transmission if the modem receives this message from the
opposite peer. |
REPORT CONNECT | Gather the CONNECT string from
the modem and print it out. |
TIMEOUT 10 | Set initial timeout to 10 seconds. The modem's response should
be immediate. |
"" AT&F1M0M0M0M0&M5S2=255 | M0 - Turn off the speaker during connect. &M5 - Make the modem require error
control. S2=255 - Disable the TIES "+++" break
sequence. |
SAY "Calling myisp\n" | Display the message "Calling myisp" on the local
machine. |
TIMEOUT 60 | Reset the timeout to 60 seconds to allow more time for link negotiation. |
OK "ATDT1-123-555-1212" | Call the remote peer by using the phone number 123-555-1212. |
CONNECT \c | Wait for the CONNECT
message from the opposite peer's modem. |
\r \d\c | Wait until the end of the CONNECT message. |
SAY "Connected; running PPP\n" | Display the informative message "Connected;
running PPP" on the local machine. |
Basic Chat Script Enhanced for a UNIX-Style Login
The next chat script is a basic script that is enhanced for calling
a remote Solaris peer or other UNIX-type peer. This chat script is used in "How to Create the Instructions for Calling a Peer".
SAY "Calling the peer\n"
TIMEOUT 10
ABORT BUSY
ABORT 'NO CARRIER'
ABORT ERROR
REPORT CONNECT
"" AT&F1&M5S2=255
TIMEOUT 60
OK ATDT1-123-555-1234
CONNECT \c
SAY "Connected; logging in.\n"
TIMEOUT 5
ogin:--ogin: pppuser
TIMEOUT 20
ABORT 'ogin incorrect'
ssword: \qmypassword
"% " \c
SAY "Logged in. Starting PPP on peer system.\n"
ABORT 'not found'
"" "exec pppd"
~ \c |
The following table explains the parameters of the chat script.
Script Contents | Explanation |
TIMEOUT 10 | Set initial timeout to 10 seconds. The modem's response should
be immediate. |
ABORT BUSY | Abort transmission if the modem receives this message from the
opposite peer. |
ABORT 'NO CARRIER' | Abort transmission if the modem receives this message from the
opposite peer. |
ABORT ERROR | Abort transmission if the modem receives this message from the
opposite peer. |
REPORT CONNECT | Gather the CONNECT string from
the modem and print it out. |
"" AT&F1&M5S2=255 | &M5 - Make the modem
require error control. S2=255 - Disable the TIES "+++"
break sequence. |
TIMEOUT 60 | Reset the timeout to 60 seconds to allow more time for link negotiation. |
OK ATDT1-123-555-1234 | Call the remote peer by
using the phone number 123-555-1212. |
CONNECT \c | Wait for the CONNECT
message from the opposite peer's modem. |
SAY "Connected; logging
in.\n" | Display
the informative message "Connected; logging in," to give the user
status. |
TIMEOUT 5 | Change the timeout to enable quick display
of the login prompt. |
ogin:--ogin: pppuser | Wait for the login prompt. If it is not received, send a RETURN and wait.
Then send the user name pppuser to the peer.
The sequence that follows is referred to by most ISPs as the PAP login, though
it is not related in any way to PAP authentication. |
TIMEOUT 20 | Change the timeout to 20 seconds to allow
for slow password verification. |
ssword: \qmysecrethere | Wait for the
password prompt from the peer. When the prompt is received, send the password \qmysecrethere. The \q prevents
the password from being written to the system log files. |
"% " \c | Wait for a shell prompt from the peer. The
chat script uses the C shell. Change this value if the user prefers to log
in with a different shell. |
SAY "Logged in. Starting
PPP on peer system.\n" | Display the informative message "Logged in. Starting PPP on peer system"
to give the user status. |
ABORT 'not found' | Abort the transmission if the shell encounters
errors. |
"" "exec pppd" | Start pppd on the peer. |
~ \c | Wait for PPP to start on the peer. |
Starting PPP right after the CONNECT \c is often
called a PAP login by ISPs, though the PAP login is actually
not part of PAP authentication.
The phrase ogin:--ogin: pppuser instructs
the modem to send the user name, in this example pppuser,
in response to the login prompt that is received from the dial-in server. pppuser is a special PPP user account name that was created
for remote user1 on the dial-in server. For
instructions on creating PPP user accounts on a dial-in server, refer to "How to Configure Users of the Dial-in Server".
Chat Script for External ISDN TA
The following chat script is for calling from a dial-out
machine with a ZyXEL omni.net. ISDN TA.
SAY "Calling the peer\n"
TIMEOUT 10
ABORT BUSY
ABORT 'NO CARRIER'
ABORT ERROR
REPORT CONNECT
"" AT&FB40S83.7=1&K44&J3X7S61.3=1S0=0S2=255
OK ATDI18882638234
CONNECT \c
\r \d\c
SAY "Connected; running PPP\n" |
The following table explains the parameters of the chat script.
Script Contents | Explanation |
SAY "Calling the peer" | Display this message on the screen of the dial-out machine. |
TIMEOUT 10 | Set the initial timeout to 10 seconds. |
ABORT BUSY | Abort transmission if the modem receives this message from the
opposite peer. |
ABORT 'NO CARRIER' | Abort transmission if the modem receives this message from the
opposite peer. |
ABORT ERROR | Abort transmission if the modem receives this message from the
opposite peer. |
REPORT CONNECT | Gather the CONNECT string from
the modem and print it out. |
"" AT&FB40S83.7= 1&K44&J3X7S61.3=1 S0=0S2=255 | The letters in this line have
the following meaning: &F - Use factory default
B40 - Do asynchronous PPP conversion
S83.7=1 - Use data over speech bearer
&K44 - Enable CCP compression
&J3 - Enable MP
X7 - Report DCE side rates
S61.3=1 - Use packet fragmentation
S0=0 - No auto answer
S2=255 - Disable TIES escape
|
OK ATDI18882638234 | Make an ISDN call. For multi-link, the second call is placed
to the same telephone number, which is normally what is required by most ISPs.
If the remote peer requires a different second phone number, append "+nnnn" (nnnn represents the
second phone number). |
CONNECT \c | Wait
for the CONNECT message from the opposite
peer's modem. |
\r \d\c | Wait until the end of
the CONNECT message. |
SAY "Connected; running
PPP\n" | Display
this message on the screen of the dial-out machine. |
Refer to thechat(1M)
man page for descriptions of options and other detailed information about
the chat script. For an explanation of expect-send strings, refer to "UUCP Chat Script Field".