Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Oct 2017 20:22:46 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Ian Lepore <ian@freebsd.org>
Cc:        Zaphod Beeblebrox <zbeeble@gmail.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: We do serial differently.
Message-ID:  <20171019172246.GU2473@kib.kiev.ua>
In-Reply-To: <1508432312.1383.18.camel@freebsd.org>
References:  <CACpH0Md0ckYH6k5ufAwCoc-_ThtJHrV9%2BdUtp66%2BSSjVuyhpxA@mail.gmail.com> <1508425713.1383.6.camel@freebsd.org> <CACpH0MfaP%2B0BY-1VqbnTQXe9xtLpU3%2BopYaNpRQC1so0C5iKmw@mail.gmail.com> <1508432312.1383.18.camel@freebsd.org>

index | next in thread | previous in thread | raw e-mail

On Thu, Oct 19, 2017 at 10:58:32AM -0600, Ian Lepore wrote:
> Note that that really describes the tty-layer behavior, it's what tells
> the ftdi chip to turn dtr on and off, so it should apply to other
> brands of usb adapter as well.
> 
> Looking at that page you cited in your original message and how it
> talks about a dtr connection to reset, this might be the problem. šYou
> can try "stty -f /dev/cuaU0 -hupcl" -- that will force the signal to be
> driven low continuously, regardless of whether anyone has the device
> open or not. šBut there's no telling if that's the right behavior for
> your arduino, it might just be differently-wrong, like never doing the
> reset at all. šIf the line needs to be pulsed to do a reset maybe you
> can use a wrapper script that does stty hupcl; sleep .1; stty -hupcl,
> then launches your program.

For each tty device, including cuaU*, there are <name>.init and <name>.lock
devfs nodes which can be used to set the initial and permanent states of
the flags.  It might be useful in this situation.


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171019172246.GU2473>