Online Book Reader

Home Category

UNIX System Administration Handbook - Evi Nemeth [64]

By Root 2722 0
as login. See page 105 for details about the login process.

7. HP-UX only supports this style of account expiration when the system is configured in “trusted mode.”

7 Serial Devices

Serial ports are one of the handiest I/O facilities available on UNIX systems. Although they are not especially fast, they are quite flexible and can be found on everything from PCs to mainframes.

Serial ports can be used with a variety of devices, including printers, terminals, and other computers. They’re also found on a lot of custom-made, hobbyist, and low-volume equipment (media changers, temperature sensors, even sewing machines). A device can be attached to the system either directly (with a cable) or via a telephone line with modems at each end.

This chapter describes how to attach serial devices to your system and explains how to configure your software to take advantage of them. We will often use terminals, modems, and printers as specific examples, but other devices are essentially similar.

The first few sections address serial hardware and cabling considerations. Then, starting on page 103, we talk about the software infrastructure that has historically been used to support hardware terminals. Few sites use terminals anymore, but their ghosts live on in UNIX’s handling of pseudo-terminals and window systems. The remainder of the chapter (starting on page 113) provides some general background on modems, serial debugging, and newer standards such as the Universal Serial Bus.

7.1 SERIAL STANDARDS


Most serial ports obey some variant of the standard known as RS-232. This standard specifies the electrical characteristics and meaning of each signal wire, as well as pin assignments on the traditional 25-pin (DB-25) serial connector shown in Exhibit A.

Exhibit A A male DB-25 connector

Full RS-2321

is overkill for all real-world situations, as it defines numerous signals that are unnecessary for basic communication. DB-25 connectors are also inappropriately large for use on patch panels and laptop computers. As a result, a number of alternative connectors have come into widespread use. These are described in the section titled Alternative connectors starting on page 97.

Traditional RS-232 uses shielded, twisted-pair cable, usually stranded 22-gauge wire. The original RS-232 signal voltages were ±12 volts DC, but ±5 volts is more common these days. Sometimes, ±3 volts is used. Higher voltages are less susceptible to interference. All of these voltages comply with the RS-232 specification, so it’s perfectly OK to connect devices that use different voltage standards.

RS-232 is not an electrically “balanced” system; it uses a single conductor for the data traveling in each direction. Ergo, there is actually no good reason to use twisted pairs. The benefit of STP cabling is all in the shield, which may (or may not) help to reduce external interference. In fact, the use of twisted-pair cable can actually reduce the reliability and range of serial cables if the two data lines (TD and RD) are placed together on a single pair. So don’t do that.

There is no commonly agreed-upon standard for which RS-232 signals should be run together on a twisted-pair cable. Some sources recommend pairing signal grounds with both TD and RD, but this pairing costs an extra conductor and provides multiple paths for the signal ground. As far as we know, there is no compelling reason to use this convention.

DB-25 connectors are either male (with pins sticking out, called DB25P) or female (with matching holes, DB25S). There are tiny invisible numbers near the pins or holes which label them from 1 to 25. You can see the numbers best by holding the connector up to the light and viewing it at an angle. Sometimes only pins 1, 13, 14, and 25 are numbered.

Exhibit A shows a male DB-25. As with all serial connectors, the pin numbers on a female connector are a mirror image of those on a male connector, so that like-numbered pins mate. The diagram is drawn from the orientation shown (as if you were facing the end of the cable, about to plug the

Return Main Page Previous Page Next Page

®Online Book Reader