Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 19 Nov 2004 13:15:23 -0800 From: Roger Pryor To: Cygwin Mailing List Subject: Newbie question regarding tcsetattr Message-Id: <20041119131523.58dd206d.rpryor@pryor-and-pryor.com> Organization: Pryor and Pryor Inc. Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Declude-Sender: rpryor AT pryor-and-pryor DOT com [64.114.151.101] X-Declude-Spoolname: D641f003b023a1cd9.SMD X-IsSubscribed: yes Hi: I'm a new cygwin user, attepting to port a Linux package that uses the COM ports to drive a remote device. I'm finding that calls to tcsetattr don't seem to work. What is happening is that although the speed is being setup correctly, the values that I want for c_iflag and c_cflag are not being set, but left as they were before. Is this a known bug (there were conversations about this last year in the archives) and if so is there any idea when it will be fixed?, or am I confused (equally likely!) Usage is: ... int port; struct termios p; ... port = open("/dev/ttyS1", O_RDWR|O_NOCTTY|O_NDELAY); ... memset(&p, 0, sizeof(struct termios)); p.c_iflag = IGNBRK|IGNPAR; p.c_cflag = CS8|CREAD|CLOCAL|B9600; cfsetispeed(&p, B9600); cfsetospeed(&p, B9600); if(tcsetattr(port, TCSANOW, &p) < 0) grumble Thanks -------------------------------------------------------------------------- Roger Pryor Vancouver, B.C., V6E 1K7, Canada -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/