Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-19 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found