chat
automated modem and serial device conversation
TLDR
Execute a chat script directly
SYNOPSIS
chat [options] script
DESCRIPTION
chat automates conversations with modems and serial devices by exchanging expect-send string pairs. It waits for an expected string from the device, then sends a response, repeating this process through a scripted sequence.
The primary use case is establishing PPP (Point-to-Point Protocol) connections over serial lines and modems. A typical chat script initializes the modem with AT commands, dials a phone number, waits for a CONNECT response, and handles login sequences. Abort strings can be defined to terminate the script on error conditions like BUSY or NO CARRIER.
chat is part of the ppp package and is typically invoked by pppd rather than run directly. Scripts can be specified inline on the command line or loaded from a file.
PARAMETERS
-f file
Read script from file-t seconds
Timeout for expecting responses-v
Verbose logging to syslog-r file
Log specific strings to report file-T string
Substitute \T in script with string-V
Log all conversation to stderr
SCRIPT SYNTAX
ABORT string
Abort if string is receivedTIMEOUT seconds
Set timeout for next expectREPORT string
Log string to report file
CAVEATS
Primarily used for legacy modem/PPP connections. Timing is critical; adjust timeouts for slow devices. Escape sequences may need proper quoting.
