Using Perl to access serial ports

Jason Pearce jason.pearce@ieee.org
Tue May 31 11:30:00 GMT 2005


This is just a bit of an update.

I have got Win32::SerialPort working, at least a limited capacity.

After taking a look at the source for it, I discovered that this module 
is actually just straight Perl, and it relies on Win32::API. I have 
already been using /Reini's cut down version of this for some time, and 
so I thought this might work. And it does, at least for the simple 
functions.
ie I can set the baud rates, parity etc. Write a few bytes and read them 
back after waiting enough time for the external device to reply. This 
functionality is actually all I needed to read my precision thermometer.

Since Reini's Win32:API module does not support call backs any 
Win32::SerialPort functions that utilise the call backs will not work. I 
have not had the chance to delve into exactly what functions that is 
yet. I plan to look further into that, but I have limited time to devote 
to this - especially now main goal is achieved.

Regards,
Jason

ps. I was never able to get the /dev/com1 or /dev/ttyS1 devices working. 
I expected that I would be able to echo commands into /dev/com1 and cat 
replies from it.
///

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



More information about the Cygwin mailing list