On 10/28/2016 5:17 PM,
anti...@math.uni.wroc.pl wrote:
> Don Y <blocked...@foo.invalid> wrote:
>>
>> [Originally, RTS/CTS were used to handshake the flow of data from
>> DTE to DCE: RTS to indicate a *desire* to send data to the DCE;
>> CTS to indicate a *willingness* to ACCEPT data from the DTE. I.e.,
>> assert RTS, wait for CTS, send data as long as CTS is valid. There
>> was not a similar handshake from DCE to DTE!
>
> AFAICS DTR and DTS where used for DCE to DTE handshake
Remember, the standard was originally intended to allow big blue and ma
bell to talk to each other. (e.g., Bell 103 modem) Trying to relate
this to EIA232F changes lots of basic assumptions (e.g., lots of
interface signals are no longer in play!)
[Speaking historically...]
The "data terminal" *was* a "terminal" -- an electroMECHANICAL device.
DTR was asserted at the start of an exchange with the attached MODEM
(DCE) device to indicate the DTE's (TTY) willingness to enter into a
conversation. I.e., "ready to receive an incoming call, or initiate
an outgoing call (via an ACU ion the modem)".
For an incoming call, eventually, the MODEM informs the TTY of its
detection of a ring signal (RI == Ring Indicator). Note that
RI almost literally means "the bell in the phone is ringing NOW...
and now it has stopped... and now its ringing again, etc." I.e.,
the DTE can actually sense the ring *pattern*, not just the fact
that there is a call coming in. It is up to the TTY to determine
when and if the call will be answered (e.g., wait for the 6th ring).
The TTY asserts DTR to "wake up" the MODEM (in some MODEM chipsets, the
DTR *input* is essentially a RESET signal; when not asserted, the MODEM
chipset is HELD RESET!) Once the MODEM "powers up", it asserts DSR (Data
SET Ready). I.e., DTR and DSR just say "Hello, I am alive and well"
for each of their respective parties.
When the TTY wants to send data to the MODEM, it asserts RTS (REQUESTING
the go-ahead to send data). When the MODEM is ready to handle that data,
it replies by asserting CTS ("It's OK for you to send that data, now!")
At any time, the TTY can drop DTR and the MODEM will hangup!
As the remote device can also hangup at any time, the MODEM signals
that fact to the TTY by dropping DCD (Data Carrier Detected -- connection
broken!).
The process can not restart until the DTR signal is dropped (to RESET
the MODEM). And, the MODEM will acknowledge this by dropping DSR.
The RTS/CTS signals are similarly interlocked.
You have to remember that the original MODEMs were little more than
analog circuits. These interface signals directly controlled them and
reported their state. All of the "smarts" controlling the sequencing
was implemented in the TTY (DTE) device. The MODEM simply MOdulated
and DEModulated the analog signals on the PSTN. Look at the physical
size of a 103 modem and remember that it was built before SMT components.
So, each resistor was larger than a SOIC8! In fact, the "IC" had
only been invented a few years earlier!!
[Imagine how large the MODEM would have had to be if it had real
*smarts* inside it!]
E.g., RTS effectively turned *on* the transmit carrier. The MODEM told the
TTY that the Tx carrier had been turned on and was now ready to be MODULATED
by returning CTS. Thereafter, the incoming data (TxD) would directly control
the modulation of that carrier -- using the timing inherent in the TxD signal!
(i.e., if you mucked with the individual bit times, the MODEM
conveyed that to the remote DCE! Note that, nowadays, the presence
of an MCU *inside* a MODEM allows the DCE-DTE interface to run at a
different data rate than the DCE-DCE interface -- slower OR faster!)
Note that dropping RTS would result in the MODEM dropping CTS!
This is consistent with the above explanation: the MODEM is
telling the TTY that it is no longer monitoring the TxD signal
to control the Tx carrier.
If you encounter such a device, nowadays, chances are your
"driver" will choke because of these sorts of direct controls
of the MODEM's internals. I.e., imagine what would happen if
every time you dropped RTS to signal you were "too busy for more
data" the remote device responded by saying "well, *I* am too
busy for you, too!" And, conversely, when you reasserted RTS,
the remote device reasserted CTS!
Note that the Centronics printer interface's original implementation
also had similar interlocking signals in the protocol -- that are
now largely perverted owing to the increased capabilities of
processors.
>> Now, RTS is effectively
>> RTR: "Ready to Receive", not "Request to Send"! There's a big
>> difference in intent.]
>
> Well, this meaning of RTS corresponds to old DTR. I think
No. "Old DTR" had exactly two state changes per phone call:
turning on at the start and off at the end. By contrast,
RTR turns on and off repeatedly during a "call".
> that current practice is clearer to than old one: when
> I first saw names of handshake lines it was natural for
> me that when "Request to Send" is asserted it means that
> the _other_ end should send data...
Again, you have to evaluate the names in the context of a TTY
talking to a MODEM. And, an *historical* modem, not the sorts
of "modems with computers inside them" that are the norm, today.
Nowadays, we think of everything as being a DTE (TTY/computer role).
That symmetry didn't exist when the standard was originally created;
each end of the RS232 link had very specific responsibilities and
roles.