| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-Spam-Check-By: | sourceware.org |
| Date: | Thu, 24 May 2012 14:38:07 +0200 |
| From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Reading data from ttyS fails |
| Message-ID: | <20120524123807.GE18736@calimero.vinschen.de> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <1337858727 DOT 3447279826 AT as03 DOT cooltoad DOT com> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <1337858727.3447279826@as03.cooltoad.com> |
| User-Agent: | Mutt/1.5.21 (2010-09-15) |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
On May 24 14:25, thunderboy42 wrote:
> 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?
Can you please create a simple testcase for reading from ttyS0
which can be compiled out of the box?
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |