[sane-devel] Epson Perfection 2400 Photo scanner problems

brook@biology.nmsu.edu brook@biology.nmsu.edu
Wed, 26 May 2004 14:02:28 -0600


Olaf Meeuwissen writes:
 > >From your debugging output it looks like there is nothing wrong with
 > your USB setup but I'm not very familiar with BSD.  The logs show one
 > error message though that I find particularly "alarming".
 > 
 > Er, not implemented on BSD?  That could be a problem.  From a quick
 > look at sanei_usb.c, it seems that your libusb implementation is at
 > fault.

The comments in bsd.c (part of libusb) indicate that the author "had
not needed usb_clear_halt() yet."  I am not sure what that means.  The
same note is given for usb_reset() and usb_resetep().  What should
these functions be doing?  Does anyone have a suggested implementation
for BSD systems or is doing nothing really ok?

 > Does the debugging output just stop here or did you get time out
 > messages like with the ESC-@ command?

The debugging output from 'scanimage -L' stops at the end and never
times out.

Since my last try, I have updated the system to v1.0.14 for the sane
backends and v0.1.8 for libusb (which is the most recent stable
release).  The output seems essentially the same as before.

>From sane-find-scanner, I get:

     [sanei_debug] Setting debug level of sanei_usb to 255.
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner0: Device not configured
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner1: Device not configured
     usb_set_debug: Setting debugging level to 255 (on)
     usb_os_find_busses: Found /dev/usb0
     usb_os_find_busses: Found /dev/usb1
     usb_os_find_devices: Found /dev/ugen0 on /dev/usb1
     usb_control_msg: 128 6 512 0 0xbfbff640 8 1000
     usb_control_msg: 128 6 512 0 0x8058100 32 1000
     [sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011b) interface 0  at libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_init: found 1 devices
     usb_control_msg: 128 6 769 0 0x8060000 100 1000
     USB error: error sending control message: Input/output error
     usb_control_msg: 128 6 770 0 0x8060080 100 1000
     USB error: error sending control message: Input/output error

       # No SCSI scanners found. If you expected something different, make sure that
       # you have loaded a SCSI driver for your SCSI adapter.

     found USB scanner (vendor=0x04b8, product=0x011b) at libusb:/dev/usb1:/dev/ugen0
       # Your USB scanner was (probably) detected. It may or may not be supported by
       # SANE. Try scanimage -L and read the backend's manpage.

       # Not checking for parallel port scanners.

       # Most Scanners connected to the parallel port or other proprietary ports
       # can't be detected by this program.

>From scanimage -L, I get:

     [sanei_debug] Setting debug level of sanei_usb to 255.
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner0: Device not configured
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner1: Device not configured
     usb_set_debug: Setting debugging level to 255 (on)
     usb_os_find_busses: Found /dev/usb0
     usb_os_find_busses: Found /dev/usb1
     usb_os_find_devices: Found /dev/ugen0 on /dev/usb1
     usb_control_msg: 128 6 512 0 0xbfbfece0 8 1000
     usb_control_msg: 128 6 512 0 0x80521a0 32 1000
     [sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011b) interface 0  at libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_init: found 1 devices
     [sanei_usb] sanei_usb_find_devices: vendor=0x1606, product=0x0010
     [sanei_usb] sanei_usb_find_devices: vendor=0x1606, product=0x0030
     [sanei_usb] sanei_usb_find_devices: vendor=0x1606, product=0x0130
     [sanei_debug] Setting debug level of sanei_usb to 255.
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner0: Device not configured
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner1: Device not configured
     usb_set_debug: Setting debugging level to 255 (on)
     [sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011b) interface 0  at libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_init: found 1 devices
     [sanei_usb] sanei_usb_find_devices: vendor=0x1606, product=0x0230
     [sanei_usb] sanei_usb_open: trying to open device `/dev/usbscanner'
     [sanei_usb] sanei_usb_open: can't find device `/dev/usbscanner' in list
     [sanei_debug] Setting debug level of sanei_usb to 255.
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner0: Device not configured
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner1: Device not configured
     usb_set_debug: Setting debugging level to 255 (on)
     [sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011b) interface 0  at libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_init: found 1 devices
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0001
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2004
     [sanei_debug] Setting debug level of sanei_usb to 255.
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner0: Device not configured
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner1: Device not configured
     usb_set_debug: Setting debugging level to 255 (on)
     [sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011b) interface 0  at libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_init: found 1 devices
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x1a20
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x1a26
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x2022
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x1a2a
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x2040
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x2060
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x207e
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20be
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20c0
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20b0
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20de
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20fc
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20fe
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x0002
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x0001
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2061
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2093
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2091
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2095
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2097
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x208d
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x20ff
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x208f
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x20fd
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0114
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x011f
     usb_os_find_busses: Found /dev/usb0
     usb_os_find_busses: Found /dev/usb1
     usb_os_find_devices: Found /dev/ugen0 on /dev/usb1
     [sanei_debug] Setting debug level of sanei_usb to 255.
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner0: Device not configured
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner1: Device not configured
     usb_set_debug: Setting debugging level to 255 (on)
     [sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011b) interface 0  at libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_init: found 1 devices
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0010
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0011
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0017
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0015
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0017
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0013
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0013
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0011
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0010
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0014
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0015
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0014
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0016
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0017
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0017
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0007
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x000f
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x000f
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0005
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0014
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0012
     [sanei_usb] sanei_usb_find_devices: vendor=0x0400, product=0x1000
     [sanei_usb] sanei_usb_find_devices: vendor=0x0400, product=0x1001
     [sanei_usb] sanei_usb_find_devices: vendor=0x0400, product=0x1001
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2007
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2008
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2009
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2013
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2015
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2016
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0505
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0605
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x010f
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x011d
     [sanei_usb] sanei_usb_find_devices: vendor=0x1606, product=0x0060
     [sanei_usb] sanei_usb_find_devices: vendor=0x1606, product=0x0160
     [sanei_usb] sanei_usb_find_devices: vendor=0x049f, product=0x001a
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x2206
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x2207
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x2208
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x220d
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x220e
     [sanei_debug] Setting debug level of sanei_usb to 255.
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner0: Device not configured
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner1: Device not configured
     usb_set_debug: Setting debugging level to 255 (on)
     [sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011b) interface 0  at libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_init: found 1 devices
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0006
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0001
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0008
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0002
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0873
     [sanei_debug] Setting debug level of sanei_usb to 255.
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner0: Device not configured
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner1: Device not configured
     usb_set_debug: Setting debugging level to 255 (on)
     [sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011b) interface 0  at libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_init: found 1 devices
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0010
     [sanei_debug] Setting debug level of sanei_usb to 255.
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner0: Device not configured
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner1: Device not configured
     usb_set_debug: Setting debugging level to 255 (on)
     [sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011b) interface 0  at libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_init: found 1 devices
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x1005
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x1105
     [sanei_debug] Setting debug level of sanei_usb to 255.
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner0: Device not configured
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner1: Device not configured
     usb_set_debug: Setting debugging level to 255 (on)
     [sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011b) interface 0  at libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_init: found 1 devices
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0101
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0401
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0201
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0601
     [sanei_debug] Setting debug level of sanei_usb to 255.
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner0: Device not configured
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner1: Device not configured
     usb_set_debug: Setting debugging level to 255 (on)
     [sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011b) interface 0  at libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_init: found 1 devices
     [sanei_usb] sanei_usb_find_devices: vendor=0x05d8, product=0x4002
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x021e
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0218
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0219
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x021a
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x021d
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x021c
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0210
     [sanei_usb] sanei_usb_find_devices: vendor=0x043d, product=0x002d
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0401
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0400
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0402
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0403
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0413
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0422
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2011
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x201b
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2017
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x201a
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x201f
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2014
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a7, product=0x0444
     [sanei_debug] Setting debug level of sanei_usb to 255.
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner0: Device not configured
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner1: Device not configured
     usb_set_debug: Setting debugging level to 255 (on)
     [sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011b) interface 0  at libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_init: found 1 devices
     [sanei_debug] Setting debug level of epson to 255.
     [epson] sane_init: sane-backends 1.0.14
     [sanei_debug] Setting debug level of sanei_usb to 255.
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner0: Device not configured
     [sanei_usb] sanei_usb_init: couldn't open /dev/uscanner1: Device not configured
     usb_set_debug: Setting debugging level to 255 (on)
     [sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011b) interface 0  at libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_init: found 1 devices
     [epson] sane_init, ># epson.conf<
     [epson] sane_init, >#<
     [epson] sane_init, ># here are some examples for how to configure the EPSON backend<
     [epson] sane_init, >#<
     [epson] sane_init, ># SCSI scanner:<
     [epson] sane_init, >scsi EPSON<
     [epson] sane_init, >#<
     [epson] sane_init, ># Parallel port scanner:<
     [epson] sane_init, >#pio 0x278<
     [epson] sane_init, >#pio 0x378<
     [epson] sane_init, >#pio 0x3BC<
     [epson] sane_init, >#<
     [epson] sane_init, ># USB scanner:<
     [epson] sane_init, ># There are two different methods of configuring a USB scanner: libusb and the kernel module<
     [epson] sane_init, ># For any system with libusb support (which is pretty much any recent Linux distribution) the<
     [epson] sane_init, ># following line is sufficient. This however assumes that the connected scanner (or to be more<
     [epson] sane_init, ># accurate, it's device ID) is known to the backend.<
     [epson] sane_init, >usb<
     [epson] attach_one_usb()
     [epson] SANE Epson Backend v0.2.41 - 2004-02-01
     [epson] attach(, 3)
     [epson] attach: opening 
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0101
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0103
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x010c
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0104
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x010b
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0106
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0109
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x010a
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0107
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x010e
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x010f
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0110
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0112
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0116
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x011b
     [epson] attach_one_usb(libusb:/dev/usb1:/dev/ugen0)
     [epson] SANE Epson Backend v0.2.41 - 2004-02-01
     [epson] attach(libusb:/dev/usb1:/dev/ugen0, 3)
     [epson] attach: opening libusb:/dev/usb1:/dev/ugen0
     [sanei_usb] sanei_usb_open: trying to open device `libusb:/dev/usb1:/dev/ugen0'
     [sanei_usb] sanei_usb_open: found bulk-in endpoint (address 1)
     [sanei_usb] sanei_usb_open: found bulk-out endpoint (address 2)
     [sanei_usb] sanei_usb_open: opened usb device `libusb:/dev/usb1:/dev/ugen0' (*dn=0)
     [sanei_usb] sanei_usb_get_vendor_product: device 0: vendorID: 0x04b8, productID: 0x011b
     [epson] Found valid EPSON scanner: 0x4b8/0x11b (vendorID/productID)
     [epson] reset()
     [epson] send buf, size = 2
     [epson] buf[0] 1b .
     [epson] buf[1] 40 @
     [sanei_usb] sanei_usb_write_bulk: trying to write 2 bytes
     [sanei_usb] 0000: 1B 40                                           .@..............
     [sanei_usb] sanei_usb_write_bulk: wanted 2 bytes, wrote 2 bytes
     [sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
     USB error: error reading from bulk endpoint /dev/ugen0.01: Connection timed out
     [sanei_usb] sanei_usb_read_bulk: read failed: Connection timed out
     USB error: usb_clear_halt called, unimplemented on BSD
     [epson] receive buf, expected = 1, got = 0
     [epson] get_identity_information()
     [epson] send buf, size = 2
     [epson] buf[0] 1b .
     [epson] buf[1] 49 I
     [sanei_usb] sanei_usb_write_bulk: trying to write 2 bytes
     [sanei_usb] 0000: 1B 49                                           .I..............

At this point scanimage just hangs forever.

Cheers,
Brook