Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

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

Thanks for looking. I just put the code in for completeness. As usually you get moaned at for not including it. Ill rephrase my question.

Its advice Im after from someone who might have done something similar with perl, daemons and serial/usb. What I suspect is that theres a gotcha with Device::SerialPort or something to do with the run levels that Im missing.

When I run it from the command line directly calling the script with -d for debug. syslog shows all the debug I expect to see and it communicates with the arduino over serial/usb exactly as expected.

When I run it through inet.d using "sudo service zoneswitch start" with debug set in the inet.d bash script syslog shows all the debug messages as expected but nothing goes over the serial/usb connection to the arduino. Obviously all errors from the script are lost as Im running it as a daemon using Proc::Daemon.

In both cases there are no errors from the module Device::SerialPort when I pass it the serial port I want. If the device isnt plugged in my script waits and tries again until it is available. So syslog would show waiting debug messages. So the script seems to be connecting to the serial port ok.

Is that enough info, or is there something Ive missed?


In reply to Re^2: perl daemon accessing serial over usb by gordonendersby
in thread perl daemon accessing serial over usb by gordonendersby

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 browsing the Monastery: (5)
As of 2024-04-24 00:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found