The following is a basic chat script that you can use as a template for creating your own chat scripts.
ABORT BUSY ABORT 'NO CARRIER' REPORT CONNECT TIMEOUT 10 "" AT&F1M0&M5S2=255 SAY "Calling myserver\n" TIMEOUT 60 OK "ATDT1-123-555-1212" ogin: pppuser ssword: \q\U % pppd |
The next 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 reports ABORT 'NO CARRIER' when dialing. The cause for this message is usually a dialing or modem negotiation failure. |
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&F1M0&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 myserver\n" |
Display the message Calling myserver 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. |
ogin: pppuser |
Log in to the peer by using UNIX-style login. Supply the user name pppuser. |
ssword: \q\U |
\q – Do not log if debugging with the -v option. \U – Insert in this location the contents of the string that follows -U, which is specified on the command line. Usually, the string contains the password. |
% pppd |
Wait for the % shell prompt, and run the pppd command. |