Thanks Thunder, will streamline the code as you suggested. On the syncs, i repeat all the commands until i get the expected success code as passed in as the second parameter sent to sub SendCommand. I need to limit the number of retries but figure that will be a later addition, also will be adding something to power cycle the camera if i get to 60 with no success. Here is the config file, wondering if the handshake part is failing, i have tried RTS, XOFF, DTR and none they dont seem to make a difference. I have no experience with this level of serial so thanks for taking a look.

Win32::SerialPort_Configuration_File -- DO NOT EDIT -- \\.\COM4 CFG_1,none eol,10 clear,-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@- RCONST,1000 istrip,0 CFG_2,none XOFFCHAR,19 PARITY_EN,0 WCONST,200 intr,3 U_MSG,1 STOP,1 XONLIM,2048 erase,8 XONCHAR,17 BINARY,1 RTOT,0 echonl,0 XOFFLIM,512 icrnl,0 inlcr,0 READBUF,4096 igncr,0 EOFCHAR,0 WRITEBUF,0 RINT,4294967295 ocrnl,0 bsdel,  opost,0 echoke,1 PARITY,none HNAME,localhost echoctl,0 CFG_3,none EVTCHAR,0 icanon,0 isig,0 HADDR,0 E_MSG,1 DATA,8 DVTYPE,none echo,0 quit,4 s_eof,26 s_kill,21 ERRCHAR,0 onlcr,1 ALIAS,COM4 HSHAKE,none DATYPE,raw echok,1 echoe,1 BAUD,57600 WTOT,10

In reply to Re^2: Serial camera - Issues connecting by SquareJ
in thread Serial camera - Issues connecting by SquareJ

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.