Greetings, fellow monks.
I'm having an unusual (judging by the google results) problem with the Win32::SerialPort module. Following is the error, and the relevant code.

The error:

Missing REQUIRED setting for BAUD at Foo.pm line 35 write_settings failed, closing port at Foo.pm line 35 Failed to write settings at Foo.pm line 35.

The code: (Foo.pm lines 26-35)

my $Serial = new Win32::SerialPort('COM1') or die "Serial port died"; $Serial->baudrate(115200); $Serial->parity('none'); $Serial->databits(8); $Serial->stopbits(1); $Serial->handshake('none'); $Serial->buffers(4096, 4096); $Serial->error_msg(1); $Serial->user_msg(1); $Serial->write_settings || die "Failed to write settings";

The error shows up after booting the computer, and after using any program that communicates with the serial port at a different baud rate. I can only seem to resolve it by running something that opens the serial port at my preferred baud rate (115200), such as setting it in HyperTerminal.

Have any of you had any experience with this error? Can I do whatever HyperTerminal and the other programs do to make the baud rate valid? Am I just missing a line somewhere? Thanks.

-BronzeWing


In reply to Unusual error in Win32::SerialPort (Missing REQUIRED setting for BAUD) by BronzeWing

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.