[sane-devel] Regarding libUSB API (configurations)

2007-07-12 Thread René Kjellerup
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 = 0x0002
  ConfigurationDescriptor : wTotalLength= 0x0027
  ConfigurationDescriptor : bNumInterfaces  = 0x0001
  ConfigurationDescriptor : bConfigurationValue = 0x0001
  ConfigurationDescriptor : iConfiguration  = 0x
  ConfigurationDescriptor : bmAttributes= 0x00c0
  ConfigurationDescriptor : MaxPower= 0x
  ConfigurationHandle = 0x
  Interface[0]: Length= 76
  Interface[0]: InterfaceNumber   = 0
  Interface[0]: AlternateSetting  = 0
[85 ms] UsbSnoop - MyInternalIOCTLCompletion(ad282db0) : fido=,
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] Regarding libUSB API (configurations)

2007-07-11 Thread m. allan noah
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 = 0x0002
   ConfigurationDescriptor : wTotalLength= 0x0027
   ConfigurationDescriptor : bNumInterfaces  = 0x0001
   ConfigurationDescriptor : bConfigurationValue = 0x0001
   ConfigurationDescriptor : iConfiguration  = 0x
   ConfigurationDescriptor : bmAttributes= 0x00c0
   ConfigurationDescriptor : MaxPower= 0x
   ConfigurationHandle = 0x
   Interface[0]: Length= 76
   Interface[0]: InterfaceNumber   = 0
   Interface[0]: AlternateSetting  = 0
 [85 ms] UsbSnoop - MyInternalIOCTLCompletion(ad282db0) : fido=,
 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