[sane-devel] Problems with libusb and Snapscan 1236U (maybe similar to others): USB dump

m. allan noah anoah@pfeiffer.edu
Mon, 1 Mar 2004 11:46:58 -0500 (EST)


oliver, not sure if it helps you, but the fujitsu backend does this same 
thing on second scans if the first scan used an odd number of usb packets 
and then the backend exits. as a simple test, you could add a global 
packet counter, and throw an additional pointless request onto the end, 
before closing the device.

this will require you to actually chop up your large packets, rather than 
have libusb do it for you.

if that works, then perhaps there is a libusb/linux kernel error that 
prevents the DATA0/1 toggle from frobbing.

allan

On Mon, 1 Mar 2004, D. Winkler wrote:

> Hi Oliver,
> 
> maybe you can use this dump here:
> 
> 
> The FIRST call of scanimage -L:
> 
> 
> alpha:/var/cache/apt/archives# SANE_DEBUG_SANEI_USB=255 scanimage -L  
> [sanei_debug] Setting debug level of sanei_usb to 255.
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner0: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner1: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner2: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner3: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner4: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner5: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner6: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner7: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner8: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner9: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner10: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner11: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner12: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner13: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner14: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner15: No such
> device
> usb_set_debug: Setting debugging level to 255 (on)
> usb_os_find_busses: Found 002
> usb_os_find_busses: Found 001
> usb_os_find_busses: Skipping non bus directory devices
> usb_os_find_devices: Found 001 on 002
> usb_os_find_devices: Found 008 on 001
> usb_os_find_devices: Found 003 on 001
> skipped 1 class/vendor specific interface descriptors
> usb_os_find_devices: Found 002 on 001
> usb_os_find_devices: Found 001 on 001
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [sanei_usb] sanei_usb_init: found libusb device (0x06bd/0x0002)
> interface 0  at libusb:001:008
> [sanei_usb] sanei_usb_init: device 0x046d/0xc001, interface 0 doesn't
> look like a scanner (0/3)
> [sanei_usb] sanei_usb_init: device 0x046d/0xc001: no suitable interfaces
> [sanei_usb] sanei_usb_init: device 0x0698/0x2002, interface 0 doesn't
> look like a scanner (9/9)
> [sanei_usb] sanei_usb_init: device 0x0698/0x2002: no suitable interfaces
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [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=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_open: trying to open device `libusb:001:008'
> [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: found interupt-in endpoint (address 3)
> [sanei_usb] sanei_usb_open: opened usb device `libusb:001:008' (*dn=0)
> [sanei_usb] sanei_usb_get_vendor_product: device 0: vendorID: 0x06bd,
> productID: 0x0002
> [sanei_usb] sanei_usb_write_bulk: trying to write 6 bytes
> [sanei_usb] 0000: 12 00 00 00 24 00                              
> ....$...........
> [sanei_usb] sanei_usb_write_bulk: wanted 6 bytes, wrote 6 bytes
> [sanei_usb] sanei_usb_read_bulk: trying to read 8 bytes
> [sanei_usb] 0000: F9 00 00 00 00 00 00 00                        
> ................
> [sanei_usb] sanei_usb_read_bulk: wanted 8 bytes, got 8 bytes
> [sanei_usb] sanei_usb_read_bulk: trying to read 36 bytes
> [sanei_usb] 0000: 06 00 02 02 49 00 00 00 41 47 46 41 20 20 20 20
> ....I...AGFA    
> [sanei_usb] 0010: 53 4E 41 50 53 43 41 4E 20 31 32 33 36 55 20 20
> SNAPSCAN 1236U  
> [sanei_usb] 0020: 30 30 37 32                                    
> 0072............
> [sanei_usb] sanei_usb_read_bulk: wanted 36 bytes, got 36 bytes
> [sanei_usb] sanei_usb_read_bulk: trying to read 8 bytes
> [sanei_usb] 0000: FB 00 00 00 00 00 00 00                        
> ................
> [sanei_usb] sanei_usb_read_bulk: wanted 8 bytes, got 8 bytes
> [sanei_usb] sanei_usb_get_vendor_product: device 0: vendorID: 0x06bd,
> productID: 0x0002
> [sanei_usb] sanei_usb_close: closing device 0
> [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
> device `snapscan:libusb:001:008' is a AGFA SNAPSCAN 1236U flatbed
> scanner
> 
> 
> 
> 
> **********************************
> 
> The SECOND call of scanimage -L
> 
> 
> alpha:/var/cache/apt/archives# SANE_DEBUG_SANEI_USB=255 scanimage -L 
> [sanei_debug] Setting debug level of sanei_usb to 255.
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner0: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner1: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner2: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner3: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner4: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner5: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner6: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner7: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner8: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner9: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner10: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner11: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner12: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner13: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner14: No such
> device
> [sanei_usb] sanei_usb_init: couldn't open /dev/usb/scanner15: No such
> device
> usb_set_debug: Setting debugging level to 255 (on)
> usb_os_find_busses: Found 002
> usb_os_find_busses: Found 001
> usb_os_find_busses: Skipping non bus directory devices
> usb_os_find_devices: Found 001 on 002
> usb_os_find_devices: Found 008 on 001
> usb_os_find_devices: Found 003 on 001
> skipped 1 class/vendor specific interface descriptors
> usb_os_find_devices: Found 002 on 001
> usb_os_find_devices: Found 001 on 001
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [sanei_usb] sanei_usb_init: found libusb device (0x06bd/0x0002)
> interface 0  at libusb:001:008
> [sanei_usb] sanei_usb_init: device 0x046d/0xc001, interface 0 doesn't
> look like a scanner (0/3)
> [sanei_usb] sanei_usb_init: device 0x046d/0xc001: no suitable interfaces
> [sanei_usb] sanei_usb_init: device 0x0698/0x2002, interface 0 doesn't
> look like a scanner (9/9)
> [sanei_usb] sanei_usb_init: device 0x0698/0x2002: no suitable interfaces
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [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=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_open: trying to open device `libusb:001:008'
> [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: found interupt-in endpoint (address 3)
> [sanei_usb] sanei_usb_open: opened usb device `libusb:001:008' (*dn=0)
> [sanei_usb] sanei_usb_get_vendor_product: device 0: vendorID: 0x06bd,
> productID: 0x0002
> [sanei_usb] sanei_usb_write_bulk: trying to write 6 bytes
> [sanei_usb] 0000: 12 00 00 00 24 00                              
> ....$...........
> [sanei_usb] sanei_usb_write_bulk: wanted 6 bytes, wrote 6 bytes
> [sanei_usb] sanei_usb_read_bulk: trying to read 8 bytes
> 
> 
> /* ... time goes by .... */
> 
> 
> USB error: error reading from bulk endpoint 0x81: Connection timed out
> [sanei_usb] sanei_usb_read_bulk: read failed: Connection timed out
> [sanei_usb] sanei_usb_close: closing device 0
> [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
> 
> 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).
> 
> 
> *******************
> 
> demsg wants to tell me:
> 
> [...]
> usb 1-1: bulk timeout on ep1in
> usbfs: USBDEVFS_BULK failed dev 8 ep 0x81 len 8 ret -110
> 
> 
> 
> Maybe this could help you or others ...
> 
> 
> Greetings
> Daniel
> 
> 
> 

-- 
"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera