Null modem
Encyclopedia
Null modem is a communication method to connect two DTE
Data terminal equipment
Data Terminal Equipment is an end instrument that converts user information into signals or reconverts received signals. These can also be called tail circuits. A DTE device communicates with the data circuit-terminating equipment...

s (computer
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...

, terminal
Computer terminal
A computer terminal is an electronic or electromechanical hardware device that is used for entering data into, and displaying data from, a computer or a computing system...

,
printer
Computer printer
In computing, a printer is a peripheral which produces a text or graphics of documents stored in electronic form, usually on physical print media such as paper or transparencies. Many printers are primarily used as local peripherals, and are attached by a printer cable or, in most new printers, a...

 etc.) directly using an RS-232
RS-232
In telecommunications, RS-232 is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE and a DCE . It is commonly used in computer serial ports...

 serial cable
Serial cable
A serial cable is a cable that can be used to transfer information between two devices using serial communication. The form of connectors depends on the particular PHY used...

. The name stems from the historical use of the RS-232 cable to connect two teleprinter
Teleprinter
A teleprinter is a electromechanical typewriter that can be used to communicate typed messages from point to point and point to multipoint over a variety of communication channels that range from a simple electrical connection, such as a pair of wires, to the use of radio and microwave as the...

 devices to modem
Modem
A modem is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information. The goal is to produce a signal that can be transmitted easily and decoded to reproduce the original digital data...

s in order to communicate with one another; null modem communication was possible by instead using RS-232
RS-232
In telecommunications, RS-232 is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE and a DCE . It is commonly used in computer serial ports...

 to connect the teleprinters directly to one another.

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
Data circuit-terminating equipment
A data circuit-terminating equipment is a device that sits between the data terminal equipment and a data transmission circuit. It is also called data communications equipment and data carrier equipment...

 e.g. a modem
Modem
A modem is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information. The goal is to produce a signal that can be transmitted easily and decoded to reproduce the original digital data...

. With a null modem connection the transmit
Transmission (telecommunications)
Transmission, in telecommunications, is the process of sending, propagating and receiving an analogue or digital information signal over a physical point-to-point or point-to-multipoint transmission medium, either wired, optical fiber or wireless...

 and receive lines are crosslinked. Depending on the purpose, sometimes also one or more handshake
Handshaking
In information technology, telecommunications, and related fields, handshaking is an automated process of negotiation that dynamically sets parameters of a communications channel established between two entities before normal communication over the channel begins...

 lines are crosslinked. Several wiring layouts are in use because the null modem connection is not covered by a standard
Standardization
Standardization is the process of developing and implementing technical standards.The goals of standardization can be to help with independence of single suppliers , compatibility, interoperability, safety, repeatability, or quality....

.

Origin

Originally, the RS-232 standard was developed and used for teleprinter
Teleprinter
A teleprinter is a electromechanical typewriter that can be used to communicate typed messages from point to point and point to multipoint over a variety of communication channels that range from a simple electrical connection, such as a pair of wires, to the use of radio and microwave as the...

 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 adaptor itself as well as the connection method.

Cables and adapters

A null modem cable is an RS-232 serial cable
Serial cable
A serial cable is a cable that can be used to transfer information between two devices using serial communication. The form of connectors depends on the particular PHY used...

 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
Adapter (computing)
In computing, adapter is a hardware device or software component that converts transmitted data from one presentation form to another. The data presentation can be, for example, a message sent between objects in an application or a packet sent through a network.In modern personal computer, almost...

. The adapter contains the necessary crosslinks between the signals.

Pin mapping

This is one very common mapping which will work with software that relies on proper assertion of the CD signal.
Signal Name and AbbreviationDB-25 Pin DE-9
D-subminiature
The D-subminiature or D-sub is a common type of electrical connector. They are named for their characteristic D-shaped metal shield. When they were introduced, D-subs were among the smaller connectors used on computer systems....

 Pin
DirectionDE-9 Pin DB-25 PinSignal Name Abbreviation
Frame Ground
Ground (electricity)
In electrical engineering, ground or earth may be the reference point in an electrical circuit from which other voltages are measured, or a common return path for electric current, or a direct physical connection to the Earth....

 (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
Single-ended signalling
Single-ended signaling is the simplest and most commonly used method of transmitting electrical signals over wires. One wire carries a varying voltage that represents the signal, while the other wire is connected to a reference voltage, usually ground....

 
SG 7 5 5 7 SG
Data Set Ready  DSR 6 6 < 4 20 DTR
Data Carrier Detect
Data Carrier Detect
Data Carrier Detect, abbreviated as DCD, or alternately Carrier Detect abbreviated as CD, is a control signal present inside an RS-232 serial communications cable that goes between a computer and another device, such as a modem. This signal is a simple "high/low" status bit that is sent "from DCE...

 (CD)
DCD 8 1
Data Terminal Ready
Data Terminal Ready
Data Terminal Ready, abbreviated as DTR, is a control signal present inside an RS-232 serial communications cable that goes between a computer and another device, such as a modem...

 
DTR 20 4 > 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 DTE's (or two DCE's) needed to communicate with each other, then a null modem was necessary.

Null modems were commonly used for file transfer
File transfer
File transfer is a generic term for the act of transmitting files over a computer network or the Internet. There are numerous ways and protocols to transfer files over a network. Computers which provide a file transfer service are often called file servers. Depending on the client's perspective the...

 between computers, or remote operation. Under the Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

, the direct cable connection
Direct cable connection
Direct Cable Connection , is a feature of Microsoft Windows that allows a computer to transfer and share files with another computer, via a connection using either the serial port, parallel port or the infrared port of each computer...

 can be used over a null modem connection. The later versions of MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

 were shipped with the InterLnk program. Both pieces of software allow the mapping of a hard disk
Hard disk
A hard disk drive is a non-volatile, random access digital magnetic data storage device. It features rotating rigid platters on a motor-driven spindle within a protective enclosure. Data is magnetically read from and written to the platter by read/write heads that float on a film of air above the...

 on one computer as a network drive on the other computer. No Ethernet hardware
Hardware
Hardware is a general term for equipment such as keys, locks, hinges, latches, handles, wire, chains, plumbing supplies, tools, utensils, cutlery and machine parts. Household hardware is typically sold in hardware stores....

 (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
Ethernet
Ethernet is a family of computer networking technologies for local area networks commercially introduced in 1980. Standardized in IEEE 802.3, Ethernet has largely replaced competing wired LAN technologies....

 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
FIFO
FIFO is an acronym for First In, First Out, an abstraction related to ways of organizing and manipulation of data relative to time and prioritization...

 buffers and an interrupt service routine). KGDB
KGDB
KGDB is a debugger for the Linux kernel. It requires two machines that are connected via a serial connection. The serial connection may either be an RS-232 interface using a null modem cable, or via the UDP/IP networking protocol .KGDB was originally implemented as a patch to Linux kernel, but it...

 for Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

, ddb for BSD and WinDbg or KD
WinDbg
WinDbg is a multipurposed debugger for Microsoft Windows, distributed on the web by Microsoft. It can be used to debug user mode applications, drivers, and the operating system itself in kernel mode...

 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
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

 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).

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
Rollover cable
Rollover cable is a type of null-modem cable that is most commonly used to connect a computer terminal to a router's console port. This cable is typically flat to help distinguish it from other types of network cabling...

" that just reverses pins 1 through 8 on one end to 8 through 1 on the other end.

No hardware handshaking

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
Flow control
In data communications, flow control is the process of managing the pacing of data transmission between two nodes to prevent a fast sender from outrunning a slow receiver. It provides a mechanism for the receiver to control the transmission speed, so that the receiving node is not overwhelmed with...

 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 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
Hardware
Hardware is a general term for equipment such as keys, locks, hinges, latches, handles, wire, chains, plumbing supplies, tools, utensils, cutlery and machine parts. Household hardware is typically sold in hardware stores....

 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
    Serial cable
    A serial cable is a cable that can be used to transfer information between two devices using serial communication. The form of connectors depends on the particular PHY used...

     is needed.
  • The computer's physical serial port
    Serial port
    In computing, a serial port is a serial communication physical interface through which information transfers in or out one bit at a time...

    s remain free.


For instance, DOSBox
DOSBox
DOSBox is emulator software that emulates an IBM PC compatible computer running MS-DOS. It is intended especially for use with old PC games. DOSBox is free software....

 has allowed older DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

 games to use virtual null modems.

Another common example consists of unix pseudo terminal
Pseudo terminal
In some operating systems, including Unix, a pseudo terminal is a pseudo-device pair that provides a text terminal interface without an associated device, such as a virtual console, computer terminal or serial port...

s (pty) which present a standard tty
Tty (Unix)
tty is a Unix command that prints to standard output the name of the terminal connected to standard input. The name of the program comes from teletypewriter, abbreviated "TTY".When the program runs, it will output something like this:$ tty/dev/pts/4...

 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
    Crossover cable
    A crossover cable connects two devices of the same type, for example DTE-DTE or DCE-DCE, usually connected asymmetrically , by a modified cable called a crosslink...

  • Rollover cable
    Rollover cable
    Rollover cable is a type of null-modem cable that is most commonly used to connect a computer terminal to a router's console port. This cable is typically flat to help distinguish it from other types of network cabling...

  • Direct cable connection
    Direct cable connection
    Direct Cable Connection , is a feature of Microsoft Windows that allows a computer to transfer and share files with another computer, via a connection using either the serial port, parallel port or the infrared port of each computer...

  • Debugging
    Debugging
    Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge...

  • Serial Line Internet Protocol
    Serial Line Internet Protocol
    The Serial Line Internet Protocol is an encapsulation of the Internet Protocol designed to work over serial ports and modem connections. It is documented in RFC 1055...

  • LapLink cable
    LapLink cable
    A LapLink cable is a cable that allows one to connect two computers together to establish a direct cable connection. The connection is achieved via the parallel ports on the two computers. No networking hardware such as a network interface card or a modem are required...

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK