|Don't ask to ask, just ask|
Device::USB Read/Writeby flbiggs (Novice)
|on Dec 08, 2010 at 00:14 UTC||Need Help??|
flbiggs has asked for the
wisdom of the Perl Monks concerning the following question:
I am trying read and write to/from a USB scanner to extend the functionality of sane a bit. I am able to view the device information and endpoints fairly easily with the following code:
My problem is that I cannot quite figure out how to provide appropriate parameters for the interrupt_read, interrupt_write, bulk_read and bulk_write methods.
For example, the documentation for interrupt_write provides:
Is 'ep' the full bEndpointAddress or just its lower 3 bits. How do I set up Buffer? Is that an array reference?
Could someone please provide some sample perl code that performs a read or write using Device::USB (or point me to a website)?