delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/11/03/10:23:43

From: marko DOT kohtala AT ntc DOT nokia DOT com (Marko Kohtala)
Subject: b20: serial port bugs
3 Nov 1998 10:23:43 -0800 :
Message-ID: <363DE81A.C54E1328.cygnus.gnu-win32@ntc.nokia.com>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

I use NT 4.0 SP3 and Cygwin B20.

CSIZE and CBAUD use one same bit. Therefore CS8 sets a bit that is used
for B57600 and B115200.

select() never tells that something is available for read from a serial
port.

When select returns with timeout, the read bitmask (at least) still has
all the bits set. I think they should be zeroed, since the descriptors
are not available for read.

Even read() never gives any characters from serial port.

ioctl TCGETA and TCSETA return error.

I have set using tcsetattr() the following settings:
c_iflag = IGNBRK | INPCK;
c_oflag =  0;
c_cflag = B9600 | CS8 | CREAD |CLOCAL | HUPCL | PARENB;
c_lflag =  0;
c_cc[VMIN] = 0;
c_cc[VTIME] = 0;

I tried VMIN = 1. It seemed not to block as it is supposed to, but
read() returned with 0 when there was no characters. However, with this
setting I was able to read characters for a while, but after a couple of
characters it seemed to stop. I have given up debugging for now.

Ctrl-C in gdb seems to kill the gdb.


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019