Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Dec 1996 22:57:57 -0700 (MST)
From:      Brandon Gillespie <brandon@glacier.cold.org>
To:        Mark Taylor <mtaylor@cybernet.com>
Cc:        hackers@freebsd.org
Subject:   RE: Help!  Turning off DTR on a serial device
Message-ID:  <Pine.NEB.3.95.961210225420.10600A-100000@glacier.cold.org>
In-Reply-To: <XFMail.961205172226.mtaylor@cybernet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 6 Dec 1996, Mark Taylor wrote:
> On 18:25:06 Brandon Gillespie wrote:
> >I'm writing some software to use the serial device in FreeBSD (and
> >Unixware in the long run).  I need to know if I can turn off DTR.  The
> >supplied software with this program is for DOS, and manages to turn off
> >DTR from the software end--but I have never been able to figure out if I
> >can do this from a unix perspective?  Can I?  help?
> >
> >-Brandon Gillespie
> 
> There is an IOCTL for it.
> Look in /usr/include/sys/ttycom.h for TIOCSDTR (set DTR) and TIOCCDTR (clear
> DTR).
> 
> The only problem youu will find with it is that the DTR is set when you change
> your
> baud rate.  There is an 'if' statement in the baud changing code in the
> kernel's sio
> driver which checks if the baud is non-zero, then the DTR will be set.
> 
> So, you can set your baud rate, turn off your DTR, but don't chang your baud
> rate
> again!  It will turn ON the DTR (if the new baud rate is not zero).

How portable is this?  I'm developing the software in FreeBSD but it will
be running on a Unixware server.  Anybody familiar with unixware?

-Brandon Gillespie




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.95.961210225420.10600A-100000>