Can't use ioctl() to set baud rate on /dev/ttyS0

Gary Johnson
Tue Apr 24 18:28:00 GMT 2007

On 2007-04-23, Christopher Faylor wrote:
> On Mon, Apr 23, 2007 at 06:34:45PM -0700, Gary Johnson wrote:
> >I've been working on porting a simple terminal emulator application 
> >from HP-UX 10.20 to Cygwin.  All it does is make a few termio 
> >settings on stdin, stdout and the specified serial port, then copy 
> >characters from stdin to the serial port and from the serial port to 
> >stdout.  It seems to work fine except that it won't set the serial 
> >port baud rate.
> For cygwin, you'll need to use cfset[io]speed and tcsetattr to set
> baud rate.

That did it!  It all works great now.  Thank you.

I know I'm going to regret asking this, SHTDI and all, but where is 
this documented?  I searched the FAQ and User's Guide for ioctl, 
etattr and termio and didn't find anything relevant.


Gary Johnson                 | Agilent Technologies     | Mobile Broadband Division
                             | Spokane, Washington, USA

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list