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

Stefan Lucke stefan at lucke.in-berlin.de
Wed Feb 13 20:08:23 UTC 2008


Quoting Pierre Willenbrock <pierre at pirsoft.dnsalias.org>:

> Stefan Lucke schrieb:
> > On Monday 11 February 2008, Pierre Willenbrock wrote:
> >> Reinhard Biegel schrieb:
> >>> Am Monday, 11. February 2008 schrieb Stefan Lucke:
> >
> >>>> At that moment, I guess you'll see messages like:
> >>>> 	new high speed USB device using ehci_hcd and address nn
> >>>> via dmesg.
> >>> Hi,
> >>> Yes, thats right.
> >>>
> >>> Changing the write to reg 0x6b from 0x0c to 0x08 fixes that.
> >>> Scanner is producing noisy image now.
> >>>
> >>> Do I see right that the two bits (0x04 and 0x08 of register 0x6b) affect two
> >>> pins which are marked as 'reserved' in the datasheet? They are only
> >>> documented for GL843.
> >> Register 0x6b is very different between GL841/2 and GL843. But the
> >> documentation around the pins controlled with 0x6b is a bit lacking.
> >
> > So we need to write reserved I/O bits, (0x6b) need to write to undefined
> > gamma addresses (0x5b/5c - 0x0c00). Thats really magic. Both areas
> > are defined for GL843 but not for GL841/2.
> >
>
> I just tested that on my scanner. Gamma data written to 0xc000 ended up
> in Gamma RAM, 0x0000. Can someone please play around with the actual
> data transmitted and the address? It may be a dummy write. On the other
> hand, the firmware may intercept that write(for whatever reasons it
> could not use another usb vendor transfer).
>
> If you want to test that yourself, i attached my program. You will
> probably need to fiddle with the initialisation code.
>


1st intermediate result is it failed at register 6 write ;-) :

fprintf(stderr,"SCANMOD_i\n");
    res = set_SCANMOD_i(d, 0); ONERROUT();
fprintf(stderr,"RPWRBIT_b\n");
    res = set_RPWRBIT_b(d, 1); ONERROUT();
fprintf(stderr,"GAIN4_b\n");
    res = set_GAIN4_b(d, 1); ONERROUT();
fprintf(stderr,"OPTEST_i\n");
    res = set_OPTEST_i(d, 0); ONERROUT();

Skipping GAIN4 write, it failed at OPTEST write.

jarada gl842-memory # ./testprog
Info: open_scanner: Success
Unknown8E(0) = 00
SCANMOD_i
RPWRBIT_b
GAIN4_b
Fatal: Could not set register: Protocol error (06)
Info: close_scanner: Success

jarada gl842-memory # dmesg -c
[23696.699268] usb 1-7.2: new high speed USB device using ehci_hcd and address 33
[23696.787173] usb 1-7.2: OK: device descriptor read/64, error 0, mp 64 (0 0)
[23696.809238] usb 1-7.2: configuration #1 chosen from 1 choice
[23704.440983] usb 1-7.2: usbfs: USBDEVFS_CONTROL failed cmd testprog rqt 64 rq 12 len 1 ret -71
[23704.506662] usb 1-7.2: USB disconnect, address 33
[23704.722697] usb 1-7.2: new high speed USB device using ehci_hcd and address 34
[23704.810805] usb 1-7.2: OK: device descriptor read/64, error 0, mp 64 (0 0)
[23704.832411] usb 1-7.2: configuration #1 chosen from 1 choice

After inserting ahead of above code:
res = usb_con_write_register_byte(d, 0x6b, 0x08); ONERROUT();

I got the attached out file.

Stefan Lucke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.out.bz2
Type: application/octet-stream
Size: 778 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080213/0b686f3f/attachment.obj 


More information about the sane-devel mailing list