delorie.com/archives/browse.cgi | search |
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 |
Message-ID: | <42F8355B.46BE1891@dessent.net> |
Date: | Mon, 08 Aug 2005 21:47:23 -0700 |
From: | Brian Dessent <brian AT dessent DOT net> |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: 1.5.18: get strange characters from rs232-port on a Windows XP machine |
References: | <200508081714 DOT 50312 DOT MoritzHerrmann05 AT gmx DOT de> |
X-Spam-Report: | -5.8/5.0 ---- Start SpamAssassin results * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] * 0.1 AWL AWL: From: address is in the auto white-list ---- End SpamAssassin results |
X-IsSubscribed: | yes |
Reply-To: | cygwin AT cygwin DOT com |
Moritz Herrmann wrote: > I'm working on a little c program to receive and save strings from the > serial-port into a local file on a Windows XP/2003 Server machine. > The program is working very well on a linux machine but if I try to run it > under windows I just get stupid characters like: If you want to use the serial port under Cygwin you need to open /dev/ttyS1 and not "com2". Remember that Cygwin is trying to emulate a posix environment. http://cygwin.com/cygwin-ug-net/using-specialnames.html You can in fact open the serial devices as "com1", "com2" etc. But in doing so you implicily tell Cygwin that you are going to use Windows native methods to access the port, and so things like tcgetattr() and tcsetattr() will have no effect -- you would have to use the native win32 API serial port functions. That is why it only works if you first initialize the port with hyperterminal. Brian -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |