Re: Unwanted auto-assertion of DTR & RTS on serial port open

From: CeDeROM <cederom_at_tlen.pl>
Date: Tue, 24 May 2022 21:15:03 UTC
On Tue, May 24, 2022 at 10:46 PM Warner Losh wrote:
> On Tue, May 24, 2022 at 12:18 PM Ian Smith wrote:
>> On 25 May 2022 3:09:11 am AEST, Mychaela Falconia wrote:
>>  > Daniel Feenberg wrote:
>>  > > The man page adds the (-)rtsdtr option in version 13.1:
>>  > >  https://www.freebsd.org/cgi/man.cgi?query=stty
>>  > > and I can confirm it is an invalid argument in 13.0.
>>  > Huh?  That very same man.cgi on freebsd.org tells me that (-)rtsdtr
>>  > first appears in 13.0 (there is a typo in the man page, the negative
>>  > form is -rtsdtr, not --rtsdtr as the man page says), ditto for the
>>  > appearance of CNO_RTSDTR in termios(4), the underlying kernel
>>  > interface.
>> I'm not sure if that is a typo, going on the discussion of double negatives in the review, reposted here:
>> https://reviews.freebsd.org/D20031
>>
>> The manual page footer actually says FreeBSD 13.0, and could be much clearer about which of those settings are or are not defaults, at least to this bear of little brain.
>
> Yes. This was added. The default is rtsdtr, which means "do the rts/dtr wiggling when the data device is opened."
> The option is -rtsdtr to turn off this historic behavior. The -- is a typo that's still present in the system. I've just pushed
> a fix.

Thank you Warner and everyone that made this update! This may also
come handy in my projects.. some devices use those lines to power
(i.e. Metex Multimeters) and it would be nice to set them to constant
0 (that results in high voltage output on the pins right?) :-)

I have question: if the option is CNO_RTSDTR then application switch
could be also -nortsdtr not -rtsdtr ? With -rtsdtr switch I would
think this option is enabled. With -nortsdtr I am sure this option is
disabled :-)

Thanks again! :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info