From owner-freebsd-questions Thu May 28 16:59:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA27581 for freebsd-questions-outgoing; Thu, 28 May 1998 16:59:13 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mail.kersur.net (root@mail.kersur.net [199.79.199.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA27575 for ; Thu, 28 May 1998 16:59:05 -0700 (PDT) (envelope-from dswartz@druber.com) Received: from manticore (manticore.druber.com [207.180.95.108]) by mail.kersur.net (8.8.8/8.8.8) with SMTP id TAA10052 for ; Thu, 28 May 1998 19:58:58 -0400 (EDT) Message-Id: <3.0.5.32.19980528195857.00930100@mail.kersur.net> X-Sender: druber@mail.kersur.net X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32) Date: Thu, 28 May 1998 19:58:57 -0400 To: freebsd-questions@FreeBSD.ORG From: Dan Swartzendruber Subject: reading from serial port? Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have a null modem cable connecting S0 on two freebsd 2.2.6-stable boxes. One of the is booted in serial console mode. I am trying to read from the serial port on the other one. I'm seeing some peculiar behavior. Basically, when the reader opens /dev/cuaa0 (or /dev/ttyd0), it blocks. Okay. Then, if I throw something in the other end (manually, by 'echo xxx > /dev/cua00', I do see that output show up, but then the reader goes into an infinite loop of returning from read with nbytes of zero. Even though there is clearly no data present, it is returning nonetheless. If I close and re-open the port, I do block as expected. What am I missing? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message