[sane-devel] HP ScanJet N6310 - SANE Not Supporting

Abdul Salam V vasalami at gmail.com
Wed Sep 7 13:27:03 UTC 2011


This is amazing. Thanks Stef for this quick reply and great hint.

I have taken the values of Cannon Lide200 for motor, DAC and gpo entry.
Since it's CCD one, for sensor entry taken the value of hp g4050. Now device
is responding, motor & lamp is on and moving front and back. Hope this will
not kill the device, let me if I'm anything wrong.

However, the output it generates is black screen file. Below is the code
added into the genesys_devices.c file.

static Genesys_Model hpn6310_model = {
  "hewlett-packard-scanjet-n6310",      /* Name */
  "Hewlett Packard",                    /* Device vendor string */
  "ScanJet N6310",                      /* Device model name */
  GENESYS_GL847,
  NULL,

  { 4800, 2400, 1200, 600, 400, 300, 200, 150, 100, 0},
  { 4800, 2400, 1200, 600, 400, 300, 200, 150, 100, 0},
  {16, 8, 0},                   /* possible depths in gray mode */
  {16, 8, 0},                   /* possible depths in color mode */

  SANE_FIX (6.55),              /* Start of scan area in mm  (x) */
  SANE_FIX (15.00),             /* Start of scan area in mm (y) */
  /*SANE_FIX (217.9),             /* Size of scan area in mm (x) 5148 pixels
at 600 dpi*/
  /*SANE_FIX (315.0),             /* Size of scan area in mm (y) */
  SANE_FIX (216),        /* Size of scan area in mm (x) 435*/
  SANE_FIX (511),         /* Size of scan area in mm (y) 511*/   /* In the
device user manual flatbed glass size is maximum 216 mm, 300 mm. If I give
this value to above yellow shaded code, motor is moving half and coming
back.*/

  SANE_FIX (3.0),               /* Start of white strip in mm (y) */
  SANE_FIX (0.0),               /* Start of black mark in mm (x) */

  SANE_FIX (0.0),               /* Start of scan area in TA mode in mm (x)
*/
  SANE_FIX (0.0),               /* Start of scan area in TA mode in mm (y)
*/
  SANE_FIX (100.0),             /* Size of scan area in TA mode in mm (x) */
  SANE_FIX (100.0),             /* Size of scan area in TA mode in mm (y) */

  SANE_FIX (0.0),              /* Start of white strip in TA mode in mm (y)
*/

  SANE_FIX (0.0),               /* Size of scan area after paper sensor
stops
                                   sensing document in mm */
  SANE_FIX (0.0),               /* Amount of feeding needed to eject
document
                                   after finishing scanning in mm */

  0, 32, 48,                    /* RGB CCD Line-distance correction in pixel
*/

  COLOR_ORDER_RGB,              /* Order of the CCD/CIS colors */

  SANE_FALSE,                   /* Is this a CIS scanner? */
  SANE_FALSE,                   /* Is this a sheetfed scanner? */
  CCD_G4050,
  DAC_CANONLIDE200,
  GPO_CANONLIDE200,
 MOTOR_CANONLIDE200,
  GENESYS_FLAG_UNTESTED        /* not fully working yet */
    | GENESYS_FLAG_LAZY_INIT
    | GENESYS_FLAG_14BIT_GAMMA
    | GENESYS_FLAG_DARK_CALIBRATION
    | GENESYS_FLAG_OFFSET_CALIBRATION
    | GENESYS_FLAG_CUSTOM_GAMMA
    | GENESYS_FLAG_SKIP_WARMUP
   | GENESYS_FLAG_NO_CALIBRATION,
/*     | GENESYS_FLAG_HALF_CCD_MODE,*/
  GENESYS_HAS_NO_BUTTONS, /* no buttons supported */
  100,
  100
};

Still I'm looking into this in more detail. Since I'm newbie to this, I'm
moving further without any proper managed way. Also I want to know how to
analyse/compare the USBSnoopy.log .

Thanks once again,
Abdul Salam

On Wed, Sep 7, 2011 at 1:57 AM, stef <stef.dev at free.fr> wrote:

> Le mardi 6 septembre 2011 15:06:10 Abdul Salam V, vous avez écrit :
> > Hello SANE Dev Team -
> >
> > As per my findings, SANE is not supporting HP Scanjet N6310 scanner. So I
> > am much interested to write sane module for this device. Currently I
> don't
> > have much idea of writing sane driver. So I want your help and support in
> > this regard.
> >
> > The chipset used in this device is GL847. Since there is no document
> > available for this device and chipset, I have used reverse engineering
> > method and generated the snoopy log file. Also using "usbsnoop2libusb.pl
> "
> > converted the log file into C code. However I'm struggling to understand
> > and to fill some of the values for the genesys device datastructure. Can
> > you please guide me how to do this without having the proper document.
> >
> > Please find the attachment of the documents and also let me know in case
> > you want any additional information. I have chipset data sheet for GL846
> > and GL848 but not GL847.
> >
> > Currently I have modified the "genesys_devices.c" and other configure
> file.
> > "scanimage -L"  listing out the device but not any other process. So
> please
> > let me what are the other things I need to do and how fill the C
> structure
> > such as "genesys_Sensor", "genesys_motor", "genesys_gpo" etc.
> >
> > Your guidance and support would be much appreciated.
> >
> > Thanks and Regards,
> > Abdul Salam
>
>        Hello,
>
>        the starting point is to clone the device description of another
> gl847
> device and disable calibration with device flags. You'll have to clone all
> sensor, motor and gpo entry giving them another id.
>        Then by comparing the USB log from the backend with the one from
> windows
> you'll find differences that you will fix one after all. I'm sorry I am too
> short on time to give more explanations than the comments in the code (you
> may
> use the appended qdox config file). The various mail about the optic book
> 3600
> contain interesting hints on what you'll have to do. Using eclipse+CDT will
> let you follow the usage of each struct.
>        This scanner is a CCD one, and the code path in the gl847 part for
> this
> is completly untested and surely need some tuning. By the way, there is no
> code for ADF support in the genesys backend.
>
> Regards,
>         Stef
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20110907/b3aa87d6/attachment.html>


More information about the sane-devel mailing list