X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_40,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_HOSTKARMA_YE,RCVD_IN_SEMBLACK,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-Id: <1337858727.3447279826@as03.cooltoad.com> From: "thunderboy42" To: cygwin AT cygwin DOT com Subject: Reading data from ttyS fails Date: Thu, 24 May 2012 14:25:27 +0200 X-Abuse-to: abuse AT coolgoose DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 I have an embedded system connectet with my PC which sends debug data over the rs232. A simple terminal program unter cygwin is used to analyze this data. before cygwin 1.7.10 evertything went fine, but now it seems, most transmitted characters get lost. even this simple example from wikibooks does not work anymore: ... memset(&tio,0,sizeof(tio)); tio.c_iflag=0; tio.c_oflag=0; tio.c_cflag=CS8|CREAD|CLOCAL; tio.c_lflag=0; tio.c_cc[VMIN]=1; tio.c_cc[VTIME]=5; tty_fd=open("/dev/ttyS0", O_RDWR | O_NONBLOCK); cfsetospeed(&tio,B115200); // 115200 baud cfsetispeed(&tio,B115200); // 115200 baud tcsetattr(tty_fd,TCSANOW,&tio); while (c!='q') { if (read(tty_fd,&c,1)>0) write(STDOUT_FILENO,&c,1); } ... So what can I do? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple