There are a bunch of statements that over-ride defaults.
I do not believe that to be a wise decision.
Over-ride a default when you know why you are doing it.
Some examples are:
$PortObj->handshake("xoff"); $PortObj->xon_limit(100); # bytes left in buffer $PortObj->xoff_limit(100); # space left in buffer $PortObj->xon_char(0x11); $PortObj->xoff_char(0x13);
In the "bad old days", and still sometimes today, there is what is called "hardware flow control" and serial ports wiggle dedicated lines to regulate the flow of information..."Wait,...my buffer is full right now!". In "Dilbert-ese", "my brain is full!".

These "flow control" lines took extra pins on the connector. On the modern DB-9 connectors, not all of these lines are even there!

The old farts were not stupid. But, they didn't have smart IC's which in themselves contained buffer memory. Modern UARTs (Universal Asynchronous Receiver/Transmitter) can send an "in band" signal to tell the other guy to "shut up". This is the X-ON/X-OFF protocol.

Its like the "mother-in-law" is spewing out massive amounts of verbage and you just whisper "stop" and she does! Magic!

I would leave that X-ON/OFF protocol alone unless a good reason to over-ride it surfaces. And of course that certainly can happen!

I would also concentrate on what you send and what you receive. Forget performance until you get the correct command and response data. I'm not sure that you have that yet.


In reply to Re: Timing issue while accessing serial port by Marshall
in thread Timing issue while accessing serial port by vrn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.