Hardware flow control for TTY ports under V.3

Root Boy Jim rbj at uunet.UU.NET
Tue Apr 16 11:50:06 AEST 1991


In article <1991Apr14.202750.22010 at mtxinu.COM> ed at mtxinu.COM (Ed Gould) writes:
?[someone wrote:]
?>There is no portable way to do hardware handshake under UNIX. The
?>termio(7) man page author didn't think of it (this is the only
?>explanation I have for that omission).

Actually, it was tty(4). Termio came later.

?There is exactly one reason that the termio(7) page doesn't describe
?portable hardware flow control.  That reason is that it doesn't
?exist.  The man pages document *existing* systems.  They are not
?specifications for something that doesn't exist.

Well, yes it does. In fact, many UARTS won't even transmit if
CTS isn't high.

?There is also a reason why the termio software doesn't specify or
?support hardware flow control.  When that software was being
?developed, there was a wide variety of types of serial ports
?available.  Some had provisions, for RTS/CTS flow control, but they
?were by far the exception, not the rule.  Many ports had no
?modem-control support at all, some had only carrier detect, and
?some had full support for the signals.  However, what "full support
?for the signals" meant was that the *software* could look at them.

They were cheap copys of the real thing. Sure, you can get by
with only three wires, but real hardware flow control would
have allowed us to use ^Q & ^S as emacs commands.

?This is all consistent with the long-since-adopted EIA RS232C
?standard (note - industry standard, not one person's idea of how
?it should work).  RS232C (while it may be outdated) does not have
?the notion of flow control, per se.  It knows about line turnaround
?for half-duplex systems.  That is what RTS (request to send, sent
?from the DTE - in this case the computer - to the modem) and CTS
?(clear to send, from the DCE - modem - to the computer) were designed
?for.  Hardware flow control came along and coopted those signals
?for other purposes.

For an extension of the same thing. CTS is, as you have mentioned,
"Clear To Send". What does "clear" mean? It could mean yes, you
have the link. But it could also mean, "there is buffer space"
available. It doesn't matter *why* CTS is high or low, just obey it.

?There still exist half-duplex systems in the world.  Would you
?suggest that hardware manufacturers abandon the standard that
?supports them in favor of an ad-hoc solution that works in some
?situations? 

Yes I would. UNIX doesn't *do* half-duplex. But all that equipment
should be destroyed (or at least don't bother me with it's details).
And BTW, I want the tilde bit and the all caps back in my terminal
info word; such things are just not important any longer.

?That's not what I think standards are for.

The key letter in that sentence is the one after the second `d'.
RS232 has been mutated in so many ways that anything is possible.
-- 
		[rbj at uunet 1] stty sane
		unknown mode: sane



More information about the Comp.unix.wizards mailing list