We have an application that needs to check the status of the CTS line
every time a character is received in the UART of the serial port
/dev/ser1. In this application, we are not using hardware nor software
flow control, so the meaning of DTR, DSR, RTS, and CTS is
application-specific. We are talking to an RF modem which sends
information over the serial port, but assigns a special meaning to the
CTS line.
If a character is received from the modem when the CTS line is clear,
the character is interpreted as a DATA byte.
If a character is received from the modem when the CTS line is set, the
character is interpreted as a COMMAND byte.
We cannot change the operation of the RF modem.
We need to be able to reliably read the status of the CTS line at the
time the character was received.
Is there a guaranteed way to do it?
Thx!
Alain.