[sane-devel] "Error during device I/O" with Fujitsu fi65-F (epjitsu backend)

m. allan noah kitno455 at gmail.com
Mon Mar 16 12:26:04 UTC 2015


I have attached a minor patch to the backend. The idea is to send
commands in the same order as the windows driver, starting with get
hardware status. If this does not fix it, I will move on to set
window, which looks like it should be after the initial coarse
calibration payload.

allan

On Mon, Mar 16, 2015 at 7:34 AM, m. allan noah <kitno455 at gmail.com> wrote:
> Hmm- the scanner is upset that we tried to send window data. Perhaps
> it wants some other command to be sent first. I will look at your pcap
> again and come up with a patch
>
> allan
>
> On Mon, Mar 16, 2015 at 3:30 AM, Jonas Neubert <jonas.neubert at gmail.com> wrote:
>> I believe all debug output I sent so far (both SANE and Windows) was with 300dpi setting, for scanimage it's the default value for the --resolution option in the output of 'scanimage -h'. Anyway, ran it again, this time with resolution and mode options explicitly set, still same behavior, see debug output below.
>>
>> Note that I already had SANE_DEBUG_EPJITSU=25 set before. Just in case you meant increasing it to 35: https://gist.github.com/jonemo/8e0b28f15e7e7431975a
>>
>> -Jonas
>>
>>
>>     jonas at sane-scanner:~$ sudo SANE_DEBUG_EPJITSU=25 scanimage --resolution=300 --mode=Color > file.npm
>>     [sanei_debug] Setting debug level of epjitsu to 25.
>>     [epjitsu] sane_init: start
>>     [epjitsu] sane_init: epjitsu backend 1.0.27, from sane-backends 1.0.25git
>>     [epjitsu] sane_init: finish
>>     [epjitsu] sane_get_devices: start
>>     [epjitsu] sane_get_devices: reading config file epjitsu.conf
>>     [epjitsu] sane_get_devices: firmware '/usr/share/sane/epjitsu/60f_0A00.nal'
>>     [epjitsu] sane_get_devices: looking for 'usb 0x04c5 0x10c7'
>>     [epjitsu] sane_get_devices: firmware '/usr/share/sane/epjitsu/300_0C00.nal'
>>     [epjitsu] sane_get_devices: looking for 'usb 0x04c5 0x1156'
>>     [epjitsu] sane_get_devices: firmware '/usr/share/sane/epjitsu/300M_0C00.nal'
>>     [epjitsu] sane_get_devices: looking for 'usb 0x04c5 0x117f'
>>     [epjitsu] sane_get_devices: firmware '/usr/share/sane/epjitsu/1300_0C26.nal'
>>     [epjitsu] sane_get_devices: looking for 'usb 0x04c5 0x11ed'
>>     [epjitsu] sane_get_devices: firmware '/usr/share/sane/epjitsu/65f_0A01.nal'
>>     [epjitsu] sane_get_devices: looking for 'usb 0x04c5 0x11bd'
>>     [epjitsu] attach_one: start 'libusb:001:007'
>>     [epjitsu] attach_one: init struct
>>     [epjitsu] attach_one: connect fd
>>     [epjitsu] connect_fd: start
>>     [epjitsu] connect_fd: opening USB device
>>     [epjitsu] connect_fd: finish
>>     [epjitsu] load_fw: start
>>     [epjitsu] get_stat: start
>>     [epjitsu] do_cmd: start
>>     [epjitsu] cmd: writing 2 bytes, timeout 10000
>>     [epjitsu] cmd: wrote 2 bytes, retVal 0
>>     [epjitsu] in: memset 2 bytes
>>     [epjitsu] in: reading 2 bytes, timeout 10000
>>     [epjitsu] in: retVal 0
>>     [epjitsu] in: read 2 bytes
>>     [epjitsu] do_cmd: finish
>>     [epjitsu] load_fw: read firmware file /usr/share/sane/epjitsu/65f_0A01.nal ok
>>     [epjitsu] do_cmd: start
>>     [epjitsu] cmd: writing 2 bytes, timeout 10000
>>     [epjitsu] cmd: wrote 2 bytes, retVal 0
>>     [epjitsu] in: memset 1 bytes
>>     [epjitsu] in: reading 1 bytes, timeout 10000
>>     [epjitsu] in: retVal 0
>>     [epjitsu] in: read 1 bytes
>>     [epjitsu] do_cmd: finish
>>     [epjitsu] do_cmd: start
>>     [epjitsu] cmd: writing 4 bytes, timeout 10000
>>     [epjitsu] cmd: wrote 4 bytes, retVal 0
>>     [epjitsu] out: writing 65536 bytes, timeout 10000
>>     [epjitsu] out: wrote 65536 bytes, retVal 0
>>     [epjitsu] do_cmd: finish
>>     [epjitsu] do_cmd: start
>>     [epjitsu] cmd: writing 1 bytes, timeout 10000
>>     [epjitsu] cmd: wrote 1 bytes, retVal 0
>>     [epjitsu] in: memset 1 bytes
>>     [epjitsu] in: reading 1 bytes, timeout 10000
>>     [epjitsu] in: retVal 0
>>     [epjitsu] in: read 1 bytes
>>     [epjitsu] do_cmd: finish
>>     [epjitsu] do_cmd: start
>>     [epjitsu] cmd: writing 2 bytes, timeout 10000
>>     [epjitsu] cmd: wrote 2 bytes, retVal 0
>>     [epjitsu] in: memset 1 bytes
>>     [epjitsu] in: reading 1 bytes, timeout 10000
>>     [epjitsu] in: retVal 0
>>     [epjitsu] in: read 1 bytes
>>     [epjitsu] do_cmd: finish
>>     [epjitsu] do_cmd: start
>>     [epjitsu] cmd: writing 1 bytes, timeout 10000
>>     [epjitsu] cmd: wrote 1 bytes, retVal 0
>>     [epjitsu] in: memset 1 bytes
>>     [epjitsu] in: reading 1 bytes, timeout 10000
>>     [epjitsu] in: retVal 0
>>     [epjitsu] in: read 1 bytes
>>     [epjitsu] do_cmd: finish
>>     [epjitsu] get_stat: start
>>     [epjitsu] do_cmd: start
>>     [epjitsu] cmd: writing 2 bytes, timeout 10000
>>     [epjitsu] cmd: wrote 2 bytes, retVal 0
>>     [epjitsu] in: memset 2 bytes
>>     [epjitsu] in: reading 2 bytes, timeout 10000
>>     [epjitsu] in: retVal 0
>>     [epjitsu] in: read 2 bytes
>>     [epjitsu] do_cmd: finish
>>     [epjitsu] get_ident: start
>>     [epjitsu] do_cmd: start
>>     [epjitsu] cmd: writing 2 bytes, timeout 10000
>>     [epjitsu] cmd: wrote 2 bytes, retVal 0
>>     [epjitsu] in: memset 32 bytes
>>     [epjitsu] in: reading 32 bytes, timeout 10000
>>     [epjitsu] in: retVal 0
>>     [epjitsu] in: read 32 bytes
>>     [epjitsu] do_cmd: finish
>>     [epjitsu] get_ident: finish
>>     [epjitsu] attach_one: Found FUJITSU scanner fi-65F  0A01 at libusb:001:007
>>     [epjitsu] attach_one: Found fi-65F
>>     [epjitsu] attach_one: init options
>>     [epjitsu] attach_one: init settings
>>     [epjitsu] change_params: start
>>     [epjitsu] change_params: finish
>>     [epjitsu] disconnect_fd: start
>>     [epjitsu] disconnecting usb device
>>     [epjitsu] disconnect_fd: finish
>>     [epjitsu] attach_one: finish
>>     [epjitsu] sane_get_devices: found scanner libusb:001:007
>>     [epjitsu] sane_get_devices: found 1 scanner(s)
>>     [epjitsu] sane_get_devices: finish
>>     [epjitsu] sane_open: start
>>     [epjitsu] sane_open: searching currently attached scanners
>>     [epjitsu] sane_open: device libusb:001:007 requested, attaching
>>     [epjitsu] sane_open: device libusb:001:007 found
>>     [epjitsu] connect_fd: start
>>     [epjitsu] connect_fd: opening USB device
>>     [epjitsu] connect_fd: finish
>>     [epjitsu] sane_open: finish
>>     [epjitsu] sane_get_option_descriptor: 0
>>     [epjitsu] sane_control_option: get value for '' (0)
>>     [epjitsu] sane_get_option_descriptor: 0
>>     [epjitsu] sane_control_option: get value for '' (0)
>>     [epjitsu] sane_get_option_descriptor: 1
>>     [epjitsu] sane_get_option_descriptor: 2
>>     [epjitsu] sane_get_option_descriptor: 3
>>     [epjitsu] sane_get_option_descriptor: 4
>>     [epjitsu] sane_get_option_descriptor: 5
>>     [epjitsu] sane_get_option_descriptor: 6
>>     [epjitsu] sane_get_option_descriptor: 7
>>     [epjitsu] sane_get_option_descriptor: 8
>>     [epjitsu] sane_get_option_descriptor: 9
>>     [epjitsu] sane_get_option_descriptor: 10
>>     [epjitsu] sane_get_option_descriptor: 11
>>     [epjitsu] sane_get_option_descriptor: 12
>>     [epjitsu] sane_get_option_descriptor: 13
>>     [epjitsu] sane_get_option_descriptor: 14
>>     [epjitsu] sane_get_option_descriptor: 15
>>     [epjitsu] sane_get_option_descriptor: 16
>>     [epjitsu] sane_get_option_descriptor: 17
>>     [epjitsu] sane_get_option_descriptor: 18
>>     [epjitsu] sane_get_option_descriptor: 19
>>     [epjitsu] sane_get_option_descriptor: 20
>>     [epjitsu] sane_get_option_descriptor: 21
>>     [epjitsu] sane_get_option_descriptor: 22
>>     [epjitsu] sane_get_option_descriptor: 23
>>     [epjitsu] sane_get_option_descriptor: 4
>>     [epjitsu] sane_get_option_descriptor: 4
>>     [epjitsu] sane_control_option: set value for 'resolution' (4)
>>     [epjitsu] sane_get_option_descriptor: 3
>>     [epjitsu] sane_get_option_descriptor: 3
>>     [epjitsu] sane_control_option: set value for 'mode' (3)
>>     [epjitsu] sane_start: start
>>     [epjitsu] sane_start: first page
>>     [epjitsu] teardown_buffers: start
>>     [epjitsu] teardown_buffers: finish
>>     [epjitsu] change_params: start
>>     [epjitsu] change_params: finish
>>     [epjitsu] setup_buffers: start
>>     [epjitsu] setup_buffers: finish
>>     [epjitsu] load_lut: start
>>     [epjitsu] load_lut:
>>     [epjitsu] 000: 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
>>     [epjitsu] 010: 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
>>     [epjitsu] 020: 32 32 32 32 32 32 32 32 32 32 33 34 34 35 36 37
>>     [epjitsu] 030: 38 38 39 3a 3b 3c 3d 3d 3e 3f 40 41 41 42 43 44
>>     [epjitsu] 040: 45 45 46 47 48 49 49 4a 4b 4c 4d 4d 4e 4f 50 51
>>     [epjitsu] 050: 52 52 53 54 55 56 56 57 58 59 5a 5a 5b 5c 5d 5e
>>     [epjitsu] 060: 5e 5f 60 61 62 63 63 64 65 66 67 67 68 69 6a 6b
>>     [epjitsu] 070: 6b 6c 6d 6e 6f 6f 70 71 72 73 74 74 75 76 77 78
>>     [epjitsu] 080: 78 79 7a 7b 7c 7c 7d 7e 7f 80 80 81 82 83 84 85
>>     [epjitsu] 090: 85 86 87 88 89 89 8a 8b 8c 8d 8d 8e 8f 90 91 91
>>     [epjitsu] 0a0: 92 93 94 95 96 96 97 98 99 9a 9a 9b 9c 9d 9e 9e
>>     [epjitsu] 0b0: 9f a0 a1 a2 a2 a3 a4 a5 a6 a6 a7 a8 a9 aa ab ab
>>     [epjitsu] 0c0: ac ad ae af af b0 b1 b2 b3 b3 b4 b5 b6 b7 b7 b8
>>     [epjitsu] 0d0: b9 ba bb bc bc bd be bf c0 c0 c1 c2 c3 c4 c4 c5
>>     [epjitsu] 0e0: c6 c7 c8 c8 c9 ca cb cc cd cd cd cd cd cd cd cd
>>     [epjitsu] 0f0: cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd
>>     [epjitsu] load_lut: finish
>>     [epjitsu] coarsecal: start
>>     [epjitsu] set_window: start, window 0
>>     [epjitsu] do_cmd: start
>>     [epjitsu] cmd: writing 2 bytes, timeout 10000
>>     [epjitsu] cmd: wrote 2 bytes, retVal 0
>>     [epjitsu] in: memset 1 bytes
>>     [epjitsu] in: reading 1 bytes, timeout 10000
>>     [epjitsu] in: retVal 9
>>     [epjitsu] in: return error 'Error during device I/O'
>>     [epjitsu] set_window: error sending cmd
>>     [epjitsu] coarsecal: error sending setwindow
>>     [epjitsu] sane_start: ERROR: failed to coarsecal
>>     [epjitsu] sane_cancel: start
>>     [epjitsu] sane_cancel: finish
>>     scanimage: sane_start: Error during device I/O
>>     [epjitsu] sane_cancel: start
>>     [epjitsu] sane_cancel: finish
>>     [epjitsu] sane_close: start
>>     [epjitsu] sane_cancel: start
>>     [epjitsu] sane_cancel: finish
>>     [epjitsu] lamp: start (0)
>>     [epjitsu] do_cmd: start
>>     [epjitsu] cmd: writing 2 bytes, timeout 10000
>>     [epjitsu] cmd: wrote 2 bytes, retVal 0
>>     [epjitsu] in: memset 1 bytes
>>     [epjitsu] in: reading 1 bytes, timeout 10000
>>     [epjitsu] in: retVal 0
>>     [epjitsu] in: read 1 bytes
>>     [epjitsu] do_cmd: finish
>>     [epjitsu] lamp: cmd bad status?
>>     [epjitsu] disconnect_fd: start
>>     [epjitsu] disconnecting usb device
>>     [epjitsu] disconnect_fd: finish
>>     [epjitsu] sane_close: finish
>>     [epjitsu] sane_exit: start
>>     [epjitsu] destroy: start
>>     [epjitsu] teardown_buffers: start
>>     [epjitsu] teardown_buffers: finish
>>     [epjitsu] destroy: finish
>>     [epjitsu] sane_exit: finish
>>
>>
>> ---- On Sun, 15 Mar 2015 18:04:01 -0700 m. allan noah  wrote ----
>>>Hmm- perhaps you can try scanimage again, but at resolution 300? Also
>>>increase the epjitsu debug level to 25, and don't set the dll debug
>>>level, it is not helpful.
>>>
>>>I see a couple possible differences that have never been important
>>>with prior scanners, but perhaps are important with yours.
>>>
>>>allan
>>>
>>
>
>
>
> --
> "well, I stand up next to a mountain- and I chop it down with the edge
> of my hand"



-- 
"well, I stand up next to a mountain- and I chop it down with the edge
of my hand"
-------------- next part --------------
diff --git a/backend/epjitsu.c b/backend/epjitsu.c
index 5359e3b..80626da 100644
--- a/backend/epjitsu.c
+++ b/backend/epjitsu.c
@@ -197,7 +197,7 @@
 #include "epjitsu-cmd.h"
 
 #define DEBUG 1
-#define BUILD 27
+#define BUILD 28
 
 #ifndef MAX3
   #define MAX3(a,b,c) ((a) > (b) ? ((a) > (c) ? a : c) : ((b) > (c) ? b : c))
@@ -2369,6 +2369,8 @@ sane_start (SANE_Handle handle)
         s->side = !s->side;
     }
 
+    ret = get_hardware_status(s);
+
     /* ingest paper with adf */
     if( s->source == SOURCE_ADF_BACK || s->source == SOURCE_ADF_FRONT
      || (s->source == SOURCE_ADF_DUPLEX && s->side == SIDE_FRONT) ){


More information about the sane-devel mailing list