Наши партнеры








Книги по Linux (с отзывами читателей)

Библиотека сайта rus-linux.net

contents
Next: UUCP Over TCP Up: UUCP Configuration Files Previous: What Devices there are--

How to Dial a Number-- the dial File

The dial file describes the way various dialers are used. Traditionally, UUCP talks of dialers rather than modems, because in earlier times, it was usual practice to have one (expensive) automatic dialing device serve a whole bank of modems. Today, most modems have dialing support built in, so this distinction gets a little blurred.

Nevertheless, different dialers or modems may require a different configuration. You can describe each of them in the dial file. Entries in dial start with the dialer command that gives the dialer's name.

The most important entry beside this is the modem chat, specified by the chat command. Similar to the login chat, it consists of a sequence of strings uucico sends to the dialer and the responses it expects in return. It is commonly used to reset the modem to some known state, and dial the number. The following sample dialer entry shows a typical modem chat for a Hayes-compatible modem:

The modem chat begins with , the empty expect string. uucico will therefore send the first command (ATZ) right away. ATZ is the Hayes command to reset the modem. It then waits until the modem has sent OK, and sends the next command which turns off local echo, and the like. After the modem returns OK again, uucico sends the dialing command (ATDT). The escape sequence T in this string is replaced with the phone number taken from the system entry sys file. uucico then waits for the modem to return the string CONNECT, which signals that a connection with the remote modem has been established successfully.

Often, the modem fails to connect to the remote system, for instance if the other system is talking to someone else and the line is busy. In this case, the modem will return some error message indicating the reason. Modem chats are not capable to detect such messages; uucico will continue to wait for the expected string until it times out. The UUCP log file will therefore only show a bland ``timed out in chat script'' instead of the true reason.

However, Taylor UUCP allows you to tell uucico about these error messages using the chat-fail command as shown above. When uucico detects a chat-fail string while executing the modem chat, it aborts the call, and logs the error message in the UUCP log file.

The last command in the example shown above tells UUCP to toggle the DTR line before starting the modem chat. Most modems can be configured to go on-hook when detecting a change on the DTR line, and enter command mode.gif


contents
Next: UUCP Over TCP Up: UUCP Configuration Files Previous: What Devices there are--

Andrew Anderson
Thu Mar 7 23:22:06 EST 1996