[sane-devel] Canon LiDE 80 (2nd try)

Stefan Lucke stefan at lucke.in-berlin.de
Sat Feb 9 09:15:26 UTC 2008


On Friday 08 February 2008, Reinhard Biegel wrote:
> Am Wednesday, 6. February 2008 schrieb Reinhard Biegel:
> > Oh....i just remember there was something that had to be called at any
> > price but didn't find any documentation about that. I'm going to look for
> > that in my logs.
> 
> Hi again,
> 
> I wanted to capture some logs today. But I had to find out that Canon doen't 
> even provide drivers for 64bit Vista, which i set up some days ago. 
> *goingcrazy*
> 
> As far as I remember there was a bulk write to gamma address space during 
> initialisation which wrote data beyond the end of gamma table in the logs. 
> When saying 'beyond' I'm refering the GL841 datasheet.

You are talking about writes like:
set_write_register(0x5b, 0x0c)
set_write_register(0x5c, 0x00)
set_register(0x28)
buf_prepaccess(0x00000080,BULK_OUT)
Data: 01 00 82 00 80 00 00 00
Index: 0
BULK>(128)
  0x18, 0x36, 0x18, 0x36,  0x18, 0x36, 0x18, 0x36,
  0x18, 0x36, 0x18, 0x36,  0x18, 0x36, 0x18, 0x36,
  0x18, 0x36, 0x18, 0x36,  0x18, 0x36, 0x18, 0x36,
  0x18, 0x36, 0x18, 0x36,  0x18, 0x36, 0x18, 0x36,
  0x18, 0xb6, 0x18, 0xb6,  0x18, 0xb6, 0x18, 0xb6,
  0x18, 0xb6, 0x18, 0xb6,  0x18, 0xb6, 0x18, 0xb6,
  0x18, 0xb6, 0x18, 0xb6,  0x18, 0xb6, 0x18, 0xb6,
  0x18, 0xb6, 0x18, 0xb6,  0x18, 0xb6, 0x18, 0xb6,
  0x18, 0xf6, 0x18, 0xf6,  0x18, 0xf6, 0x18, 0xf6,
  0x18, 0xf6, 0x18, 0xf6,  0x18, 0xf6, 0x18, 0xf6,
  0x18, 0xf6, 0x18, 0xf6,  0x18, 0xf6, 0x18, 0xf6,
  0x18, 0xf6, 0x18, 0xf6,  0x18, 0xf6, 0x18, 0xf6,
  0x18, 0x76, 0x18, 0x76,  0x18, 0x76, 0x18, 0x76,
  0x18, 0x76, 0x18, 0x76,  0x18, 0x76, 0x18, 0x76,
  0x18, 0x76, 0x18, 0x76,  0x18, 0x76, 0x18, 0x76,
  0x18, 0x76, 0x18, 0x76,  0x18, 0x76, 0x18, 0x76,

5b/5c build address 0x0c 00, whereas gamma address is defined as 10bit.
I tried a few of them, but without luck.

> 
> Without writing beyond the end the motors only made ugly noise, but when 
> writing there the initial motor movement (forward-backward-forward...) took 
> place (not the same speed as with windows drivers, either little bit slower 
> or faster, don't remember).

Running scanimage alone still produces the ugly motor sound. When I
use "testprog" (mentioned earlier) ahead, scanimage is moving scanhead
a back and forward and starts (now with LED on [green]) moving for a
complete scan.

The only thing which works (standalone) is recognition of home position
(thats a hand polished diff):

Index: backend/genesys_gl841.c
===================================================================
RCS file: /cvsroot/sane/sane-backends/backend/genesys_gl841.c,v
retrieving revision 1.19
diff -p -U 3 -r1.19 genesys_gl841.c
--- backend/genesys_gl841.c     3 Feb 2008 10:34:20 -0000       1.19
+++ backend/genesys_gl841.c     8 Feb 2008 19:51:09 -0000
@@ -2023,6 +2076,9 @@ HOME_FREE: 3
     r = sanei_genesys_get_address (reg, 0x69);
     r->value = 0;

+    r = sanei_genesys_get_address (reg, 0x6b);
+    r->value |= 1; /* LiDE 80: turn on motor home sensor */
+
     r = sanei_genesys_get_address (reg, 0x6a);
     r->value = (fast_slope_steps >> 1) + (fast_slope_steps & 1);

@@ -3475,6 +3552,12 @@ gl841_slow_back_home (Genesys_Device * d
        wait_until_home);

   memset (local_reg, 0, sizeof (local_reg));
+
+  /* LiDE 80: ensure that home sensor is powered on for reading ;-) */
+  sanei_genesys_read_register (dev, 0x6b, &val);
+  val |= 1;
+  sanei_genesys_write_register (dev, 0x6b, val);
+
   val = 0;
   status = sanei_genesys_get_status (dev, &val);
   if (status != SANE_STATUS_GOOD)

-- 
Stefan Lucke



More information about the sane-devel mailing list