From owner-freebsd-questions Tue Jun 1 8:51:23 1999 Delivered-To: freebsd-questions@freebsd.org Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by hub.freebsd.org (Postfix) with ESMTP id BCA3A14E32 for ; Tue, 1 Jun 1999 08:51:05 -0700 (PDT) (envelope-from andre.albsmeier@mchp.siemens.de) X-Envelope-Sender-Is: andre.albsmeier@mchp.siemens.de (at relayer david.siemens.de) Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.9.3/8.9.3) with ESMTP id RAA20442 for ; Tue, 1 Jun 1999 17:51:04 +0200 (MET DST) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) by mail1.siemens.de (8.9.3/8.9.3) with ESMTP id RAA10314 for ; Tue, 1 Jun 1999 17:51:03 +0200 (MET DST) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.9.3/8.9.3) id RAA12380 for ; Tue, 1 Jun 1999 17:51:03 +0200 (CEST) Date: Tue, 1 Jun 1999 17:51:01 +0200 From: Andre Albsmeier To: freebsd-questions@freebsd.org Subject: Advice for writing software using serial ports needed Message-ID: <19990601175101.A14395@internal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Because I hate to do it on DOS/Win95/WinNT, I would like to solve the following problem on FreeBSD: I have to write a small programm that sends data to a serial port. The device on the serial port sends the data back (just like a loopback interface with TX/RX and RTS/CTS connected together). I need some advice or a pointer how to do this properly. I think I have to: 1. open /dev/cuaa0 2. set baudrate, bits, ... somehow (ioctl, termios, ???) 3. write/read to/from it within a select() loop 4. ??? Now I am looking for a small piece of source which contains the appropriate calls already so I don't have to think a lot. (Actually, I would like to figure it out by myself but the software has to be ready tomorrow evening, else I would have to do it on a Micro$oft OS :-). I already looked at the minicom sources but they are to complicated to understand them quickly... Thanks for any hints! -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message