The /etc/uucp/Dialers file contains dialing instructions for many commonly used modems. You probably do not need to change or add entries to this file unless you plan to use a nonstandard modem or plan to customize your UUCP environment. Nevertheless, you should understand what is in the file and how it relates to the Systems and Devices file.
The text specifies the initial conversation that must take place on a line before it can be made available for transferring data. This conversation, often referred to as a chat script, is usually a sequence of ASCII strings that is transmitted and expected, and it is often used to dial a phone number.
As shown in the examples in "/etc/uucp/Devices File" the fifth field in a Devices file entry is an index into the Dialers file or a special dialer type (TCP, TLI, or TLIS). The uucico daemon attempts to match the fifth field in the Devices file with the first field of each Dialers file entry. In addition, each odd-numbered Devices field, starting with the seventh position is used as an index into the Dialers file. If the match succeeds, the Dialers entry is interpreted to perform the dialer conversation.
Each entry in the Dialers file has the following format:
dialer |
substitutions |
expect-send |
Example 12-10 shows the entry for a US Robotics V.32bis modem.
Dialer Substitution Expaec-Send usrv32bis-e =,-, "" dA\pT&FE1V1X1Q0S2=255S12=255&A1&H1&M5&B2&W\r\c OK\r \EATDT\T\r\c CONNECT\s14400/ARQ STTY=crtscts |
The Dialer field matches the fifth and additional odd-numbered fields in the Devices file. The Substitutions field is a translate string: the first of each pair of characters is mapped to the second character in the pair. This is usually used to translate = and - into whatever the dialer requires for "wait for dial tone" and "pause."
The remaining expect-send fields are character strings.
Example 12-11 shows some sample entries in the Dialers file, as distributed when you install UUCP as part of the Solaris installation program.
penril =W-P "" \d > Q\c : \d- > s\p9\c )-W\p\r\ds\p9\c-) y\c : \E\TP > 9\c OK ventel =&-% "" \r\p\r\c $ <K\T%%\r>\c ONLINE! vadic =K-K "" \005\p *-\005\p-*\005\p-* D\p BER? \E\T\e \r\c LINE develcon "" "" \pr\ps\c est:\007 \E\D\e \n\007 micom "" "" \s\c NAME? \D\r\c GO hayes =,-, "" \dA\pTE1V1X1Q0S2=255S12=255\r\c OK\r \EATDT\T\r\c CONNECT # Telebit TrailBlazer tb1200 =W-, "" \dA\pA\pA\pTE1V1X1Q0S2=255S12=255S50=2\r\c OK\r \EATDT\T\r\c CONNECT\s1200 tb2400 =W-, "" \dA\pA\pA\pTE1V1X1Q0S2=255S12=255S50=3\r\c OK\r \EATDT\T\r\c CONNECT\s2400 tbfast =W-, "" \dA\pA\pA\pTE1V1X1Q0S2=255S12=255S50=255\r\c OK\r \EATDT\T\r\c CONNECT\sFAST # USrobotics, Codes, and DSI modems dsi-ec =,-, "" \dA\pTE1V1X5Q0S2=255S12=255*E1*F3*M1*S1\r\c OK\r \EATDT\T\r\c CONNECT\sEC STTY=crtscts,crtsxoff dsi-nec =,-, "" \dA\pTE1V1X5Q0S2=255S12=255*E0*F3*M1*S1\r\c OK\r \EATDT\T\r\c CONNECT STTY=crtscts,crtsxoff usrv32bis-ec =,-, "" \dA\pT&FE1V1X1Q0S2=255S12=255&A1&H1&M5&B2&W\r\c OK\r \EATDT\T\r\c CONNECT\s14400/ARQ STTY=crtscts,crtsxoff usrv32-nec =,-, "" \dA\pT&FE1V1X1Q0S2=255S12=255&A0&H1&M0&B0&W\r\c OK\r \EATDT\T\r\c CONNECT STTY=crtscts,crtsxoff codex-fast =,-, "" \dA\pT&C1&D2*MF0*AA1&R1&S1*DE15*FL3S2=255S7=40S10=40*TT5&W\r\c OK\r \EATDT\T\r\c CONNECT\s38400 STTY=crtscts,crtsxoff tb9600-ec =W-, "" \dA\pA\pA\pTE1V1X1Q0S2=255S12=255S50=6\r\c OK\r \EATDT\T\r\cCONNECT\s9600 STTY=crtscts,crtsxoff tb9600-nec =W-, "" \dA\pA\pA\pTE1V1X1Q0S2=255S12=255S50=6S180=0\r\c OK\r \EATDT\T\r\c CONNECT\s9600 STTY=crtscts,crtsxoff
Table 12-5 lists escape characters commonly used in the send strings in the Dialers file:
Table 12-5 Backslash Characters for /etc/uucp/Dialers
Character |
Description |
---|---|
Send or expect a backspace character |
|
No newline or carriage return |
|
Delay (approximately 2 seconds) |
|
Phone number or token without Dialcodes translation |
|
Disable echo checking |
|
Enable echo checking (for slow devices) |
|
Insert a Break character |
|
Send newline |
|
Send octal number. Additional escape characters that can be used are listed in the section "/etc/uucp/Systems File". |
|
Send or expect a NULL character (ASCII NUL) |
|
Pause (approximately 12-14 seconds) |
|
Return. |
|
Send or expect a space character |
|
Phone number or token with Dialcodes translation |
Here is a penril entry in the Dialers file:
penril =W-P "" \d > Q\c : \d- > s\p9\c )-W\p\r\ds\p9\c-) y\c : \E\TP > 9\c OK |
First, the substitution mechanism for the phone number argument is established, so that any = is replaced with a W (wait for dial tone) and any - with a P (pause).
The handshake given by the remainder of the line works as listed:
"" - Wait for nothing. (that is, proceed to the next thing)
\d - Delay 2 seconds, then send a carriage-return
> - Wait for a >
Q\c - Send a Q without a carriage-return
: - Expect a :
\d- - Delay 2 seconds, send a - and a carriage-return
> - Wait for a >
s\p9\c - Send an s, pause, send a 9 with no carriage-return
)-W\p\r\ds\p9\c-) - Wait for a ). If it is not received, process the string between the - characters as follows. Send a W, pause, send a carriage-return, delay, send an s, pause, send a 9, without a carriage-return, then wait for the ).
y\c - Send a y with no carriage-return
: - Wait for a :
\E\TP - Enable echo checking. (From this point on, whenever a character is transmitted, it waits for the character to be received before doing anything else.) Then, send the phone number. The \T means take the phone number passed as an argument and apply the Dialcodes translation and the modem function translation specified by field 2 of this entry. Then send a P and a carriage-return.
> - Wait for a >
9\c - Send a 9 without a newline
You can also use the pseudo-send STTY=value string to set modem characteristics. For instance, STTY=crtscts enables outbound hardware flow control, STTY=crtsxoff enables inbound hardware flow control, and STTY=crtscts,crtsxoff enables both outbound and inbound hardware flow control.
STTY accepts all the stty modes. See the stty(1) and termio(4) man pages.
The following example would enable hardware flow control in a Dialers entry:
dsi =,-, "" \dA\pTE1V1X5Q0S2=255S12=255*E1*F3*M1*S1\r\c OK\r \EATDT\T\r\c CONNECT\sEC STTY=crtscts |
This pseudo-send string can also be used in entries in the Systems file.
In some cases, you have to reset the parity because the system that you are calling checks port parity and drops the line if it is wrong. The expect-send couplet ~~ P_ZERO sets parity to zero:
foo =,-, "" P_ZERO "" \dA\pTE1V1X1Q0S2=255S12=255\r\c OK\r\EATDT\T\r\c CONNECT |
In the same manner, P_EVEN sets it to even (the default); P_ODD sets it to odd; and P_ONE sets it to one. This pseudo-send string can also be used in entries in the Systems file.