Re: tty_tiocmset() masks out TIOCM_RI and TIOCM_CD, which breaksrfcomm

From: Alan Cox
Date: Wed Jan 21 2009 - 10:33:22 EST

> TIOCM_CD and TIOCM_RI to the list? Like this:

CD and RI are inputs which is why they are masked.

> Traditionally, RI (Ring Indicator) and CD (Carrier Detect) were
> typically used for DCE -> DTE communication, so perhaps this is why
> they were left off initially. However, when Bluetooth is used to

The cables end up doing the conversion so the PC world always sees them
from the one end - even if they are in fact crossed over in the cable.

> It might be appropriate to include other signals as well, such as CTS
> and DSR. However, these do not seem necessary for rfcomm, since the
> rfcomm driver will interpret a DTR as a DSR and an RTS as a CTS. My
> main concern is for RI and CD, for which there does not seem to be a
> workaround.

I would have expected the driver to be remapping RI/CD just as it does
for the DTR<->DSR RTS<->CTS cable switch around.

It's certainly possible to fix it, but that would need a double check on
the existing drivers and that passing new suprise bits won't do any harm.
The real question is what should the right behaviour be - and to me that
seems to be to logically flip all the lines not just DTR/DSR RTS/CTS
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at