Next | Prev | Up | Top | Contents | Index

The Dialers File

The Dialers file (/etc/uucp/Dialers) specifies the initial conversation that must take place on a line before it can be made available for transferring data. This conversation is usually a sequence of ASCII strings that is transmitted and expected, and it is often used to dial a phone number with an ASCII dialer (such as an automatic-dial modem).

As shown in the preceding section, the fifth field in a Devices file entry is an index into the Dialers file or a special dialer type. An attempt is made 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 negotiations.

Each entry in the Dialers file has the following format:

dialer substitutions expect-send ...

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 technique is usually used to translate the equal sign (=) and the hyphen (-) characters into whatever the dialer requires for "wait for dial tone" and "pause."

The expect-send fields are character strings.

The following list describes some of the escape characters used in the Dialers file. Table 7-2 lists escape sequences used by UUCP.

UUCP Escape Sequences
Escape sequenceMeaning
\NSend or expect a null character (ASCII NUL).
\bSend or expect a backspace character.
\cIf at the end of a string, suppress the newline that is normally sent. Ignored otherwise.
\dDelay two seconds before sending or reading more characters.
\pPause for approximately 1/4 to 1/2 second.
\EStart echo checking. (From this point on, whenever a character is transmitted, login processing will wait for the character to be received before proceeding.)
\eTurn off echo checking.
\nSend a newline character.
\rSend or expect a carriage return.
\sSend or expect a space character.
\tSend or expect a tab character.
\\Send or expect a backslash (\) character.
EOTSend or expect EOT newline twice.
BREAKSend or expect a break character.
\KSame as BREAK.
\ddd Send or expect the character represented by the octal digits ddd.

Here is a sample line from 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

The penril entry in the Dialers file is executed as follows. First, the phone number argument is translated, replacing any equal sign with a W (wait for dial tone) and replacing any hyphen with a P (pause).

The handshake given by the remainder of the line works as follows:

" "

Wait for nothing; in other words, proceed to the next step.

\d

Delay for two seconds.

>

Wait for a "greater than" sign (>).

Q\c

Send a Q with no terminating new line.

:

Wait for a colon (:).

\d-

Delay for two seconds.

>

Wait for a "greater than" sign (>).

s\p9\c

Send an s, pause for 1/2 second, send a 9, send no terminating new line.

)-W\p\r\ds\p9\c-)


Wait for a closing parenthesis [)]; if it is not received, process the string between the hyphens as follows: Send a W, pause, send a carriage return, delay, send an s, pause, send a 9 without a new line, and then wait for the closing parenthesis.

y\c

Send a y without a new line.

:

Wait for a colon (:)

\E\TP

Enable echo checking. (From this point on, whenever a character is transmitted, handshake processing waits for the character to be received before proceeding.) Then send the phone number. The \T instructs the program to take the phone number passed as an argument, apply the Dialcodes translation and the modem function translation specified by field two of this entry, then send a P.

9\c

Send a 9 without a new line.

OK

Wait for the string OK.

Next | Prev | Up | Top | Contents | Index