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: Mon, 9 May 2005 22:35:26 +0200 From: Martin Koegler To: cygwin AT cygwin DOT com Subject: Bug in the /dev/ttySx handling code? Message-ID: <20050509203526.GA28389@ahab.auto.tuwien.ac.at> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.1i On Mon, May 09, 2005 at 12:46:55PM -0500, Terry Dabbs wrote: > > It appears you are using com1, with this command: > stty -F /dev/ttyS0 -a > > But, you strace shows ttyS1, which is com2. Are you plugged into the proper port with your cable? Yes, I used the right port, as on the Linux PC cat /dev/ttyS0 showed the expected data (after adjusting the configuration of the port), which was send with my program (eibd) using cygwin. In the other direction, I did some echo xxxxxxxxxxxxxxxx >/dev/ttyS0. With 9600 baud, I get for such a request a block of the same byte (I have not checked the hex code). I am using two PCs, one with Windows, where COM2 is used and a Linux PC with only one COM port. stty -F /dev/ttyS0 -a shows the configuration of the Linux PC. A "mode COMx" in cmd on a unused port shows a baud rate of 9600, so it looks like, the configuration of the serial port is not changed, although in the current CVS version of fhandler_serial.cc, I can not see any proof for it. At least, I understand, why stty -F /dev/ttyS0 under cygwin return 0 baud: tcgetattr returns 0 baud, if DTR is not set, which is different to the behaviour of Linux. I would like to track the problem down, but as the use of stty (and cat for doing IO) does not work, I have no idea, how to do it. mfg Martin Kögler -- 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/