[sane-devel] Fujitsu fi-4120C USB timeouts

m. allan noah anoah@pfeiffer.edu
Wed, 4 May 2005 18:47:56 -0400 (EDT)


simon, i guess you could say that i am maintaining the fujitsu backend, 
along with oliver s. i have seen the timeouts that you have reported, and 
find that they seem to have two root causes:

1. linux kernel doing something weird with the data0/1 usb toggle,
2. the firmware on the scanner gets confused by this and craps out.

later kernel revisions seem to help, but 2.4.x was better than 2.6.x

i have (in a proprietary app that does not use sane) had some luck with 
changing the backend to always execute an even number of commands before 
the device is closed, but this is not always workable due to retransmits 
skewing my counts.

in the last month, i have re-written the aforementioned app, and am no 
longer seeing the timeouts on an fc2 machine running the latest 2.6.10 
erratta kernel. i have yet to find the time to figure out how to get sane 
to do the same thing...

allan

On Wed, 4 May 2005, Simon Glass wrote:

> Hi,
>
> I am writing a program called maxview a bit like PaperPort on Windows.
>
>   http://maxview.sf.net
>
> I have had great results with the 4340C on SCSI, but can't get the 4120C to 
> behave itself on USB.
>
> I get timeouts in usb bulk read. It seems that if it continues OK it will 
> sometimes carry on and scan. But it seems broken. Does anyone have any ideas 
> on where I should look? I reduced the timeout from 30 seconds to 3, but that 
> is not really a solution.
>
> Thanks,
> Simon
>
> error is this:
>
>
> [sanei_usb] sanei_usb_write_bulk: wanted 31 bytes, wrote 31 bytes
> [fujitsu] wrote 31 bytes
> [fujitsu] try to read 96 bytes
> [sanei_usb] sanei_usb_read_bulk: trying to read 96 bytes
> [sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily 
> unavailable
> [fujitsu] read 0 bytes
> [fujitsu] *** Got error 9 trying to read
> [fujitsu] *** Try to read CSW
> [sanei_usb] sanei_usb_read_bulk: trying to read 13 bytes
> [sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily 
> unavailable
> [fujitsu] *** Read CSW
>
>
>
> full log:
>
> QSettings::sync: filename is null/empty
> QSettings::sync: filename is null/empty
> [sanei_debug] Setting debug level of sanei_usb to 300.
> [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 004
> usb_os_find_busses: Found 003
> 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 004
> usb_os_find_devices: Found 001 on 003
> usb_os_find_devices: Found 002 on 002
> usb_os_find_devices: Found 001 on 002
> error obtaining child information: Inappropriate ioctl for device
> 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: device 0x0000/0x0000 looks like a root hub
> [sanei_usb] sanei_usb_init: found libusb device (0x04c5/0x1041) interface 0 
> at libusb:002:002
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [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=0x05da, product=0x30d4
> [sanei_debug] Setting debug level of sanei_usb to 300.
> [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_os_init: Found USB VFS at /proc/bus/usb
> usb_set_debug: Setting debugging level to 255 (on)
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [sanei_usb] sanei_usb_init: found libusb device (0x04c5/0x1041) interface 0 
> at libusb:002:002
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [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=0x03f0, product=0x0000
> [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x2205
> [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x2005
> [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x2005
> [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0705
> [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0805
> [sanei_debug] Setting debug level of sanei_usb to 300.
> [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_os_init: Found USB VFS at /proc/bus/usb
> usb_set_debug: Setting debugging level to 255 (on)
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [sanei_usb] sanei_usb_init: found libusb device (0x04c5/0x1041) interface 0 
> at libusb:002:002
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [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=0x03f0, product=0x0105
> [sanei_debug] Setting debug level of sanei_usb to 300.
> [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_os_init: Found USB VFS at /proc/bus/usb
> usb_set_debug: Setting debugging level to 255 (on)
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [sanei_usb] sanei_usb_init: found libusb device (0x04c5/0x1041) interface 0 
> at libusb:002:002
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [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=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=0x0050
> [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_usb] sanei_usb_open: trying to open device `auto'
> [sanei_usb] sanei_usb_open: can't find device `auto' in list
> [sanei_debug] Setting debug level of fujitsu to 300.
> [fujitsu] sane_init
> [sanei_debug] Setting debug level of sanei_usb to 300.
> [sanei_usb] sanei_usb_init
> [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_os_init: Found USB VFS at /proc/bus/usb
> usb_set_debug: Setting debugging level to 255 (on)
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [sanei_usb] sanei_usb_init: found libusb device (0x04c5/0x1041) interface 0 
> at libusb:002:002
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
> [sanei_usb] sanei_usb_init: found 1 devices
> [fujitsu] sane_init: reading config file fujitsu.conf
> [fujitsu] attach_scanner: /dev/sg2
> [fujitsu] attach_scanner: opening /dev/sg2
> [fujitsu] attachScanner opening SCSI device
> [fujitsu] attach_scanner: open failed
> [sanei_usb] sanei_usb_find_devices: vendor=0x04c5, product=0x1041
> [fujitsu] attach_scanner: libusb:002:002
> [fujitsu] attach_scanner: opening libusb:002:002
> [fujitsu] attachScanner opening USB device
> [sanei_usb] sanei_usb_open: trying to open device `libusb:002:002'
> [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: 0x8258e30
> [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: 0x8258e44
> [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: opened usb device `libusb:002:002' (*dn=0)
> [fujitsu] identify_scanner
> [fujitsu] do_inquiry
> [fujitsu] inquiry
> [fujitsu] 000: 12 00 00 00 60 00
> [fujitsu] try inquiry 0
> [fujitsu] <cmd<
> [fujitsu] 000: 12 00 00 00 60 00
> [fujitsu] *** URB going out:
> [fujitsu] 000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 010: 00 00 00 12 00 00 00 60 00 00 00 00 00 00 00
> [fujitsu] try to write 31 bytes
> [sanei_usb] sanei_usb_write_bulk: trying to write 31 bytes
> [sanei_usb] 0000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> C...............
> [sanei_usb] 0010: 00 00 00 12 00 00 00 60 00 00 00 00 00 00 00 
> .......`........
> [sanei_usb] sanei_usb_write_bulk: wanted 31 bytes, wrote 31 bytes
> [fujitsu] wrote 31 bytes
> [fujitsu] try to read 96 bytes
> [sanei_usb] sanei_usb_read_bulk: trying to read 96 bytes
> [sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily 
> unavailable
> [fujitsu] read 0 bytes
> [fujitsu] *** Got error 9 trying to read
> [fujitsu] *** Try to read CSW
> [sanei_usb] sanei_usb_read_bulk: trying to read 13 bytes
> [sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily 
> unavailable
> [fujitsu] *** Read CSW
> [fujitsu]
> [fujitsu] do_usb_cmd: asked 96 bytes, got 0
> [fujitsu] do_usb_cmd: returning 0x00000009
> [fujitsu] do_usb_cmd: returning 0 bytes:
> [fujitsu] try inquiry 1
> [fujitsu] <cmd<
> [fujitsu] 000: 12 00 00 00 60 00
> [fujitsu] *** URB going out:
> [fujitsu] 000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 010: 00 00 00 12 00 00 00 60 00 00 00 00 00 00 00
> [fujitsu] try to write 31 bytes
> [sanei_usb] sanei_usb_write_bulk: trying to write 31 bytes
> [sanei_usb] 0000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> C...............
> [sanei_usb] 0010: 00 00 00 12 00 00 00 60 00 00 00 00 00 00 00 
> .......`........
> [sanei_usb] sanei_usb_write_bulk: wanted 31 bytes, wrote 31 bytes
> [fujitsu] wrote 31 bytes
> [fujitsu] try to read 96 bytes
> [sanei_usb] sanei_usb_read_bulk: trying to read 96 bytes
> [sanei_usb] 0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> ................
> [sanei_usb] 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> ................
> [sanei_usb] sanei_usb_read_bulk: wanted 96 bytes, got 32 bytes
> [fujitsu] read 32 bytes
> [fujitsu] *** Data read:
> [fujitsu] 000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] *** Try to read CSW
> [sanei_usb] sanei_usb_read_bulk: trying to read 13 bytes
> [sanei_usb] 0000: 53 00 00 00 00 00 00 00 00 00 00 00 00 S...............
> [sanei_usb] sanei_usb_read_bulk: wanted 13 bytes, got 13 bytes
> [fujitsu] *** Read CSW
> [fujitsu] 000: 53 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] do_usb_cmd: asked 96 bytes, got 32
> [fujitsu] do_usb_cmd: returning 32 bytes:
> [fujitsu] >rslt>
> [fujitsu] 000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] try inquiry 2
> [fujitsu] <cmd<
> [fujitsu] 000: 12 00 00 00 60 00
> [fujitsu] *** URB going out:
> [fujitsu] 000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 010: 00 00 00 12 00 00 00 60 00 00 00 00 00 00 00
> [fujitsu] try to write 31 bytes
> [sanei_usb] sanei_usb_write_bulk: trying to write 31 bytes
> [sanei_usb] 0000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> C...............
> [sanei_usb] 0010: 00 00 00 12 00 00 00 60 00 00 00 00 00 00 00 
> .......`........
> [sanei_usb] sanei_usb_write_bulk: wanted 31 bytes, wrote 31 bytes
> [fujitsu] wrote 31 bytes
> [fujitsu] try to read 96 bytes
> [sanei_usb] sanei_usb_read_bulk: trying to read 96 bytes
> [sanei_usb] 0000: 06 00 02 02 5B 00 00 10 46 55 4A 49 54 53 55 20 
> ....[...FUJITSU
> [sanei_usb] 0010: 66 69 2D 34 31 32 30 43 64 6A 20 20 20 20 20 20 fi-4120Cdj
> [sanei_usb] 0020: 30 4B 30 30 00 00 00 00 00 00 00 00 03 00 00 00 
> 0K00............
> [sanei_usb] 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> ................
> [sanei_usb] 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> ................
> [sanei_usb] 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> ................
> [sanei_usb] sanei_usb_read_bulk: wanted 96 bytes, got 96 bytes
> [fujitsu] read 96 bytes
> [fujitsu] *** Data read:
> [fujitsu] 000: 06 00 02 02 5b 00 00 10 46 55 4a 49 54 53 55 20
> [fujitsu] 010: 66 69 2d 34 31 32 30 43 64 6a 20 20 20 20 20 20
> [fujitsu] 020: 30 4b 30 30 00 00 00 00 00 00 00 00 03 00 00 00
> [fujitsu] 030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] *** Try to read CSW
> [sanei_usb] sanei_usb_read_bulk: trying to read 13 bytes
> [sanei_usb] 0000: 53 00 00 00 00 00 00 00 00 00 00 00 00 S...............
> [sanei_usb] sanei_usb_read_bulk: wanted 13 bytes, got 13 bytes
> [fujitsu] *** Read CSW
> [fujitsu] 000: 53 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] do_usb_cmd: returning 96 bytes:
> [fujitsu] >rslt>
> [fujitsu] 000: 06 00 02 02 5b 00 00 10 46 55 4a 49 54 53 55 20
> [fujitsu] 010: 66 69 2d 34 31 32 30 43 64 6a 20 20 20 20 20 20
> [fujitsu] 020: 30 4b 30 30 00 00 00 00 00 00 00 00 03 00 00 00
> [fujitsu] 030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] Found FUJITSU scanner fi-4120Cdj version 0K00 on device 
> libusb:002:002, treating as fi-4x20
> [fujitsu] get_vital_product_data
> [fujitsu] get_vital_product_data
> [fujitsu] 000: 12 01 f0 00 64 00
> [fujitsu] <cmd<
> [fujitsu] 000: 12 01 f0 00 64 00
> [fujitsu] *** URB going out:
> [fujitsu] 000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 010: 00 00 00 12 01 f0 00 64 00 00 00 00 00 00 00
> [fujitsu] try to write 31 bytes
> [sanei_usb] sanei_usb_write_bulk: trying to write 31 bytes
> [sanei_usb] 0000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> C...............
> [sanei_usb] 0010: 00 00 00 12 01 F0 00 64 00 00 00 00 00 00 00 
> .......d........
> [sanei_usb] sanei_usb_write_bulk: wanted 31 bytes, wrote 31 bytes
> [fujitsu] wrote 31 bytes
> [fujitsu] try to read 100 bytes
> [sanei_usb] sanei_usb_read_bulk: trying to read 100 bytes
> [sanei_usb] 0000: 06 F0 02 00 5F 02 58 02 58 11 02 58 02 58 00 32 
> ...._.X.X..X.X.2
> [sanei_usb] 0010: 00 32 FF FC 00 00 13 EC 00 00 41 A0 8F 00 00 00 
> .2........A.....
> [sanei_usb] 0020: 92 0A 01 00 00 00 00 00 EF BF 00 04 00 00 00 00 
> ................
> [sanei_usb] 0030: 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> ................
> [sanei_usb] 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> ................
> [sanei_usb] 0050: 00 00 00 FF 00 00 41 01 A8 40 08 00 00 00 00 00 
> ......A..@......
> [sanei_usb] 0060: 00 00 00 00 ................
> [sanei_usb] sanei_usb_read_bulk: wanted 100 bytes, got 100 bytes
> [fujitsu] read 100 bytes
> [fujitsu] *** Data read:
> [fujitsu] 000: 06 f0 02 00 5f 02 58 02 58 11 02 58 02 58 00 32
> [fujitsu] 010: 00 32 ff fc 00 00 13 ec 00 00 41 a0 8f 00 00 00
> [fujitsu] 020: 92 0a 01 00 00 00 00 00 ef bf 00 04 00 00 00 00
> [fujitsu] 030: 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 050: 00 00 00 ff 00 00 41 01 a8 40 08 00 00 00 00 00
> [fujitsu] 060: 00 00 00 00
> [fujitsu] *** Try to read CSW
> [sanei_usb] sanei_usb_read_bulk: trying to read 13 bytes
> [sanei_usb] 0000: 53 00 00 00 00 00 00 00 00 00 00 00 00 S...............
> [sanei_usb] sanei_usb_read_bulk: wanted 13 bytes, got 13 bytes
> [fujitsu] *** Read CSW
> [fujitsu] 000: 53 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] do_usb_cmd: returning 100 bytes:
> [fujitsu] >rslt>
> [fujitsu] 000: 06 f0 02 00 5f 02 58 02 58 11 02 58 02 58 00 32
> [fujitsu] 010: 00 32 ff fc 00 00 13 ec 00 00 41 a0 8f 00 00 00
> [fujitsu] 020: 92 0a 01 00 00 00 00 00 ef bf 00 04 00 00 00 00
> [fujitsu] 030: 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 050: 00 00 00 ff 00 00 41 01 a8 40 08 00 00 00 00 00
> [fujitsu] standard options
> [fujitsu]   basic x res: 600 dpi
> [fujitsu]   basic y res: 600 dpi
> [fujitsu]   step x res 1 dpi
> [fujitsu]   step y res 1 dpi
> [fujitsu]   max x res 600 dpi
> [fujitsu]   max y res 600 dpi
> [fujitsu]   min x res 50 dpi
> [fujitsu]   max y res 50 dpi
> [fujitsu]   window width 21.59 cm
> [fujitsu]   window length 71.12 cm
> [fujitsu] functions:
> [fujitsu]    binary scanning: 1
> [fujitsu]    gray scanning: 1
> [fujitsu]    half-tone scanning: 1
> [fujitsu]    color binary scanning: 0
> [fujitsu]    color scanning: 1
> [fujitsu]    color half-tone scanning: 0
> [fujitsu] image memory: 16777216 bytes
> [fujitsu] physical functions:
> [fujitsu]    operator panel 1
> [fujitsu]    barcode 0
> [fujitsu]    endorser 0
> [fujitsu]    duplex 1
> [fujitsu]    flatbed 0
> [fujitsu]    adf 1
> [fujitsu] image control functions:
> [fujitsu]    brightness steps: 0
> [fujitsu]    threshold steps: 255
> [fujitsu]    contrast steps: 0
> [fujitsu]    number of build in gamma patterns: 0
> [fujitsu]    number of download gamma patterns: 1
> [fujitsu] compression processing functions:
> [fujitsu]    compression MR: 0
> [fujitsu]    compression MR: 0
> [fujitsu]    compression MMR: 0
> [fujitsu]    compression JBIG: 0
> [fujitsu]    compression JPG1: 1
> [fujitsu]    compression JPG2: 0
> [fujitsu]    compression JPG3: 0
> [fujitsu] image processing functions:
> [fujitsu]    black and white reverse: 1
> [fujitsu]    automatic binary DTC: 0
> [fujitsu]    simplified DTC: 1
> [fujitsu]    autline extraction: 0
> [fujitsu]    image emphasis: 1
> [fujitsu]    automatic separation: 0
> [fujitsu]    mirror image: 0
> [fujitsu]    white level follower: 0
> [fujitsu]
>
> [fujitsu] range: 14149222 46609203
> [fujitsu] 	ADF: present
> [fujitsu] 	Duplex Unit: present
> [fujitsu] 	Duplex Raster Offset: 0
> [fujitsu] 	Color Raster Offset: 0
> [sanei_usb] sanei_usb_close: closing device 0
> [fujitsu] attach_scanner: done
> [fujitsu] sane_get_devices 0
> [fujitsu] sane_open: device /dev/sg2 requested
> [fujitsu] sane_open: no device found
> [fujitsu] sane_open: device libusb:002:002 requested
> [fujitsu] sane_open: device libusb:002:002 found
> [fujitsu] init_options
> [fujitsu] init_options: set compression 1
> [fujitsu] ok compression 1
> [fujitsu] init_options:ok
> [fujitsu] calculateDerivedValues
> [fujitsu] 	top_margin: 0
> [fujitsu] 	left_margin: 0
> [fujitsu] 	scan_width: 0
> [fujitsu] 	scan_height: 0
> [fujitsu] calculateDerivedValues: ok
> [fujitsu] sane_control_option: get value "filler"
> [fujitsu] 	cap = 4
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_get_option_descriptor: "duplex"
> [fujitsu] sane_get_option_descriptor: "duplex"
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_get_option_descriptor: "duplex"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_get_option_descriptor: "duplex"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_get_option_descriptor: "mode"
> option-map IS empty
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_control_option: get value "source"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "duplex"
> [fujitsu] sane_control_option: get value "duplex"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_get_option_descriptor: "duplex"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_control_option: get value "resolution"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_get_option_descriptor: "duplex"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_control_option: get value "y-resolution"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_control_option: get value "mode"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_control_option: get value "source"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "duplex"
> [fujitsu] sane_control_option: get value "duplex"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_get_option_descriptor: "duplex"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_control_option: get value "resolution"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_get_option_descriptor: "duplex"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_control_option: get value "y-resolution"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_control_option: get value "mode"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_control_option: set value "mode"
> [fujitsu] calculateDerivedValues
> [fujitsu] 	top_margin: 0
> [fujitsu] 	left_margin: 0
> [fujitsu] 	scan_width: 10157
> [fujitsu] 	scan_height: 14031
> [fujitsu] 	scan_width corrected: 10176
> [fujitsu] calculateDerivedValues: ok
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_control_option: get value "source"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "duplex"
> [fujitsu] sane_control_option: get value "duplex"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_get_option_descriptor: "duplex"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_control_option: get value "resolution"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "filler"
> [fujitsu] sane_get_option_descriptor: "source"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_get_option_descriptor: "duplex"
> [fujitsu] sane_get_option_descriptor: "resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_control_option: get value "y-resolution"
> [fujitsu] 	cap = 5
> [fujitsu] sane_get_option_descriptor: "y-resolution"
> [fujitsu] sane_get_option_descriptor: "mode"
> [fujitsu] sane_control_option: get value "mode"
> [fujitsu] 	cap = 5
>
>
>

-- 
"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