Date: Mon, 25 Mar 2019 11:16:12 +0100 From: Matthias Apitz <guru@unixarea.de> To: Andrea Venturoli <ml@netfence.it> Cc: Polytropon <freebsd@edvax.de>, freebsd-questions@freebsd.org Subject: Re: Resetting a serial port Message-ID: <20190325101612.GB2415@sh4-5.1blu.de> In-Reply-To: <360bcc93-b4fc-f9f5-4056-5c5b45b8fcbb@netfence.it> References: <6623dd04-822d-dbdb-d2f5-3021debc1c2a@netfence.it> <20190319193907.b0f51931.freebsd@edvax.de> <360bcc93-b4fc-f9f5-4056-5c5b45b8fcbb@netfence.it>
next in thread | previous in thread | raw e-mail | index | archive | help
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 -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub October, 7 -- The GDR was different: Peace instead of Bundeswehr and wars, Druschba instead of Nazis, to live instead of to survive.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190325101612.GB2415>