Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Win32::SerialPort code hanging while reading a 'line'

by poolpi (Hermit)
on Jul 25, 2008 at 12:51 UTC ( [id://700124]=note: print w/replies, xml ) Need Help??


in reply to Win32::SerialPort code hanging while reading a 'line'

Do you use the XS version of Win32::SerialPort?

From the doc:

Buffers The size of the Win32 buffers are selectable with buffers. But each read method currently uses a fixed internal buffer of 4096 bytes. This can be changed in the Win32API::CommPort source and read with internal_buffer. The XS version will support dynamic buffer sizing. Large operations are automatically converted to multiple smaller ones by the tied FileHandle methods.

Another idea :
Maybe do you need to purge the buffer sometimes?
$PortObj->lookclear; # empty buffers

See Methods used with Tied FileHandles ,

hth,
PooLpi

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://700124]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-04-23 19:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found