<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 21/06/2015 23:04, John S. Weber
      wrote:<br>
    </div>
    <blockquote
cite="mid:CALSuzGaB02c7XB7sGzo4eb04v5j_Xw2iYmgWUWYwtb_eXkBPvA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>I recently purchased a Canon LIDE 220 as it was claimed to
          be support by sane. I put the USB code (04a9:190f) into the
          Scanner Search Engine at the <a moz-do-not-send="true"
            href="http://sane.org">sane.org</a> and it yielded this page
          which says support is complete.</div>
        <div><br>
        </div>
        <div><a moz-do-not-send="true"
href="http://www.sane-project.org/cgi-bin/driver.pl?manu=&model=&bus=any&v=04a9&p=190f">http://www.sane-project.org/cgi-bin/driver.pl?manu=&model=&bus=any&v=04a9&p=190f</a></div>
        <div><br>
        </div>
        <div>It was not found by the sane shipped with Ubuntu 15.04, so
          I installed this ppa:</div>
        <div><br>
        </div>
        <div>ppa:rolfbensch/sane-git<br>
        </div>
        <div><br>
        </div>
        <div>And updated. The scanned was then recognized by the xsane,
          et al. It mostly gave errors alluding to an invalid device.
          When it did try to scan, the head would go to the far end and
          required unplugging the USB cable to get it to stop banging at
          the end. Sometimes, not often, it would work fine. I did a
          bunch of reading and I was able to fix things by setting sane
          debug variables. One site suggested this and it worked:</div>
        <div><br>
        </div>
        <div>
          <div>export SANE_DEBUG_GENESYS=255</div>
          <div>export SANE_DEBUG_GENESYS_LOW=255</div>
          <div>export SANE_DEBUG_GENESYS_GL124=255</div>
          <div>scanimage -d genesys -l 0.0 -t 0.0 -x 90 -y 140
            --resolution 1200  --mode Color >scan.pnm 2>scan.log</div>
        </div>
        <div><br>
        </div>
        <div>I've narrowed it down to just </div>
        <div><br>
        </div>
        <div>export SANE_DEBUG_GENESYS_LOW=8<br>
        </div>
        <div><br>
        </div>
        <div>From my reading, I believe there is a race condition more
          exposed by faster hardware. I have new, fast hardware. My
          libsane version is 1.0.25-git20150612-vivid0 on Ubuntu 15.04.</div>
        <div><br>
        </div>
      </div>
    </blockquote>
    Debug levels are defined like this for genesys_low:<br>
    <br>
    genesys_low.h:#define DBG_io          6    /* io functions */<br>
    genesys_low.h:#define DBG_io2         7    /* io functions that are
    called very often */<br>
    genesys_low.h:#define DBG_data        8    /* log image data */<br>
    <br>
        So if you get the problem at log level below seven, we must look
    at DBG_data usage in genesys_low.c . But here isn't on. So try 7 and
    6 as debug levels. Once we know the exact kind of logging level that
    fix this timing issue, the next step is to remove this messages one
    by on until you find the one that makes difference. I haven't seen
    nothing obvious, so experimenting/testing is needed.<br>
    <br>
        sanei_genesys_wait_for_home(),
    sanei_genesys_set_buffer_address() and sanei_genesys_write_ahb
    functions() are printing messages in the middle of the code and are
    first candidates to try, in this order.<br>
    <br>
    <blockquote
cite="mid:CALSuzGaB02c7XB7sGzo4eb04v5j_Xw2iYmgWUWYwtb_eXkBPvA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>At this point the scanner is working reliably with no bad
          behavior.</div>
        <div><br>
        </div>
        <div>I am having one issue which seems like a driver bug. Using
          Xsane through gimp, set to grayscale 300 and 1200 dpi, the
          scan is fine. At 600dpi the pixel dimension of the scan is
          correct, but the lengthwise aspect ratio is stretched so that
          only maybe 2/3 of a letter size is actually scanned and it's
          stretched to letter size. The scanner head only moves across
          the top ~2/3 of the scanned page.</div>
        <div>
          <div><br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
        There is a flaw in the backend design regarding both gl124 an
    gl847 support. The supported models have a maximum motor speed
    higher (900 dpi) than the lowest optical resolution. I need to
    redesign things to work around that. The less complicated would be
    to scan several lines at 900 dpi then crop down data. This involves
    quite some work.<br>
    <br>
    <blockquote
cite="mid:CALSuzGaB02c7XB7sGzo4eb04v5j_Xw2iYmgWUWYwtb_eXkBPvA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Let me know what other info I can provide, or if there's
            already an answer that I've missed, I'll be glad to be
            pointed in the right direction.</div>
          <div><br>
          </div>
          <div>Thanks,</div>
          <div>John</div>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
    <br>
    Regards,<br>
        Stef<br>
  </body>
</html>