[#302207] problem with usb_set_configuration() in sanei/sanei_usb.c

View Trackers | Bugs | Export CSV

2005-09-20 23:15
Submitted by:
Assigned to:
Henning Geinitz (hmg-guest)
problem with usb_set_configuration() in sanei/sanei_usb.c

Detailed description
I found this with the google, but forgot the link:

I have an Epson RX-600 printer, scanner, etc...

I get the following in the dmesg using sane-backends-1.0.16 (gentoo) when trying to use the scanner:

usb 3-1: usbfs: interface 1 claimed by usblp while 'xsane' sets config #1

If i comment out the usb_set_configuration() call in sanei_usb.c file and recompile, it works OK. But I assume this is not a proper fix, since in some cases printer doesn't configure the usb and then the scanner should do it. So there should be a call to routine like usb_get_configuration() before that and if usb is not configured for that device do the configuration....

I hope this makes sense :-)

Followups: Sort comments antichronologically

Date: 2005-09-21 10:23
Sender: Henning Geinitz

Logged In: YES user_id=2888Could you give some more details? E.g. run xsane with USB debugging turned on: SANE_DEBUG_SANEI_USB=255 xsane
And also please send the output of "sane-find-scanner -v -v" when your scanner is connected.
Unfortunately it's necesary to run usb_set_configuration() as we had some reports that devices don't work if it's not called before claim_interface. Maybe it's possible to ignore the error, if it's a specific error code.
libusb doesn't provide usb_get_configuration so I can't call it.
Date: 2005-09-22 06:24
Sender: Nobody

Logged In: NO OK, I found the web site, where I got the instructions to comment out the usb_set_configuration() [google:sanei_usb.c usb_set_configuration], There you'll found more info. Also this seems a common problem for all multi device boxes.

As of usb_get_configuration() I was just illustrationg that it would be nice to have such a function, then I could be able to fix it myself :-) Otherwise this problem is beyond my abilities so I reported a bug. I hope it gets fixed so I will not be forced to comment out this routine each time gentoo wants to upgrade sane-backends. I know this commenting out is not a fix! It just avoids the problem for my particular setup.
Date: 2005-09-22 08:00
Sender: Henning Geinitz

Logged In: YES user_id=2888Thanks for the link. However, it doesn't tell much more details.
Could you please sen d the output of "sane-find-scanner -v -v"? That way I can see how these devices are set up and may develop a workaround.
Date: 2005-09-22 08:44
Sender: Nobody

Logged In: NO I don't know how to post an attachement to this system so I made a web address for it:

Date: 2005-09-22 08:46
Sender: Nobody

Logged In: NO In the privious post I put the working version case. Should I made also the non-working one?
Date: 2005-09-23 14:41
Sender: Nobody

non-connecté Hello there,

Same problem here :

slackware 10.2
kernel 2.6.13
epson cx3200 scanner
sane 1.0.16

If i remove the usblp module, scanimage detect the scanner and work.
If not, no detection and same error message in syslog.

Could you please give some detail to the modification in sanei_usb.c (line mumbers to comment out) ?

I have not see that in slack 10.1 with 2.6.10 kernel and sane 1.0.15 ???


Date: 2005-09-23 16:37
Sender: Henning Geinitz

Logged In: YES user_id=2888The latest development snapshot (and the CVS version) of SANE contains a work-around for this problem. Please test and report if it works.

Another work-around is to remove the kernel usblp module (rmmod usblp) for the time you want to scan.
Date: 2005-09-23 19:43
Sender: Nobody

non-connecté Hi,

I have compiled the last development version of sane (23/9/05) but scanimage -L fail to detect the scanner (with or without usblp loaded).
Now i am back to 1.0.16 slack package.

Date: 2005-09-24 16:46
Sender: Henning Geinitz

Logged In: YES user_id=2888There is a success report on the sane-devel mailing list with the snapshot 2005-09-23. So I rather think in your case it's something else (built without libusb support?).

For now i mark this bug "fixed" but keep it open for other users.
Date: 2005-09-25 07:53
Sender: Nobody

non-connecté Hi,

You are right, 24/9/2005 version is ok.
I forgot the --with-group=scanner flag in configure......

Many thanks.

Date: 2005-12-28 14:31
Sender: Henning Geinitz

Logged In: YES user_id=2888As this is fixed in the current stable version (1.0.17) I'm closing the bug.
Date: 2006-07-27 09:46
Sender: Nobody

Logged In: NO Running 2.6.17-1.2145_FC5 on x86_64 with an Epson CX11N
MFP (all-in-one) and
% rpm -q sane-backends
% scanimage -V
scanimage (sane-backends) 1.0.17; backend version 1.0.17

I am still getting these error messages in the log:

kernel: usb 3-7: usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1

Could this be due to the MFP not reporting a standard
interface class (cf. this excerpt from lsusb -v)?

Bus 003 Device 003: ID 04b8:0815 Seiko Epson Corp.
Device Descriptor:
bDeviceClass 0 (Defined at Interface level)
idVendor 0x04b8 Seiko Epson Corp.
idProduct 0x0815
iProduct 2 USB2.0 MFP(Hi-Speed)
Configuration Descriptor:
bNumInterfaces 2
Interface Descriptor:
bDescriptorType 4
bInterfaceNumber 0
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 5 EPSON Scanner
Interface Descriptor:
bDescriptorType 4
bInterfaceNumber 1
bInterfaceClass 7 Printer
bInterfaceSubClass 1 Printer
bInterfaceProtocol 2 Bidirectional
iInterface 6 USB2.0 Printer
Date: 2006-07-31 09:01
Sender: Nobody

Logged In: NO Regarding my post on 2006-07-27 09:46:

Sorry, it turned out this was not the problem.

But to clarify, the fix mentioned in post of
2005-12-28 14:31 is that sane simply ignores
this message. This can clearly be seen by setting
SANE_DEBUG_SANEI_USB=255 before starting scanimage,
xsane or whatever.

My problem was related to not being able to scan
using high speed USB, only full speed.

-- Arne Glenstrup

Attached Files:


Field Old Value Date By
status_idOpen2005-12-28 14:31hmg-guest
assigned_tonone2005-12-28 14:31hmg-guest
close_date2005-12-28 14:312005-12-28 14:31hmg-guest
ResolutionNone2005-09-24 16:46hmg-guest
Categorybackends (drivers)2005-09-21 10:23hmg-guest
Powered By FusionForge