X-Spam-Check-By: sourceware.org Date: Thu, 26 Jul 2007 20:47:19 -0700 From: Gary Johnson To: cygwin AT cygwin DOT com Subject: Re: Accessing RS-232 serial port under Cygwin Message-ID: <20070727034719.GA19593@suncomp1.spk.agilent.com> Mail-Followup-To: cygwin AT cygwin DOT com References: <46A95D97 DOT 9030404 AT chariot DOT net DOT au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46A95D97.9030404@chariot.net.au> User-Agent: Mutt/1.5.16 (2007-06-09) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On 2007-07-27, Mike Fahlbusch wrote: > ask.teddy wrote: > >> I want to write a C program which runs on a desktop computer and talks >> to a device over the RS-232 serial port. I'm using WinXP + Cygwin, and >> sometimes Ubuntu Linux. I hope this program can be ported to either OS >> with the least modification at the source level. How can I use a C >> program to access the serial port under Cygwin? > > This link will get you off to a good start: > > http://www.google.com/search?q=serial+C+unix+program Note that Cygwin supports the termios(3) interface but not the ioctl(2) interface for controlling serial ports. Using termios(3) should allow you to use the same source on either Cygwin or Linux, at least for the serial port control. Regards, Gary -- 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/