Date: Thu, 16 Jan 2003 16:48:18 +0200 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Paul Hamilton <paul@computerwest.com.au> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: How do I monitor the serial CTS line via C programmatically? Message-ID: <20030116144818.GA5678@gothmog.gr> In-Reply-To: <AGEHIFHGNEMPFNCPLONMIENIEBAA.paul@compwest.com.au> References: <20030115112042.GA26041@gothmog.gr> <AGEHIFHGNEMPFNCPLONMIENIEBAA.paul@compwest.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2003-01-16 15:44, Paul Hamilton <paul@computerwest.com.au> wrote: > Thanks Giorgos! > > I needed to know the function used to access the Serial ports under FreeBSD. > Your program compiles, but generates the following error msg when run: > > test_prog: ioctl: Inappropriate ioctl for device > > Thanks to the ioctl 'tip', I researched around, and found that the > serial port needed opening, so this is the finished code (just in > case someone else needs it): Ah, of course. When I tested it, I used: % ./a.out < /dev/cuaa1 so the shell did the open() for me :) You're right, of course... > [snip C source] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030116144818.GA5678>