Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Null modem
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Serial cable connecting two computers}} [[File:Null modem.jpg|300px|thumb|A null modem adapter]] '''Null modem''' is a communication method to directly connect two [[data terminal equipment|DTE]]s ([[computer]], [[computer terminal|terminal]], [[printer (computing)|printer]], etc.) using an [[RS-232]] [[serial cable]]. The name stems from the historical use of [[RS-232]] cables to connect two [[teleprinter]] devices or two [[modem]]s in order to communicate with one another; ''null modem'' communication refers to using a crossed-over RS-232 cable to connect the teleprinters directly to one another without the modems. It is also used to serially connect a computer to a printer, since both are [[data terminal equipment|DTE]], and is known as a ''Printer Cable''. The RS-232 standard is asymmetric as to the definitions of the two ends of the communications link, assuming that one end is a [[data terminal equipment|DTE]] and the other is a [[Data circuit-terminating equipment|DCE]], e.g. a [[modem]]. With a null modem connection the [[Transmission (telecommunications)|transmit]] and receive lines are crosslinked. Depending on the purpose, sometimes also one or more [[Handshake (computing)|handshake]] lines are crosslinked. Several wiring layouts are in use because the null modem connection is not covered by the RS-232 standard. == Origins == Originally, the RS-232 standard was developed and used for [[teleprinter]] machines which could communicate with each other over phone lines. Each teleprinter 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 teleprinters. If a user wished to connect two teleprinters directly without modems (null modem) then they would crosslink the connections. The term ''null modem'' may also refer to the cable or adapter itself as well as the connection method.<ref name="lammertbies">{{cite web |author=Lammert Bies |url=http://www.lammertbies.nl/comm/info/RS-232_null_modem.html |title=RS232 serial null modem cable wiring and tutorial |publisher=lammertbies.nl |access-date=2013-12-26}}</ref> Null modem cables were a popular method for transferring data between the early personal computers from the 1980s to the early 1990s. == Cables and adapters == [[File:Null modem cable 1.jpg|thumb|A null modem cable]] A null modem cable is a 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 (computing)|adapter]]. The adapter contains the necessary crosslinks between the signals.<ref name="null-modem">{{cite web |url=http://www.nullmodem.com/NullModem.htm |title=Null Modem |publisher=nullmodem.com |date=2008-11-07 |access-date=2013-12-26}}</ref><ref>{{cite web |url=http://www.hardwarebook.info/Nullmodem_(9-9) |title=Nullmodem (9-9) - HwB |publisher=hardwarebook.info |date=2006-12-27 |access-date=2013-12-26}}</ref> === Wiring diagrams === [[File:D25 Null Modem Wiring.png|thumb|DB-25 null modem wiring diagram]] [[File:D9 Null Modem Wiring.png|thumb|DE-9 null modem wiring diagram]] {{See also|Serial port#Pinouts|l1=Serial port: Pinouts}} Below is a very common wiring diagram for a null modem cable to interconnect two DTEs (e.g. two PCs) providing full handshaking, which works with software relying on proper assertion of the ''Data Carrier Detect'' (DCD) signal:<ref name="null-modem" /> {| class="wikitable" ! colspan="4" | One side ! rowspan="2" | Signal<br />direction ! colspan="3" | Other side |- ! colspan="2" | Signal and abbreviations ! [[DB-25]] pin ! [[D-subminiature|DE-9]] pin ! DE-9 pin ! DB-25 pin ! Signal |- | [[Ground (electricity)|Frame Ground]] | FG || 1 || {{n/a}} | style="text-align:center;" {{n/a|Common}} | {{n/a}} || 1 || FG |- | [[Transmitted Data]] | TxD, TD || 2 || 3 | style="text-align:center;" | β | 2 || 3 || RxD |- | [[Received Data]] | RxD, RD || 3 || 2 | style="text-align:center;" | β | 3 || 2 || TxD |- | [[RS-232 RTS/CTS|Request To Send]] | RTS || 4 || 7 | style="text-align:center;" | β | 8 || 5 || CTS |- | [[RS-232 RTS/CTS|Clear To Send]] | CTS || 5 || 8 | style="text-align:center;" | β | 7 || 4 || RTS |- | [[Single-ended signalling|Signal Ground]] | SG || 7 || 5 | style="text-align:center;" | <small>Common</small> | 5 || 7 || SG |- | [[Data Set Ready]] | DSR || 6 || 6 | style="text-align:center;" rowspan="2" | β | rowspan="2" | 4 || rowspan="2" | 20 || rowspan="2" | DTR |- | [[Data Carrier Detect]] | DCD, CD || 8 || 1 |- | rowspan="2" | [[Data Terminal Ready]] | rowspan="2" | DTR || rowspan="2" | 20 || rowspan="2" | 4 | style="text-align:center;" rowspan="2" | β | 1 || 8 || DCD |- | 6 || 6 || DSR |} == Applications == The original application of a null modem was to connect two teleprinter 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 DTEs (or two DCEs) needed to communicate with each other, then a null modem was necessary.<ref>{{cite web |url=http://adtpro.sourceforge.net/connectionsserial.html |title=ADTPro - ADTPro Serial Cabling |publisher=sourceforge.net |date=2011-01-25 |access-date=2013-12-26}}</ref> Null modems were 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|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.<ref>{{cite web |url=https://www.angelfire.com/ma/mantasdos/interlnk.html |title=MS-DOS External commands - INTERLNK |publisher=[[Angelfire]] |access-date=2013-12-26}}</ref> On the [[Amiga]] computer, a null modem connection was a common way of [[:Category:Multiplayer null modem games|playing multiplayer games]] between two machines. The popularity and availability of faster information exchange systems such as [[Ethernet]] made the use of null modem cables less common. In modern systems, such a cable can still be useful for [[Kernel (operating system)|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 (computing and electronics)|FIFO]] buffers and an [[interrupt service routine]]). [[KGDB]] for [[Linux]], ddb for [[Berkeley Software Distribution|BSD]], and [[WinDbg|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 administering "headless" devices providing a serial administration console (i.e. managed switches, rackmount server units, and various embedded systems). An example of embedded systems that widely use null modems for remote monitoring include [[Remote Terminal Unit|RTUs]], device controllers, and smart sensing devices. These devices tend to reside in close proximity and lend themselves to short run serial communication through protocols such as [[DNP3]], [[Modbus]], and other IEC variants. The Electric, Oil, Gas, and Water Utilities are slow to respond to newer networking technologies which may be due to large investments in capital equipment that has useful service life measured in decades. Serial ports and null modem cables are still widely used in these industries with Ethernet just slowly becoming a widely available option. == 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 [[rollover cable|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.<ref name="lammertbies" /> === No hardware handshaking === {{Multiple image | direction = horizontal | width = 200 | image1 = Null modem xon-xoff.svg | image2 = Null modem DB-9 xon-xoff.svg | footer = Wiring pinouts for DB-25 (left) and DE-9 (right) connectors }} The simplest 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 (data)|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.<ref name="lammertbies" /> {{Clear}} === Loopback handshaking === {{Multiple image | direction = horizontal | width = 200 | image1 = Null modem 3-wire.svg | image2 = Null modem DB-9 3-wire.svg | footer = Wiring pinouts for DB-25 (left) and DE-9 (right) connectors }} 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.<ref name="lammertbies" /> 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. {{Clear}} === Partial handshaking === {{Multiple image | direction = horizontal | width = 200 | image1 = Null modem 5-wire.svg | image2 = Null modem DB-9 5-wire.svg | footer = Wiring pinouts for DB-25 (left) and DE-9 (right) connectors }} 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.<ref name="lammertbies" /> {{Clear}} === Full handshaking === {{Multiple image | direction = horizontal | width = 200 | image1 = Null modem 7-wire.svg | image2 = Null modem DB-9 7-wire.svg | footer = Wiring pinouts for DB-25 (left) and DE-9 (right) connectors }} 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.<ref name="lammertbies" /> {{Clear}} === Virtual null modem === A virtual null modem is a communication method to connect two [[application software|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.<ref>{{cite web |url=http://sourceforge.net/projects/com0com |title=Null-modem emulator | Download Null-modem emulator software for free at |publisher=sourceforge.net |access-date=2013-12-26}}</ref><ref>{{cite web |url=http://developer.berlios.de/projects/n8vbvcomdriver/ |title=BerliOS Developer: Project Summary - N8VB_vCOM Virtual Null Modem Cable |publisher=berlios.de |date=2005-07-15 |access-date=2013-12-26 |url-status=dead |archive-url=https://web.archive.org/web/20131226111423/http://developer.berlios.de/projects/n8vbvcomdriver/ |archive-date=2013-12-26 }}</ref> 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 only by computer performance and network speed * Virtual connections over local network or Internet, mitigating cable length restrictions * Virtually unlimited number of virtual connections * No need for a serial cable * The computer's physical [[serial port]]s remain free For instance, [[DOSBox]] has allowed older [[DOS]] games to use virtual null modems. Another common example consists of Unix [[pseudoterminal]]s (pty) which present a standard [[Tty (Unix)|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]] * [[Debugging]] * [[Direct cable connection]] * [[LapLink cable]] * [[Rollover cable]] * [[Serial Line Internet Protocol]] ==References== {{Reflist|30em}} ==External links== *{{Commons category-inline|Null modems}} [[Category:Modems]] [[Category:Multiplayer null modem games| ]] [[Category:Out-of-band management]] [[fr:Modem#Modem nul]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite web
(
edit
)
Template:Clear
(
edit
)
Template:Commons category-inline
(
edit
)
Template:Multiple image
(
edit
)
Template:N/a
(
edit
)
Template:Reflist
(
edit
)
Template:See also
(
edit
)
Template:Short description
(
edit
)