Date: Thu, 05 Dec 1996 17:18:58 -0500 (EST) From: Mark Taylor <mtaylor@cybernet.com> To: Brandon Gillespie <brandon@glacier.cold.org> Cc: hackers@freebsd.org Subject: RE: Help! Turning off DTR on a serial device Message-ID: <XFMail.961205172226.mtaylor@cybernet.com> In-Reply-To: <Pine.NEB.3.95.961204112251.19235B-100000@glacier.cold.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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). -------------------------------------------------------------------- Mark J. Taylor Network R&D Engineer Cybernet Systems mtaylor@cybernet.com 727 Airport Blvd. PHONE (313) 668-2567 Ann Arbor, MI 48108 FAX (313) 668-8780 --------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.961205172226.mtaylor>