This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using Perl to access serial ports

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.


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:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]