bless( {
'location' => 0,
'dirname' => '005',
'devices' => [
bless( {
'descriptor' => {
'bcdUSB' => '2.00',
'iProduct' => 2,
'bDeviceSubClass' => 0,
'bDeviceClass' => 0,
'idProduct' => 63104,
'bcdDevice' => '4.00',
'iManufacturer' => 1,
'bMaxPacketSize0' => 8,
'iSerialNumber' => 3,
'bNumConfigurations' => 1,
'idVendor' => 1027,
'bDescriptorType' => 1,
'bDeviceProtocol' => 0
},
'filename' => '026',
'config' => [
bless( {
'MaxPower' => 300,
'bmAttributes' => 160,
'bNumInterfaces' => 1,
'interfaces' => [
[
bless( {
'bInterfaceSubClass' => 255,
'bNumEndpoints' => 2,
'endpoints' => [
bless( {
'bmAttributes' => 2,
'wMaxPacketSize' => 64,
'bSynchAddress' => 0,
'bRefresh' => 0,
'bEndpointAddress' => 129,
'bInterval' => 0,
'bDescriptorType' => 5
}, 'Device::USB::DevEndpoint' ),
bless( {
'bmAttributes' => 2,
'wMaxPacketSize' => 64,
'bSynchAddress' => 0,
'bRefresh' => 0,
'bEndpointAddress' => 2,
'bInterval' => 0,
'bDescriptorType' => 5
}, 'Device::USB::DevEndpoint' )
],
'bInterfaceProtocol' => 255,
'iInterface' => 2,
'bInterfaceNumber' => 0,
'bDescriptorType' => 4,
'bAlternateSetting' => 0,
'bInterfaceClass' => 255
}, 'Device::USB::DevInterface' )
]
],
'iConfiguration' => 0,
'wTotalLength' => 32,
'bConfigurationValue' => 1,
'bDescriptorType' => 2
}, 'Device::USB::DevConfig' )
],
'device' => 9370480
}, 'Device::USB::Device' ),
####
#!/usr/bin/perl
use strict;
use warnings;
use Device::USB;
my $VENDOR = 1027;
my $PRODUCT = 63104;
my $usb = Device::USB->new();
my $dev = $usb->find_device( $VENDOR, $PRODUCT );
printf "Device: %04X:%04X\n", $dev->idVendor(), $dev->idProduct();
$dev->open();
print "Manufactured by ", $dev->manufacturer(), "\n",
" Product: ", $dev->product(), "\n";
exit;
####
Device: 0403:F680
Manufactured by Suunto
Product: Suunto Sports Instrument