When we look at the connector pinout of the RS232 port, we see two pins which are certainly used



Similar documents
RS-232 COMMUNICATIONS

HelpAndManual_unregistered_evaluation_copy USER'S MANUAL

RJ45 Shielded (standard) port pinout. CS9000, Jetstream , Lanstream 2000, RTA8/RJX, RRC16, MTA8/RJX & SXDC8/RJX

Cabling Guide for Console and AUX Ports

isco Connecting Routers Back to Back Through the AUX P

PCMCIA 1 Port RS EDITION OCTOBER 1999

Advanced Data Capture and Control Systems

Cable Specifications and Information

Encore Controller to Router Connections

How to setup a serial Bluetooth adapter Master Guide

WHQL Certification Approval...2 User Interface...3 SUNIX s COMLab..4

Serial Cables & Adapters

Cable Guide. Click on the subject to view the information. Digi Cables Building Cables General Cable Information

Cable Pinouts. SRP I/O Module

Using HyperTerminal with Agilent General Purpose Instruments

Cable Specifications and Information

RS232C < - > RS485 CONVERTER S MANUAL. Model: LD15U. Phone: / 97 / 98 (M)

Application Note 83 Fundamentals of RS 232 Serial Communications

LS-101 LAN to Serial Device server. User s Manual

Configuring IP to Serial with Auto Answer and Serial to IP

Manual Serial PCI Cards

Appendix A. This Appendix includes the following supplemental material:

ELAN DIGITAL SYSTEMS LTD. SL232 PC- CARD USER S GUIDE

Why you need to monitor serial communication?

The Secrets of Flow Control in Serial Communication

Elo Interactive Digital Signage (IDS): Remote Management

RS-232 Communications Using BobCAD-CAM. RS-232 Introduction

Dial-Up / Leased-Line Modem. User Manual. AGM Electronics, Inc Dial-Up / Leased-Line Modem, Series ( ) Manual Rev A + - DLM CTS RTS DTR DSR

Docklight Pro Monitor User Manual 10/2015

Remote Serial over IP Introduction on serial connections via IP/Ethernet

Quectel Cellular Engine

Comtrol Cable User Guide

Instructions on How to Use HyperTerminal to Test Serial Ports ...

Using a Laptop Computer with a USB or Serial Port Adapter to Communicate With the Eagle System

version 3.1. Security modem with USB port user guide

Connector and Cable Specifications

16-Port RS232 to USB2.0 High Speed Multi Serial Adapter (w/ Metal Case) Installation Guide

How to setup a serial Bluetooth adapter

TRP-C31M MODBUS TCP to RTU/ASCII Gateway

1 Port FTDI USB to RS232 Null Modem Adapter

RJ11 RS-232 Interface

Technical Note #14. Phone Modem Device Support. GE ED&C Home Search ED&C GE ED&C Power Management Home GE ED&C PMCS Home

BLUETOOTH SERIAL PORT PROFILE. iwrap APPLICATION NOTE

Making a DB to RJ45 adapter.

Accessing Diagnostics using a Dialup Modem

Hardware Reference. Linux Device Server IGW/922 with DIL/NetPC ADNP/9200

Configuring the Siemens TC35 modems for use with the MI2292

Objectives. Basics of Serial Communication. Simplex vs Duplex. CMPE328 Microprocessors (Spring ) Serial Interfacing. By Dr.

WHQL Certification Approval...2 User Interface K software FIFO 4 Universal PCI Interface...5 Ready for 64-bit System...5

TCP/IP MODULE CA-ETHR-A INSTALLATION MANUAL

Date Rev. Details Author

AutoWAVE. Programming Instructions P/N Part of Thermo Fisher Scientific. Revision D

Timeout The Crosspoint Status Request message has a timeout, which means that you need to wait 1 second in between request messages.

Connecting the Console Port to a PC

RS232 Board datasheet

Modbus Communications for PanelView Terminals

Module Connectors and Cable Specifications

2012 uptimedevices.com

Serial to Bluetooth Adapter

The Analyst RS422/RS232 Tester. With. VTR, Monitor, and Data Logging Option (LOG2) User Manual

RS-422/485 Multiport Serial PCI Card. RS-422/485 Multiport Serial PCI Card Installation Guide

Connecting Serial Interface Cards to a Network

Low Speed Modems for Dial and Leased Circuits 2400E-2 (Stand Alone) 2400R-2 (Rack Mount) 2400E-4 (Stand Alone) 2400R-4 (Rack Mount)

Cable Connection Procedures for Cisco 1900 Series Routers

RS-232 Baud Rate Converter CE Model 232BRC Documentation Number 232BRC-3903 (pn5104-r003)

IPG/7700 Hardware Manual SYSTECH. Document number Revision A

Cable Guide Including all PortServer TS, Digi Connect, and Digi One Products

Application Note 2. Using the TCPDIAL & TCPPERM Commands to Connect Two TransPort router Serial Interfaces Over TCP/IP.

Industrial Multi-port Serial Cards

LOW COST GSM MODEM. Description. Part Number

1. Make sure that no client accounts are open. 2. Click on Setup, then click Modem. The Modem Setup window will appear.

XPort Universal Demo Board User Guide

SUDT AccessPort TM Advanced Terminal / Monitor / Debugger Version 1.37 User Manual

By4750. USB Serial Converter (RS232 RS485)

2-Port RS232/422/485 Combo Serial to USB2.0 Adapter (w/ Metal Case and Screw Lock Mechanism) Installation Guide

RS-232 to TTL Converter Cables SuperDroid Robots

White Paper. Technical Capabilities of the DF1 Half-Duplex Protocol

2100 POS System User Guide

Data Cables. Schmitt TTL LABORATORY ELECTRONICS II

DB9-USB-RS232 Module. Male & Female. Datasheet

Fanuc 0 M/T Model C Serial (RS232) Connection Guide

MDM192 MULTI-DROPS DIGITAL MODEM FOR PRIVATE LINE. USER GUIDE Document reference :

OFF-LINE COMMUNICATIONS WITH CINCINNATI EQUIPMENT Pg. 1 of 5

MS830 / MS833 Barcode Reader v1.0 9-December-2014

BIT COMMANDER. Serial RS232 / RS485 to Ethernet Converter

Technical Manual. For use with Caller ID signaling types: Belcore 202, British Telecom, & ETSI

LTM-1338B. Plus Communications Manual

Cable Guide For all PortServer TS, Digi Connect, and Digi One Products

Cable Guide For all PortServer TS, Digi Connect, and Digi One Products

LINDY ELECTRONICS LIMITED & LINDY-ELEKTRONIK GMBH - SECOND EDITION

Chapter 13: Internet Connectivity

Siemens DECT Engine MD32. Product Description. Information and Communication Products

Revision Date: September 19, 2006

Programming and Using the Courier V.Everything Modem for Remote Operation of DDF6000

Moxa TCC-100/100I User s Guide

Application Bulletin

32 Transferring Projects and Data

Teleservice via RS232 interface XC100/XC200

POS Integration. Prepared by: Binh Nguyen

ECcom. Signal Monitor Communications Software Operations Manual

Transcription:

1 Null modem - an introduction Serial communications with RS232 1. One of the oldest and most widely spread communication methods in computer world. The way this type of communication can be performed is pretty well defined in standards. I.e. with one exception. The standards show the use of DTE/DCE communication, the way a computer should communicate with a peripheral device like a modem. For your information, DTE means data terminal equipment (computers etc.) where DCE is the abbreviation of data communication equipment (modems). One of the main uses of serial communication today where no modem is involved?a serial null modem configuration with DTE/DTE communication?is not so well defined, especially when it comes to flow control. The terminology null modem for the situation where two computers communicate directly is so often used nowadays, that most people don t realize anymore the origin of the phrase and that a null modem connection is an exception, not the rule. In history, practical solutions were developed to let two computers talk with each other using a null modem serial communication line. In most situations, the original modem signal lines are reused to perform some sort of handshaking. Handshaking can increase the maximum allowed communication speed because it gives the computers the ability to control the flow of information. High amounts of incomming data is allowed if the computer is capable to handle it, but not if it is busy performing other tasks. If no flow control is implemented in the null modem connection, communication is only possible at speeds at which it is sure the receiving side can handle the amount information even under worst case conditions. 2 Original use of RS232 When we look at the connector pinout of the RS232 port, we see two pins which are certainly used for flow control. These two pins are RTS, request to send and CTS, clear to send. With DTE/DCE communication (i.e. a computer communicating with a modem device) RTS is an output on the DTE and input on the DCE. CTS is the answering signal comming from the DCE. Before sending a character, the DTE asks permission by setting its RTS output. No information will be sent until the DCE grants permission by using the CTS line. If the DCE cannot handle new requests, the CTS signal will go low. A simple but useful mechanism allowing flow control in one direction. The assumption is, that the DTE can always handle incomming information faster than the DCE can send it. In the past, this was true. Modem speeds of 300 baud were common and 1200 baud was seen as a high speed connection. For further control of the information flow, both devices have the ability to signal their status to the other side. For this purpose, the DTR data terminal ready and DSR data set ready signals are present. The DTE uses the DTR signal to signal that it is ready to accept information, whereas the DCE uses the DSR signal for the same purpose. Using these signals involves not a small protocol of requesting and answering as with the RTS/CTS handshaking. These signals are in one direction only. The last flow control signal present in DTE/DCE communication is the CD carrier detect. It is not used directly for flow control, but mainly an indication of the ability of the modem device to communicate with its counter part. This signal indicates the existence of a communication link between two modem devices. 1 The sourse of this document is http://www.lammertbies.nl/comm/info/rs-232 null modem.html 1

3 Null modem without handshaking How to use the handshaking lines in a null modem configuration? The simplest way is to don t use them at all. In that situation, only the data lines and signal ground are cross connected in the null modem communication cable. All other pins have no connection. An example of such a null modem cable without handshaking can be seen in the figure below. Figure 1: Simple null modem without handshaking 3.1 Compatibility issues 2 3 Rx Tx 3 2 Tx Rx If you read about null modems, this three wire null modem cable is often talked about. Yes, it is simple but can we use it in all circumstances? There is a problem, if either of the two devices checks the DSR or CD inputs. These signals normaly define the ability of the other side to communicate. As they are not connected, their signal level will never go high. This might cause a problem. The same holds for the RTS/CTS handshaking sequence. If the software on both sides is well structured, the RTS output is set high and then a waiting cycle is started until a ready signal is received on the CTS line. This causes the software to hang because no physical connection is present to either CTS line to make this possible. The only type of communication which is allowed on such a null modem line is data-only traffic on the cross connected Rx/Tx lines. This does however not mean, that this null modem cable is useless. Communication links like present in the Norton Commander program can use this null modem cable. This null modem cable can also be used when communicating with devices which do not have modem control signals like electronic measuring equipment etc. As you can imagine, with this simple null modem cable no hardware flow control can be implemented. The only way to perform flow control is with software flow control using the XOFF and XON characters. 4 Null modem with loop back handshaking The simple null modem cable without handshaking shows incompatibilities with common software. The main problem with this cable is that there is a possibility for the software to hang if it checks the modem signal lines in a proper way. I.e. with this null modem cable, good written programs will perform worse than badly written programs. 2

To overcome this problem and still be able to use a cheap null modem communication cable with only three lines in it, a fake null modem cable layout has been defined. The null modem cable with loop back handshaking resulted from this. Figure 2: Null modem with loop back handshaking 2 3 Rx Tx 3 2 T x Rx 1 + 4 + 6 - DTR CD + DTR - 1 + 4 + 6 DTR CD + DTR 7 + 8 - RTS CTS - 7 + 8 RTS CTS The main purpose of this null modem cable is to let well defined software think there is handshaking available, with a null modem cable which has no provisions for it. 4.1 Compatibility issues Consider first the DSR signal (pin 6). This input indicates that the other side is ready to start communicating. In the layout, the line is linked back to the DTR output (pin 4). This means, that the software doesn t see the ready signal of the other device, but its own. The same holds for the CD input (pin 1). The assumption is, that if software has been written to check the DSR line to test communication availability, it will probably also set the DTR output to indicate its own state. This is true for at least 99% of all serial communication software. This implies that at least 99% of all serial communication software is capable of faking its own DSR check with this null modem cable. The same trick is used with the CTS input. In the original use, RTS is set, and then CTS is checked before starting the communication. By setting the RTS output (pin 7) the CTS input on the same connector (pin 8) is receiving clearance immediately. There is no possibility of a software hangup because of dangling RTS requests. 4.2 Other issues to consider The null modem cable with loop back handshaking is often advised as the best low cost available null modem cable. But, is it really so good? The simple null modem cable without handshaking has the disadvantage that it does not permit proper written software to communicate with it. Software which is aware of the lack of handshaking signals can however use it without problems. The null modem cable with loop back handshaking can be used with more software, but it has no functional enhancements over the simple cable! There is no way both devices can control data 3

flow, other than by using XON/XOFF handshaking. If the software is designed for using hardware flow control it seems to work with this null modem cable, but on unpredictable moments, data loss may occur. This means that the null modem cable allows communication as long as no flow control is needed, but when data speeds reach the limit the receivers can handle, communication may stop immediately without an assignable reason. Therefore, although this null modem cable is cheap and easy to make, use it with care! Despite these warnings, this type of null modem cable has been used successfully between Windows 95/98/ME computers with a Direct Cable Connection. 5 Null modem with partial handshaking The simple null modem cable and the null modem cable with loop back handshaking are useful, but have no provisions for hardware flow control. If it is absolutely necessary that hardware flow control is used, the null modem with partial handshaking can be an alternative. Figure 3: Null modem with partial handshaking 5.1 Compatibility issues 1 7 + 8 RT S 2 CT S 2 +CD 1 2 3 Rx T x 3 2 T x Rx 4 6 DT R DSR 6 4 DSR DT R 7 + 8 1 RT S 1 CT S 1 +CD 2 This null modem cable is the best of two worlds. There is the possibility of hardware flow control without being incompatible with the original way flow control was used with DTE/DCE communication. Let us first consider the RTS/CTS flow control lines present on pins 7 and 8. As with the loop back null modem cable, these signals are not connected to the other device, but directly looped back on the same connector. This means, that RTS/CTS flow control is allowed to be used in the software, but it has no functional meaning. Only when the software at the other side checks the CD signal at pin 1, the RTS information will reach the other device. This would however be only the case in specifically developed software which uses the CD input for this purpose. More important however is the cross connection of the DSR (pin 6) and DTR (pin 4) lines. By cross connecting these lines, their original function is simulated pretty well. The DTR output is used to signal the other device that communication is possible. This information is read on the DSR input, the same input used for this purpose with modem communication. Because of this cross connection, the DTR output line can be used for simple flow control. Incomming data is allowed when the output is set, and blocked if the output is not set. 4

Software using only the RTS/CTS protocol for flow control cannot take advantage of the partial handshaking null modem cable. Most software however will also check the DSR line and in that case?when using the null modem cable with partial handshaking?the best possible hardware flow control can be achieved which is still compatible with the original use with modems. 6 Null modem with full handshaking The most expensive null modem cable is the null modem cable suitable for full handshaking. In this null modem cable, seven wires are present. Only the ring indicator RI and carrier detect CD signal are not linked. The cable is shown in the following figure. Figure 4: Null modem with full handshaking 6.1 Compatibility issues 2 3 Rx T x 3 2 T x Rx 4 6 DT R DSR 6 4 DSR DT R 7 8 RT S CT S 8 7 CT S RT S The null modem cable with full handshaking does not permit the older way of flow control to take place. The main incompatibility is the cross connection of the RTS and CTS pins. Originally, these pins are used for a question/answer type of flow control. When the full handshaking null modem cable is used, there is no request anymore. The lines are purely used for telling the other side if communication is possible. The main advantage of this cable is, that there are two signalling lines in each direction. Both the RTS and DTR outputs can be used to send flow control information to the other device. This makes it possible to achieve very high communication speeds with this type of null modem cable, provided that the software has been designed for it. Because of the high possible connection speed, this null modem cable can be used with Interlink to connect two MS-DOS PC s. This is the type of cable Microsoft recommends for the direct cable connection in their knowledge base article. For the DB9 connector they also added a connection of DTR to CD on each connector but they didn t define this connection for the DB25 connector version and they also didn t mention the CD input in the descriptive text, so it is safe to leave the CD input disconnected. 5

7 Null modem layout selection table The right null modem cable to choose mainly depends on the application and the software that will be used. As a general guide line, I would advise the following. Table 1: Choose your null modem cable Cable without Loop back Partial Full handshaking handshaking handshaking handshaking Software flow +++ ++ + + control only DTE/DCE compatible hardware flow control - +++ ++ - at low speeds High speed communication - - ++ +++ using special software +++ Recommended cable, ++ Good alternative, + Works, but not recommended, - Does not work. The null modem cable with partial handshaking works in most cases. If you are developing software which must work with all kinds of cables, it is best to use software flow control only and ignore all modem control inputs. An easily-understood, workable falsehood is more useful than a complex, incomprehensible truth. THUMB S SECOND POSTULATE 6