RS232 - what's the difference between RTS/CTS & DSR/DTR?

Thread Starter

strantor

Joined Oct 3, 2010
5,329
I attempted to use a pair of serial extender devices and they did not work for me. They did not work because they only transmit RX, TX, RTS, CTS. The particular device I needed to communicate with, requires RX, TX, DSR, DTR. So I made my own serial cables which route DSR/DTR to the normal RTS/CTS pins, and that did not work either. I tried every possible combination of crossover/straight through, on both ends, nothing worked.

I confirmed that they DO work, so long as both devices are configured to use RTS/CTS, but the devices will not transmit a DSR/DTR signal the same way. I concluded that the two signals must be fundamentally different in some way. They are both digital signals, correct? Are the levels different? Is one a pulse train rather than a steady signal? What's the difference?
 

MaxHeadRoom

Joined Jul 18, 2013
21,402
Normally theTX end RTS is connected to the CTS on the RX side and vice-versa for a dual connection
For a non handshake method, the Hand shake is jumpered each end, RTS to CTS and DSR & DCD & DTR jumpered.
In this day and age, with fast transmission, Handshake is rarely used.
Max.
 

Papabravo

Joined Feb 24, 2006
14,393
DSR/DTR (Data Set Ready/Data Terminal Ready) are signals that refer to the device as a whole. RTS/CTS (Request To Send/Clear to Send) are used for devices that are half duplex and operate on a character by character basis or sometime on a message by message basis. when you connect something to RTS/CTS it has to behave in the way the receiver expects. Don't know what a cross connected cable will do unless both sides are bit banging those control lines.

EDIT: Half-duplex communication is a rarity these days with everyone using buffered FIFO's on receivers.
 

andrewmm

Joined Feb 25, 2011
572
rs232 is extremely well defined,
and in the process, very confusing,

Take the fact that no where in the spec is there defined what a 1 and a 0 is, thats in seperate specs,

It owes its history to the days of tele types,
over 100 years back,

The basis is that a DTE ( data terminal equipment ) is talking to a DCE ( Data Circuit-terminating equipment ) !

typically we'd think of a DTE as the computer, and a DCE as the teletype.

A DTE has a male connector, and a DCE has a female connector.
Used to be a 25 pin connector, but then moved to 9 pin , and lately has all but died.

In theory , all you need to get a link to work , is to connect the Tx from the DTE to the Rx of the DCE, and the Tx of the DCE to the Rx of the DTE, and join the earths.

Then you have to get the number of bits right , the parity on / off and the stop bits, 0,1, 1 1/2 or 2. and the baud rate .

Then the fun starts.

Its not so true now days, but you could imagine the computer sending when the teletype had no paper, in other words it was not ready, or the teletype could be wanting data, it was requesting,

thats where the other control lines come in,

there's even a Ri, ring indicator, that allows a modem ( a DCE ) to wake the computer to receive a call when its rung.

In theory, a DTE should not send data unless its told it can,
but no one uses the control lines now days,

Im farily certain you don't need anything apart from the Rx, Tx and gnd.
 

MaxHeadRoom

Joined Jul 18, 2013
21,402
The last time used H.S. was back in the days of CNC programs on punched tape. (Reader & Tape Punch).
The H.S. used to either indicate buffer full and to wait until buffer loaded into memory, and the DTR ready when punch/reader is turned on & ready.
Now just the 3 wire RS232 cable is used.
Max..
 

nsaspook

Joined Aug 27, 2009
7,587
...
In theory, a DTE should not send data unless its told it can,
but no one uses the control lines now days,

Im farily certain you don't need anything apart from the Rx, Tx and gnd.
RTS/CTS (DSR/DTR are visages of the dinosaur era) flow control should be used IMO for BLE (and most wireless) raw UART interfaces if the host-to-module flow control hardware is available (many controllers have this functionality). Some modules have sufficient buffering to prevent most overflow issues with the proper software monitoring but many do not.
http://www.summitdata.com/blog/uart-flow-control-rtscts-necessary-proper-operation-wireless-modules/
https://www.silabs.com/documents/public/application-notes/an0059.0-uart-flow-control.pdf
 

Thread Starter

strantor

Joined Oct 3, 2010
5,329
Thanks everyone for all the info. I am aware that DSR/DTR is ancient, and I assure you that it is required for this device. I can modify baud, parity, data bits and stop bits, but cannot modify the requirement for DSR/DTR. The device is a Markem Imaje 9042 inkjet coder. It's a printer that shoots ink like a gun at things some distance away. It is used on a conveyor to label 50lb sacks as they pass by. This one is brand new but the model/family has been around for a long time and the RS232 function is only there because it's always been there. I suppose it's probably only retained to support legacy interfacing equipment and if I called tech support they wouldn't even know it had a serial port, and have to send for that one guy who has been with the company for 50+ years and refuses to retire.

I've read through the links provided and I do not see anything that stands out as a fundamental difference between DSR/DTR and RTS/CTS. They're both digital signals that change state prior to a message and revert after. I do not see why a device designed to amplify/transmit one signal over CAT5 wouldn't work just as well for the other. So if I really want this burning curiosity quenched I think my only option is to break out the oscilloscope and see what's going on before & after each converter.
 

nsaspook

Joined Aug 27, 2009
7,587
The classic DB25 hardware flow loopback looks like this.

If you really need the D-signals then a proper three pin loop-back connection is needed in addition to the two pin RTS/CTS loop-back.
 

Thread Starter

strantor

Joined Oct 3, 2010
5,329
The classic DB25 hardware flow loopback looks like this.

If you really need the D-signals then a proper three pin loop-back connection is needed in addition to the two pin RTS/CTS loop-back.
I'm puzzled. Why would I need a loop-back?
I'm communicating from a computer (DB9) to the printer. The printer cannot be made to transmit anything, if that's what you're suggesting (make the printer talk to itself for test purposes). The printer must receive a serial command before it will send any response.

The printer does not have a DB25 or a DB9. It's a terminal strip and it has terminals for GND, RX, TX, DSR, DTR, and that's it.
 

nsaspook

Joined Aug 27, 2009
7,587
I'm puzzled. Why would I need a loop-back?
I'm communicating from a computer (DB9) to the printer. The printer cannot be made to transmit anything, if that's what you're suggesting (make the printer talk to itself for test purposes). The printer must receive a serial command before it will send any response.

The printer does not have a DB25 or a DB9. It's a terminal strip and it has terminals for GND, RX, TX, DSR, DTR, and that's it.
It was just an example for the pin connections.

Is your printer similar to this one? If so, are the Jumpers and switches set to RS232?

http://marking.com.ua/INSTRUKCII/MANUAL PRINTERA/Markem-Imaje 9040 Book For Service Engineers.pdf

To interface the printer with the customer network: 1 Ethernet Port (using RJ45 connector) 1 “COM 1” port: optional RS232 communication for special application
 

Thread Starter

strantor

Joined Oct 3, 2010
5,329
It was just an example for the pin connections.

Is your printer similar to this one? If so, are the Jumpers and switches set to RS232?

http://marking.com.ua/INSTRUKCII/MANUAL PRINTERA/Markem-Imaje 9040 Book For Service Engineers.pdf

To interface the printer with the customer network: 1 Ethernet Port (using RJ45 connector) 1 “COM 1” port: optional RS232 communication for special application
Yes, and yes.

I have had it working for a couple of weeks already. I'm running 38.4k, going directly over about 80ft of shielded CAT6 cable. By what I could find on the internet, this should not be possible. I only tried it out of frustration/desperation with these serial extenders. The extender devices are now shelved, but I can't let go of inter-cranial nagging about why they didn't work. And I might not get so lucky on the next install (I have 7 of these to do over the next year, and I have purchased 7 of the extender pairs).
 

andrewmm

Joined Feb 25, 2011
572
Do I understand your sending RS232 data at 38.4K over Cat 6 80 feet ( 25 Meters )?
and your also asking about the DSR / DTR signals.

RS232 is single ended, and no termination. 9600 used to be the standard over cables , and with +- 12 V signalling.
Is this single ended ? I'd say its going to be difficult to get 38.4K over cat 6, the twisting is going to work against you.
Its a long time since I have even tried to get this sort of slow speed over cables , I could be wrong, but it does not feel right to me.

You ask about RTS / CTS v DSR/DTR.
Its a very simple / confusing system that is trying to cater for all eventualities.
Remember we talked about the DTE and the DCE, I always looked at it as
one of the systems was to allow the DTE to control the flow, one was designed for the DCE to control the flow,
If you had both active, then you had a great opportunity for the system to lock up, both ends waiting for the other !
so what tended to happen was one pair was used, and the other dis abled by being wired in the plug "loopback"

You have DSR / DTR.
DSR comes out of the DCE and into the DTE,
in your case its out of the printer, into the "computer "
and is used to indicate the printer is ready to print

DTR comes out of the DTE to the DCE.
in your case out of the computer and into the printer, and says the computer is ready to talk,


your extender, I'm assuming is transparent to the date / controls,
it does not know about the protocol

You have a pins on the extenders, marked RTS / CTS.
so RTS is out of the DTE into the DCE.
It has the same direction as the DTR you need,

CTS is out of DCE and into DTE
it has the same direction as you DSR.

Does that make sense ?
your just using the extender as a transparent link,

Just one last thing,
its caught me out before,
Just check out the extender as to if the RX is an input or an output !

Welcome to the hole that is RS232,
the numbe rof us old times who have a box full of adapters from this to that,
as well as a box with leds on to tell which pins are used.

USB is SO much easier .....
 
Top