It's been a long time since I last used Cygwin, but since it's "just" a compatibility/emulation layer, I wouldn't be surprised at all if there were issues with its handling of serial ports and/or the interaction of Windows, Cygwin and Device::SerialPort. Have you tried accessing the serial port from inside the Cygwin environment, for example via screen? Also, and this is a complete stab in the dark, perhaps the baud rate setting is getting messed up somehow, and you could try setting the default baud rate of the port in the Windows Control Panel in the Device Manager.

If you're not entirely fixed on Cygwin, as a possible alternative, Win32::SerialPort should work under Strawberry Perl (I have seen at least one report that someone had to use the 32-bit edition of Strawberry Perl even on a 64-bit Windows, though).

You asked about other alternatives: Yes, there are some more "low-level" ways of opening and communicating with the serial port in Perl, but in my experience those can sometimes become so tricky to get right that it's probably better to first try to get Win32::SerialPort or Device::SerialPort working.


In reply to Re^4: Using Device::SerialPort by Anonymous Monk
in thread Using Device::SerialPort by hardy004

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.