Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Update: see libusb and sync/asyc IO .

I am happy to see this code, as I figure USB devices are going to proliferate. With only a small knowledge of how sockets work, and assuming USB would use a similar protocol, I'm guessing that you have a classic lockup condition, where both ends of the connection are trying to read, or trying to write, at the same time. Nothing gets thru.

You need to get some sort of synchronization going, a protocol, like "over and out", means you are switching to listening, so the other end should now send.

Possibly, just printing a few newlines on a line by themselves, would signal a protocol shift, by flushing the buffers, or whatever it is doing. I notice in the module's example code, they use alot of newlines. :-)


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

In reply to Re: Device::USB ubuntu 13.10 and bulk read write problem by zentara
in thread Device::USB ubuntu 13.10 and bulk read write problem by AlexSH

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 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
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2021-06-12 15:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (53 votes). Check out past polls.

    Notices?