...> dialer <interface> [<dialer_file> [<seconds> [<pings> [<hostid>]]]]
Set up an autodialer session for the interface. If no DialerFile is specified, a previous dialer command process will be removed. If the number of pings is omitted, the DialerFile will be executed without first pinging the <host>.
<dialer_file> may have any valid file (path) name for DialerFile. It is good practice to select names that can not conflict with other files in use, and prefix them with characters that will cause them to sort together. DialerFile is located in the installation root directory unless a full pathname is provided.
<seconds> the interval in seconds the interface is allowed to be idle before establishing a new connection,
<pings> a number of attempts the autodialer will ping the <hostid> if specified, or send a link-layer echo request if no hostid was given. When there is no incoming data after pinging or determining the interface is closed, the autodialer will execute the special commands contained in the DialerFile to open the link to a remote host.
The dialer commands in the file are described below.
- Examples:
dialer sl0 ns9tel dia 30 10 ns9tel
DIALER FILE COMMANDS
control down | up Control the 'asy' interface. The 'down' option drops DTR (and RTS except in the Unix version). The 'up' option asserts DTR (and RTS except in the Unix version). Example:
control down
- Actually, other options beside down and up are allowed, provided they are supported by the param command for the dialer's interface. Example:
control dtr 1
send "<string>" [<milliseconds>] This dialer command will write the specified string to the interface. The string quote marks are required, and the string may not contain embedded control characters. However, the standard C string escape sequences are recognized (but \0 should not be used). If <milliseconds> is specified, the <string> characters are sent with a <milliseconds> inter-character delay, useful for ancient Micom switches! Example:
send "atdt555-1212"
speed [ 115200|57600|38400|19200|9600|4800|2400|1200|300 ] This command sets the speed of the interface to one of the available speeds. If the speed argument is missing, the speed will be displayed in the dialer session window. Example:
speed 1200
wait <milliseconds> [ "text_string" [speed|ipaddress]]
If only the time is specified, the dialer pauses for the desired number of milliseconds. Otherwise, the dialer reads until the <text_string> is detected on the interface.
- If the string is not detected within the desired time, the autodialer will reset. The string quote marks are required, and the string may not contain embedded control characters. However, the standard C string escape sequences are recognized (but \0 may not be used).
- If the "speed" keyword is specified, the dialer will continue to read characters until a non-digit is detected. The string read is converted to an integer, and used to set the interface speed. If the trailing non-digit is not detected within the desired time, or the integer value is not a valid speed, the autodialer will reset.
- If the "ipaddress" keyword is specified, the dialer will continue to read characters until a dotted-quad IP address is detected. The numeric address is used to set the interface IP address. If a trailing non-digit is not detected within the specified time, or the address is invalid, the autodialer will reset. This option is only available when #define SLIP at compile time, since PPP protocol supports address negotiation. Examples:
wait 45000 "CONNECT " speed 29.4.4.4.2 wait 5000 "Assigned IP address is" ipaddress
DIALER FILE EXTENDED COMMANDS
failmode [ on | OFF ] 'failmode' establishes whether the dialer should continue after a failed dialer command. <off> implies abort the dialing script, while <on> means continue the script, which in effect enables the 'ifok' and 'iffail' commands.
begin 'begin' starts a block of commands, and is typically used after an 'ifok' or 'iffail' command.
end 'end' terminates a block of commands, which extends to the previous unpaired 'begin'.
exit [<return_code>] 'exit' ends the dialer script, with the result code set to that of the previous dialer command unless <return_code> is specified.
status [ up | down ] 'status' is similar to the 'control' command, except that the iostatus() routine is notified.
ifok <cmd> 'ifok' invokes the dialer command <cmd> if the previous command was successful.
iffail <cmd> 'iffail' invokes the dialer command <cmd> if the previous command was not successful.
verbose [ ON | off ] 'verbose' sets the verbosity level of the dialer, that is, whether the dialer echoes the script commands as they are read and displays output received during the wait command. The "off" setting is recommended for those well-debugged scripts used with the ping/redial option. The verbose setting is retained across dialer invocations.
DIALER FILE EXAMPLE
> [tbd] Found in the dialer file description when it is created.
