[sane-devel] Canon LiDE 90
Guillaume Gastebois
guillaume.gastebois at free.fr
Mon Jan 21 20:48:20 UTC 2008
Hello,
Thank you Pierre.
I did all what you do : commenting the code in
genesys_flatbed_calibration (Offset/Gain calibration commented out too),
added OPTICAL_FLAG_DISABLE_SHADING to the flags in
gl841_init_optical_regs_scan
analog frontend is so :
{0x00, 0x21, 0x00, 0x00},
{0x02, 0x8b, 0x02, 0x8b, 0x02, 0x8b, 0x20, 0x06, 0x00, 0xff,
0x24, 0x00, 0x00, 0x04},
{0x02, 0x04,
0x02, 0x04, 0x02, 0x04,
0x0a, 0x71,
0x55,
0x00, 0x00, 0x20, 0x41}
I can now see my dinosaure ! See picture attached (colored dinosaure on
a white page). It's far from perfect !
>Guillaume Gastebois schrieb:
>> Hello,
>>
>> OK, my motor moves !
>
>Cool.
>
>>
>> But, someting doesn't work during initialisation : I get floating >point
>> error !
>>
>> I modified genesys_gl841.c for instrumentation and genesys_devices.c
>> (genesys_sensor section) in accordance to my windows usb snoop log >(see
>> attacement).
>>
>> SANE_DEBUG_GENESYS_GL841=255 scanimage
>> -device-name=genesys:libusb:001:066 > toto.pnm ends with :
>
>(please use both SANE_DEBUG_GENESYS_GL841=255 and
>SANE_DEBUG_GENESYS=255, the device specific code calls back into the
>unspecific code)
>
>>
>> [genesys_gl841] reg[0x86] = 0x00
>> [genesys_gl841] reg[0x87] = 0x00
>> [genesys_gl841] gl841_bulk_write_register: wrote 104 registers
>> [genesys_gl841] gl841_led_calibration: starting first line reading
>> [genesys_gl841] gl841_begin_scan
>> [genesys_gl841] gl841_bulk_write_register (elems = 4)
>> [genesys_gl841] reg[0x03] = 0x5f
>> [genesys_gl841] reg[0x01] = 0x81
>> [genesys_gl841] reg[0x0d] = 0x01
>> [genesys_gl841] reg[0x0f] = 0x01
>> [genesys_gl841] gl841_bulk_write_register: wrote 4 registers
>> [genesys_gl841] gl841_begin_scan: completed
>> [genesys_gl841] gl841_bulk_read_data: requesting 31200 bytes
>> [genesys_gl841] gl841_bulk_read_data: trying to read 31200 bytes of
>>data
>> [genesys_gl841] gl841_bulk_read_data read 31200 bytes, 0 remaining
>> [genesys_gl841] gl841_bulk_read_data: completed
>> [genesys_gl841] gl841_led_calibration: average: 0,801,302
>> [genesys_gl841] gl841_led_calibration:
>>avga=367,expr=0,expg=0,expb=0,avge=0
>> Exception en point flottant (floating point exception)
>
>that line above should be more like this:
>[genesys_gl841] gl841_led_calibration: average: 43901,43865,43387
>
>But you can ignore led-calibration for now, that is not essential when
>debugging the backend. Just make sure the exposure settings in
>Genesys_Sensor.regs_0x10_0x1d are good, for example from an usb log the
>last register write to 0x10-0x15 before receiving actual scanned data.
>If those stay all zero, the rgb-leds in your scanner are very probably
>not controlled using the rgb-led-control-feature of the gl84x.
>
>You can disable led calibration by commenting out the code in
>genesys_flatbed_calibration. Offset/Gain calibration can be commented
>out when the values in Genesys_Frontend are good, Shading calibration
>can be disabled when you add OPTICAL_FLAG_DISABLE_SHADING to the flags
>for gl841_init_optical_regs_scan. When shading calibration is disabled,
>you get vertical stripes, the others lead to too dark/bright r/g/b
>channels.
>
>Things that may be missing:
>* leds need to be controlled correctly
>* cis-sensor needs to get the correct clock signals(line toggle+pixel
> clock, half-resolution signal is optional for now)
>* the analog frontend registers need to be setup correctly in
> Genesys_Frontend
>* the readout position in the data stream from the analog frontend may
> need tweaking(registers 0x52,0x53)
>
>When that is done, you should be able to get an image from your
>scanner, although calibration may be lacking.
>
>The data stream inside gl84x based cis-scanners(at least the LiDE
>35/50/60) looks like this:
>-----+
>gl84x!
>-----+
> ! r,g,b led control line, selects colors r, g, b in turn,
> ! controls exposure for each color
>+---------+
>!r,g,b led!
>+---------+
> ! r,g,b light
>+--------+
>!original!
>+--------+
> ! r,g,b component
>+----------+
>!cis sensor!
>+----------+
> ! voltages proportional to light intensity
>+---------------+
>!analog frontend!
>+---------------+
> ! 16bit intensity, multiplexed on 8bit data bus
>-----+
>gl84x!
>-----+
>
>> See sample image toto.jpg too (when commenting zero division in
>> genesys_gl841.c the scanner scans an image).
>>
>> Help needed thanks
>>
>> Guillaume
>
>Regards,
> Pierre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: toto.jpg
Type: image/jpeg
Size: 30706 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080121/b13a9468/attachment-0001.jpg
More information about the sane-devel
mailing list