Chat In and Chat Out Scripts

The properties file and command line options use short scripts to control the logging in and out of the target system.

These scripts are used when the NoConnect property is set to 1 and the login details are specified using the ChatinString property. .

Chat in and chat out scripts form a single line in the expect-send format (for chat in scripts) or send-expect format (for chat out scripts). The format is:
ChatinString : <expect> <send> <expect> <send> ...
ChatoutString : <send> <expect> <send> <expect> 
Note: The elements in the chat strings are separated by white space. In order to send or expect a sequence that includes white space, surround the sequence with single quotes.

A typical chat in script might be:

".*login.*:.*anu\r\n.*assword.*:.*anu\r\n"
The number of connections to a device is usually limited to 32. When a connection is closed, it must be deleted using the deldevice command. This command requires the device ID. If you are using a chat out string, the TSM automatically adds this to the chat out string. Effectively, the TSM prefixes any chat out string with the following:
stop\r .*> 'deldevice deviceid\r' .*>

The expect text can use any regular expression, while the send text can send any characters (including control characters) using the standard UNIX/C escape sequences described in Escape Codes.