From: "Tosoni" <jp.tosoni@acksys.fr>
To: 'Krzysztof Halasa' <khc@pm.waw.pl>
Cc: linux-serial@vger.kernel.org
Subject: RE: should RTS init in serial core be tied to CRTSCTS
Date: Wed, 14 Mar 2007 12:07:58 +0100 [thread overview]
Message-ID: <001d01c76629$06da71a0$2e01a8c0@acksys.local> (raw)
In-Reply-To: <m34poq39dg.fsf@maximus.localdomain>
Krzysztof Halasa wrote:
> > It has always been the standard for all modems.
>
> Look, I've been using various modems for many years, starting with
> self-made 300 bps one and there were basically 3 options:
> - no flow control at all (no buffering etc), RTS/CTS disabled/missing,
> - XON/XOFF flow control, RTS/CTS disabled/missing,
> - RTS/CTS handshaking with RTS = modem can send to computer (with
> option to ignore RTS) and CTS = computer can send to modem.
Well, I know well that nowadays all modems use RTS for RX handshake or dont
use it altogether.
But the original meaning was not this (see below), and there are still
devices out there that rely on the original meaning. Should Linux ignore
them ?
>
> > The mistake comes from the
> > fact that the serial ports has been used extensively to
> drive things which
> > are *not* modems (say, printers and VT100 consoles on Unix
> systems). Such
> > devices did not need the standard-specified RTS function.
>
> VT100 and printers are DTE, connections between DTE (without help
> of DCE) are obviously non-standard.
Yes.
>
> > CCITT V24 says about RTS: "...this signal drives the DCE
> and sets it to
> > transmit data..." (translated from french)
> > CCITT V24 does not constraint the DCE to being half or full duplex.
> > CCITT V24 says nothing about using RTS to handle flow control.
>
> Circuit 105 - Request to send
> Direction: To DCE
> Signals on this circuit control the data channel transmit function
> of the DCE. The ON condition causes the DCE to assume the data channel
> transmit mode. The OFF condition causes the DCE to assume the data
> channel non-transmit mode, when all data transferred on circuit 103
> have been transmitted.
Thank you for pointing out the correct text.
You can see that in this text, RTS is used for the transmit function, not
receive. So RX handshake with RTS is nonstandard. But I agree it is in wide
use.
>
> What do you think are "data channel transmit mode" and "non-transmit"
> mode? Obviously the standard doesn't know if it's a radiomodem, RS-485
> style multipoint bus or something else but it's clearly half-duplex -
> full-duplex devices are always in "transmit" and "receive" mode
> simultaneously.
If the standard assumed half-duplex, it would say so.
In fact, in its paragraph 1.3 the standard says explicitely that it can be
used for 4-wires lines. Do you think you need four wires for half-duplex
operation ?
The standard specifies a behaviour that works in both cases (half and full
duplex).
I agree that nowadays, it's important only for half-duplex. But half-duplex
devices *do* exist ! And they rely on this use of RTS.
>
> Does your modem drop carrier when RTS goes?
>
> V.24 assumes DTE is always able to receive data. While it's probably
> the case with PC and Linux, it may not be true with all DTE. With
> strict V.24 DTE has not way to say "I can't take data, stop
> transmitting". Now imagine connecting a serial printer to a PC
> with a pair of DCE.
That is true, I agree that V.24 does not address flow control: this is
because V.24 is a DTE-to-DCE interface (part of layer 1), not a DTE-to-DTE
interface. This is why XON-XOFF has been designed.
It is assumed (remember that the standard is old) that the modem does not
have significant buffering. So it does not need flow control by itself. This
is not the case for the modems which compress data, for example.
>
> >> I've seen such devices quite recently, perhaps ~ 10 years ago.
> >> OTOH I think even "current" PC BIOSes use such signaling.
> >
> > Even Windows implements the CCITT view of RTS, via a flag
> named "RTS_TOGGLE"
>
> Great, meanwhile we don't have it here, but that only means nobody
> is really interested in it.
In fact, there where many requests in the past to handle this, but they did
not make it to the drivers/serial sources.
For example there is a ioctl TIOCSERSETRS485 in the architecture that does
exactly this.
Also I saw several people asking questions as to how to handle this from
user space in a reliable way and the answers were always unsatisfactory
(because of scheduling delays).
Also, recent OXFORD UART components added this in the hardware. Do you
think OXFORD would add hardware features that nobody care about ? We have
customers that care about a lot. Unfortunately there is not way in the Linux
8250 driver to activate this feature. And when I offered to add it, I was
put off by the serial maintainer, for the (bad) reason below.
>
> >> For such signaling, it would perhaps be better to invent
> another flag,
> >> similar to CRTSCTS. The driver would, of course, need some
> real code
> >> for that.
> >
> > Another flag would help to drive modems, yes.
>
> Which modems, exactly? Normal modems work perfectly fine with current
> CRTSCTS and this RTS toggling could only confuse them.
All the bunch of half-duplex serial devices, like radio modems and
pseudo-modems driving an half duplex bus (which are in *wide* use in the
industry)
> A flag alone is no help for half-duplex devices, they would need
> a complete handshaking code.
Not true.
This is also the view of the former maintainer of drivers/serial. But
obviously neither of you used half duplex devices before.
There is no need for handshake, since half duplex is used in master/slave
situations. And I can insure you, that Windows handles this very well, using
only the above-mentioned RTS_TOGGLE flag.
> --
> Krzysztof Halasa
>
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2007-03-14 11:08 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-02 0:03 should RTS init in serial core be tied to CRTSCTS Mike Frysinger
2007-03-04 16:20 ` Robin Getz
2007-03-04 19:46 ` Russell King
2007-03-04 20:42 ` Robin Getz
2007-03-04 20:42 ` Robin Getz
2007-03-05 8:39 ` Russell King
2007-03-05 8:39 ` Russell King
2007-03-05 17:09 ` Mike Frysinger
2007-03-05 17:39 ` Tosoni
2007-03-05 17:56 ` Russell King
2007-03-05 18:13 ` Mike Frysinger
2007-03-06 20:40 ` Krzysztof Halasa
2007-03-06 23:24 ` Robin Getz
2007-03-06 23:24 ` Robin Getz
2007-03-07 12:46 ` Krzysztof Halasa
2007-03-07 13:38 ` Oleksiy Kebkal
2007-03-07 15:19 ` Robin Getz
2007-03-07 21:30 ` Oleksiy Kebkal
2007-03-08 13:44 ` Robin Getz
2007-03-08 13:48 ` Russell King
2007-03-08 14:16 ` Carl-Daniel Hailfinger
2007-03-08 14:20 ` Russell King
2007-03-08 16:51 ` Krzysztof Halasa
2007-03-08 18:43 ` Tosoni
2007-03-08 18:43 ` Tosoni
2007-03-09 20:39 ` Krzysztof Halasa
2007-03-09 20:39 ` Krzysztof Halasa
2007-03-12 9:22 ` Tosoni
2007-03-12 9:22 ` Tosoni
2007-03-12 12:59 ` Krzysztof Halasa
2007-03-12 12:59 ` Krzysztof Halasa
2007-03-14 11:07 ` Tosoni [this message]
2007-03-14 12:44 ` Krzysztof Halasa
2007-03-14 13:45 ` Tosoni
2007-03-14 23:59 ` Krzysztof Halasa
2007-03-08 14:23 ` Oleksiy Kebkal
2007-03-08 14:28 ` Russell King
2007-03-08 14:40 ` Oleksiy Kebkal
2007-03-08 14:25 ` Oleksiy Kebkal
2007-03-08 14:25 ` Oleksiy Kebkal
2007-03-08 20:23 ` Robin Getz
2007-03-08 20:40 ` Russell King
2007-03-08 23:32 ` Robin Getz
2007-03-09 8:57 ` Russell King
2007-03-09 14:18 ` Oleksiy Kebkal
2007-03-07 12:54 ` Oleksiy Kebkal
2007-03-07 13:03 ` Krzysztof Halasa
2007-03-07 20:04 ` Mike Frysinger
2007-03-07 5:13 ` Oleksiy Kebkal
2007-03-07 12:48 ` Krzysztof Halasa
-- strict thread matches above, loose matches on Subject: below --
2007-03-05 8:23 Oleksiy Kebkal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001d01c76629$06da71a0$2e01a8c0@acksys.local' \
--to=jp.tosoni@acksys.fr \
--cc=khc@pm.waw.pl \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.