Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
11 - - Unassigned
12 SDCD IN Secondary Carrier Detect. Only needed if second channel being used.
13 SCTS IN Secondary Clear to send. Only needed if second channel being used.
14 STD OUT Secondary Transmit Data. Only needed if second channel being used.
16 SRD IN Secondary Receive Data. Only needed if second channel being used.
18 LL - Local Loopback
19 SRTS OUT Secondary Request to Send. Only needed if second channel being used.
22 RI IN Ring Indicator. DCE (Modem) raises when incoming call detected used for auto
answer applications.
25 - - Unassigned
RS232 on DB9 (EIA/TIA 574)
Pin Name Dir Notes/Description
No.
3 TD OUT Transmit Data (a.k.a TxD, Tx). Sending data from DTE.
4 DTR OUT Data Terminal Ready. Raised by DTE when powered on. In auto-answer mode
raised only when RI arrives from DCE.
5 SGND - Ground
7 RTS OUT Request To Send. Raised by DTE when it wishes to send. Expects CTS from DCE.
9 RI IN Ring Indicator. Set when incoming ring detected - used for auto-answer
application. DTE raised DTR to answer.
RS232 on RJ45 (RS-232D)
More properly EIA/TIA - 561. Use when connecting to or from a serial port with an 8
position Modular Jack (RJ45). If you are cross-connecting from a DB9 or a DB25 use the
signal names to cross connect the appropriate connections.
Note: Pin 1 is a multi-function pin sharing with DSR (Data Set Ready) and RI (Ring
Indicator). This means it is impossible to differentiate between an incoming ring signal
and when the modem has finally connected and synched up. With local (null modem
connections) or if the modem is run in auto-answer mode this is not normally a problem.
If used with a modem and the DTE (the computer end) wants to control the connection
the problem is more real. DSR would normally indicate the 'connected and synched-up'
state following DTR from the DTE. DCD will indicate that a carrier has been received
but does not indicate synchronization of both ends. In most cases however CTS (Clear To
Send) in response to RTS (Request To Send) will not normally be returned until an end-
to-end connection is available.
3 RD 2 TD
2 TD 3 RD
20 DTR 6,8 DSR, DCD
6,8 DSR, DCD 20 DTR
4 RTS 5 CTS
5 CTS 4 RTS
7 SGND 7 SGND
RS232 DB9 NULL Modem Pinout
Use when connecting two systems, for example two PCs, via their DB9 interfaces
without a modem. Typically called a back-to-back or NULL modem connection.
2 RD 3 TD
3 TD 2 RD
1,4,6 DSR, DCD, DTR 1,4,6 DSR, DCD, DTR
7,8 RTS,CTS 7,8 RTS,CTS
5 SGND 5 SGND
DB9 Loopback
DB9 Signal Loopback Signal
to
2 RD 3 TD
3 TD 2 RD
4 DTR 6,1 DSR, DCD
7 RTS 8 CTS
5 SGND 5 SGND
DB25 Loopback
3 RD 2 TD
2 TD 3 RD
4 RTS 5 CTS
5 CTS 4 RTS
7 SGND 7 SGND
20 DTR 6,8 DSR, DCD
NOTE:
For the sake of simplicity this loopback will only work for the primary channel.
By looping the primary channel clocks (15 and 17) both synchronous and asynchronous
capabilities can be tested. If only asynchronous tests are being performed omit this.
RS232 DB9 NULL Modem Pinout on CAT5
This is in response to a number of recent emails asking how to wire both ends of a DB9
connection using cat5(e) cable. This must not be confused with DB9 to RJ45 (RS232D).
We have shown a null modem (back-to-back PCs) only configuration. And if you want to
use cat5(e) with a real modem (a DB25 connector)? Our advice - don't.
Warning: There is, as far as we know, no standard to cover the use of cat5(e) (8
conductor) wiring when used with two DB9 connectors. Any such wiring scheme is
therefore non-standard - that includes the wiring scheme below. Specifically this means
that both ends of the cable must be wired in the same way and that no assumptions can be
made about how the other end is wired. You will have to manually inspect both ends of
the connection. Damage can result from mis-matched wiring.
A DB9 clearly has 9 connections and a cat5(e) cable has 8 conductors. RS232D has
chosen to use Pin 1 as a multi-function pin (DSR/RI) to provide maximum flexibility
with modems - in particular it allows for DCD which is a meaningful signal from a
modem but not we suggest from a peer PC. We have chosen to use a minor variation on
the normal DB9 Null modem pinout above - specifically we have allowed for RI which
could be used from a peer PC to commence a transmission sequence. The colors used are
unimportant but the suggested configuration is one way to provide the shortest use of the
adjacent (twisted) pairs.
2 RD Brown 3 TD Blue
3 TD Blue 2 RD Brown
4 DTR Green 6,1 DSR, DCD Brown-white
6,1 DSR, DCD Brown-white 4 DTR Green
7 RTS Blue-white 8 CTS Green-white
8 CTS Green-white 7 RTS Blue-white
5 SGND Orange 5 SGND Orange
9 RI Orange-white 9 RI Orange-white
RS232 DB9 to DB25 Pinout
Use when connecting a DB9 (e.g. a PC) to a DB25 (e.g. a modem) interface. See the full
signal names in the DB9 and DB25 section.
1 DCD 8
2 RD 3
3 TD 2
4 DTR 20
5 SGND 7
6 DSR 6
7 RTS 4
8 CTS 5
9 RI 22
2 RD 2 TD
3 TD 3 RD
4 DTR 6,8 DSR, DCD
6,1 DSR, DCD 20 DTR
7 RTS 5 CTS
8 CTS 4 RTS
5 SGND 7 SGND
9 RI 22 RI
It is not difficult to monitor half duplex RS232 serial communication between two
devices with a PC. To do this you need the RS232 monitor cable which is displayed in
the next picture. Two DB9 connectors are wired straight through. The spy computer is
connected to the third connector. This monitor cable taps communication from two
sources on only one RS232 receiver port. This means that if the two devices happen to
talk simultaneously, the monitored information will be garbage. In most circumstances
communication protocols work half duplex, in which case this RS232 cable will work
without problems. Otherwise you need the full duplex RS232 monitor cable which is
discussed here also.
When an RS232 port is in an idle state, it will be in the so-called marking state with a
negative voltage at the transmit output. Assume the computer connected to the left port is
sending data and the peripheral device at the right side is idle. At that moment the RS232
signal level on line 3 will change. When the voltage of this line changes to a higher value,
current will flow through the diode to the spy computer. We assume the attached device
is in an idle state. Therefore, the voltage at line 2 is something like -12 Volt, while at the
other end of the resistor +12 Volt is applied. Simple mathematics learns that a current of
approximately 11 mA (=24 Volt/2200 Ohm) flows through the resistor. This is no
problem because most RS232 driver IC's are capable to deliver at least 45 mA. Because
the voltage drop over the diode is only 0.7 Volt—independent of the current through the
diode—the spy computer will see on its RS232 port (almost) the same voltage levels as
present on the transmit port of the sending computer and data from the sending computer
to the peripheral device is successfully captured.
In the second situation the computer has finished sending data and waits for an answer
from the device at the male connector. The RS232 signal level at line 2 will go to positive
values. The diode will block current to line 3 so the spy computer effectively only sees
the data coming from the peripheral device. Now the spy computer will be able to pick-
up the data send from the device back to the computer.
In the diagram for the half duplex monitor cable some shorts have been made between
pins of the connector of the spying computer. These shorts loopback the handshaking
signals of the computer. In most cases these shorts won't be necessary, but if the spy
monitoring software uses handshaking, this will prevent the monitor software from
blocking.
You don't need expensive software to use this RS232 spy cable. A simple serial terminal
emulator like the HyperTerminal program present on all Windows based computers is
enough to spy your communications. The only thing you need to do is changing the
baudrate and start and stop bits settings from the terminal emulation program to the
settings used on the line to monitor.
Full duplex RS232 spy / monitor / sniffer cable
The diagram of the full duplex RS232 monitor cable is actually simpler than the diagram
of the half duplex monitor cable. This is because no special circuitry is necessary to
combine two communication lines on one input. Just to be sure, all handshake signals on
both spy connectors have been looped back. This prevents the software from blocking
input in case it checks the CTS, DSR or CD inputs.