[sane-devel] how to fill values in Genesys_Frontend structure from usb log?

Pierre Willenbrock pierre at pirsoft.dnsalias.org
Wed Dec 28 13:42:01 UTC 2005


Hi

Parag N(पराग़) schrieb:
> Hello,
> 
> On 12/27/05, Pierre Willenbrock <pierre at pirsoft.dnsalias.org> wrote:
> 
>>Parag N(पराग़) schrieb:
>>
>>>      I have usb log captured on windows just after powering up
>>>scanner HP 2400. I am checking Genesys_Frontend,Genesys_Motor
>>>structure values in genesys_devices.c. I want to know how to calculate
>>>values for Genesys_Frontend structure. Also how to calculate maximum
>>>start speed ,maximum end speed of scanner motor?
>>
>>I assume you can already interpret register reads/writes.
>>
>>Genesys_Frontend contains the setting of the analog frontend:
>>  AFE   |Genesys_Frontend
>>Register|    member
>>--------+----------------
>>0x00    |.reg[0]
>>0x01    |.reg[1]
>>0x02    |.reg[2]
>>0x03    |.reg[3]
>>0x04    |(reset)
>>0x06    |.reg2[0]
>>0x08    |.reg2[1]
>>0x09    |.reg2[2]
>>0x20    |.offset[0]
>>0x21    |.offset[1]
>>0x22    |.offset[2]
>>0x24    |.sign[0]
>>0x25    |.sign[1]
>>0x26    |.sign[2]
>>0x28    |.gain[0]
>>0x29    |.gain[1]
>>0x2a    |.gain[2]
>>
> 
>  does that mean i have to fill Genesys_Frontend like this with
> replacing values of registers mentioned above
>  {{0x00, 0x31, 0x1f, 0x13}
>    , {0x08, 0x02, 0x16}
>    , {0x20, 0x80, 0x10}
>    , {0x80, 0x00, 0x00}
>    , {0x01, 0xff, 0x00}
>    }
> 

You need to create a new entry in the list and add a new DAC_ in
genesys_low.h, if there is no entry matching your data. Then you need to
fill that entry with what you found.

Ususally we set the .gain and .offset to only somehow sane values, as
those will be calibrated before scanning. The rest depends on what you
get in the log.

>>AFE Registers a written by setting register FEWDA(0x50) to the register
>>number and then writing to registers FEWRDATA(0x3a,0x3b), so you will
>>see these three register writes repeat in your log(Register numbers for
>>gl646).
>>
> 
>  But i am getting 0x51,0x3a,0x3b as repetitive registers in my linux
> debug log in gl646_bulk_write_register function.
> ???
> 

Sorry, 0x51 is correct.

Regards,
  Pierre



More information about the sane-devel mailing list