AlexSH has asked for the wisdom of the Perl Monks concerning the following question:


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