Hello

I'm install Device::USB from apt-get on my Ubuntu machine. I have usb device. With wireshark i get protocol from anower software. The protocol used to communicate bulktransfer

but when i try implement it with Device::USB i have no luck

#!/usr/bin/perl -w use strict; use Device::USB; my $usb = Device::USB->new(); my $dev = $usb->find_device( 0x2642,0x0669); printf "Device: %04X:%04X\n", $dev->idVendor(), $dev->idProduct(); $dev->open (); $dev->claim_interface(); $dev->set_configuration (0); my $cmd = $dev->{config}->[0]->{interfaces}->[0]->[0]->{endpoints}->[0 +]->{bEndpointAddress}; my $string = $dev->{config}->[0]->{interfaces}->[0]->[0]->{endpoints}- +>[1]->{bEndpointAddress}; my $data = $dev->{config}->[0]->{interfaces}->[0]->[0]->{endpoints}->[ +3]->{bEndpointAddress}; my $send = $dev->bulk_write($cmd,hex('dd'),1000); my $data; my $read = $dev->bulk_read($string,$data,64,1000); $read = $dev->bulk_read($string,$data,64,1000);

I can't see any output in wireshark. And i have $send =-1 and read='-1'

What i'm missing ?

PS sorry for English

In reply to 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":



  • 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.