From owner-freebsd-hackers Wed Nov 10 0:48:28 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id D5E0315329 for ; Wed, 10 Nov 1999 00:48:24 -0800 (PST) (envelope-from bright@wintelcom.net) Received: from localhost (bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) with ESMTP id BAA08541; Wed, 10 Nov 1999 01:11:57 -0800 (PST) Date: Wed, 10 Nov 1999 01:11:57 -0800 (PST) From: Alfred Perlstein To: Mike Nowlin Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: serial (std & rocketport) ioctl? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 10 Nov 1999, Mike Nowlin wrote: > > Hate to sound like a bum, but I haven't figured out enough of the kernel > to answer this one for myself..... :) > > Topic: serial driver > > We have an application that sends (not receives) data to a serial port to > a set of brain-dead analyzers (and other stuff). For several reasons I > don't feel motivated enough to get into here, we can't send data to more > than one at a time. > > Under Linux, there's an ioctl() you can call (don't remember which one) to > ask the kernel if the port in question has actually completed sending the > data that has been sent to it. Last time I checked, this only worked for > the 8250 family of parts, and not the more "advanced" boards like Cyclades > & RocketPort -- that ioctl didn't exist for these boards. So, I was stuck > using standard serial boards, and using this ioctl to wait for one > transmission to complete before starting another one to a different port. > > Is there anything like this under FreeBSD? The Linux machine is on its > way out (kernel version 1.2.8(!), plus failing hardware), and we've added > more equipment -- I'd love to use a Cyclades or RP board for this, instead > of lots of modified serial cards, and I've been using more and more > FreeBSD for the machines at work... (Don't get me wrong - I love Linux, > but I trust FreeBSD more for what we do at work -- medical testing.) We like FreeBSD as well. :) I'm not a serial expert, but maybe the direction you need to take is looking at /usr/include/sys/ttycom.h, several ioctl's seem to be what you're looking for, noteably: #define TIOCDRAIN _IO('t', 94) /* wait till output drained */ maybe that's incorrect, but i'm sure one or a combination of a few ioctls from that header will help you out. good luck, -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message