----- Original Message ----- 
From: "robert johnson" <[EMAIL PROTECTED]>
To: "perl-win32-users" <perl-win32-users@listserv.ActiveState.com>
Sent: Saturday, May 14, 2005 4:17 AM
Subject: Win32::SerialPort collecting data stream


> i just can't get this figured out.
>
> i have a device, that reports ascii data via a typical (DB-9) serial port.
i
> set up Win32::SerialPort in the following method:
>
> $comm = Win32::SerialPort->new($port) or die "Close any application using
> $port\n";
> $comm->baudrate($baud); $comm->databits($dbits);
> $comm->stopbits($sbits); $comm->parity($parity);
>

It would be helpful to know the values that $baud, $dbits, $sbits and
$parity contain .... just so we can see that they are sane :-)

>
> the following code works, but only for a relatively small amount of data
>
> $comm->lookclear;
> $comm->write("rl\r");
> sleep 10;
> $rcvd=$comm->input;
> (... and then write $rcvd to a file ...)

I wonder if  increasing the size of the read buffer enables you to collect
larger amounts of data.
----------------------------------
$PortObj->buffers(4096, 4096);  # read, write
  # returns current in list context
----------------------------------

Try increasing it to accommodate the larger inputs and see what happens.
That's probably not the way to fix the problem, even if it works .... but
knowing whether (or not) it works might help in finding the correct
solution.

Cheers,
Rob

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to