[sane-devel] Regarding libUSB API (configurations)

m. allan noah kitno455 at gmail.com
Wed Jul 11 23:05:44 UTC 2007


if you are directly using libusb, call usb_set_configuration() :)

http://libusb.sourceforge.net/doc/function.usbsetconfiguration.html

if you are using sanei_usb, then this has generally been done for you already.

allan

On 7/11/07, René Kjellerup <webmaster at keenan.dk> wrote:
> Hi' every one.
>
> This mail is primarily directed to those
> of you who's writing USB applications.
>
> My question meight seem simple, however
> the solution does elude me.
>
> In my log file it takes my scanner 80ms to
> select the configuration
>
> Quote from log:
> [5 ms]  >>>  URB 4 going down  >>>
> -- URB_FUNCTION_SELECT_CONFIGURATION:
>   ConfigurationDescriptor = 0x812d7c78 (configure)
>   ConfigurationDescriptor : bLength             = 9
>   ConfigurationDescriptor : bDescriptorType     = 0x00000002
>   ConfigurationDescriptor : wTotalLength        = 0x00000027
>   ConfigurationDescriptor : bNumInterfaces      = 0x00000001
>   ConfigurationDescriptor : bConfigurationValue = 0x00000001
>   ConfigurationDescriptor : iConfiguration      = 0x00000000
>   ConfigurationDescriptor : bmAttributes        = 0x000000c0
>   ConfigurationDescriptor : MaxPower            = 0x00000000
>   ConfigurationHandle     = 0x00000000
>   Interface[0]: Length            = 76
>   Interface[0]: InterfaceNumber   = 0
>   Interface[0]: AlternateSetting  = 0
> [85 ms] UsbSnoop - MyInternalIOCTLCompletion(ad282db0) : fido=00000000,
> Irp=814469a0, Context=821c7208, IRQL=0
> [85 ms]  <<<  URB 4 coming back  <<<
> End quote.
>
> Well that's what my log says, my question is:
> How in the world do I make a program call
> to do this?
>
> That is, is there some API to make the
> URB_FUNCTION_SELECT_CONFIGURATION call to the
> USB device (my scanner in this case), or does
> libusb do this when getting the device?
>
> Kind regards
> René Kjellerup
> -- as life grows older, I gain experience.
>
>
> --
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>              to sane-devel-request at lists.alioth.debian.org
>


-- 
"The truth is an offense, but not a sin"



More information about the sane-devel mailing list