UNIX System Administration Handbook - Evi Nemeth [67]
Ready-made RJ-45 cables are usually wired straight through. To use them, you will have to remove the connector from one end and crimp on a new one with the wires reversed. Female-to-female RJ-45 connectors (“butt blocks”) are available for extending cable lengths, but remember: two twisted cables joined with such a coupler make a straight-through cable.
Many vendors make DB-25 to RJ-45 adaptors. Their internal color coding does not match the cable colors. The adaptors, wire connectors, and wire have become available at electronics stores, sadly without any help on using them for RS-232.
This scheme was intended for use with jacketed ribbon cable, in which all the wires are side by side. Twisted-pair cable, by contrast, has four pairs of wire, each pair twisted against itself along the cable’s length. If you use twisted-pair cable (such as Category 5 cable) you should not wire your cables as you normally would for RJ-45 (e.g., for 10BaseT, telephone, etc.). Rather, you should wire them so that wires 3:4 and wires 5:6 make pairs. Other pairings will be susceptible to data signal crosstalk. The pairing of the remaining wires is not important, but 1:2 and 7:8 will be about as good as any.
See page 375 for more information about Category 5 cable.
Inside an adaptor is an RJ-45 socket with 8 wires coming out of it. These wires have RS-232 pins (or pin sockets, as appropriate) crimped onto them. You simply push these pins into the proper holes in the RS-232 connector and then snap the adaptor housing on.
Table 7.4 Wiring for a Yost RJ-45 to DB-25 or DB-9 adaptor
There is one problem, however: both ground pins have to go into the same DB-25 or DB-9 hole (pin 7 or 5, respectively). You can crimp these wires together so they come out to one pin with a tiny plastic thingy made by AMP called a “Tel-splice connector ½ tap dry,” part number 553017-4. So far, this part seems to be available only in quantity 1,000 for $80 or so. Believe me, you want them if you’re going to wire more than a few adaptors.
Some DTE devices require the DSR signal to be active before they will send data. This signal is usually provided by the DCE device, but you can fake it by wiring together pins 20 and 6 (4 and 6 on a DB-9 connector). This way, the DTE device will receive the DSR signal from itself whenever it asserts DTR.
On some DCE printers, pin 7 of the RJ-45 adaptor (the brown wire) should be connected to the DSR line (pin 6 on both DB-25 and DB-9). Read your printer documentation to find out if it provides useful handshaking signals on DSR instead of DCD.
Thanks to folks at Berkeley for this idea. Their wiring is slightly different, I gather for historical reasons, but the basic idea was there. If I can find out who really originated this scheme, I’d like to credit him or her by name.
Dave Yost Los Altos, CA July 1999
7.3 Hard and soft carrier
UNIX expects to see the DCD signal, carrier detect, go high (positive voltage) when a device is attached and turned on. This signal is carried on pin 8 of the standard DB-25 connector. If your serial cable has a DCD line and your computer really pays attention to it, you are using what is known as hard carrier. Most systems also allow soft carrier, where the computer pretends that DCD is always asserted.
For certain devices (particularly terminals), soft carrier is a great blessing. It allows you to get away with using only three lines for each serial connection: transmit, receive, and signal ground. However, modem connections really