Online Book Reader

Home Category

UNIX System Administration Handbook - Evi Nemeth [75]

By Root 2728 0
your modem correctly, but these days it usually just works.

Data compression algorithms can be used to shrink the number of bits that must be transmitted between analog endpoints. The amount of compression varies from worse than none (when transmitting data that has already been compressed) to at most about 4:1. A more typical value is 1.5:1. In general, the average configuration does better with one of these compression algorithms turned on.

Dial-out configuration: /etc/phones and /etc/remote


The tip and cu commands provide a basic keyboard interface to serial devices. They are most often used with modems but can also be used to talk to printers and terminals. tip and cu use two config files that record phone numbers (/etc/phones) and serial port information (/etc/remote).

The /etc/remote file looks like this:

# /etc/remote: Dialer definitions

dial19200|19200 Baud:dv=/dev/cul0:br#19200:\

cu=/dev/cul0:at=hayes:du:

dial38400|dialer|38400 Baud:dv=/dev/cul0:br#38400:\

cu=/dev/cul0:at=hayes:du:

# Commonly dialed hosts

ucc:pn=3338118:tc=dial38400

cc:pn=@:tc=dial38400

dca:dv=/dev/ttyh1,/dev/ttyh2:br#9600:pa=none

The first two entries describe dialer configurations. The next section provides shortcuts for dialing particular hosts. Note that in the cc entry, the phone number is written as pn=@, which means to look for the phone number(s) in /etc/phones.

# /etc/phones: This file can contain long distance

# billing numbers and unpublished telephone numbers,

# so it's not usually world-readable.

cc 5552530

monet 8,,510,555-4567,,,,xxxx-xxx

The phones file contains symbolic definitions of phone numbers. In this example, xxxx-xxx could represent a long distance billing number. Punctuation is used to signify delays or to wait for a second dial tone. The characters depend on the brand of modem: commas, equal signs, and stars all commonly have special meanings.

Bidirectional modems


It is occasionally handy to use a single modem for both dial-in and dial-out services. This configuration requires special treatment of the serial port, since getty normally takes full control of serial ports at boot time. Other processes that want to use the modem are shut out, unable to open the port even when the modem is not actually in use. Unfortunately, there is little standardization among systems for the management of bidirectional modems.

Solaris requires you to take the following steps to make a port bidirectional:

• Include the -b flag to ttyadm when attaching the port monitor.

• Use /dev/cua/a (not/dev/term/a) as the argument to ttyadm.

• Edit /etc/uucp/Devices to list the bidirectional service name.

See How to Set Up Bidirectional Modem Service in the Solaris AnswerBook for explicit examples and details.

Under HP-UX and Red Hat, a special getty called uugetty can be used on bidirectional ports. uugetty shares lock files with cu, tip, and uucico to avoid conflicts.

7.14 DEBUGGING A SERIAL LINE


Debugging serial lines is not difficult. Some typical errors are:

• Forgetting to tell init to reread its configuration files

• Forgetting to set soft carrier when using three-wire cables

• Using a cable with the wrong nullness

• Soldering or crimping DB-25 connectors upside down

• Connecting a device to the wrong wire due to bad or nonexistent wire maps

• Setting the terminal options incorrectly

A breakout box is an indispensable tool for debugging cabling problems. It is patched into the serial line and shows the signals on each pin as they pass through the cable. The better breakout boxes have both male and female connectors on each side and so are totally flexible and bisexual in their positioning. LEDs associated with each “interesting” pin (pins 2, 3, 4, 5, 6, 8, and 20) show when the pin is active.

Some breakout boxes are read-only and just allow you to monitor the signals; others let you rewire the connection and assert a voltage on a particular pin. For example, if you suspected that a cable needed to be nulled (crossed), you could use the breakout

Return Main Page Previous Page Next Page

®Online Book Reader