Вы находитесь на странице: 1из 5

Null modem 1

Null modem
Null modem is a communication method to connect two DTEs
(computer, terminal, printer etc.) directly using an RS-232 serial cable.
The RS-232 standard is asymmetrical as to the definitions of the two
ends of the communications link so it assumes that one end is a DTE
and the other is a DCE e.g. a modem. With a null modem connection
the transmit and receive lines are crosslinked. Depending on the
purpose, sometimes also one or more handshake lines are crosslinked.
Several wiring layouts are in use because the null modem connection is
not covered by a standard.

Origin of the term


Originally, the RS-232 standard was developed and used for teletype A null modem adapter

machines which could communicate with each other over phone lines.
Each teletype would be physically connected to its modem via an RS-232 connection and the modems could call
each other to establish a remote connection between the teletypes. If a user wished to connect two teletypes directly
without modems (null modem) then they would crosslink the connections. The term null modem may also refer to
the cable or adaptor itself as well as the connection method.

Null modem cables and adapters


A null modem cable is an RS-232 serial cable where the transmit and
receive lines are crosslinked. In some cables there are also handshake
lines crosslinked. In many situations a straight through serial cable is
used, together with a null modem adapter. The adapter contains the
necessary crosslinks between the signals.
A null-modem cable

Null modem cable pin mapping


This is one very common mapping which will work with software that
relies on proper assertion of the CD signal.

DB-9 Null-Modem Wiring Diagram


Null modem 2

DB-25 Null-Modem Wiring Diagram

Signal Name and Abbreviation DB-25 Pin DB-9 Pin Direction DB-9 Pin DB-25 Pin Signal Name Abbreviation

Frame Ground (chassis) FG 1 - - 1 FG

Transmitted Data (TD) TxD 2 3 > 2 3 RxD

Received Data (RD) RxD 3 2 < 3 2 TxD

Request To Send RTS 4 7 > 8 5 CTS

Clear To Send CTS 5 8 < 7 4 RTS

Signal Ground SG 7 5 5 7 SG

Data Set Ready DSR 6 6 < 4 20 DTR

Data Carrier Detect (CD) DCD 8 1

Data Terminal Ready DTR 20 4 > 1 8 DCD

6 6 DSR

Applications
The original application of a null modem was to connect two teletype terminals directly without using modems. As
the RS-232 standard was adopted by other types of equipment, designers needed to decide whether their devices
would have DTE-like or DCE-like interfaces. When an application required that two DTE's (or two DCE's) needed
to communicate with each other, then a null modem was necessary.
Null modems are commonly used for file transfer between computers, or remote operation. Under the Microsoft
Windows operating system, the direct cable connection can be used over a null modem connection. The later
versions of MS-DOS were shipped with the InterLnk program. Both pieces of software allow the mapping of a hard
disk on one computer as a network drive on the other computer. No Ethernet hardware (such as a network interface
card or a modem) is required for this.
The popularity and availability of faster information exchange systems such as Ethernet made the use of null-modem
cables less common. Nowadays, such a cable can still be useful for kernel mode development, since it allows the
user to remotely debug a kernel with a minimum of device drivers and code (a serial driver mainly consists of two
FIFO buffers and an interrupt service routine). KGDB for Linux, ddb for BSD and WinDbg or KD for Windows can
be used to remotely debug systems, for example. This can also provide a serial console through which the in-kernel
debugger can be dropped to in case of kernel panics, in which case the local monitor and keyboard may not be usable
anymore (the GUI reserves those resources and dropping to the debugger in the case of a panic won't free them).
Another context where these cables can be useful is when administrating "headless" devices providing a serial
administration console (i.e. managed switches, rackmount server units and various embedded systems).
Null modem 3

Types of null modem


Connecting two DTE devices together requires a null modem that acts as a DCE between the devices by swapping
the corresponding signals (TD-RD, DTR-DSR, and RTS-CTS). This can be done with a separate device and two
cables, or using a cable wired to do this. If devices require Carrier Detect, it can be simulated by connecting DSR
and DCD internally in the connector, thus obtaining CD from the remote DTR signal. One feature of the Yost
standard is that a null modem cable is a "rollover cable" that just reverses pins 1 through 8 on one end to 8 through 1
on the other end.

No hardware handshaking
The most simplistic type of serial cable has no hardware handshaking. This cable has only the data and signal ground
wires connected. All of the other pins have no connection. With this type of cable flow control has to be
implemented in the software. The use of this cable is restricted to data-traffic only on its cross connected Rx and Tx
lines. This cable can also be used in devices that do not need or make use of modem control signals.

Loop back handshaking


Because of the compatibility issues and potential problems with a simple null modem cable, a solution was
developed to trick the software into thinking there was handshaking available. However, the cable pin out merely
loops back and does not physically support the hardware flow control.
This cable could be used with more software but it had no actual enhancements over its predecessor. The software
would work thinking it had hardware flow control but could suddenly stop when higher speeds were reached and
with no identifiable reason.

Partial handshaking
In this cable the flow control lines are still looped back to the device. However, they are done so in a way that still
permits Request To Send (RTS) and Clear To Send (CTS) flow control but has no actual functionality. The only way
the flow control signal would reach the other device is if the opposite device checked for a Carrier Detect (CD)
signal (at pin 1 on a DE-9 cable and pin 8 on a DB-25 cable). As a result only specially designed software could
make use of this partial handshaking. Software flow control still worked with this cable.

Full handshaking
This cable is the most expensive of the serial cables because it has full wiring and pin-outs. This cable is
incompatible with the previous types of cables' hardware flow control, due to a crossing of its RTS/CTS pins. With
suitable software, the cable is capable of much higher speeds than its predecessors. It also supports software flow
control.

Virtual null modem


A virtual null modem is a communication method to connect two computer applications directly using a virtual serial
port. Unlike a null modem cable, a virtual null modem is a software solution which emulates a hardware null modem
within the computer. All features of a hardware null modem are available in a virtual null modem as well. There are
some advantages to this:
• Higher transmission speed of serial data (limited by computer performance only).
• Virtual connection over network or Internet is possible, mitigating cable length restrictions.
• An unlimited number of virtual connections is possible.
• No serial cable is needed.
• The computer's physical serial ports remain free.
Null modem 4

For instance, DOSBox has allowed older DOS games to use virtual null modems.
Another common example consists of unix pseudo terminals (pty) which present a standard tty interface to user
applications, including virtual serial controls. Two such ptys may easily be linked together by an application to form
a virtual null-modem communication path.

See also
• Crossover cable
• Rollover cable
• Serial cable
• Direct cable connection
• Debugging
• Serial Line Internet Protocol (SLIP)
• LapLink cable (can be seen as a parallel equivalent to a serial null modem cable)

External links
• http://www.angelfire.com/ma/mantasdos/interlnk.html
• http://www.nullmodem.com/NullModem.htm
• http://www.lammertbies.nl/comm/info/RS-232_null_modem.html
• http://www.hardwarebook.info/Nullmodem_(9-9)
• http://sourceforge.net/projects/com0com
• http://adtpro.sourceforge.net/connectionsserial.html#MiniDIN8
• http://developer.berlios.de/projects/n8vbvcomdriver/
Article Sources and Contributors 5

Article Sources and Contributors


Null modem  Source: http://en.wikipedia.org/w/index.php?oldid=393330104  Contributors: Akrumbein, Balabiot, BlackWolf, Bobo192, CALR, Chrike, Clawed, Cookie2911, CryptoDerk,
Deelkar, Dori, Druiloor, EdJohnston, Fabulatech, GentlemanGhost, Glaurung, Glenn, Harryboyles, IFaqeer, Itai, Ivan Pozdeev, Jimpricedallas, Jjoss, Joakim.Ogren, KerryVeenstra, Ledow, Lupo,
Marasmusine, Matusz, Mikeblas, Momma's Little Helper, Moppet65535, Mungojerry2007, Natalya, Noe, Nuno Tavares, Oashi, Orangebodhi, Poccil, ProveIt, QUILzhunter931, RazorICE, Rick
Sidwell, Rvolz, Safalra, SebastianHelm, Sietse Snel, SlayerK, Smyth, Softie, StealthFox, Stewartadcock, Synook, TReKiE, The Thing That Should Not Be, Tom-, Towel401, Underdog, Xinit,
Yama, Yurivict, Zondor, 81 anonymous edits

Image Sources, Licenses and Contributors


Image:Null modem.jpg  Source: http://en.wikipedia.org/w/index.php?title=File:Null_modem.jpg  License: Public Domain  Contributors: User:Dori
Image:Null modem cable 1.jpg  Source: http://en.wikipedia.org/w/index.php?title=File:Null_modem_cable_1.jpg  License: Public Domain  Contributors: User:Ivan Pozdeev
Image:D9_Null_Modem_Wiring.png  Source: http://en.wikipedia.org/w/index.php?title=File:D9_Null_Modem_Wiring.png  License: Public Domain  Contributors: User:Johnsoa
Image:D25_Null_Modem_Wiring.png  Source: http://en.wikipedia.org/w/index.php?title=File:D25_Null_Modem_Wiring.png  License: Public Domain  Contributors: User:Johnsoa

License
Creative Commons Attribution-Share Alike 3.0 Unported
http:/ / creativecommons. org/ licenses/ by-sa/ 3. 0/

Вам также может понравиться