From owner-freebsd-hackers Tue Dec 10 21:57:45 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id VAA18208 for hackers-outgoing; Tue, 10 Dec 1996 21:57:45 -0800 (PST) Received: from glacier.cold.org (glacier.cold.org [206.81.134.54]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id VAA18203 for ; Tue, 10 Dec 1996 21:57:43 -0800 (PST) Received: from localhost (brandon@localhost) by glacier.cold.org (8.7.5/8.7.3) with SMTP id WAA10611; Tue, 10 Dec 1996 22:57:57 -0700 (MST) Date: Tue, 10 Dec 1996 22:57:57 -0700 (MST) From: Brandon Gillespie To: Mark Taylor cc: hackers@freebsd.org Subject: RE: Help! Turning off DTR on a serial device In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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