Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Fri, 29 Jul 2005 14:53:40 +0100 (BST) From: Michael McCarthy To: cygwin AT cygwin DOT com Subject: Serial Port Problems Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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 = ; quit = ; erase = ; kill = ; eof = ; swtch = ; susp = ; rprnt = ; werase = ; lnext = ; flush = ; 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/