in reply to How to set tty settings from perl
Unfortunately after some upgrades, this code now stopped working
That's strange, it doesn't seem like IO::Stty ever supported crtscts.
Does anyone have a suggestion on how to to id properly?
Well, if you look at the source, what the module is doing is mostly tedious, but not too complex. You could set attributes on the port using your own POSIX::Termios object.
You might also be interested in my node Lower-Level Serial Port Access on *NIX; I've been using IO::Termios with good success (also in combination with IO::Stty).
open(Client,"+>/dev/ttyUSB0") || die "open: $!";
BTW, see "open" Best Practices.
My fallback solution is to just system() stty...
Yes, in the worst case that's a possibility, I am guessing this code isn't meant to be super portable anyway. I'd recommend using a module instead of plain system, I showed some examples here.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to set tty settings from perl
by Sec (Monk) on Dec 10, 2019 at 22:48 UTC | |
by haukex (Archbishop) on Dec 11, 2019 at 18:05 UTC | |
by Sec (Monk) on Dec 18, 2019 at 00:04 UTC |