[sane-devel] Canon LiDE 90

Pierre Willenbrock pierre at pirsoft.dnsalias.org
Wed Jan 16 13:15:10 UTC 2008


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




More information about the sane-devel mailing list