From owner-freebsd-stable@FreeBSD.ORG Sun Jan 9 01:11:54 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8B3716A4CE for ; Sun, 9 Jan 2005 01:11:54 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5593143D39 for ; Sun, 9 Jan 2005 01:11:53 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id j091BgKa092952; Sun, 9 Jan 2005 11:41:43 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Brandon Fosdick Date: Sun, 9 Jan 2005 11:41:40 +1030 User-Agent: KMail/1.7.1 References: <40170.4.248.235.201.1104333403.squirrel@4.248.235.201> <200501091115.00779.doconnor@gsoft.com.au> <41E08199.3000405@bfoz.net> In-Reply-To: <41E08199.3000405@bfoz.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3310152.LOodFagmlB"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200501091141.40752.doconnor@gsoft.com.au> X-Spam-Score: -5.4 () IN_REP_TO,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: freebsd-stable@freebsd.org Subject: Re: ucom and sio X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2005 01:11:55 -0000 --nextPart3310152.LOodFagmlB Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sun, 9 Jan 2005 11:28, Brandon Fosdick wrote: > Daniel O'Connor wrote: > > Is it blocking waiting for carrier detect to come up? > > Try using the cuaNN device instead. > > The software in question worked fine using a cuaNN device until said > device died. > > Somebody else mentioned that I could set the device to ignore the > carrier detect signal. How do I do that? Is it a flag to tcsetattr() or > some kind of ioctl? Something like this should work.. if ((sfd =3D open(portfname, O_RDWR | O_NONBLOCK)) =3D=3D -1) { fprintf(stderr, "Couldn't open serial port - %s\n", strerror(errno)= ); exit(1); } if (tcgetattr(sfd, &tp) =3D=3D -1) { fprintf(stderr, "Couldn't get attr - %s\n", strerror(errno)); exit(1); } tp.c_cflag =3D CLOCAL; if (tcflush(sfd, TCIOFLUSH) =3D=3D -1) { fprintf(stderr, "Couldn't flush - %s\n", strerror(errno)); exit(1); } if (tcsetattr(sfd, TCSANOW, &tp) =3D=3D -1) { fprintf(stderr, "Couldn't set attrs - %s\n", strerror(errno)); exit(1); } ie setting CLOCAL. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart3310152.LOodFagmlB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBB4ITM5ZPcIHs/zowRAjw1AKCdEuVG/ikYosGegmz1a7OLOiTemQCfTwTL ROIj/cROVNKQ8/PuGm/Ngs8= =G+T2 -----END PGP SIGNATURE----- --nextPart3310152.LOodFagmlB--