delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/25/16:17:42

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: <4294DDCE.6020506@x-ray.at>
Date: Wed, 25 May 2005 22:19:26 +0200
From: Reini Urban <rurban AT x-ray DOT at>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8b) Gecko/20050217
MIME-Version: 1.0
To: Jason Pearce <jason DOT pearce AT ieee DOT org>
CC: Cygwin List <cygwin AT cygwin DOT com>
Subject: Re: Using Perl to access serial ports
References: <428E2B87 DOT 9040008 AT ieee DOT org>
In-Reply-To: <428E2B87.9040008@ieee.org>
X-IsSubscribed: yes

Jason Pearce schrieb:
> There was some recent discussion about serial ports and Perl.
>    http://sourceware.org/ml/cygwin/2005-05/msg00013.html
> 
> But I did not see any resolution.
> Did anyone end up porting either Win32::SerialPort or Win32API::CommPort 
> as Reini suggested?
> 
> I need to talk to a thermometer via a serial link. The protocol is not 
> very complex.
> Could I just use a system call to stty to set the baudrate and then pipe 
> the thermometer comand to /dev/ttyS0 and read the response from 
> /dev/ttyS0 using file handles?
> 
> Reini - you suggested adding cygwin support for Device::SerialPort would 
> be the easiest route. Do you still recommend this? 

Sure.

> I am not very 
> familiar with Windows API library, but could I just use Win32::API to 
> call some already existing entry points in Windows?

Uaing .xs is usually easier than using an FFI i.e. Win32::API.
And Win32::API doesn't compile out of the box on cygwin.
I have a stripped version without callback support at my site, but using 
xs is better.
If you really want an FFI I recommend FFI over Win32::API by far.

-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
http://phpwiki.org/

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