A universal serial cable
I've been playing around with RS232-interface peripherals a lot recently, and keep finding that I never have the right cables on hand. There are DTE and DCE variants, 9-pin and 25-pin, and even some weird combinations (notably serial terminals with DCE connectors wired as if they were DTEs, or with DTR/DSR and RTS/CTS crossed).
As a result of years of frustration with consumer networking equipment early-on, my homelab is full of enterprise networking kit (mostly Cisco). Most of this equipment uses “Cisco console” pinned RJ45 plugs and sockets for serial connections, and I have plenty of those cables. One day I tripped over a box of these cables, and realised they were the perfect solution to my problems!
- The big box of random RS232 cables can be replaced with a smaller box of console and rollover cables, and adapters.
- A USB console cable is tidier and more convenient than a USB-to-DB9 adapter and a serial cable.
- If I need a longer cable, I just need an RJ45 coupler and a Cat5 straight Ethernet cable.
All I needed was some 9-pin and 25-pin to RJ45 adapters, the sort which can be pinned
Wiring basics
Traditionally a Cisco Console cable was made up of a Rollover cable and a DB9F-to-RJ45 socket adapter. These days that arrangement is rare to see, and most modern cables combine the rollover cable with the adapter: they're made up of a DB9 female connector (or a USB-RS232 adapter module) soldered on to a length of flat cable which terminates in an RJ45 plug. These modern cables are usually wired as follows:
DB9 female | Function | RJ45 plug |
---|---|---|
8 | CTS ← RTS | 1 |
6 | DSR ← DTR | 2 |
2 | RXD ← TXD | 3 |
5 | Ground | 4, 5 |
3 | TXD → RXD | 6 |
4 | DTR → DSR | 7 |
7 | RTS → CTS | 8 |
The DCD (data carrier detect) and RI (ring indicator) are not connected. In practice this doesn't matter: some null-modem cables connect DCD to DTR, but this isn't essential, and where needed it can be accommodated by wiring the pins up inside the RJ45 adapter.
It's also worth considering the matter of DTE and DCE wiring conventions. In times gone by, a printing or CRT terminal might have been plugged into a modem to allow it to dial a remote computer. This would only need a straightforward male-to-female DE9 or DB25 extension cable, and was facilitated by having two different pinouts:
- DTE (Data Terminal Equipment) is usually a female DE9 or DB25 connector, and is found on terminals, PCs, and similar equipment.
- DCE (Data Communications Equipment) is usually a male DE9 or DB25 connector, and is usually found on modems.
- A DTE is connected to a DCE with a straight-through (pin-1-to-pin-1) wired male-to-female cable: in essence, an extension cable.
- A DTE is connected to another DTE with a null-modem cable, which crosses the data pairs.
- Connecting two DCEs together makes absolutely no sense at all.
By virtue of the rollover cable (which crosses RXD/TXD, RTS/CTS and DTR/DSR like a null-modem cable would), the Cisco RJ45 console port can be considered to be a DTE.
Adapter wiring
Wire colours
Most of the adapters I've used follow the same colour code for the RJ45 end:
RJ pin | Colour |
---|---|
1 | Blue |
2 | Orange |
3 | Black |
4 | Red |
5 | Green |
6 | Yellow |
7 | Brown |
8 | White or grey |
This is by no means a guarantee, but it does match up with the following adapters:
- Excel 23-0020 (D25 plug)
- Startech GC258MF (D25 plug)
Always check the colour code before wiring - if in doubt, look at where the wires go on the back of the RJ45 socket, or check with a continuity tester.
Cisco console cable to DB9 Female (DTE) adapter
DB9 female | Function | RJ45 jack |
---|---|---|
7 | RTS → CTS | 1 |
4 | DTR → DSR | 2 |
3 | TXD → RXD | 3 |
5 | Ground | 4, 5 |
2 | RXD ← TXD | 6 |
6 | DSR ← DTR | 7 |
8 | CTS ← RTS | 8 |
This converts a Cisco console cable into a DB9F for plugging into a PC.
One of these adapters plus a rollover cable (or straight cable and rollover adapter) can be used to connect a PC to a Cisco console port.
Cisco console cable to DB25 Female (DTE) adapter
DB25 female | Function | RJ45 jack |
---|---|---|
4 | RTS → CTS | 1 |
20 | DTR → DSR | 2 |
2 | TXD → RXD | 3 |
7 | Ground | 4, 5 |
3 | RXD ← TXD | 6 |
6 | DSR ← DTR | 7 |
5 | CTS ← RTS | 8 |
This converts a Cisco console cable into a DB25F for plugging into a PC.
One of these adapters plus a rollover cable (or straight cable and rollover adapter) can be used to connect a PC to a Cisco console port.
Cisco console cable to DB9 Male (DCE) adapter
DB9 male | Function | RJ45 jack |
---|---|---|
8 | CTS → CTS | 1 |
6 | DSR → DSR | 2 |
2 | RXD → RXD | 3 |
5 | Ground | 4, 5 |
3 | TXD ← TXD | 6 |
4 | DTR ← DTR | 7 |
7 | RTS ← RTS | 8 |
This converts a Cisco console cable into a DB9M for plugging into some types of modem (e.g. the Diamond Speedstar 56k).
One of these adapters plus a rollover cable (or straight cable and rollover adapter) can be used to connect a modem to a Cisco console port.
Cisco console cable to DB25 Male (DCE) adapter
DB25 male | Function | RJ45 jack |
---|---|---|
5 | CTS → CTS | 1 |
6 | DSR → DSR | 2 |
3 | RXD → RXD | 3 |
7 | Ground | 4, 5 |
2 | TXD ← TXD | 6 |
20 | DTR ← DTR | 7 |
4 | RTS ← RTS | 8 |
This converts a Cisco console cable into a DB25M for plugging into a modem.
One of these adapters plus a rollover cable (or straight cable and rollover adapter) can be used to connect a modem to a Cisco console port.
Untested and unusual adapters
ACT Sirius One (Victor 9000) to RJ45 adapter
This adapter has not been tested!
DB25 male | Function | RJ45 jack |
---|---|---|
4 | RTS → CTS | 1 |
20 | DTR → DSR | 2 |
2 | TXD → RXD | 3 |
7 | Ground | 4, 5 |
3 | RXD ← TXD | 6 |
6 | DSR ← DTR | 7 |
5 | CTS ← RTS | 8 |
: Pins 6 (DSR) and 22 (RI) may need to be connected together in the Victor plug.
(Victor serial port pinout from the Victor 9000 service manual)
The ACT Sirius One (Victor 9000) has a DTE serial port with a DCE connector. To use standard serial cables, you need a DB25 gender changer with two male connectors. This adapter is that, but in a single convenient adapter.
This can be combined with a rollover cable and a DB9 or DB25 connector to connect the Victor to a PC. Such a cable is useful for transferring files with Kermit, or bootstrapping a machine with Cerealbewt.
BBC Micro to RJ45
This adapter has not been tested!
This is sometimes called an “XFER” cable, after the popular DOS software which is used to copy files from a BBC Micro to/from a PC.
The wiring details in the table below are based on Sprow's Crossover cable diagram.
Domino plug | Function | RJ45 plug | RJ45 jack |
---|---|---|---|
E | RTS → CTS | 1 | 8 |
(Link) | DTR → DSR | 2 | 7 |
B | TXD → RXD | 3 | 6 |
C | Ground | 4, 5 | 5, 4 |
A | RXD ← TXD | 6 | 3 |
(Link) | DSR ← DTR | 7 | 2 |
D | CTS ← RTS | 8 | 1 |
The “Link” joins pins 2 and 7 of the RJ45, bridging DTR and DSR. It's not possible to link this through to DCD, but it shouldn't matter as this is just a loopback link.
The “RJ45 Plug” variant terminates in an RJ45 plug, which plugs straight into a PC DB9 adapter to create the Sprow crossover cable. The “RJ45 Jack” variant can have a Cisco crossover cable plugged into it, which creates the same connections.
ZX Spectrum to RJ45
This adapter has not been tested!
This cable is quite unusual in that the Spectrum provides DTR (Data Terminal Ready) and CTS (Clear To Send), but not their corresponding DSR and RTS signals. The port on the Spectrum is also bit-banged, which means it's quite slow (maximum 9600 Baud).
A link between CTS and DTR is included, to allow compatibility with Sercp. It may be necessary to fit a switch to the cable to choose whether DTR (from the Spectrum) is routed to DSR or CTS (or both) – your mileage may vary.
631W plug | Function | RJ45 plug | RJ45 jack |
---|---|---|---|
4 | DTR → CTS DTR → DSR | 1, 2 | 8, 7 |
2 | TXD → RXD | 3 | 6 |
1 | Ground | 4, 5 | 5, 4 |
3 | RXD ← TXD | 6 | 3 |
DSR ← DTR | 7 | 2 | |
5 | CTS ← RTS | 8 | 1 |
6 | +12V | No connection |
The “RJ45 Plug” variant terminates in an RJ45 plug, which plugs straight into a PC DB9 adapter to form a crossover (null modem) cable. The “RJ45 Jack” variant can have a Cisco crossover cable plugged into it, which creates the same connections.
When holding the 631W plug with the pins facing up and the latch to the right, the pins are numbered 1 to 6 from left to right.
Software which can be used with this cable:
- ZX-Trans can be used to transfer snapshots from a PC to the Spectrum using the serial port, once a small bootstrap has been loaded from tape.
- Sercp can copy files from a PC to a Spectrum and vice versa
Of course, this can also be used to connect a serial printer to the Spectrum… which might well be more useful than connecting it to a PC.
The ZX Spectrum serial port also functions as a MIDI Out port. It's possible to make a combination serial and MIDI Out cable if you want: build the circuit in this PDF file (based around a transistor and three resistors) and incorporate it into your cable. I'd suggest building the circuit on Veroboard and installing it in a small project box. Make holes for the cables to enter and exit, and fit a 5-pin 180-degree DIN socket in the lid for the MIDI Out connection.
Sources of information:
-
- At time of writing the 631W plugs are available from Activeconsult and Betterbox. They crimp onto FCC-68 style flat cable.
- Crimped cables occasionally turn up, e.g. on ebay. At the time of writing (Jan 2025) they're available from blob02.
- The same plug is used for the Sinclair QL serial port.
DEC MMJ to RJ45
These are useful for connecting DEC terminals and printers to modern PCs and modems.
For wiring details, see https://www.lammertbies.nl/comm/cable/dec-mmj. Watch out - the adapters work like Cisco ones, in that they terminate in a socket and end in a rollover cable.