This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Serial Port Problems
- From: Michael McCarthy <mccarthy at compsci dot bristol dot ac dot uk>
- To: henning at hhschmidt dot de
- Cc: cygwin at cygwin dot com
- Date: Mon, 1 Aug 2005 15:23:53 +0100 (BST)
- Subject: RE: Serial Port Problems
- References: <42EA870C.4070403@gmx.net>
On Fri, 29 Jul 2005, H. Henning Schmidt wrote:
You can configure your serial port -attached file-desc to return after one
single byte or after a timeout by configuring the appropriate members of the
struct termios -member <c_cc>. Read
http://www.easysw.com/~mike/serial/serial.html for details.
;Henning
Thanks Henning! Got it working by adding the following to the settings I
already had:
// ignore modem control lines and enable the receiver
tios.c_cflag |= (CLOCAL|CREAD);
// minimum number of characters before read() returns
tios.c_cc[VMIN] = 6;
Kind regards,
Mike McCarthy
--
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/