<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div style="" class=""><span style="" class=""><br style="">Dear Stef,</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;"><br style="" class=""><span style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;"><span style="" class="">thanks a lot for your suggestions and scripts. The more I dig into the source code, the more</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;"><span style="" class="">questions I have. Here they are:</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family:
 serif; background-color: transparent; font-style: normal;"><span style="" class=""><br style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;"><span style="" class="">1) file genesys_devices.c, definition of  Genesys_Model canon_8400f_model (line 1691). I realized that the dpi list does not correspond to the model (CS8400F has maximum resolution of 3200dpi).</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;"><span style="" class="">- Shell I change the array with values available in the windows driver of the scanner? Is the length of the array fixed?<br style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;"><span style="" class="">- Are the other
 values extracted from some logs, or shell I disassemble unit to measure all constants (position of white strip)?</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;"><span style="" class="">- I have performed test scan with resolution of 100dpi of size 10x10 cm (specified with -x -y option). The resulting image had proper number of lines/rows (393), proper aspect ratio. However, the scan are was about 15x15 cm. I assume this has something to do with wrong array with dpi setting...</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;"><br style="" class=""><span style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;"><span style="" class="">2) genesys_gl843.h, There is
 definition of the Sensor_Profile sensors. For the CS8400F there is defined array (line 666). I logged several scans with different dpi settings using usbsnoop. After processing logs with your script I found that there are different possible values reported for the sensor_profile and motor_profile. This profiles do not coincide with the one in the </span><span style="" class="">genesys_gl843.h. Here are ones, extracted from the logs:</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;"><br style="" class=""><span style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;">sensor_profile { sensor_id, dpi, 7200, 0xe3f, 0x0, 0x1b6db, 5168, 0,0xffffffffffffffff,<br style="" class="">0xfffffffffffffeff, 0xfffffffffffffeff, 0xfffffffffffffeff, 0xffffffffffffffff, 0x01,
 0x02, 0xffffffffffffffff, 0xffffffffffffffff,<br style="" class="">{0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0x33, 0x0c, 0x13, 0xffffffffffffffff, 0x30, 0xffffffffffffffff, 0x00, 0x84, },<br style="" class="">{0x0d,0x10,0x01,0x04,0x07,0x0a,0x6b,0xffffffffffffffff,0x40,0x00,0x00,0xffffffffffffffff,0x85,},<br style="" class="">}</div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;">sensor_profile { sensor_id, dpi, 7200, 0xe3f, 0x0, 0x1b6db, 5168, 0,0xffffffffffffffff,<br style="" class="">0xfffffffffffffeff, 0xfffffffffffffeff, 0xfffffffffffffeff, 0xffffffffffffffff, 0x01, 0x02, 0xffffffffffffffff, 0xffffffffffffffff,<br style="" class="">{0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0x33, 0x0c, 0x13, 0xffffffffffffffff,
 0x30, 0xffffffffffffffff, 0x00, 0x84, },<br style="" class="">{0x0d,0x10,0x01,0x04,0x07,0x0a,0x6b,0xffffffffffffffff,0x40,0x00,0x00,0xffffffffffffffff,0x88,},<br style="" class="">},</div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;">sensor_profile { sensor_id, dpi, 22000, 0x0, 0xff, 0x0, 5168, 0,0x2a,<br style="" class="">0x 0, 0x 0, 0x 0, 0xffffffffffffffff, 0x07, 0x08, 0xffffffffffffffff, 0xffffffffffffffff,<br style="" class="">{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x0c, 0x10, 0x2a, 0x30, 0x00, 0x00, 0x9a, },<br style="" class="">{0x01,0x04,0x07,0x0a,0x0d,0x10,0x1b,0x00,0x40,0x00,0x00,0xffffffffffffffff,0x88,},<br style="" class="">},<br style="" class="">sensor_profile { sensor_id, dpi, 10800, 0xe3f, 0x0, 0x1b6db, 5168, 0,0x2a,<br style="" class="">0x 0, 0x 0, 0x 0, 0xffffffffffffffff, 0x01, 0x02, 0xffffffffffffffff, 0xffffffffffffffff,<br style=""
 class="">{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0c, 0x13, 0x2a, 0x30, 0x00, 0x00, 0x84, },<br style="" class="">{0x0d,0x10,0x01,0x04,0x07,0x0a,0x6b,0x00,0x40,0x00,0x00,0xffffffffffffffff,0x88,},<br style="" class="">},<br style="" class="">sensor_profile { sensor_id, dpi, 14400, 0x1ff, 0x0, 0x24924, 5168, 0,0x2a,<br style="" class="">0x 0, 0x 0, 0x 0, 0xffffffffffffffff, 0x00, 0x01, 0xffffffffffffffff, 0xffffffffffffffff,<br style="" class="">{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0c, 0x11, 0x2a, 0x30, 0x00, 0x00, 0x84, },<br style="" class="">{0x0b,0x0e,0x11,0x02,0x05,0x08,0x63,0x00,0x40,0x00,0x00,0xffffffffffffffff,0x88,},<br style="" class="">},<br style="" class="">sensor_profile { sensor_id, dpi, 7200, 0xe3f, 0x0, 0x1b6db, 5168, 0,0x2a,<br style="" class="">0x 0, 0x 0, 0x 0, 0xffffffffffffffff, 0x01, 0x02, 0xffffffffffffffff, 0xffffffffffffffff,<br style="" class="">{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0c, 0x13, 0x2a, 0x30,
 0x00, 0x00, 0x84, },<br style="" class="">{0x0d,0x10,0x01,0x04,0x07,0x0a,0x6b,0x00,0x40,0x00,0x00,0xffffffffffffffff,0x85,},<br style="" class="">}</div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;"><br style="" class=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;">They are all different. Do you have any suggestions what to do with this? For each sensor_profile there is a motor_profile. They have the following structure:</div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;">motor_profile={id,7200,2, {0, 0, ......} all skipped numbers are zeros (in contrast to one in the <span style="" class="">genesys_gl843.h, line 677</span>). The second number coincides with the first number reported in the
 sensor_profile.</div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;"><br></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;">I would appreciate you suggestions for further implementation.</div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;">Thank you in advance,</div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;">Best regards,</div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color: transparent; font-style: normal;">Myroslav<br style="" class=""><span style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: serif; background-color:
 transparent; font-style: normal;"><span style="" class=""><br style="" class=""></span></div> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div class="" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div class="" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="" class="" dir="ltr"> <font style="" class="" face="Arial" size="2"> On Monday, June 2, 2014 9:39 PM, Stef <stef.dev@free.fr> wrote:<br style="" class=""> </font> </div>  <br style="" class=""><br style="" class=""> <div style="" class=""><div style="" class="" id="yiv1025950432"><div style="" class="">
    <div style="" class="" id="yiv1025950432yqt15634"><div style="" class="">On 01/06/2014 14:19, Myroslav Kavatsyuk
      wrote:<br style="" class="" clear="none">
    </div>
    <blockquote style="" class="" type="cite">
      <div class="" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;">
        <div class="" style="">Dear Stef,<br class="" style="" clear="none">
          <br class="" style="" clear="none">
          Finally I managed to test the CS8400F. In the git version of
          SANE there is<br class="" style="" clear="none">
          some implementation of the scanner. After adding proper line
          to genesys.conf<br class="" style="" clear="none">
          I managed to make first scan with the CS8400F. Scanning was
          invoked using<br class="" style="" clear="none">
          scanimage. Here are my observations:<br class="" style="" clear="none">
          * If I do not specify size of a document to scan (no -x and -y
          options), the scanner<br class="" style="" clear="none">
            head bumps into movement limiter (goes too far)<br class="" style="" clear="none">
          * Scanner does not perform calibration and does not warm-up
          the lamp.<br class="" style="" clear="none">
             It starts scanning immediately after the scanimage command.
          Once I limited<br class="" style="" clear="none">
             scanning region with -x and -y options, I got image with
          vertical stripes (luck<br class="" style="" clear="none">
             of CCD gain calibration?)<br class="" style="" clear="none">
          <br class="" style="" clear="none">
          I am ready to work on the backend to make it usable. However,
          I need your help.<br class="" style="" clear="none">
          In the SANE digest (vol 74, issue 19) you wrote: "Adding
          support for the Canoscan<br class="" style="" clear="none">
          8400F will be a matter of tuning the settings structures in
          genesys_devices.c and<br class="" style="" clear="none">
          genesys_gl843.h. Then maybe adapt the code in genesys_gl843.c
          to support the<br class="" style="" clear="none">
          possible differences for this model."<br class="" style="" clear="none">
          Can you give me more specific hints, where should I add
          calibration, warming up?<br class="" style="" clear="none">
          I have running WindowsXP in the virtualbox with the usbsnoop,
          so I can get any<br class="" style="" clear="none">
          required usb logs.</div>
        <div class="" style="color:rgb(0, 0, 0);font-size:16px;font-family:serif;background-color:transparent;font-style:normal;"><br style="" class="" clear="none">
        </div>
        <div class="" style="color:rgb(0, 0, 0);font-size:16px;font-family:serif;background-color:transparent;font-style:normal;">Thank you in advance,<br class="" style="" clear="none">
          Best regards,<br class="" style="" clear="none">
          Myroslav</div>
        <div class="" style=""><br class="" style="" clear="none">
        </div>
      </div>
      <br style="" class="" clear="none">
      <fieldset style="" class=""></fieldset>
      <br style="" class="" clear="none">
    </blockquote></div>
        Hello,<br style="" class="" clear="none">
    <br style="" class="" clear="none">
        calibration is currently desactived because of the
    GENESYS_FLAG_NO_CALIBRATION . Remove it to activate calibration.
    Since there are already 2 CCD scanners supported (KV-SS080 and HP
    G4050), you'll have to setup entries in data tables held in
    genesys_gl843:<br style="" class="" clear="none">
        - Sensor_Profile sensors[]<br style="" class="" clear="none">
        - Motor_Profile gl843_motors[]<br style="" class="" clear="none">
        - slope table such a uint32_t kvss080[]<br style="" class="" clear="none">
    <br style="" class="" clear="none">
    Data will have to be extracted from usb logs.  The dev cycle is run
    the backend with your changes, compare with usb logs, change code
    again to fix differences .... until it works.<br style="" class="" clear="none">
    <br style="" class="" clear="none">
    Sometimes you'll may have to add specific behavior for your scanner
    in genesys_gl843.c see the use of CCD_G4050, CCD_KVSS080, etc...<br style="" class="" clear="none">
    <br style="" class="" clear="none">
        running 'doxygen genesys-doxygen.conf' in the doc/ sub dir will
    generate doxygen info for all the backend.<br style="" class="" clear="none">
    <br style="" class="" clear="none">
    Regards,<br style="" class="" clear="none">
        Stef<br style="" class="" clear="none">
    <br style="" class="" clear="none">
  </div></div><br style="" class=""><br style="" class=""></div>  </div> </div>  </div> </div></body></html>