[sane-devel] Sane doesn't create a scanner device

Johannes Meixner jsmeix at suse.de
Mon Oct 31 13:46:45 UTC 2005


Hello,

On Oct 28 18:25 Henning Meier-Geinitz wrote (shortened):
> On Thu, Oct 27, 2005 at 09:05:02AM +0200, Johannes Meixner wrote:
> > For some all-in-one devices (like the Epson Stylus Photo RX420)
> > which have also a cardreader unit included there is additionally
> > the "usb_storage" kernel module which gets in conflict with SANE.
> 
> I don't see any difference compared to usblp.

You are right, see
https://bugzilla.novell.com/show_bug.cgi?id=127524#c25
---------------------------------------------------------
... scanning failed on my RX420 when usblp was loaded
but usb-storage was not loaded.
=> Very unstable (at least for me).
=> Needs further investigation.
---------------------------------------------------------

Scanning (always via "scanimage") with my RX420 works for one
or a few attempts and then it hangs up (but I can abort it
with [Ctrl]+[C]).

After
rmmod usblp usb-storage ; modprobe usblp ; modprobe usb-storage
"scanimage -L" works again for one or a few attempts.

This are the last messages with "SANE_DEBUG_SANEI_USB=128":
-----------------------------------------------------------------
...
[sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x080f
[sanei_usb] sanei_usb_open: trying to open device `libusb:002:003'
USB error: could not set config 1: Device or resource busy
[sanei_usb] sanei_usb_open: libusb complained: could not set
            config 1: Device or resource busy
[sanei_usb] Maybe the kernel scanner driver or usblp claims
            the interface? Ignoring this error...
[sanei_usb] sanei_usb_open: configuration nr: 0
[sanei_usb] sanei_usb_open:     interface nr: 0
[sanei_usb] sanei_usb_open:   alt_setting nr: 0
[sanei_usb] sanei_usb_open:num: 0 endpoint: 0x8052708
[sanei_usb] sanei_usb_open: direction: 128)
[sanei_usb] sanei_usb_open:  address: 1 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-in endpoint (address 0x01)
[sanei_usb] sanei_usb_open:num: 1 endpoint: 0x805271c
[sanei_usb] sanei_usb_open: direction: 0)
[sanei_usb] sanei_usb_open:  address: 2 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-out endpoint (address 0x02)
[sanei_usb] sanei_usb_open: configuration nr: 0
[sanei_usb] sanei_usb_open:     interface nr: 1
[sanei_usb] sanei_usb_open:   alt_setting nr: 0
[sanei_usb] sanei_usb_open:num: 0 endpoint: 0x8052758
[sanei_usb] sanei_usb_open: direction: 128)
[sanei_usb] sanei_usb_open:  address: 3 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-in endpoint (address 0x03)
[sanei_usb] sanei_usb_open: we already have a bulk-in endpoint
                            (address: 0x81), ignoring the new one
[sanei_usb] sanei_usb_open:num: 1 endpoint: 0x805276c
[sanei_usb] sanei_usb_open: direction: 0)
[sanei_usb] sanei_usb_open:  address: 4 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-out endpoint (address 0x04)
[sanei_usb] sanei_usb_open: we already have a bulk-out endpoint
                            (address: 0x02), ignoring the new one
[sanei_usb] sanei_usb_open: configuration nr: 0
[sanei_usb] sanei_usb_open:     interface nr: 2
[sanei_usb] sanei_usb_open:   alt_setting nr: 0
[sanei_usb] sanei_usb_open:num: 0 endpoint: 0x80527a8
[sanei_usb] sanei_usb_open: direction: 128)
[sanei_usb] sanei_usb_open:  address: 5 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-in endpoint (address 0x05)
[sanei_usb] sanei_usb_open: we already have a bulk-in endpoint
                            (address: 0x81), ignoring the new one
[sanei_usb] sanei_usb_open:num: 1 endpoint: 0x80527bc
[sanei_usb] sanei_usb_open: direction: 0)
[sanei_usb] sanei_usb_open:  address: 6 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-out endpoint (address 0x06)
[sanei_usb] sanei_usb_open: we already have a bulk-out endpoint
                            (address: 0x02), ignoring the new one
[sanei_usb] sanei_usb_open: opened usb device `libusb:002:003' (*dn=1)
[sanei_usb] sanei_usb_get_vendor_product: device 1:
            vendorID: 0x04b8, productID: 0x080f
[sanei_usb] sanei_usb_write_bulk: trying to write 2 bytes
[sanei_usb] 0000: 1B 40                                           
. at ..............
[sanei_usb] sanei_usb_write_bulk: write failed:
            Resource temporarily unavailable
[sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
[sanei_usb] sanei_usb_read_bulk: read failed:
            Resource temporarily unavailable
[sanei_usb] sanei_usb_write_bulk: trying to write 2 bytes
[sanei_usb] 0000: 1B 49                                           
.I..............
[sanei_usb] sanei_usb_write_bulk: write failed:
            Resource temporarily unavailable
[sanei_usb] sanei_usb_write_bulk: trying to write 2 bytes
[sanei_usb] 0000: 1B 49                                           
.I..............
[sanei_usb] sanei_usb_write_bulk: write failed:
            Resource temporarily unavailable

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
-----------------------------------------------------------------
and in dmesg there is either
"interface 1 claimed by usblp while 'scanimage' sets config #1"
or
"interface 2 claimed by usb-storage while 'scanimage' sets config #1"
depending which kernel module was loaded.
 

> What happens with usb_storage loaded? Same symptom, i.e. SANE can't
> open the scanner?

Yes, the symptoms are exactly the same for usblp and usb_storage.


> I think the only annoyance is the error message in syslog. On the
> other hand, the kernel may be just a bit too verbose. Trying to change
> the configuration while something else calims an interface is not such
> a big problem which would warrant a warning message.

I don't care about waring messages.
 
> As we had trouble with devices which need the set_configuration
> command, I want to keep it.

I am no USB expert but for me it seems SANE (i.e. sanei_usb.c)
calims the right interface (i.e. I think the conflict doesn't happen
because SANE calims the interface for the printer or cardreader).

For me it seems the conflict happens when SANE tries to set the
configuration while usblp and/or usb_storage are only loaded
(there was no real data transfer regarding the printer and/or
the cardreader - I neither printed nor was there a memory-card
plugged in).


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5      Mail: jsmeix at suse.de
90409 Nuernberg, Germany                    WWW: http://www.suse.de/



More information about the sane-devel mailing list