delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/29/09:53:57

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Fri, 29 Jul 2005 14:53:40 +0100 (BST)
From: Michael McCarthy <mccarthy AT cs DOT bris DOT ac DOT uk>
To: cygwin AT cygwin DOT com
Subject: Serial Port Problems
Message-ID: <Pine.LNX.4.61.0507291435120.6806@zeta.cs.bris.ac.uk>
MIME-Version: 1.0
X-Spam-Score: -2.8
X-IsSubscribed: yes

Hi there,

I have been experiencing some problems interfacing the serial ports on two 
seperate systems: a windows 2000 PC and a windows XP laptop.  Basically, 
all I want to do is read some data from a device that is connected to the 
serial port.

I am using some code (that works under linux) to open the serial port 
(/dev/ttyS0) as read-only and read the incoming data.  The setup of the 
baud rate and flags seems to go smoothly, yet the program hangs on the 
read() function.  However, I know that data is arriving because 
HyperTerminal shows that it is there.

stty gives some interesting results:

$ stty -F /dev/ttyS0
speed 0 baud; line = 0;
intr = <undef>; quit = <undef>; erase = <undef>; kill = <undef>; eof = 
<undef>;
swtch = <undef>; susp = <undef>; rprnt = <undef>; werase = <undef>;
lnext = <undef>; flush = <undef>; min = 0; time = 0;
-cread
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

as well as:

$ stty -F /dev/ttyS0 -a
speed 0 baud;stty: /dev/ttyS0: Function not implemented


Not sure if this is normal (a zero baud rate?).  The same results occur on 
both systems.  Anyway, I have found a few posts that look somewhat similar 
to my problem:

   http://www.cygwin.com/ml/cygwin/1998-12/msg00695.html
   http://www.cygwin.com/ml/cygwin/2002-01/msg00062.html
   http://www.cygwin.com/ml/cygwin/2003-07/msg01312.html

But no solutions posted.

Any suggestions/comments would be greatly appreciated.

Kind regards,


Mike McCarthy

PS: I can provide cygcheck output if required.

--
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/

- Raw text -


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