Opening already open serial port now sets RTS and DTR?
It used to be that opening a serial port only set RTS and DTR if it was a "first open". If the port was already open, subsequent opens didn't mess up RTS and DTR. This was a very useful behavior in the embedded world where RTS and DTR are often used to power and or control things (reset lines, mode controls, line driver enables, etc.).
This seems to have changed, and now _every_ open sets RTS and DTR even if the port was already open and RTS and DTR had already been put in the desired state.
Is there no longer any way to open an already-open serial port without changing the state of RTS and DTR?
What was the reasoning for breaking user-application backwards compatiblity like that?
--
Grant
Greg KH
maintainerQuoted 10 lines · Grant Edwards
It used to be that opening a serial port only set RTS and DTR if it was a "first open". If the port was already open, subsequent opens didn't mess up RTS and DTR. This was a very useful behavior in the embedded world where RTS and DTR are often used to power and or control things (reset lines, mode controls, line driver enables, etc.).
This seems to have changed, and now _every_ open sets RTS and DTR even if the port was already open and RTS and DTR had already been put in the desired state.
When did it change? Any chance you can do 'git bisect' to track it down?
And what hardware are you using here? Different hardware works differently in this way at times.
thanks,
greg k-h
Quoted 9 lines · Greg KH
Quoted 6 lines · Grant Edwards
It used to be that opening a serial port only set RTS and DTR if it was a "first open". [...]
This seems to have changed, and now _every_ open sets RTS and DTR even if the port was already open and RTS and DTR had already been put in the desired state.
When did it change?
I'm not sure. It's been a couple years since the last time I personally used something that relied on the "old" behavior.
Quoted 1 line
Any chance you can do 'git bisect' to track it down?
Unfortunately, it would take a lot of work to get set up to do that.
I can probably try the past half-dozen or so Ubuntu distros (I'm not sure how far back I can go with available hardware). I'll check around with colleagues to see if we have any existing installations that are using on the old behavior.
Quoted 1 line
And what hardware are you using here?
I've tried a couple different FTDI USB devices (FT232R single port and FT4232H quad port). I've also tried a 16550A motherboard UART. I believe that both FTDI and 16550 used to set RTS/DTR only on "first open".
Quoted 1 line
Different hardware works differently in this way at times.
Which is the "expected correct" behavior?
--
Grant