<div dir="ltr">Hello,<br><br>A couple of years ago I bought a Minolta Dimage Scan Dual II and I'm trying to use it with SANE Avision.<br><br>The Avision backend worked well from the binary compiled for OSX by Mattias Ellert (<a href="http://www.ellert.se/twain-sane/">http://www.ellert.se/twain-sane/</a>) when I first tried it, but I recently updated it and it doesn't work anymore.<br><br>I downloaded SANE source code and compiled it for Linux on a RPi. I use scanimage to list all devices connected to the RPI and the scanner is included in the list:<br><br>$ sudo scanimage -L<br>device `avision:libusb:001:011' is a Minolta Dimage Scan Dual II film scanner<br><br>I run an empty scan to force the calibration of the scanner as suggested by <a href="https://alioth-lists.debian.net/pipermail/sane-devel/2006-May/016907.html">https://alioth-lists.debian.net/pipermail/sane-devel/2006-May/016907.html</a>, but it doesn't work:<br><br>$ sudo SANE_DEBUG_AVISION=8 SANE_DEBUG_SANEI_USB=8 scanimage -d "$SCANNER" >calibration.pnm<br>Output format is not set, using pnm as a default.<br>[18:05:35.705004] [sanei_debug] Setting debug level of avision to 8.<br>[18:05:35.705260] [avision] sane_init:(Version: 1.0 Build: 297)<br>[18:05:35.705343] [sanei_debug] Setting debug level of sanei_usb to 8.<br>[18:05:35.705423] [sanei_usb] sanei_usb_init: Looking for libusb devices<br>usb_set_debug: Setting debugging level to 255 (on)<br>[18:05:35.705653] [sanei_usb] sanei_usb_scan_devices: marking existing devices<br>[18:05:35.705719] [sanei_usb] libusb_scan_devices: Looking for libusb devices<br>usb_os_find_busses: Found 001<br>usb_os_find_devices: Found 010 on 001<br>usb_os_find_devices: Found 004 on 001<br>skipped 1 class/vendor specific interface descriptors<br>skipped 1 class/vendor specific interface descriptors<br>skipped 1 class/vendor specific interface descriptors<br>usb_os_find_devices: Found 003 on 001<br>usb_os_find_devices: Found 002 on 001<br>usb_os_find_devices: Found 001 on 001<br>error obtaining child information: Inappropriate ioctl for device<br>error obtaining child information: Inappropriate ioctl for device<br>error obtaining child information: Inappropriate ioctl for device<br>[18:05:35.706941] [sanei_usb] libusb_scan_devices: found libusb device (0x0638/0x026a) interface 0  at libusb:001:010<br>[18:05:35.707082] [sanei_usb] store_device: add dn 0 with libusb:001:010<br>[18:05:35.707180] [sanei_usb] libusb_scan_devices: device 0x045e/0x0800, interface 0 doesn't look like a scanner (0/3)<br>[18:05:35.707276] [sanei_usb] libusb_scan_devices: device 0x045e/0x0800, interface 1 doesn't look like a scanner (0/3)<br>[18:05:35.707376] [sanei_usb] libusb_scan_devices: device 0x045e/0x0800, interface 2 doesn't look like a scanner (0/3)<br>[18:05:35.707464] [sanei_usb] libusb_scan_devices: device 0x045e/0x0800: no suitable interfaces<br>[18:05:35.707575] [sanei_usb] libusb_scan_devices: found libusb device (0x0424/0xec00) interface 0  at libusb:001:003<br>[18:05:35.707668] [sanei_usb] store_device: add dn 1 with libusb:001:003<br>[18:05:35.707733] [sanei_usb] libusb_scan_devices: device 0x0424/0x9514, interface 0 doesn't look like a scanner (9/9)<br>[18:05:35.707803] [sanei_usb] libusb_scan_devices: device 0x0424/0x9514: no suitable interfaces<br>[18:05:35.707868] [sanei_usb] libusb_scan_devices: device 0x1d6b/0x0002, interface 0 doesn't look like a scanner (9/9)<br>[18:05:35.707943] [sanei_usb] libusb_scan_devices: device 0x1d6b/0x0002: no suitable interfaces<br>[18:05:35.708008] [sanei_usb] sanei_usb_scan_devices: device 00 is libusb:001:010<br>[18:05:35.708081] [sanei_usb] sanei_usb_scan_devices: device 01 is libusb:001:003<br>[18:05:35.708146] [sanei_usb] sanei_usb_scan_devices: found 2 devices<br>[18:05:35.708291] [avision] sane_reload_devices: parsing config line ""<br>[18:05:35.708358] [avision] sane_reload_devices: config file line 1: ignoring empty line<br>[18:05:35.708426] [avision] sane_reload_devices: parsing config line "# These are the possible options. Normally any scanner"<br>[18:05:35.708488] [avision] sane_reload_devices: config file line 2: ignoring comment line<br>[18:05:35.708554] [avision] sane_reload_devices: parsing config line "# should work just fine without them - and they are only"<br>[18:05:35.708616] [avision] sane_reload_devices: config file line 3: ignoring comment line<br>[18:05:35.708682] [avision] sane_reload_devices: parsing config line "# needed for test and debugging. So if you experience problems"<br>[18:05:35.708744] [avision] sane_reload_devices: config file line 4: ignoring comment line<br>[18:05:35.708811] [avision] sane_reload_devices: parsing config line "# and you solve them with enabling options here, please notify"<br>[18:05:35.708873] [avision] sane_reload_devices: config file line 5: ignoring comment line<br>[18:05:35.708941] [avision] sane_reload_devices: parsing config line "# the SANE/Avision maintainer: Mike Kelly <<a href="mailto:mike@piratehaven.org">mike@piratehaven.org</a>>"<br>[18:05:35.709004] [avision] sane_reload_devices: config file line 6: ignoring comment line<br>[18:05:35.709071] [avision] sane_reload_devices: parsing config line ""<br>[18:05:35.709132] [avision] sane_reload_devices: config file line 7: ignoring empty line<br>[18:05:35.709196] [avision] sane_reload_devices: parsing config line "option disable-gamma-table"<br>[18:05:35.709332] [avision] sane_reload_devices: config file line 8: disable-gamma-table<br>[18:05:35.709399] [avision] sane_reload_devices: parsing config line "#option disable-calibration"<br>[18:05:35.709462] [avision] sane_reload_devices: config file line 9: ignoring comment line<br>[18:05:35.709529] [avision] sane_reload_devices: parsing config line "#option force-a4"<br>[18:05:35.709591] [avision] sane_reload_devices: config file line 10: ignoring comment line<br>[18:05:35.709658] [avision] sane_reload_devices: parsing config line ""<br>[18:05:35.709718] [avision] sane_reload_devices: config file line 11: ignoring empty line<br>[18:05:35.709783] [avision] sane_reload_devices: parsing config line "#scsi AVISION"<br>[18:05:35.709845] [avision] sane_reload_devices: config file line 12: ignoring comment line<br>[18:05:35.709912] [avision] sane_reload_devices: parsing config line "#scsi FCPA"<br>[18:05:35.709977] [avision] sane_reload_devices: config file line 13: ignoring comment line<br>[18:05:35.710049] [avision] sane_reload_devices: parsing config line "#scsi MINOLTA"<br>[18:05:35.710112] [avision] sane_reload_devices: config file line 14: ignoring comment line<br>[18:05:35.710177] [avision] sane_reload_devices: parsing config line "#scsi MITSBISH MCA-S600C"<br>[18:05:35.710240] [avision] sane_reload_devices: config file line 15: ignoring comment line<br>[18:05:35.710307] [avision] sane_reload_devices: parsing config line "#scsi MITSBISH MCA-SS600"<br>[18:05:35.710369] [avision] sane_reload_devices: config file line 16: ignoring comment line<br>[18:05:35.710435] [avision] sane_reload_devices: parsing config line "#scsi HP"<br>[18:05:35.710496] [avision] sane_reload_devices: config file line 17: ignoring comment line<br>[18:05:35.710561] [avision] sane_reload_devices: parsing config line "#scsi hp"<br>[18:05:35.710622] [avision] sane_reload_devices: config file line 18: ignoring comment line<br>[18:05:35.710687] [avision] sane_reload_devices: parsing config line ""<br>[18:05:35.710748] [avision] sane_reload_devices: config file line 19: ignoring empty line<br>[18:05:35.710814] [avision] sane_reload_devices: parsing config line "#scsi /dev/scanner"<br>[18:05:35.710877] [avision] sane_reload_devices: config file line 20: ignoring comment line<br>[18:05:35.710950] [avision] sane_reload_devices: parsing config line "# usb libusb:002:003"<br>[18:05:35.711037] [avision] sane_reload_devices: config file line 21: ignoring comment line<br>[18:05:35.711111] [avision] sane_reload_devices: parsing config line "# usb 0x03f0 0x0701"<br>[18:05:35.711198] [avision] sane_reload_devices: config file line 22: ignoring comment line<br>[18:05:35.711688] [avision] sane_reload_devices: Trying to find USB device 0638 0a27 ...<br>[18:05:35.711781] [sanei_usb] sanei_usb_find_devices: vendor=0x0638, product=0x0a27<br>[18:05:35.711863] [avision] sane_reload_devices: Trying to find USB device 0638 0a3c ...<br><omitted><br>[18:05:35.719256] [avision] sane_reload_devices: Trying to find USB device 0638 026a ...<br>[18:05:35.719325] [sanei_usb] sanei_usb_find_devices: vendor=0x0638, product=0x026a<br>[18:05:35.719391] [avision] attach:<br>[18:05:35.719455] [avision] attach: opening libusb:001:010<br>[18:05:35.719515] [sanei_usb] sanei_usb_open: trying to open device `libusb:001:010'<br>[18:05:35.719758] [sanei_usb] sanei_usb_open: configuration nr: 0<br>[18:05:35.719829] [sanei_usb] sanei_usb_open:     interface nr: 0<br>[18:05:35.719891] [sanei_usb] sanei_usb_open:   alt_setting nr: 0<br>[18:05:35.719959] [sanei_usb] sanei_usb_open: endpoint nr: 0<br>[18:05:35.720023] [sanei_usb] sanei_usb_add_endpoint: direction: 0, address: 1, transfer_type: 2<br>[18:05:35.720088] [sanei_usb] sanei_usb_add_endpoint: found bulk-out endpoint (address 0x01)<br>[18:05:35.720154] [sanei_usb] sanei_usb_open: endpoint nr: 1<br>[18:05:35.720214] [sanei_usb] sanei_usb_add_endpoint: direction: 128, address: 130, transfer_type: 3<br>[18:05:35.720279] [sanei_usb] sanei_usb_add_endpoint: found interrupt-in endpoint (address 0x82)<br>[18:05:35.720343] [sanei_usb] sanei_usb_open: endpoint nr: 2<br>[18:05:35.720405] [sanei_usb] sanei_usb_add_endpoint: direction: 128, address: 131, transfer_type: 2<br>[18:05:35.720469] [sanei_usb] sanei_usb_add_endpoint: found bulk-in endpoint (address 0x83)<br>[18:05:35.720534] [sanei_usb] sanei_usb_open: opened usb device `libusb:001:010' (*dn=0)<br>[18:05:35.720597] [avision] inquiry: length: 96<br>[18:05:35.720659] [avision] inquiry: inquiring ...<br>[18:05:35.720719] [avision] filling command to have a length of 10, was: 6<br>[18:05:35.720783] [avision] Timeouts: write: 30000, read: 1000, status: 1000<br>[18:05:35.720846] [avision] try to write cmd, count: 10.<br>[18:05:35.720909] [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes<br>[18:05:35.722594] [sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes<br>[18:05:35.722726] [avision] wrote 10 bytes<br>[18:05:35.722792] [avision] try to read 96 bytes<br>[18:05:35.722855] [sanei_usb] sanei_usb_read_bulk: trying to read 96 bytes<br>[18:05:35.725841] [sanei_usb] sanei_usb_read_bulk: wanted 96 bytes, got 96 bytes<br>[18:05:35.725997] [avision] read 96 bytes<br>[18:05:35.726067] [avision] avision_usb_status: timeout 1000, 1 retries<br>[18:05:35.726186] [avision] ==> (bulk read) going down ...<br>[18:05:35.726248] [sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes<br>[18:05:36.726662] [sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily unavailable<br>[18:05:36.727190] [avision] <== (bulk read) got: 0, status: 0<br>[18:05:36.727270] [avision] ==> (interrupt read) going down ...<br>[18:05:36.727332] [sanei_usb] sanei_usb_read_int: trying to read 1 bytes<br>[18:05:36.727691] [sanei_usb] sanei_usb_read_int: wanted 1 bytes, got 1 bytes<br>[18:05:36.727762] [avision] <== (interrupt read) got: 1, status: 0<br>[18:05:36.727827] [avision] attach: Inquiry gives mfg=MINOLTA, model=FS-V1, product revision=1.26.<br>[18:05:36.727906] [avision] attach: Checking model: 0<br><omitted><br>[18:05:36.732701] [avision] attach: Checking model: 76<br>[18:05:36.732761] [avision] attach: Scanner matched entry: 76: "MINOLTA", "FS-V1", 0x0638, 0x026a<br>[18:05:36.732827] [avision] inquiry: length: 96<br>[18:05:36.732888] [avision] inquiry: inquiring ...<br>[18:05:36.732963] [avision] filling command to have a length of 10, was: 6<br>[18:05:36.733041] [avision] Timeouts: write: 30000, read: 1000, status: 1000<br>[18:05:36.733105] [avision] try to write cmd, count: 10.<br>[18:05:36.733166] [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes<br>[18:05:36.734694] [sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes<br>[18:05:36.734779] [avision] wrote 10 bytes<br>[18:05:36.734843] [avision] try to read 96 bytes<br>[18:05:36.734928] [sanei_usb] sanei_usb_read_bulk: trying to read 96 bytes<br>[18:05:36.737865] [sanei_usb] sanei_usb_read_bulk: wanted 96 bytes, got 96 bytes<br>[18:05:36.738148] [avision] read 96 bytes<br>[18:05:36.738217] [avision] avision_usb_status: timeout 1000, 1 retries<br>[18:05:36.738281] [avision] ==> (bulk read) going down ...<br>[18:05:36.738341] [sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes<br>[18:05:37.739433] [sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily unavailable<br>[18:05:37.739945] [avision] <== (bulk read) got: 0, status: 0<br>[18:05:37.740041] [avision] ==> (interrupt read) going down ...<br>[18:05:37.740105] [sanei_usb] sanei_usb_read_int: trying to read 1 bytes<br>[18:05:37.740447] [sanei_usb] sanei_usb_read_int: wanted 1 bytes, got 1 bytes<br>[18:05:37.740517] [avision] <== (interrupt read) got: 1, status: 0<br>[18:05:37.740590] [avision] attach: raw data:<br>[18:05:37.740652] [avision]   [0] 00000110b   6o   6d  6x<br>[18:05:37.740722] [avision]   [1] 10000000b 200o 128d 80x<br>[18:05:37.740791] [avision]   [2] 00000010b   2o   2d  2x<br>[18:05:37.740859] [avision]   [3] 01000010b 102o  66d 42x<br>[18:05:37.740944] [avision]   [4] 01011011b 133o  91d 5bx<br>[18:05:37.741013] [avision]   [5] 00000000b   0o   0d  0x<br>[18:05:37.741096] [avision]   [6] 00000000b   0o   0d  0x<br>[18:05:37.741164] [avision]   [7] 00000000b   0o   0d  0x<br>[18:05:37.741231] [avision]   [8] 01001101b 115o  77d 4dx<br>[18:05:37.741300] [avision]   [9] 01001001b 111o  73d 49x<br>[18:05:37.741367] [avision]   [10] 01001110b 116o  78d 4ex<br>[18:05:37.741435] [avision]   [11] 01001111b 117o  79d 4fx<br>[18:05:37.741503] [avision]   [12] 01001100b 114o  76d 4cx<br>[18:05:37.741572] [avision]   [13] 01010100b 124o  84d 54x<br>[18:05:37.741640] [avision]   [14] 01000001b 101o  65d 41x<br>[18:05:37.741707] [avision]   [15] 00100000b  40o  32d 20x<br>[18:05:37.741775] [avision]   [16] 01000110b 106o  70d 46x<br>[18:05:37.741843] [avision]   [17] 01010011b 123o  83d 53x<br>[18:05:37.741928] [avision]   [18] 00101101b  55o  45d 2dx<br>[18:05:37.741997] [avision]   [19] 01010110b 126o  86d 56x<br>[18:05:37.742078] [avision]   [20] 00110001b  61o  49d 31x<br>[18:05:37.742147] [avision]   [21] 00100000b  40o  32d 20x<br>[18:05:37.742215] [avision]   [22] 00100000b  40o  32d 20x<br>[18:05:37.742282] [avision]   [23] 00100000b  40o  32d 20x<br>[18:05:37.742350] [avision]   [24] 00100000b  40o  32d 20x<br>[18:05:37.742418] [avision]   [25] 00100000b  40o  32d 20x<br>[18:05:37.742487] [avision]   [26] 00100000b  40o  32d 20x<br>[18:05:37.742554] [avision]   [27] 00100000b  40o  32d 20x<br>[18:05:37.742623] [avision]   [28] 00100000b  40o  32d 20x<br>[18:05:37.742691] [avision]   [29] 00100000b  40o  32d 20x<br>[18:05:37.742812] [avision]   [30] 00100000b  40o  32d 20x<br>[18:05:37.742881] [avision]   [31] 00100000b  40o  32d 20x<br>[18:05:37.742972] [avision]   [32] 00110001b  61o  49d 31x<br>[18:05:37.743057] [avision]   [33] 00101110b  56o  46d 2ex<br>[18:05:37.743126] [avision]   [34] 00110010b  62o  50d 32x<br>[18:05:37.743193] [avision]   [35] 00110110b  66o  54d 36x<br>[18:05:37.743261] [avision]   [36] 10100000b 240o 160d a0x<br>[18:05:37.743330] [avision]   [37] 00000011b   3o   3d  3x<br>[18:05:37.743399] [avision]   [38] 00000110b   6o   6d  6x<br>[18:05:37.743551] [avision]   [39] 11100111b 347o 231d e7x<br>[18:05:37.743621] [avision]   [40] 00001011b  13o  11d  bx<br>[18:05:37.743690] [avision]   [41] 00000100b   4o   4d  4x<br>[18:05:37.743759] [avision]   [42] 00001011b  13o  11d  bx<br>[18:05:37.743826] [avision]   [43] 00000100b   4o   4d  4x<br>[18:05:37.743910] [avision]   [44] 00001011b  13o  11d  bx<br>[18:05:37.743980] [avision]   [45] 00000100b   4o   4d  4x<br>[18:05:37.744063] [avision]   [46] 00001011b  13o  11d  bx<br>[18:05:37.744132] [avision]   [47] 00000100b   4o   4d  4x<br>[18:05:37.744200] [avision]   [48] 00000000b   0o   0d  0x<br>[18:05:37.744268] [avision]   [49] 00000000b   0o   0d  0x<br>[18:05:37.744336] [avision]   [50] 11011001b 331o 217d d9x<br>[18:05:37.744403] [avision]   [51] 10010100b 224o 148d 94x<br>[18:05:37.744470] [avision]   [52] 11111010b 372o 250d fax<br>[18:05:37.744538] [avision]   [53] 00001000b  10o   8d  8x<br>[18:05:37.744606] [avision]   [54] 00000100b   4o   4d  4x<br>[18:05:37.744674] [avision]   [55] 00000100b   4o   4d  4x<br>[18:05:37.744742] [avision]   [56] 00000010b   2o   2d  2x<br>[18:05:37.744810] [avision]   [57] 00001000b  10o   8d  8x<br>[18:05:37.744878] [avision]   [58] 00001000b  10o   8d  8x<br>[18:05:37.744962] [avision]   [59] 00001000b  10o   8d  8x<br>[18:05:37.745044] [avision]   [60] 11000000b 300o 192d c0x<br>[18:05:37.745113] [avision]   [61] 11010000b 320o 208d d0x<br>[18:05:37.745181] [avision]   [62] 10101000b 250o 168d a8x<br>[18:05:37.745248] [avision]   [63] 00000101b   5o   5d  5x<br>[18:05:37.745316] [avision]   [64] 00000001b   1o   1d  1x<br>[18:05:37.745385] [avision]   [65] 00000001b   1o   1d  1x<br>[18:05:37.745453] [avision]   [66] 00000010b   2o   2d  2x<br>[18:05:37.745521] [avision]   [67] 00000011b   3o   3d  3x<br>[18:05:37.745588] [avision]   [68] 00000100b   4o   4d  4x<br>[18:05:37.745657] [avision]   [69] 00000101b   5o   5d  5x<br>[18:05:37.745726] [avision]   [70] 00000000b   0o   0d  0x<br>[18:05:37.745793] [avision]   [71] 00000000b   0o   0d  0x<br>[18:05:37.745861] [avision]   [72] 00000000b   0o   0d  0x<br>[18:05:37.745945] [avision]   [73] 00000000b   0o   0d  0x<br>[18:05:37.746027] [avision]   [74] 00000000b   0o   0d  0x<br>[18:05:37.746097] [avision]   [75] 00001111b  17o  15d  fx<br>[18:05:37.746165] [avision]   [76] 11111111b 377o 255d ffx<br>[18:05:37.746233] [avision]   [77] 00000000b   0o   0d  0x<br>[18:05:37.746301] [avision]   [78] 00000000b   0o   0d  0x<br>[18:05:37.746368] [avision]   [79] 00000000b   0o   0d  0x<br>[18:05:37.746437] [avision]   [80] 00000000b   0o   0d  0x<br>[18:05:37.746504] [avision]   [81] 00001010b  12o  10d  ax<br>[18:05:37.746572] [avision]   [82] 10000000b 200o 128d 80x<br>[18:05:37.746640] [avision]   [83] 00001111b  17o  15d  fx<br>[18:05:37.746708] [avision]   [84] 11000000b 300o 192d c0x<br>[18:05:37.746775] [avision]   [85] 00001010b  12o  10d  ax<br>[18:05:37.746844] [avision]   [86] 10000000b 200o 128d 80x<br>[18:05:37.746932] [avision]   [87] 00001111b  17o  15d  fx<br>[18:05:37.747002] [avision]   [88] 11000000b 300o 192d c0x<br>[18:05:37.747086] [avision]   [89] 00001011b  13o  11d  bx<br>[18:05:37.747155] [avision]   [90] 00000100b   4o   4d  4x<br>[18:05:37.747224] [avision]   [91] 00000011b   3o   3d  3x<br>[18:05:37.747292] [avision]   [92] 00000000b   0o   0d  0x<br>[18:05:37.747360] [avision]   [93] 00100000b  40o  32d 20x<br>[18:05:37.747428] [avision]   [94] 00000000b   0o   0d  0x<br><omitted><br>[18:05:37.750330] [avision]   [135] 00000000b   0o   0d  0x<br>[18:05:37.750398] [avision] attach: [8-15]  Vendor id.:      'MINOLTA '<br>[18:05:37.750460] [avision] attach: [16-31] Product id.:     'FS-V1           '<br>[18:05:37.750521] [avision] attach: [32-35] Product rev.:    '1.26'<br>[18:05:37.750581] [avision] attach: [36]    Bitfield: ADF 3-pass color RGB color plane<br>[18:05:37.750643] [avision] attach: [37]    Optical res.:    300 dpi<br>[18:05:37.750704] [avision] attach: [38]    Maximum res.:    600 dpi<br>[18:05:37.750764] [avision] attach: [39]    Bitfield1: TRANS Q_SCAN EXTENDED_RES NEW_PROTOCOL AVISION<br>[18:05:37.750826] [avision] attach: [40-41] X res. in gray:  2820 dpi<br>[18:05:37.750906] [avision] attach: [42-43] Y res. in gray:  2820 dpi<br>[18:05:37.750968] [avision] attach: [44-45] X res. in color: 2820 dpi<br>[18:05:37.751043] [avision] attach: [46-47] Y res. in color: 2820 dpi<br>[18:05:37.751105] [avision] attach: [48-49] USB max read:    0<br>[18:05:37.751165] [avision] attach: [50]    ESA1: LIGHT_CONTROL BUTTON_CONTROL SW_CALIB NEED_SW_GAMMA XYRES_DIFFERENT<br>[18:05:37.751228] [avision] attach: [51]    ESA2: EXPOSURE_CTRL SUPPORTS_QUALITY_SPEED_CAL HAS_PUSH_BUTTON<br>[18:05:37.751291] [avision] attach: [52]    ESA3: GRAY_WHITE SUPPORTS_GAIN_CONTROL SUPPORTS_TET 3x3COL_TABLE 1x3FILTER POWER_SAVING_TIMER<br>[18:05:37.751355] [avision] attach: [53]    line difference (software color pack): 8<br>[18:05:37.751415] [avision] attach: [54]    color mode pixel boundary: 4<br>[18:05:37.751475] [avision] attach: [55]    gray mode pixel boundary: 4<br>[18:05:37.751535] [avision] attach: [56]    4bit gray mode pixel boundary: 2<br>[18:05:37.751595] [avision] attach: [57]    lineart mode pixel boundary: 8<br>[18:05:37.751655] [avision] attach: [58]    halftone mode pixel boundary: 8<br>[18:05:37.751714] [avision] attach: [59]    error-diffusion mode pixel boundary: 8<br>[18:05:37.751774] [avision] attach: [60]    channels per pixel: 1 3<br>[18:05:37.751834] [avision] attach: [61]    bits per channel: 1 4 8<br>[18:05:37.751937] [avision] attach: [62]    scanner type: Flatbed Flatbed (ADF) Film scanner<br>[18:05:37.752001] [avision] attach: [75-76] Max shading target : fff<br>[18:05:37.752081] [avision] attach: [77-78] Max X of transparency: 0 dots * base_dpi<br>[18:05:37.752142] [avision] attach: [79-80] Max Y of transparency: 0 dots * base_dpi<br>[18:05:37.752201] [avision] attach: [81-82] Max X of flatbed:      2688 dots * base_dpi<br>[18:05:37.752261] [avision] attach: [83-84] Max Y of flatbed:      4032 dots * base_dpi<br>[18:05:37.752321] [avision] attach: [85-86] Max X of ADF:          2688 dots * base_dpi<br>[18:05:37.752382] [avision] attach: [87-88] Max Y of ADF:          4032 dots * base_dpi<br>[18:05:37.752441] [avision] attach: [89-90] Res. in Ex. mode:      2820 dpi<br>[18:05:37.752501] [avision] attach: [91]    ASIC:     3<br>[18:05:37.752560] [avision] attach: [92]    Buttons:  0<br>[18:05:37.752619] [avision] attach: [93]    ESA4: NO_SINGLE_CHANNEL_GRAY_MODE<br>[18:05:37.752681] [avision] attach: [94]    ESA5:<br>[18:05:37.752743] [avision] attach: [95]    ESA6:<br>[18:05:37.752804] [avision] attach: [128]    ESA7:<br>[18:05:37.752864] [avision] attach: [129]    YCbCr:<br>[18:05:37.752950] [avision] attach: optical resolution set to: 2820 dpi<br>[18:05:37.753011] [avision] attach: max resolution set to: 2820 dpi<br>[18:05:37.753087] [avision] attach: max channels per pixel: 3, max bits per channel: 12<br>[18:05:37.753153] [avision] attach: x/y-range for mode 0 is valid!<br>[18:05:37.753214] [avision] attach: Mode 0 range is now: 24.311064 x 36.316596 mm.<br>[18:05:37.753306] [avision] attach: x/y-range for mode 1 is invalid! Using a default.<br>[18:05:37.753368] [avision] attach: Mode 1 range is now: 215.900000 x 299.720000 mm.<br>[18:05:37.753480] [avision] attach: x/y-range for mode 2 is valid!<br>[18:05:37.753542] [avision] attach: Mode 2 range is now: 24.311064 x 36.316596 mm.<br>[18:05:37.753620] [sanei_usb] sanei_usb_close: evaluating environment variable SANE_USB_WORKAROUND<br>[18:05:37.753683] [sanei_usb] sanei_usb_close: closing device 0<br>[18:05:37.753922] [avision] sane_reload_devices: Trying to find USB device 0686 4004 ...<br>[18:05:37.753993] [sanei_usb] sanei_usb_find_devices: vendor=0x0686, product=0x4004<br><omitted><br>[18:05:37.763143] [avision] sane_reload_devices: Trying to find USB device 0482 0335 ...<br>[18:05:37.763209] [sanei_usb] sanei_usb_find_devices: vendor=0x0482, product=0x0335<br>[18:05:37.763277] [avision] sane_open:<br>[18:05:37.763339] [avision] attach:<br>[18:05:37.764546] [avision] sane_open: using open_extended<br>[18:05:37.764625] [sanei_usb] sanei_usb_open: trying to open device `libusb:001:010'<br>[18:05:37.764820] [sanei_usb] sanei_usb_open: configuration nr: 0<br>[18:05:37.764903] [sanei_usb] sanei_usb_open:     interface nr: 0<br>[18:05:37.764967] [sanei_usb] sanei_usb_open:   alt_setting nr: 0<br>[18:05:37.765043] [sanei_usb] sanei_usb_open: endpoint nr: 0<br>[18:05:37.765104] [sanei_usb] sanei_usb_add_endpoint: direction: 0, address: 1, transfer_type: 2<br>[18:05:37.765169] [sanei_usb] sanei_usb_add_endpoint: found bulk-out endpoint (address 0x01)<br>[18:05:37.765233] [sanei_usb] sanei_usb_add_endpoint: we already have a bulk-out endpoint (address: 0x01), ignoring the new one<br>[18:05:37.765298] [sanei_usb] sanei_usb_open: endpoint nr: 1<br>[18:05:37.765358] [sanei_usb] sanei_usb_add_endpoint: direction: 128, address: 130, transfer_type: 3<br>[18:05:37.765421] [sanei_usb] sanei_usb_add_endpoint: found interrupt-in endpoint (address 0x82)<br>[18:05:37.765484] [sanei_usb] sanei_usb_add_endpoint: we already have a interrupt-in endpoint (address: 0x82), ignoring the new one<br>[18:05:37.765548] [sanei_usb] sanei_usb_open: endpoint nr: 2<br>[18:05:37.765608] [sanei_usb] sanei_usb_add_endpoint: direction: 128, address: 131, transfer_type: 2<br>[18:05:37.765671] [sanei_usb] sanei_usb_add_endpoint: found bulk-in endpoint (address 0x83)<br>[18:05:37.765733] [sanei_usb] sanei_usb_add_endpoint: we already have a bulk-in endpoint (address: 0x83), ignoring the new one<br>[18:05:37.765831] [sanei_usb] sanei_usb_open: opened usb device `libusb:001:010' (*dn=0)<br>[18:05:37.765910] [avision] sane_open: got 1048576 scsi_max_request_size<br>[18:05:37.765973] [avision] inquiry: length: 96<br>[18:05:37.766048] [avision] inquiry: inquiring ...<br>[18:05:37.766109] [avision] filling command to have a length of 10, was: 6<br>[18:05:37.766174] [avision] Timeouts: write: 30000, read: 1000, status: 1000<br>[18:05:37.766236] [avision] try to write cmd, count: 10.<br>[18:05:37.766297] [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes<br>[18:05:37.767946] [sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes<br>[18:05:37.768031] [avision] wrote 10 bytes<br>[18:05:37.768097] [avision] try to read 96 bytes<br>[18:05:37.768160] [sanei_usb] sanei_usb_read_bulk: trying to read 96 bytes<br>[18:05:37.770941] [sanei_usb] sanei_usb_read_bulk: wanted 96 bytes, got 96 bytes<br>[18:05:37.771012] [avision] read 96 bytes<br>[18:05:37.771093] [avision] avision_usb_status: timeout 1000, 1 retries<br>[18:05:37.771156] [avision] ==> (bulk read) going down ...<br>[18:05:37.771216] [sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes<br>[18:05:38.772101] [sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily unavailable<br>[18:05:38.772562] [avision] <== (bulk read) got: 0, status: 0<br>[18:05:38.772640] [avision] ==> (interrupt read) going down ...<br>[18:05:38.772704] [sanei_usb] sanei_usb_read_int: trying to read 1 bytes<br>[18:05:39.772840] [sanei_usb] sanei_usb_read_int: read failed: Resource temporarily unavailable<br>[18:05:39.773036] [avision] <== (interrupt read) got: 0, status: 0<br>[18:05:39.773108] [avision] try to write cmd, count: 10.<br>[18:05:39.773172] [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes<br>[18:06:09.773341] [sanei_usb] sanei_usb_write_bulk: write failed: Resource temporarily unavailable<br>[18:06:09.774163] [avision] wrote 0 bytes<br>[18:06:09.774276] [avision] === Got error 9 trying to write, wrote: 0. ===<br>[18:06:09.774549] [avision] try to read status to clear the FIFO<br>[18:06:09.774920] [avision] avision_usb_status: timeout 500, 1 retries<br>[18:06:09.775005] [avision] ==> (bulk read) going down ...<br>[18:06:09.775206] [sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes<br>[18:06:10.275721] [sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily unavailable<br>[18:06:10.276407] [avision] <== (bulk read) got: 0, status: 0<br>[18:06:10.276524] [avision] ==> (interrupt read) going down ...<br>[18:06:10.276902] [sanei_usb] sanei_usb_read_int: trying to read 1 bytes<br>[18:06:10.508940] [sanei_usb] sanei_usb_read_int: wanted 1 bytes, got 1 bytes<br>[18:06:10.509105] [avision] <== (interrupt read) got: 1, status: 0<br>[18:06:10.509491] [avision] try to write cmd, count: 10.<br>[18:06:10.509711] [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes<br>[18:06:40.510126] [sanei_usb] sanei_usb_write_bulk: write failed: Resource temporarily unavailable<br>[18:06:40.510846] [avision] wrote 0 bytes<br>[18:06:40.510962] [avision] === Got error 9 trying to write, wrote: 0. ===<br>[18:06:40.511183] [avision] try to read status to clear the FIFO<br>[18:06:40.511388] [avision] avision_usb_status: timeout 500, 1 retries<br>[18:06:40.511593] [avision] ==> (interrupt read) going down ...<br>[18:06:40.511826] [sanei_usb] sanei_usb_read_int: trying to read 1 bytes<br>[18:06:41.012777] [sanei_usb] sanei_usb_read_int: read failed: Resource temporarily unavailable<br>[18:06:41.012981] [avision] <== (interrupt read) got: 0, status: 0<br>[18:06:41.013069] [avision] === Got error 9 trying to read status. ===<br>[18:06:41.013697] [avision] inquiry: inquiry failed (Error during device I/O)<br>[18:06:41.013807] [avision] inquiry: inquiring ...<br>[18:06:41.014000] [avision] filling command to have a length of 10, was: 6<br>[18:06:41.014190] [avision] Timeouts: write: 30000, read: 1000, status: 1000<br>[18:06:41.014380] [avision] try to write cmd, count: 10.<br>[18:06:41.014566] [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes<br>[18:07:11.015767] [sanei_usb] sanei_usb_write_bulk: write failed: Resource temporarily unavailable<br>[18:07:11.016287] [avision] wrote 0 bytes<br>[18:07:11.016392] [avision] === Got error 9 trying to write, wrote: 0. ===<br>[18:07:11.016550] [avision] try to read status to clear the FIFO<br>[18:07:11.016629] [avision] avision_usb_status: timeout 500, 1 retries<br>[18:07:11.016702] [avision] ==> (interrupt read) going down ...<br>[18:07:11.016773] [sanei_usb] sanei_usb_read_int: trying to read 1 bytes<br>[18:07:11.517962] [sanei_usb] sanei_usb_read_int: read failed: Resource temporarily unavailable<br>[18:07:11.518143] [avision] <== (interrupt read) got: 0, status: 0<br>[18:07:11.518218] [avision] === Got error 9 trying to read status. ===<br>[18:07:11.518302] [avision] inquiry: inquiry failed (Error during device I/O)<br>[18:07:11.518379] [avision] sane_open: awakening inquiry failed: Error during device I/O<br>scanimage: open of device avision:libusb:001:010 failed: Error during device I/O<br>[18:07:11.518531] [avision] sane_exit:<br><br>After the command has failed subsequent calls to scanimage just hang and I need to restart the scanner in order to be able to see it in the list of devices again.<br><br>If I try to scan a frame directly the scanner starts the calibration process, but then it doesn't prompt me to enter the frame holder and subsequent calls fail with the error "Error during device I/O".<br><br>I found some workarounds that allow me to calibrate and scan, but I still need to restart the scanner after each scan. I'm definitely not an expert with Avision/SANE, so I was wondering if you could help me.<br><br>These are the issues I found and workarounds I applied so far:<div><ol><li><b>Calibration/Missing film holder issue</b><br>I added a prompt that waits for me to insert the film holder after the calibration is complete and I added a delay after the scanner is busy so get_frame_info doesn't fail: <a href="https://gitlab.com/potomak/backends/-/commit/031bd1a4630952b2907ede69f58b9ea1eb8d8145">https://gitlab.com/potomak/backends/-/commit/031bd1a4630952b2907ede69f58b9ea1eb8d8145</a>. I didn't publish this change as a PR because I'm not sure if there's a better way to do this and I wouldn't like to break other scanners supported by the backend</li><li><b>Frame range max number is always 1<br></b>The issue is that the frame option is constrained with values from 1 to 1 because the range is incorrectly initialized with max = 1. Workaround: I hardcoded max = 6</li><li><b>Can't scan frame > 3<br></b>I didn't find a workaround for this, but I guess it's some kind of timing issue. Workaround: I invert the film in the holder and continue with the last 3 frames :)</li><li><b>Can't scan more than one frame without restarting the scanner<br></b>Not sure why this happens. Workaround: restart the scanner after each scan :(</li></ol><br>I published an intro PR where I defined all data type codes in a new enum: <a href="https://gitlab.com/sane-project/backends/-/merge_requests/595">https://gitlab.com/sane-project/backends/-/merge_requests/595</a><br><br>I also tried to run an old version of SANE to see if the same backend used to work and I found one that compiles and scans!<br><br>It's from November 2004, specifically this commit: <a href="https://gitlab.com/sane-project/backends/-/commit/ce7d34ba235c60c4ae9be9662de2dce0d2c4a49f">https://gitlab.com/sane-project/backends/-/commit/ce7d34ba235c60c4ae9be9662de2dce0d2c4a49f</a><br><br>I run an empty scan to force the calibration of the scanner. After the calibration the scan is ready, it scans, and it doesn't hang after one scan as with the latest version of sane.<br><br>The only issue is that the output is completely different from the scans made using the latest version of Avision. The older version output has more contrast and misses details in darker tones.<br><br>Can you help me debug and fix Avision for Minolta Dimage Scan Dual II please?<br><br>Thanks<br>Giovanni<br></div></div>