Help need about Win32::SerialPort

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I'm looking for help about sending and receiving data with

I've got a small external device made from my own with a PIC Microcontroler
with a MAX232 transceiver.  But don't care about the device itself, I'm
sure its working well.

The device use fix length of 16 bytes packet.  On the device, each packet
received generate 1 or 2 answer packet.  For testing, a friend of mine
wrote a small Visual Basic program that allow me to send manual packet and
view the return packet.

I've read the documentation and some website and I try comething like this.
my $ob=Win32::SerialPort->new("COM1") || die "Unable to open COM1 $^E\n";
my $data = pack('H2','EC'); (I made this line shorter for better reading)

That's the writing part of the code.  I monitor the port with a serial
monitoring software and this part look good but I'm not sure.

The reading part is more tricky for me.  I try :
my $input_data = $ob->input;
or :
my $input_data = $ob->read($block);

But a could not get anything.

Please help me.

Site Timeline