SerialPort for Active perl 5.6.1
From: Grumbler(ng) (grumbler_at_nospam.de)
Date: 10/24/03
- Next message: Brian McCauley: "Re: Problem referencing arrays from modules only on Win32 (Fixed)"
- Previous message: rangelife: "Re: Win32::OLE to open Visual Studio ?"
- Next in thread: Bbirthisel: "Re: SerialPort for Active perl 5.6.1"
- Reply: Bbirthisel: "Re: SerialPort for Active perl 5.6.1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 24 Oct 2003 18:21:02 +0200
Hello,
Is Win32::SerialPort available for Active Perl 5.6.1 Build 635?
A search in ppm is successful, but the install aborts with
"package not available". The compatibility matrix on ActiveState
Homepage indicates that compilation of this module FAILS.
Or are there alternative modules?
(I was looking in the manual and in the internet, e.g. select with
four parameters, sysopen - it seems that sometimes solutions
are only possible with "perl on Unix").
All I need is
-to receive a number of characters, and
-to send single characters (command) or a number
of bytes building a message
-the send and receive should be controlled by several
instructions by the script
(the port settings, e.g. baudrate can be done with the
"mode" comand before starting the script)
On the other hand..
According to the FAQ (perlfaq8.htm) and Perl_for_Win32_FAQ_8 (8.9)
"Serial ports can be opened just like files in Perl for Win32. To
open COM1, just do this:
open( PORT, "+>COM1" ) or die "Can't open COM1: $!";
This does not work either with Windows XP nor with Windows98, e.g.
with
open(PORT, ...
$ofh=select(PORT); $|=1; select($ofh);
for(1..10) {
print PORT "a";
$in=read(PORT, $rx, 5);
print $in, " ", $rx, "\n";
}
only the first 'a' appears on the other site (Hyperterminal on Laptop)
the input (completed with ENTER, because it's buffered input) is
more often received on my PC - but not always.
(Remark: With "buffered output" the content of the script appears
on the screen (??))
Regards
- Next message: Brian McCauley: "Re: Problem referencing arrays from modules only on Win32 (Fixed)"
- Previous message: rangelife: "Re: Win32::OLE to open Visual Studio ?"
- Next in thread: Bbirthisel: "Re: SerialPort for Active perl 5.6.1"
- Reply: Bbirthisel: "Re: SerialPort for Active perl 5.6.1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|