[sane-devel] usb_set_interface and usb_claim_interface

Henning Meier-Geinitz henning at meier-geinitz.de
Tue Apr 18 12:09:12 UTC 2006


On 2006-04-17 09:07, Tamkang wrote:
>   Does anyone know why the position of usb_set_interface before
>   usb_claim_interface, get return -1 ?

As far as I know there is no libusb function called
"usb_set_interface". If you refer to usb_set_altinterface, you really
must claim the interface before. Using an alternative interface is
just a different way of using the same interface so it is blocked by
the access.

>   because I am trying to
>   developing driver sm3880 for sane-backend, and I got this I/O
>   Device Error, but I got fixed after, I reverse the
>   usb_claim_interface is on behind, after usb_set_interface function
>   got return 0, any one know why? 

I highly recommend to use the SANEI wrapper functions in
sanei/sanei_usb.c for SANE backends instead of using libusb directly.
At least with normal USB devices this makes life a little bit easier
for you (and us, because it reduces porting issues).

So you write a backend for the Microtek Scanmaker 3880? This scanner
is not yet in our list. Could you give more details, e.g. the output
of "sane-find-scanner -v -v" and if the scanner uses the same chipset
as the 3800 or some other scanner.


More information about the sane-devel mailing list