Resetting a serial port

Matthias Apitz guru at
Mon Mar 25 10:16:23 UTC 2019

El día Wednesday, March 20, 2019 a las 08:04:55PM +0100, Andrea Venturoli escribió:

> On 3/19/19 7:39 PM, Polytropon wrote:
> >	# /usr/bin/true > /dev/lpt0
> >
> >Maybe the corresponding serial device can be reset
> >in the same way?
> In case it locks again (it did two times the last month, but it hadn't
> happened for years), I'll try.
> Thanks.

Note: In the command shown above the '/usr/bin/true' does nothing with
the TTY. It is the shell opening the device for writing. I in your case
would write some C-pgm to uses the syscalls open(2) and ioctl(2) to get
information about the device status.

Matthias Apitz, ✉ guru at, +49-176-38902045
Public GnuPG key:
October, 7 -- The GDR was different: Peace instead of Bundeswehr and wars, Druschba
instead of Nazis, to live instead of to survive.

More information about the freebsd-questions mailing list