[sane-devel] Epson Perfection 2400 Photo scanner problems

brook@biology.nmsu.edu brook@biology.nmsu.edu
Mon, 24 May 2004 08:43:45 -0600


 > The epson backend recognized your scanner OK, reset it (ESC-@) and
 > then queries the scanner for its ID (ESC-I).  Looks like it isn't
 > getting an answer, so I'd suggest you look what is happening in the
 > USB layer.
 > 
 > You can see what's going on by setting the SANE_DEBUG_SANEI_USB
 > environment variable to something sensible.  IIRC, a value of 5 to 10
 > should be more or less sensible.

Thanks for the tip.  It seems there are problems with the USB
communications (see I/O and timeout errors below).  Does anyone here
know how to set up USB correctly on a NetBSD box?  Note that the
machine has a USB mouse that works fine.

Here is the output from 'sane-find-scanner':

     [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 0x8052100 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 0x805a000 100 1000
     USB error: error sending control message: Input/output error
     usb_control_msg: 128 6 770 0 0x805a080 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.

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

Here is the output from 'scanimage -L':

     [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 0xbfbfecf0 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, attach=0x4815dd64
     [sanei_usb] sanei_usb_find_devices: vendor=0x1606, product=0x0030, attach=0x4815dd64
     [sanei_usb] sanei_usb_find_devices: vendor=0x1606, product=0x0130, attach=0x4815dd64
     [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, attach=0x48172e2c
     [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=0x04a5, product=0x1a20, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x2022, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x1a2a, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x2040, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x2060, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x207e, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20c0, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20b0, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20de, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20fc, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20fe, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x0002, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x0001, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2061, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2093, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2091, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2095, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2097, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x208d, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x20ff, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x208f, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x20fd, attach=0x481becb4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0114, attach=0x481becb4
     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, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0011, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0017, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0015, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0017, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0013, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0013, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0011, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0010, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0014, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0015, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0014, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0016, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0017, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0017, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0007, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x000f, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x000f, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0005, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0014, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0012, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x0400, product=0x1000, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x0400, product=0x1001, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2007, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2008, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2009, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2013, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2015, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2016, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0505, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0605, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x010f, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x011d, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x1606, product=0x0060, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x1606, product=0x0160, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x049f, product=0x001a, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x2206, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x2207, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x220d, attach=0x4820aad4
     [sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x220e, attach=0x4820aad4
     [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, attach=0x4828e2e4
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0001, attach=0x4828e2e4
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0008, attach=0x4828e2e4
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0002, attach=0x4828e2e4
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0873, attach=0x4828e2e4
     [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, attach=0x482f2f4c
     [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, attach=0x483136e0
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x1105, attach=0x483136e0
     [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, attach=0x4832150c
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0401, attach=0x4832150c
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0201, attach=0x4832150c
     [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0601, attach=0x4832150c
     [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, attach=0x483472a8
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x021e, attach=0x483472a8
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0218, attach=0x483472a8
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0219, attach=0x483472a8
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x021d, attach=0x483472a8
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x021c, attach=0x483472a8
     [sanei_usb] sanei_usb_find_devices: vendor=0x055f, product=0x0210, attach=0x483472a8
     [sanei_usb] sanei_usb_find_devices: vendor=0x043d, product=0x002d, attach=0x483472a8
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0401, attach=0x483472a8
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0400, attach=0x483472a8
     [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x0403, attach=0x483472a8
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2011, attach=0x483472a8
     [sanei_usb] sanei_usb_find_devices: vendor=0x0458, product=0x2017, attach=0x483472a8
     [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.12
     [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 - only enable this if you have an EPSON scanner. It could<
     [epson] sane_init, >#               otherwise block your non-EPSON scanner from being<
     [epson] sane_init, >#               recognized.<
     [epson] sane_init, >#		Depending on your distribution, you may need either the<
     [epson] sane_init, >#		first or the second entry.<
     [epson] sane_init, >#usb /dev/usbscanner0<
     [epson] sane_init, >#usb /dev/usb/scanner0<
     [epson] sane_init, >usb libusb:/dev/usb1:/dev/ugen0<
     [epson] attach_one_usb(libusb:/dev/usb1:/dev/ugen0)
     [epson] SANE Epson Backend v0.2.36 - 2003-03-26
     [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] 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..............

For reference, the following is a portion of the kernel boot probe
that relates to the USB devices:

     pci0 at mainbus0 bus 0: configuration mode 1
     pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
     uhci0 at pci0 dev 29 function 0: Intel 82801CA/CAM USB Controller (rev. 0x02)
     uhci0: interrupting at irq 11
     usb0 at uhci0: USB revision 1.0
     uhub0 at usb0
     uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
     uhub0: 2 ports with 2 removable, self powered
     uhci1 at pci0 dev 29 function 2: Intel 82801CA/CAM USB Controller (rev. 0x02)
     uhci1: interrupting at irq 11
     usb1 at uhci1: USB revision 1.0
     uhub1 at usb1
     uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
     uhub1: 2 ports with 2 removable, self powered
     uhidev0 at uhub0 port 1 configuration 1 interface 0ugen0 at uhub1 port 1
     ugen0: EPSON EPSON Scanner, rev 2.00/1.00, addr 2

     uhidev0: Logitech USB-PS/2 Optical Mouse, rev 2.00/11.10, addr 2, iclass 3/1
     ums0 at uhidev0: 3 buttons and Z dir.
     wsmouse1 at ums0 mux 0

Thanks alot for your help.

Cheers,
Brook