SIIG 8-port serial boards support
Quoted 8 lines
Quoted 1 line
- conventional RTS/CTS
RTS active = ready to receive
CTS active = allowed to sendQuoted 1 line
- alternative RTS/CTS
RTS active = on before send, off after send
CTS active = allowed to send
Quoted 7 lines
Quoted 1 line
- RS485
RTS active = on before send, off after send (RTS enables driver) CTS ignored (2 wire mode, no CTS)
So maybe the extra control fields would be:
CRTSONTX - RTS on before send, off after send
CTXONCTS - wait for CTS before sending
As someone who's actually used both kinds of modems, here are the issues:
- For RS-485, you have a half-duplex wire, and the response is triggered by the serial data. And some of those industrial controllers respond in less than a character time. You MUST disable the transmitter promptly when finished sending so you can hear the response.
It's also helpful if the receiver is disabled while the transmitter is enabled, but that's negotible.
- For Classic half-duplex RTS/CTS, the DTE (computer) must always accept data, but raises RTS when it wants to send. When it gets CTS, it's allowed to actually send. There are still single-frequency VHF radio modems floating around that work this way. When a modem receives RTS and is not receiving a carrier (CD is deasserted), it enables its transmitter, and waits a programmed receiver-acquisition delay before asserting CTS.
Both of these are variants on the same theme, and I'd suggest expressing them with one additional bit along with the existing CRTSCTS. I'll call it CRTSHDX (RTS half-duplex). It means "assert RTS when we have data to send, and deassert it when we don't". When it's not set, RTS is asserted when we can accept data and deasserted when we can't.
All four combinations are sensible:
CRTSCTS CRTSHDX Handshaking
off off None. (Computer might as well send RTS< but ignores CTS)
on off Full-duplex RTS/CTS
off on RS-485. CTS ignored, RTS enables transmitter.
on on RS-232 half-duplex. RTS is request, CTS is grant.
The upshot is that CRTSCTS controls whether CTS is listened to, and the new CRTSHDX controls the interpretation of RTS. For a three-wire hookup, CRTSRCS must be off and CRTSHDX has no real effect.
Quoted 49 lines · On Fri, Feb 17, 2006 at 05:25:29PM -0500, [email protected] wrote:
Quoted 8 lines
Quoted 1 line
- conventional RTS/CTS
RTS active = ready to receive
CTS active = allowed to sendQuoted 1 line
- alternative RTS/CTS
RTS active = on before send, off after send
CTS active = allowed to sendQuoted 7 lines
Quoted 1 line
- RS485
RTS active = on before send, off after send (RTS enables driver) CTS ignored (2 wire mode, no CTS)
So maybe the extra control fields would be:
CRTSONTX - RTS on before send, off after send
CTXONCTS - wait for CTS before sendingAs someone who's actually used both kinds of modems, here are the issues:
- For RS-485, you have a half-duplex wire, and the response is triggered by the serial data. And some of those industrial controllers respond in less than a character time. You MUST disable the transmitter promptly when finished sending so you can hear the response.
It's also helpful if the receiver is disabled while the transmitter is enabled, but that's negotible.
- For Classic half-duplex RTS/CTS, the DTE (computer) must always accept data, but raises RTS when it wants to send. When it gets CTS, it's allowed to actually send. There are still single-frequency VHF radio modems floating around that work this way. When a modem receives RTS and is not receiving a carrier (CD is deasserted), it enables its transmitter, and waits a programmed receiver-acquisition delay before asserting CTS.
Both of these are variants on the same theme, and I'd suggest expressing them with one additional bit along with the existing CRTSCTS. I'll call it CRTSHDX (RTS half-duplex). It means "assert RTS when we have data to send, and deassert it when we don't". When it's not set, RTS is asserted when we can accept data and deasserted when we can't.
All four combinations are sensible:
CRTSCTS CRTSHDX Handshaking
off off None. (Computer might as well send RTS< but ignores CTS)
on off Full-duplex RTS/CTS
off on RS-485. CTS ignored, RTS enables transmitter.
on on RS-232 half-duplex. RTS is request, CTS is grant.
Quoted 3 lines
The upshot is that CRTSCTS controls whether CTS is listened to, and the new CRTSHDX controls the interpretation of RTS. For a three-wire hookup, CRTSRCS must be off and CRTSHDX has no real effect.
We need to preserve CRTSCTS off = no modem control activity - I'm sure things like old serial mice do not take kindly to having the modem control lines changing state, especially the ones they use to power themselves.
Also, !CRTSCTS is most likely the state used by any existing userspace RS485 implementations which would be using TIOCMBIC/TIOCMBIS to manipulate the RTS signal, so having RTS manipulated in this state would be an undesirable change of behaviour.
Hence, I'm very much in favour of having the default flow control method to preserve in as many ways as possible existing behaviour for CRTSCTS.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Quoted 6 lines · Russell King
Quoted 5 lines · On Fri, Feb 17, 2006 at 05:25:29PM -0500, [email protected] wrote:
CRTSCTS CRTSHDX Handshaking
off off None. (Computer might as well send RTS< but ignores CTS)
on off Full-duplex RTS/CTS
off on RS-485. CTS ignored, RTS enables transmitter.
on on RS-232 half-duplex. RTS is request, CTS is grant.
...
Quoted 8 lines
Also, !CRTSCTS is most likely the state used by any existing userspace RS485 implementations which would be using TIOCMBIC/TIOCMBIS to manipulate the RTS signal, so having RTS manipulated in this state would be an undesirable change of behaviour.
Hence, I'm very much in favour of having the default flow control method to preserve in as many ways as possible existing behaviour for CRTSCTS.
It is important to maintain the "driver doesn't touch RTS/CTS" semantics without regard to other (new) control flags.
An application might read the existing termios, and modify only the bits it is aware of without verifying that new bits are zero. CFLOWXXX also maintains a free setting for future flow modes, such as:
CFLOWZEN = alter RTS based on /dev/random
--
Paul Fulghum
Microgate Systems, Ltd