<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I wrote a scanning program that uses the Sane library eight or nine years ago, and have been using it happily, since then. A couple of weeks ago, it occurred to me the machines to which the scanners are connected hadn’t had their OSes upgraded
 in at least three years. Unfortunately, upgrading them broke my program, and I can’t figure out why.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The scanners are Fujitsu fi-6770djs, with both document feeders and flatbeds. If we stick with the document feeders, everything is fine. If we scan on the flatbed, then switch back to the document feeder, sane_start returns SANE_STATUS_INVAL.
 Restarting the program resets everything and allows us to use the document feeder, again. Now, I know that when you use the document feeder, the page dimensions have to be specified with page-length/page-width, while the flatbed requires tl-x/tl-y/br-x/br-y,
 and my program accounts for that.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I tried moving some stuff around so all the options are set right before sane_start is called (rather than immediately after the user sets them), but that didn’t help.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I tried previous versions of the Sane library, from 1.0.22 to 1.0.27; didn’t help.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here’s the debug output:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[sanei_debug] Setting debug level of dll to 255.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] sane_init: SANE dll backend version 1.0.13 from sane-backends 1.0.27git<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] sane_init/read_dlld: attempting to open directory `./dll.d'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] sane_init/read_dlld: attempting to open directory `/usr/local/etc/sane.d/dll.d'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] sane_init/read_dlld: using config directory `/usr/local/etc/sane.d/dll.d'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] sane_init/read_dlld: done.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] sane_init/read_config: reading dll.conf<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] add_backend: adding backend `net'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">...<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] add_backend: adding backend `xerox_mfp'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] sane_open: trying to open `fujitsu:fi-6770dj:1215'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] load: searching backend `fujitsu' in `/usr/local/lib:/usr/local/lib/sane'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] load: trying to load `/usr/local/lib/libsane-fujitsu.so.1'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] load: couldn't open `/usr/local/lib/libsane-fujitsu.so.1' (No such file or directory)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] load: trying to load `/usr/local/lib/sane/libsane-fujitsu.so.1'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] load: dlopen()ing `/usr/local/lib/sane/libsane-fujitsu.so.1'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] init: initializing backend `fujitsu'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[sanei_debug] Setting debug level of fujitsu to 255.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_init: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_init: fujitsu backend 1.0.133, from sane-backends 1.0.27git<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_init: finish<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] init: backend `fujitsu' is version 1.0.133<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_open: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_open: no scanners currently attached, attaching<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_get_devices: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_get_devices: reading config file fujitsu.conf<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_get_devices: setting "buffer-size" to 65536<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_get_devices: looking for 'scsi FUJITSU'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_get_devices: looking for 'usb 0x04c5 0x1041'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">...<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_get_devices: looking for 'usb 0x04c5 0x114a'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_get_devices: config option "buffer-size" (262144) is > 65536, warning!<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_get_devices: setting "buffer-size" to 262144<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_get_devices: looking for 'usb 0x04c5 0x114d'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">...<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_get_devices: looking for 'usb 0x04c5 0x1174'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] attach_one: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] attach_one: looking for 'libusb:002:002'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] connect_fd: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] connect_fd: opening USB device<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] wait_scanner: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] do_usb_cmd: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">...<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] do_usb_cmd: finish<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] init_inquire: Found FUJITSU scanner fi-6770dj version 03 at libusb:002:002<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">...<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] rs sub call >><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] do_usb_cmd: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] cmd: writing 31 bytes, timeout 30000<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] cmd: >><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] 000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C...............<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] 010: 00 00 00 03 00 00 00 12 00 00 00 00 00 00 00    ...............
<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] cmd: wrote 31 bytes, retVal 0<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] in: reading 18 bytes, timeout 30000<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] in: retVal 0<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] in: read 18 bytes<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] in: <<<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] 000: f0 00 45 00 00 00 00 0a 00 00 00 00 26 00 00 80 ..E.........&...<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] 010: 00 3e                                           .>             
<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] stat: reading 13 bytes, timeout 30000<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] stat: <<<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] 000: 53 00 00 00 00 00 00 00 00 00 00 00 00          S............  
<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] stat: read 13 bytes, retVal 0<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] do_usb_cmd: finish<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] rs sub call <<<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sense_handler: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] Sense=0x5, ASC=0x26, ASCQ=00, EOM=1, ILI=0, info=00000000<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] Illegal request: invalid field in parm list<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] Offending byte is 0x3e<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] Window desc block? byte 0x36<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] set_window: finish<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_start: ERROR: cannot set window<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_start: error 4<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] sane_cancel(handle=0x20e1300)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_cancel: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] check_for_cancel: start 0 1<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] check_for_cancel: already cancelled<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] check_for_cancel: finish 2<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_cancel: finish<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] sane_close(handle=0x20e1300)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_close: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] mode_select_buff: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] do_usb_cmd: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] cmd: writing 31 bytes, timeout 30000<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] cmd: >><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] 000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C...............<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] 010: 00 00 00 15 10 00 00 0c 00 00 00 00 00 00 00    ...............
<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] cmd: wrote 31 bytes, retVal 0<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] out: writing 12 bytes, timeout 30000<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] out: >><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] 000: 00 00 00 00 3a 06 c0 c0 00 00 00 00             ....:.......   
<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] out: wrote 12 bytes, retVal 0<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] stat: reading 13 bytes, timeout 30000<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] stat: <<<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] 000: 53 00 00 00 00 00 00 00 00 00 00 00 00          S............  
<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] stat: read 13 bytes, retVal 0<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] do_usb_cmd: finish<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] mode_select_buff: finish<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] disconnect_fd: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] disconnecting usb device<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] disconnect_fd: finish<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_close: finish<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] sane_exit: exiting<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] sane_exit: calling backend `fujitsu's exit function<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_exit: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] disconnect_fd: start<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] disconnect_fd: finish<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[fujitsu] sane_exit: finish<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[dll] sane_exit: finished<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The actual debug output was 14 meg, so I trimmed it a little. Places where I did that are denoted with “…”.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I get that the thing that obviously changed is the operating system (Linux Mint 16 to Ubuntu 16.04), but I wouldn’t even know where to start to figure out how that’s affecting my stuff, and of course, I can’t go back, because none of the
 repositories are storing it, anymore. If anyone can point me in a direction that might help, it would be greatly appreciated.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
The information contained in this email is proprietary, confidential and only for the use of the intended recipient. If you are not the intended recipient, note that any disclosure, distribution, or copying of this email is strictly prohibited. If you have
 received this email in error, please destroy it and notify us immediately at the number noted above.
</body>
</html>