On Wed, Oct 29, 2025 at 09:15:28PM +0100, Paul Menzel wrote:
Am 23.10.25 um 14:05 schrieb Johan Hovold:
The RFCOMM driver confuses the local and remote modem control signals, which specifically means that the reported DTR and RTS state will instead reflect the remote end (i.e. DSR and CTS).
This issue dates back to the original driver (and a follow-on update) merged in 2002, which resulted in a non-standard implementation of TIOCMSET that allowed controlling also the TS07.10 IC and DV signals by mapping them to the RI and DCD input flags, while TIOCMGET failed to return the actual state of DTR and RTS.
Note that the bogus control of input signals in tiocmset() is just dead code as those flags will have been masked out by the tty layer since 2003.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
There is a linux-history git archive [1], if somebody wants dig further. But not relevant for the tag used by the stable folks.
Yeah, that's tree I use.
Is there any way to test your change, to read DTR and RTS state?
This can be tested using the TIOCMGET and TIOCMSET (or TIOCMBIS/TIOCMBIC) ioctls. I use a custom c application, and I'm not aware of any particular application you can you use for testing if that's what you were after.
Johan