System Administration Guide: Network Services

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 U.S. 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. Print the string.

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.