Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
40.  UUCP Reference UUCP /etc/uucp/Dialers File  Previous   Contents   Next 
   
 

The following table lists escape characters that are commonly used in the send strings in the Dialers file.

Table 40-5 Backslash Characters for /etc/uucp/Dialers

Character

Description

\b

Sends or expects a backspace character.

\c

No newline or carriage return.

\d

Delays (approximately 2 seconds).

\D

Phone number or token without Dialcodes translation.

\e

Disables echo checking.

\E

Enables echo checking (for slow devices).

\K

Inserts a Break character.

\n

Sends newline.

\nnn

Sends octal number. Additional escape characters that can be used are listed in the section "UUCP /etc/uucp/Systems File".

\N

Sends or expects a NULL character (ASCII NUL).

\p

Pauses (approximately 12-14 seconds).

\r

Returns.

\s

Sends or expects a space character.

\T

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 that is given by the remainder of the line works as listed:

  • "" - Waits for nothing (that is, proceed to the next step).

  • \d - Delays 2 seconds, then sends a carriage return.

  • > - Waits for a >.

  • Q\c - Sends a Q without a carriage return.

  • : - Expects a :.

  • \d- - Delays 2 seconds, sends a - and a carriage return.

  • > - Waits for a >.

  • s\p9\c - Sends an s, pauses, sends a 9 with no carriage return.

  • )-W\p\r\ds\p9\c-) - Waits for a ). If ) is not received, processes the string between the - characters as follows. Sends a W, pauses, sends a carriage return, delays, sends an s, pauses, sends a 9 without a carriage return, then waits for the ).

  • y\c - Sends a y with no carriage return.

  • : - Waits for a :.

  • \E\TP - Enables echo checking. From this point on, whenever a character is transmitted, UUCP waits for the character to be received before proceeding, and then, sends the phone number. The \T means to take the phone number that is passed as an argument. The \T applies the Dialcodes translation and the modem function translation that is specified by field 2 of this entry. Then sends a P and a carriage return.

  • > - Waits for a >.

  • 9\c - Sends a 9 without a newline.

  • OK - Waits for the string OK.

UUCP Hardware Flow Control

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. STTY=crtscts,crtsxoff enables both outbound and inbound hardware flow control.

STTY accepts all the stty modes. See the stty(1) and termio(7I) 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.

UUCP Setting Parity

In some situations, 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 parity 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.

Other Basic UUCP Configuration Files

You can use files in this section in addition to the Systems, Devices, and Dialers file when doing basic UUCP configuration.

UUCP /etc/uucp/Dialcodes File

The /etc/uucp/Dialcodes file enables you to define dial-code abbreviations that can be used in the Phone field in the /etc/uucp/Systems file. You can use the Dialcodes files to provide additional information about a basic phone number that is used by several systems at the same site.

Each entry has the following format:

abbreviation dial-sequence

abbreviation represents the abbreviation that is used in the Phone field of the Systems file and dial-sequence represents the dial sequence that is passed to the dialer when that particular Systems file entry is accessed. The following table shows the correspondences between the two files.

Table 40-6 Correspondences Between Dialcodes and Systems Files

 

Field Names

 

 

 

 

 

Dialcodes

Abbreviation

Dial-Sequence

 

 

 

 

Systems

System-Name

Time

Type

Speed

Phone

Chat Script

The following table contains sample entries in a Dialcodes file.

Table 40-7 Entries in the Dialcodes File

Abbreviation

Dial-sequence

NY

1=212

jt

9+847

In the first row, NY is the abbreviation to appear in the Phone field of the Systems file. For example, the Systems file might have the following entry:

NY5551212

When uucico reads NY in the Systems file, it searches the Dialcodes file for NY and obtains the dialing sequence 1=212. This is the dialing sequence needed for any phone call to New York City. This sequence includes the number 1, an "equal sign" (=) meaning pause and wait for a secondary dial tone, and the area code 212. uucico sends this information to the dialer, then returns to the Systems file for the remainder of the phone number, 5551212.

The entry jt 9=847- would work with a Phone field such as jt7867 in the Systems file . When uucico reads the entry that contains jt7867 in the Systems file, it sends the sequence 9=847-7867 to the dialer, if the token in the dialer-token pair is \T.

 
 
 
  Previous   Contents   Next