Device::USB

A Perl module that can use libusb to access USB devices
Download

Device::USB Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • G. Wade Johnso and Paul Archer
  • Publisher web site:
  • http://search.cpan.org/~gwadej/

Device::USB Tags


Device::USB Description

A Perl module that can use libusb to access USB devices Device::USB is a Perl module that can use libusb to access USB devices.Device::USB provides a Perl wrapper around the libusb library. This supports Perl code controlling and accessing USB devices. use Device::USB; my $usb = Device::USB->new(); my $dev = $usb->find_device( $VENDOR, $PRODUCT ); printf "Device: X:Xn", $dev->idVendor(), $dev->idProduct(); $dev->open(); print "Manufactured by ", $dev->manufacturer(), "n", " Product: ", $dev->product(), "n"; $dev->set_configuration( $CFG ); $dev->control_msg( @params ); ...See the libusb manual for more information about most of the methods. The functionality is generally the same as the libusb function whose name is the method name prepended with "usb_".This module provides a Perl interface to the C library libusb. This library supports a relatively full set of functionality to access a USB device. In addition to the libusb, functioality, Device::USB provides a few convenience features that are intended to produce a more Perl-ish interface. Here are some key features of "Device::USB": · Using the library initializes it, no need to call the underlying usb_init function. · Object interface reduces namespace pollution and provides a better interface to the library. · The find_device method finds the device associated with a vendor id and product id and creates an appropriate Device::USB::Device object to manipulate the USB device. · Object interfaces to the bus and device data structures allowing read access to information about each. Requirements: · Perl


Device::USB Related Software