From owner-freebsd-questions Sun Sep 21 16:20:45 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA24389 for questions-outgoing; Sun, 21 Sep 1997 16:20:45 -0700 (PDT) Received: from freebie.lemis.com (gregl1.lnk.telstra.net [139.130.136.133]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA24382 for ; Sun, 21 Sep 1997 16:20:34 -0700 (PDT) Received: (from grog@localhost) by freebie.lemis.com (8.8.7/8.8.5) id IAA08805; Mon, 22 Sep 1997 08:50:26 +0930 (CST) Message-ID: <19970922085026.35506@lemis.com> Date: Mon, 22 Sep 1997 08:50:26 +0930 From: Greg Lehey To: Jonathan Chen Cc: FreeBSD Questions Subject: Re: Serial Port References: <199709191750.KAA00710@celebris.tddhome> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.81e In-Reply-To: ; from Jonathan Chen on Mon, Sep 22, 1997 at 09:22:40AM +1200 Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8250 Fax: +61-8-8388-8250 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Fight-Spam-Now: http://www.cauce.org Sender: owner-freebsd-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Mon, Sep 22, 1997 at 09:22:40AM +1200, Jonathan Chen wrote: > On Fri, 19 Sep 1997, Thomas Dean wrote: > >> I am attempting to use a serial port to talk to a Gramin GPS 45XL. >> >> I can talk to the device, read and write data. The results make >> sense. >> >> I am using /dev/cuaa0. >> >> I have one problem. The communications with the device are not >> reliable. I execute an application to send the device a command and >> read the results. It works. I issue the same command again and it >> hangs. Actually, I use select() and it times out after 15 seconds. >> Increasing the timeout to 100 seconds does not change things. > > How about enabling h/w flow-control with the tcsetattr() call? If I > remember correctly the flags you use are CCTS_OFLOW and CRTS_IFLOW > (check out the man entry). Unfortunately, the serial interface has only Ground, TxD and RxD. It would be interesting to see if it understands XON/XOFF, though. Greg