Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Missing data on serial read

by ccherri (Acolyte)
on Jun 15, 2013 at 00:19 UTC ( [id://1039054]=perlquestion: print w/replies, xml ) Need Help??

ccherri has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to read streaming serial data at 115200b and cant seem to pick it all up.

using the input method ($data = $Port -> input), I get the first 14 or 15 characters of every line. I need the whole line.

using the read method ($data= $Port -> read(4096)) and by adjusting the read_interval I can either get partials of every line using $Port->read_interval(1);

or fully every third line using $Port->read_interval(2); I need all of every line.

Tx for any insight! Chris

Replies are listed 'Best First'.
Re: Missing data on serial read
by BrowserUk (Patriarch) on Jun 15, 2013 at 00:30 UTC
    I get the first 14 or 15 characters of every line.

    You are overrunning the buffer in your UART. You need to enable some form of handshaking. rts/cts, XON/XOFF or DTR/DSR.

    Check the specs for the device to find out which it supports.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      I tried and verified all the available handshaking options, but none had any affect. Nor do they when I tested them using realterm either. Thanks for the suggestion tho, at least that is eliminated. Chris

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found