[sane-devel] Canon LiDE 90

Guillaume Gastebois guillaume.gastebois at free.fr
Thu Mar 20 21:55:18 UTC 2008


Hello,

> Guillaume Gastebois schrieb:
>> Hello,
>> 
>> Pierre Willenbrock a écrit :
>>> Guillaume Gastebois schrieb:
>>>  > Hello,
>>>  >
>>>  > You can find attached a patch which works like my original code (with
>>>  > different contrast and calibration between 2 scans...).
>>>  >
>>>  > I removed controversed comments (sorry).
>>>
>>> Thanks for the patch. I see that you added DAC_CANONLIDE90 at one place.
>>>   This is probably needed at others places, too. (especially in
>>> genesys.c, iirc the way to encode the shading calibration data depends
>>> on one of the xx_type variables.)
>>>
>> DAC_CANONLIDE90 appears only in genesys_devices.c and genesys_gl841.c.
> 
> (i think you meant DAC_CANONLIDE35.) That is correct, but there is also 
> CCD_CANONLIDE35, which is used in genesys.c when setting up the shading 
> calibration data.
> 
Yes Ithink DAC_CANONLIDE35. I added CCD_CANONLIDE90 in genesys.c too. 
You were true.

>> 
>>> Then i see the LiDE 35's GPIO initialization sequence is used. Are you
>>> willing to play around with the involved bits to find the state
>>> transitions that don't reset the scanner? This is not strictly
>>> necessary, as the sequence works. But there may be some subtleties
>> 
>> If i dont add same constraint as lide 35 I get black image output.
> 
> see? mine does simply "powercycle" when trying to use it without that 
> (not so) "magic" sequence.
> 
>>> hiding there. Try adding delays between the state transitions when
>>> testing that, fast switching through the sequence sometimes leads to
>>> inconsistent results. (By "state" i mean the state of the gpio pins
>>> configured as output.)
>>>
>> How to do that ????
> 
> I used my small test program[1], modified to exercise the transitions of 
> interest. As i mentioned above, my scanner is pretty unforgiving to the 
> wrong sequence, so the program failed early when something went wrong.
> 
I'll try to adapt it. Thanks.

>>> For the LiDE 35 i found at least these constraints(i had a small state
>>> table that showed the allowed transitions, but i can't find it now):
>>> - GPO17 cannot be switched on when GPIO8 is off
>>> - GPIO9 cannot be switched off when GPIO8 is off
>>>
>>>  > I see in some case that my scanner locks writing : "[genesys]
>>>  > sanei_genesys_read_register (0x41, 0xf4) completed" and to unlock I have
>>>  > to push one of the 4 buttons !!!!!! Idea about that ?
> 
> replugging does help, too? (If not, this may be interesting)
Replugging doesn't change this problem. In my first test I have to press 
  button 3 (lide 90 has 4) to unlock scanner !!!! ????
> 
>>> The scan is not starting for some reason. I don't know what causes that.
>>> May be a power issue, depending on correctly setting the gpios or sth
>>> like that.
>> 
>> The windows snoop may say that but I remember fixing gpio regs with thos
>> snoop....
>> Must be investigated but later.
>> 
>>>  > Regards
>>>  > Guillaume
>>>
>>> Regards,
>>>    Pierre
>> 
>> It remains the bigest problem : calibration. Because I get different
>> contrast and sometimes vertical contrasted lines (bad shading). To be
>> continued.
> 
> Another problem is the duplicated nibble in the data from the afe.
Yep I forget this big problem (My mind want to be closest to the end!!!)
> 
> At least now there is a patch enabling basic support for this scanner, 
> which could be integrated into sane without causing the other scanners 
> to stop working.
> 
>> Regards
>> Guillaume
> 
> Regards,
>    Pierre
> 
> [1] http://pirsoft-dsl-dropzone.de/canon-lide35.tbz2

Regards
Guillaume



More information about the sane-devel mailing list