[sane-devel] Pulstek OpticBook 3800 - problems with openning device on 1.0.23+

Stef stef.dev at free.fr
Fri May 10 06:29:09 UTC 2013


On 09/05/2013 10:49, Nikolay Shaplov wrote:
>> what kind of changes have you done in the genesys backend ? I find
>> strange that
> I find this strange too.
>
> I added
> {0x07b3, 0x1300, &plustek_3800_model},
> into
>   Genesys_USB_Device_Entry genesys_usb_device_list[]
>
> and added
>
> static Genesys_Model plustek_3800_model = {
>    "plustek-opticbook-3800",     /* Name */
>    "PLUSTEK",                    /* Device vendor string */
>    "OpticBook 3800",             /* Device model name */
>    GENESYS_GL847,
>    NULL,
>    {/*2400,*/ 1200, 600, 400, 300, 200, 150, 100, 75, 0},        /* possible y-resolutions */
>    {16, 8, 0},                   /* possible depths in gray mode */
>    {16, 8, 0},                   /* possible depths in color mode */
>
>    SANE_FIX (0.42),/*SANE_FIX (0.42),             Start of scan area in mm  (x) */
>    SANE_FIX (6.75),/*SANE_FIX (7.9),              Start of scan area in mm (y) */
>    SANE_FIX (216.0),/*SANE_FIX (216.0),           Size of scan area in mm (x) */
>    SANE_FIX (297.0),/*SANE_FIX (297.0),           Size of scan area in mm (y) */
>
>    SANE_FIX (0.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 (0.0),               /* Size of scan area in TA mode in mm (x) */
>    SANE_FIX (0.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, 24, 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_PLUSTEK_3600,
>    DAC_PLUSTEK_3600,
>    GPO_PLUSTEK_3600,
>    MOTOR_PLUSTEK_3600,
>    GENESYS_FLAG_UNTESTED         /* not fully working yet */
>            | GENESYS_FLAG_CUSTOM_GAMMA
>            | GENESYS_FLAG_SKIP_WARMUP
>            | GENESYS_FLAG_DARK_CALIBRATION
>            | GENESYS_FLAG_OFFSET_CALIBRATION
>            | GENESYS_FLAG_LAZY_INIT
>            | GENESYS_FLAG_HALF_CCD_MODE,/*
>        | GENESYS_FLAG_NO_CALIBRATION,*/
>    GENESYS_HAS_NO_BUTTONS,
>    7,
>    200
> };
>
> It is a clone of  plustek_3600_model with   GENESYS_GL841, replaced with   GENESYS_GL847,
> and names changed...
>
> That's all I did, and same trick makes sane at least try to move scanner's head in 1.0.22
>
>
>> libusb:002:007 is opened, then libusb:002:006 is tried.
> Oh... I should be more attentive. I did not noticed that.
>
>> How many scanners do you have?
> Actually my notebook has webcam and fingerprint scanner in it.
> the first one is detected by sane as an acceptable input device (but I've never tried to use it this way)
>
>> What does lsusb reports ?
> $ sudo lsusb
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
> Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
> Bus 001 Device 003: ID 0489:e00d Foxconn / Hon Hai Broadcom Bluetooth 2.1 Device
> Bus 001 Device 004: ID 1c7a:0801 LighTuning Technology Inc. Fingerprint Reader
> Bus 001 Device 005: ID 04f2:b1c1 Chicony Electronics Co., Ltd
> Bus 002 Device 004: ID 07b3:1300 Plustek, Inc.
>
     Hello,

     since the ASIC used is a GL845, you should not try forcing it to 
GL847. They are really different, and nothing will ever work. If you 
look at the GL845 datasheet, you'll see it is really close to the GL846. 
So close in fact that the same code should be able to run both.
     Since I added preliminary support for GL846 a couple of months ago, 
you'd rather declare your scanner as a GL846 one like the 
canon_formula101_model.

     Since having the ASIC datasheet isn't enough( GPIO, fontend, motors 
change from one model to another and are not coverd by this 
documentation), the process to reach full support is to run the 
experimental backend and compare debugging output with USB logs recorder 
under windows, and tweak the code until it works.

Regards,
     Stef





More information about the sane-devel mailing list