[sane-devel] Canon lide 80

2010-10-30 Thread stef
Le Thursday 28 October 2010 03:20:37 Ludovic Andrivon, vous avez ?crit :
...
 
 Hi Stef,
 
 Of course you can send me your scripts.
 I will try to get something out of those logs then.
 
 
 Regards,
 
 Ludovic

Hello,

here are the scripts. I have tested and modified them on the log you 
posted. When working on a log, get sure it has everything from scanner 
powering on, since important things (such as GPIO settings) happen then.

Happy hacking,
Stef
-- next part --
A non-text attachment was scrubbed...
Name: scripts.tar.gz
Type: application/x-compressed-tar
Size: 10213 bytes
Desc: not available
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20101030/eb9647c6/attachment.bin


[sane-devel] Canon lide 80

2010-10-27 Thread Ludovic Andrivon
Hi,

I  have a Canon Lide 80, I switch to linux in 2007 and subscribe to this 
list in 2008...
So when I need to scan i have to start a virtual machine with windows XP 
because this scanner is listed as unsupported.
Since 2008 I learn a few things and may be I can help making this 
scanner as supported even is my background as programmer is more Cobol 
oriented...

 From what I read on the list  I completed the following steps:
On my computer running Ubuntu 10.04 x86_64 2.6.32-25-generic #45
- star  Virtual Box with windows XP
- install USBsnoop
- log the calibration phase
- log a small black and white scan at 75 dpi
- log a small color scan at 75 dpi

- get a fresh copy of sane fron git and compile it
- change some genesys_device files so my scanner can be recognized and 
use canon lide 60 as model
- run /usr/local/bin/sane-find-scanner
  found USB scanner (vendor=0x04a9 [Canon], product=0x2214 [CanoScan], 
chip=GL842) at libusb:001:006
- run /usr/local/bin/scanimage  test.png
the scanner moved and start scanning for 5 seconds then stop and get 
stuck as I 'm rigth now ;-)

You can find all files and logs at the following web site:
https://sites.google.com/site/cialsane/

What can be the next steps ?

Thanks

Ludovic
andrivon at cial.ca




[sane-devel] Canon lide 80

2010-10-27 Thread stef
Le Wednesday 27 October 2010 06:15:07 Ludovic Andrivon, vous avez ?crit :
 Hi,
 
 I  have a Canon Lide 80, I switch to linux in 2007 and subscribe to this
 list in 2008...
 So when I need to scan i have to start a virtual machine with windows XP
 because this scanner is listed as unsupported.
 Since 2008 I learn a few things and may be I can help making this
 scanner as supported even is my background as programmer is more Cobol
 oriented...
 
  From what I read on the list  I completed the following steps:
 On my computer running Ubuntu 10.04 x86_64 2.6.32-25-generic #45
 - star  Virtual Box with windows XP
 - install USBsnoop
 - log the calibration phase
 - log a small black and white scan at 75 dpi
 - log a small color scan at 75 dpi
 
 - get a fresh copy of sane fron git and compile it
 - change some genesys_device files so my scanner can be recognized and
 use canon lide 60 as model
 - run /usr/local/bin/sane-find-scanner
   found USB scanner (vendor=0x04a9 [Canon], product=0x2214 [CanoScan],
 chip=GL842) at libusb:001:006
 - run /usr/local/bin/scanimage  test.png
 the scanner moved and start scanning for 5 seconds then stop and get
 stuck as I 'm rigth now ;-)
 
 You can find all files and logs at the following web site:
 https://sites.google.com/site/cialsane/
 
 What can be the next steps ?
 
 Thanks
 
 Ludovic
 andrivon at cial.ca
 

Hello,

if you wish I can send you the scripts I use to decode gl841/842 logs. 
Then you will be able to compare what is done under windows and by the 
backend. It may be the analog frontend or the GPIO settings which are 
different from the model you choose to clone. 

Regards,
Stef








[sane-devel] Canon lide 80

2010-10-27 Thread Ludovic Andrivon
Le 2010-10-27 09:21, stef a ?crit :
 Le Wednesday 27 October 2010 06:15:07 Ludovic Andrivon, vous avez ?crit :

 Hi,

 I  have a Canon Lide 80, I switch to linux in 2007 and subscribe to this
 list in 2008...
 So when I need to scan i have to start a virtual machine with windows XP
 because this scanner is listed as unsupported.
 Since 2008 I learn a few things and may be I can help making this
 scanner as supported even is my background as programmer is more Cobol
 oriented...

   From what I read on the list  I completed the following steps:
 On my computer running Ubuntu 10.04 x86_64 2.6.32-25-generic #45
 - star  Virtual Box with windows XP
 - install USBsnoop
 - log the calibration phase
 - log a small black and white scan at 75 dpi
 - log a small color scan at 75 dpi

 - get a fresh copy of sane fron git and compile it
 - change some genesys_device files so my scanner can be recognized and
 use canon lide 60 as model
 - run /usr/local/bin/sane-find-scanner
found USB scanner (vendor=0x04a9 [Canon], product=0x2214 [CanoScan],
 chip=GL842) at libusb:001:006
 - run /usr/local/bin/scanimage  test.png
 the scanner moved and start scanning for 5 seconds then stop and get
 stuck as I 'm rigth now ;-)

 You can find all files and logs at the following web site:
 https://sites.google.com/site/cialsane/

 What can be the next steps ?

 Thanks

 Ludovic
 andrivon at cial.ca

  
   Hello,

   if you wish I can send you the scripts I use to decode gl841/842 logs.
 Then you will be able to compare what is done under windows and by the
 backend. It may be the analog frontend or the GPIO settings which are
 different from the model you choose to clone.

 Regards,
   Stef

   

   



Hi Stef,

Of course you can send me your scripts.
I will try to get something out of those logs then.


Regards,

Ludovic

-- 
Ludovic Andrivon
andrivon at cial.ca


-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20101027/6cc2cf66/attachment.htm


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

2008-02-13 Thread Reinhard Biegel
On Tuesday, 12. February 2008, Stefan Lucke wrote:
  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.

Indeed, very strange.

@Gerhard Jaeger: Were did you get the bcdValues from? Can we trust them?

Is there a possibility that there is a GL841b revision of the chip with 
lower bcdValue but being derived from GL843?

Regards,
Reinhard



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

2008-02-13 Thread Pierre Willenbrock
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, 0x. 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.

Regards,
  Pierre
-- next part --
A non-text attachment was scrubbed...
Name: gl842-memory.tbz2
Type: application/octet-stream
Size: 7331 bytes
Desc: not available
Url : 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080213/4ae75f51/attachment.obj
 


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

2008-02-13 Thread Stefan Lucke
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, 0x. 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
 


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

2008-02-13 Thread Gerhard Jaeger
On Wednesday 13 February 2008 15:42:12 Reinhard Biegel wrote:
 On Tuesday, 12. February 2008, Stefan Lucke wrote:
   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.

 Indeed, very strange.

 @Gerhard Jaeger: Were did you get the bcdValues from? Can we trust them?

Yup, we can. Got that from the sources of a Windoze driver...

 Is there a possibility that there is a GL841b revision of the chip with
 lower bcdValue but being derived from GL843?

I don't think so.

- Gerhard



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

2008-02-12 Thread Reinhard Biegel
On Monday, 11. February 2008, Pierre Willenbrock wrote:
 Did someone post the bcdDevice value of a LiDE 80? GL841 goes up to
 3.0.5, as someone said, and GL842 begins with 3.0.6

bcdDevice of mine is 0302.

Reinhard



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

2008-02-12 Thread Gerhard Jaeger
On Tuesday 12 February 2008 03:41:49 Reinhard Biegel wrote:
 On Monday, 11. February 2008, Pierre Willenbrock wrote:
  Did someone post the bcdDevice value of a LiDE 80? GL841 goes up to
  3.0.5, as someone said, and GL842 begins with 3.0.6

that was me. But it's not quite clear. got also some info that
GK842 starts @ 303

 bcdDevice of mine is 0302.

So probably it's a GL841. Any chance to disassemble the device?

- Gerhard



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

2008-02-12 Thread Pierre Willenbrock
Gerhard Jaeger schrieb:
 On Tuesday 12 February 2008 03:41:49 Reinhard Biegel wrote:
 On Monday, 11. February 2008, Pierre Willenbrock wrote:
 Did someone post the bcdDevice value of a LiDE 80? GL841 goes up to
 3.0.5, as someone said, and GL842 begins with 3.0.6
 
 that was me. But it's not quite clear. got also some info that
 GK842 starts @ 303
 
 bcdDevice of mine is 0302.
 
 So probably it's a GL841. Any chance to disassemble the device?
 
No need to. i just meant to make sure that it is not a version on the
edge to GL843(if there is such an edge). My Canon LiDE 35 has 0305, and
is said to contain a GL842, according to [1], but the LiDE 50 there is
0303 and GL841. Apart from that the two datasheets show suspiciously few
differences.

Regards,
  Pierre

[1] http://www.sane-project.org/unsupported/canon-lide-50.html



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

2008-02-12 Thread Stefan Lucke
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.

 
 Did someone post the bcdDevice value of a LiDE 80? GL841 goes up to
 3.0.5, as someone said, and GL842 begins with 3.0.6

It is for my scanner:
  idVendor   0x04a9 Canon, Inc.
  idProduct  0x2214
  bcdDevice3.02
as found on: http://www.sane-project.org/unsupported/canon-lide-80.html



-- 
Stefan Lucke



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

2008-02-12 Thread Gerhard Jaeger
On Tuesday 12 February 2008 10:24:51 Pierre Willenbrock wrote:
 Gerhard Jaeger schrieb:
  On Tuesday 12 February 2008 03:41:49 Reinhard Biegel wrote:
  On Monday, 11. February 2008, Pierre Willenbrock wrote:
  Did someone post the bcdDevice value of a LiDE 80? GL841 goes up to
  3.0.5, as someone said, and GL842 begins with 3.0.6
  
  that was me. But it's not quite clear. got also some info that
  GK842 starts @ 303
  
  bcdDevice of mine is 0302.
  
  So probably it's a GL841. Any chance to disassemble the device?
  
 No need to. i just meant to make sure that it is not a version on the
 edge to GL843(if there is such an edge). My Canon LiDE 35 has 0305, and
 is said to contain a GL842, according to [1], but the LiDE 50 there is
 0303 and GL841. Apart from that the two datasheets show suspiciously few
 differences.
 

Okay, I just checked some sources I got and the major differences
seem between 843 and 84[1,2]. 841 and 842 seem to be more or less the 
same.

- Gerhard



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

2008-02-11 Thread Reinhard Biegel
  You are talking about writes like:

 I guess YES.

Yes, I do.

 Now I found the right one AND the right time: Before doing the reset ;-).

 So now I've the initial motor movement with LED blinking and a scan
 movement with green LED.

 But no (strange) data arrives.


I tried your diff, but I get the known 'invalid argument error'.

Regards,
Reinhard

Debug output of scanimage:

[genesys_gl841] gl841_init
[genesys_gl841] gl841_init_registers
[genesys_gl841] gl841_setup_sensor
[genesys_gl841] gl841_init_registers complete
[genesys] sanei_genesys_write_register (0x60, 0x06) completed
[genesys] sanei_genesys_write_register (0x61, 0x13) completed
[genesys] sanei_genesys_write_register (0x62, 0x55) completed
[genesys] sanei_genesys_write_register (0x63, 0x02) completed
[genesys] sanei_genesys_write_register (0x64, 0x34) completed
[genesys] sanei_genesys_write_register (0x65, 0x04) completed
[genesys_gl841] gl841_set_buffer_address_gamma: setting address to 0x0c000
[genesys] sanei_genesys_write_register (0x5c, 0x00) completed
[genesys] sanei_genesys_write_register (0x5b, 0x0c) completed
[genesys_gl841] gl841_set_buffer_address_gamma: completed
[genesys_gl841] gl841_bulk_write_data_gamma writing 128 bytes
[genesys_gl841] genesys_bulk_write_data:gamma wrote 128 bytes, 0 remaining
[genesys_gl841] genesys_bulk_write_data_gamma: completed
[genesys] sanei_genesys_write_register (0x0e, 0x00) completed
[genesys] sanei_genesys_write_register (0x6b, 0x0c) completed
[genesys] sanei_genesys_write_register (0x6e, 0x6d) completed
[genesys] sanei_genesys_write_register (0x6c, 0x00) completed
[genesys_gl841] gl841_bulk_write_register (elems = 104)
[genesys_gl841] reg[0x01] = 0xa0
[genesys_gl841] reg[0x02] = 0x38
...
[genesys_gl841] reg[0x6b] = 0x02
[genesys_gl841] reg[0x6e] = 0x6d
[genesys_gl841] gl841_bulk_write_register: failed while writing command: 
Invalid argument
scanimage: open of device genesys:libusb:001:010 failed: Invalid argument




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

2008-02-11 Thread Stefan Lucke
On Monday 11 February 2008, Reinhard Biegel wrote:
   You are talking about writes like:
 
  I guess YES.
 
 Yes, I do.
 
  Now I found the right one AND the right time: Before doing the reset ;-).
 
  So now I've the initial motor movement with LED blinking and a scan
  movement with green LED.
 
  But no (strange) data arrives.
 
 
 I tried your diff, but I get the known 'invalid argument error'.
 
 Regards,
 Reinhard
 
 Debug output of scanimage:

 [genesys_gl841] genesys_bulk_write_data_gamma: completed
 [genesys] sanei_genesys_write_register (0x0e, 0x00) completed
 [genesys] sanei_genesys_write_register (0x6b, 0x0c) completed

Writing value 0x08 is enough for me. Following 2 register writes
can be skipped. That's around line 5166 in genesys_gl841.c
Additional you may prevent register 0x6b from further writes by
excluding it around line 409.

In file genesys_devices.c you can change around line 585 the y start
position from 7.9 mm to 4.9 mm, as my scan head reaches opposite
of home position audible.

 [genesys] sanei_genesys_write_register (0x6e, 0x6d) completed
 [genesys] sanei_genesys_write_register (0x6c, 0x00) completed

 [genesys_gl841] gl841_bulk_write_register (elems = 104)
 [genesys_gl841] reg[0x01] = 0xa0
 [genesys_gl841] reg[0x02] = 0x38
 ...
 [genesys_gl841] reg[0x6b] = 0x02
 [genesys_gl841] reg[0x6e] = 0x6d
 [genesys_gl841] gl841_bulk_write_register: failed while writing command: 
 Invalid argument
 scanimage: open of device genesys:libusb:001:010 failed: Invalid argument

At that moment, I guess you'll see messages like:
new high speed USB device using ehci_hcd and address nn
via dmesg.

Which way is your scanner connected ?
Mine is connected via a self powered USB 2 hub.

-- 
Stefan Lucke



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

2008-02-11 Thread Reinhard Biegel
Am Monday, 11. February 2008 schrieb Stefan Lucke:
  ...
  [genesys_gl841] reg[0x6b] = 0x02
  [genesys_gl841] reg[0x6e] = 0x6d
  [genesys_gl841] gl841_bulk_write_register: failed while writing command:
  Invalid argument
  scanimage: open of device genesys:libusb:001:010 failed: Invalid argument

 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.

After scanning I have to replug the scanner, otherwise I get an error message 
telling me the document feeder is jammed. Curiously, if I set 
SANE_DEBUG_GENESYS, there comes up another error about a failed bulk_write.

Also I noticed that the LED isn't continuously illuminated. In one half it's 
continuous, but in the other there are small gaps (about 1mm) with about 4mm 
spacing between. In the middle there are a few with bigger spacing.

 Which way is your scanner connected ?
Directly to the computer, no hubs.

Regards,
Reinhard



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

2008-02-11 Thread Pierre Willenbrock
Reinhard Biegel schrieb:
 Am Monday, 11. February 2008 schrieb Stefan Lucke:
 ...
 [genesys_gl841] reg[0x6b] = 0x02
 [genesys_gl841] reg[0x6e] = 0x6d
 [genesys_gl841] gl841_bulk_write_register: failed while writing command:
 Invalid argument
 scanimage: open of device genesys:libusb:001:010 failed: Invalid argument
 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.

Did someone post the bcdDevice value of a LiDE 80? GL841 goes up to
3.0.5, as someone said, and GL842 begins with 3.0.6

 After scanning I have to replug the scanner, otherwise I get an error message 
 telling me the document feeder is jammed. Curiously, if I set 
 SANE_DEBUG_GENESYS, there comes up another error about a failed bulk_write.

The feeder jammed error happens when the backend thinks your scanning
head is stuck. For example when someone forgot to open the lock. I guess
we need SANE2 for more/better error messages. It is probably not really
stuck, but the sensor input is incorrect.

 
 Also I noticed that the LED isn't continuously illuminated. In one half it's 
 continuous, but in the other there are small gaps (about 1mm) with about 4mm 
 spacing between. In the middle there are a few with bigger spacing.

Sounds like it would normally be backtracking between the lighted areas,
but does not for some reason. Just guessing. The LiDE 80 support is far
from complete.

 
 Which way is your scanner connected ?
 Directly to the computer, no hubs.
 
 Regards,
 Reinhard
 

Regards,
  Pierre



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

2008-02-10 Thread Stefan Lucke
On Saturday 09 February 2008, Stefan Lucke wrote:
 On Friday 08 February 2008, Reinhard Biegel wrote:
  Am Wednesday, 6. February 2008 schrieb Reinhard Biegel:
   Ohi 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:

I guess YES.

 set_write_register(0x5b, 0x0c)
 set_write_register(0x5c, 0x00)
 set_register(0x28)
 buf_prepaccess(0x0080,BULK_OUT)
 Data: 01 00 82 00 80 00 00 00
 Index: 0
 BULK(128)
   0x18, 0x36, 0x18, 0x36,  0x18, 0x36, 0x18, 0x36,

   0x18, 0x76, 0x18, 0x76,  0x18, 0x76, 0x18, 0x76,

Thats not the right one, see attached diff.

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

Now I found the right one AND the right time: Before doing the reset ;-).

So now I've the initial motor movement with LED blinking and a scan
movement with green LED.

But no (strange) data arrives.


-- 
Stefan Lucke
-- next part --
? backend/genesys_low.c
Index: backend/genesys_devices.c
===
RCS file: /cvsroot/sane/sane-backends/backend/genesys_devices.c,v
retrieving revision 1.11
diff -p -U 3 -r1.11 genesys_devices.c
--- backend/genesys_devices.c   22 Nov 2007 14:05:12 -  1.11
+++ backend/genesys_devices.c   10 Feb 2008 21:00:49 -
@@ -218,6 +218,29 @@ static Genesys_Sensor Sensor[] = {
,
1.0, 1.0, 1.0,
NULL, NULL, NULL}
+  ,
+  /* CANOLIDE80 */
+  {600,
+/*TODO: find a good reason for keeping all three following variables*/
+   87, /*(black) */
+   87, /* (dummy) */
+   0,  /* (startxoffset) */
+   10400,  /*sensor_pixels */
+   210,
+   200,
+   {0x00, 0x00, 0x00, 0x00},
+   {0x06, 0x13, 0x55, 0x02, 0x32, 0x04, 0x32, 0x14, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x04
+},
+   {0x05, 0x07,
+0x00, 0x00, 0x00, 0x00,/*[GB](HI|LOW) not needed for cis */
+0x3a, 0x03,
+0x40,  /*TODO: bit7 */
+0x00, 0x00, 0x00, 0x00 /*TODO (these do no harm, but may be neccessery 
for CCD) */
+}
+   ,
+   1.0, 1.0, 1.0,
+   NULL, NULL, NULL}
 };
 
 /** for General Purpose Output specific settings:
@@ -280,6 +303,13 @@ static Genesys_Gpo Gpo[] = {
{0xef, 0x80}
,
}
+  ,
+  /* CANONLIDE80 */
+  {
+   {0x00, 0x8f}
+   ,
+   {0x6d, 0x80}
+  }
 };
 
 #define MOTOR_ST24   2
@@ -393,6 +423,17 @@ static Genesys_Motor Motor[] = {
  0.8,
 },},},
   },
+  {/* Canon LiDE 80 */
+   2400, 2400, 1, 2,
+   {
+{{4687,  937, 128, 0.8, },
+ {4687,  937, 128, 0.8, }, /* {4200, 3800,  30, 0.8, },*/
+},
+{{9375, 1875, 128, 0.8, }, /* {3500, 1300, 60, 0.8, }, */
+ {9375, 1875, 128, 0.8, }, /* {3500, 1400, 60, 0.8, }, */
+},
+   },
+  },
 };
 
 /* here we have the various device settings...
@@ -521,6 +562,53 @@ static Genesys_Model canon_lide_60_model
   400
 }; /* this is completely untested -- hmg */
 
+static Genesys_Model canon_lide_80_model = {
+  canon-lide-80, /* Name */
+  Canon, /* Device vendor string */
+  LiDE 80,   /* Device model name */
+  GENESYS_GL841,
+  NULL,
+
+  {2400, 1200, 600, 300, 150, 75, 0},  /* possible x-resolutions */
+  {4800, 2400, 1200, 600, 300, 150, 75, 0},/* possible y-resolutions */
+  {16, 8, 0},  /* possible depths in gray mode */
+  {16, 8, 0},  /* possible depths in color mode */
+
+  SANE_FIX (0.42), /* Start of scan area in mm  (x) */
+  SANE_FIX (7.9),  /* Start of scan area in mm (y) */
+  SANE_FIX (218.0),/* Size of scan area in mm (x) */
+  SANE_FIX (299.0),/* Size of scan area in mm (y) */
+
+  SANE_FIX (3.0),  /* Start of white strip in mm (y) */
+  SANE_FIX (0.0),  /* Start of black mark in mm (x) */
+
+  SANE_FIX (0.0),  /* Start of scan area in TA mode in mm (x) */
+  SANE_FIX (0.0),  /* Start of scan area in TA mode in mm (y) */
+  SANE_FIX (100.0),/* Size of scan area in TA mode in mm (x) */
+  SANE_FIX (100.0),/* Size of scan area in TA mode in mm (y) */
+
+  SANE_FIX (0.0),  /* Start of white strip in TA mode in mm (y) */
+
+  0, 0, 0, /* RGB CCD Line-distance correction in pixel */
+
+  COLOR_ORDER_RGB, 

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

2008-02-09 Thread Stefan Lucke
On Friday 08 February 2008, Reinhard Biegel wrote:
 Am Wednesday, 6. February 2008 schrieb Reinhard Biegel:
  Ohi 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(0x0080,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 -   1.19
+++ backend/genesys_gl841.c 8 Feb 2008 19:51:09 -
@@ -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



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

2008-02-06 Thread Stefan Lucke
On Tuesday 05 February 2008, Stefan Lucke wrote:
 Hi,
 
 I've seen there is some progress on lide 90 and I want to step in and
 like to ask if there could be done something for my LiDE 80 too.
 I cloned the canon_lide_60_model entry
 
 -- scanimage with debug messages : --
 [sanei_debug] Setting debug level of genesys to 255.
 [genesys] SANE Genesys backend version 1.0 build 9 from sane-backends 
 1.0.18-cvs
 [genesys] sane_init: authorize != null
 [genesys] sane_init: little endian machine
 [genesys] sane_init: reading config file `genesys.conf'
 [genesys] sane_init: config file line 1: trying to attach `usb 0x04a9 0x2214'
..
 [genesys_gl841] gl841_bulk_write_register (elems = 104)
 [genesys_gl841] reg[0x01] = 0xa0
 [genesys_gl841] reg[0x02] = 0x38
 [genesys_gl841] reg[0x03] = 0x5f
 [genesys_gl841] reg[0x04] = 0x10
 [genesys_gl841] reg[0x05] = 0x40
 [genesys_gl841] reg[0x06] = 0x18
 
 -- I modified this, debug message is written before ..bulk_write..() . --
 
 [genesys_gl841] gl841_bulk_write_register: failed while writing command: 
 Invalid argument
 scanimage: open of device genesys:libusb:001:017 failed: Invalid argument
 [genesys] sane_exit: start
 [genesys] sane_exit: exit

Some further info:
I placed some win98 logfiles at http://lucke.in-berlin.de/lide-80/ .

During my search in the list history, I found a test program in this mail:
http://lists.alioth.debian.org/pipermail/sane-devel/2006-October/017930.html

Using the following stripped down version of usbsnoop-300dpi_color.c,
helped to get rid of the sudden disconnect from below.
-- snip --
set_write_register(0x6b, 0x0c);
set_write_register(0x06, 0x10);
-- snip --

Both lines are required!
(Note: disconnect has timestamp earlier than USBDEVFS message).

Even with turned off LED and some motor sound (movement in the wrong
direction ??), scanimage produced some pnm files.

To be continued, but I really need some help, as I've no idea 
about scanner hardware.

 
 -- dmesg output (kernel 2.6.23.13): --
 [ 5298.424302] usb 1-7: new high speed USB device using ehci_hcd and address 
 17
 [ 5298.480244] usb 1-7: OK: device descriptor read/64, error 0, mp 64 (0 0)
 [ 5298.491202] usb 1-7: configuration #1 chosen from 1 choice
 [ 5312.035169] usb 1-7: usbfs: USBDEVFS_CONTROL failed cmd scanimage rqt 64 
 rq 4 len 2 ret -71
 [ 5312.035148] usb 1-7: USB disconnect, address 17
 [ 5312.188163] usb 1-7: new high speed USB device using ehci_hcd and address 
 18
 [ 5312.244105] usb 1-7: OK: device descriptor read/64, error 0, mp 64 (0 0)
 [ 5312.255079] usb 1-7: configuration #1 chosen from 1 choice

-- 
Stefan Lucke



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

2008-02-06 Thread Reinhard Biegel

Am Wednesday, 6. February 2008 schrieb Stefan Lucke:
 Even with turned off LED and some motor sound (movement in the wrong
 direction ??), scanimage produced some pnm files.

 To be continued, but I really need some help, as I've no idea
 about scanner hardware.

Hi,

I played around some time ago with the LiDE 80. IIRC I got the motor working 
by adjusting its base resolution (2400 instead of 1200 or something). But I'm 
not shure it it was the only thing.

Regards,
Reinhard Biegel



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

2008-02-06 Thread Pierre Willenbrock
Hi Stefan,

(more text inline)

Stefan Lucke schrieb:
 On Tuesday 05 February 2008, Stefan Lucke wrote:
 Hi,

 I've seen there is some progress on lide 90 and I want to step in and
 like to ask if there could be done something for my LiDE 80 too.
 I cloned the canon_lide_60_model entry

 -- scanimage with debug messages : --
 [sanei_debug] Setting debug level of genesys to 255.
 [genesys] SANE Genesys backend version 1.0 build 9 from sane-backends 
 1.0.18-cvs
 [genesys] sane_init: authorize != null
 [genesys] sane_init: little endian machine
 [genesys] sane_init: reading config file `genesys.conf'
 [genesys] sane_init: config file line 1: trying to attach `usb 0x04a9 0x2214'
 ..
 [genesys_gl841] gl841_bulk_write_register (elems = 104)
 [genesys_gl841] reg[0x01] = 0xa0
 [genesys_gl841] reg[0x02] = 0x38
 [genesys_gl841] reg[0x03] = 0x5f
 [genesys_gl841] reg[0x04] = 0x10
 [genesys_gl841] reg[0x05] = 0x40
 [genesys_gl841] reg[0x06] = 0x18

 -- I modified this, debug message is written before ..bulk_write..() . --

 [genesys_gl841] gl841_bulk_write_register: failed while writing command: 
 Invalid argument
 scanimage: open of device genesys:libusb:001:017 failed: Invalid argument
 [genesys] sane_exit: start
 [genesys] sane_exit: exit
 
 Some further info:
 I placed some win98 logfiles at http://lucke.in-berlin.de/lide-80/ .
 
 During my search in the list history, I found a test program in this mail:
 http://lists.alioth.debian.org/pipermail/sane-devel/2006-October/017930.html

I must admit, i totally forgot about that.. lectures where starting at
that time at my university.

 
 Using the following stripped down version of usbsnoop-300dpi_color.c,
 helped to get rid of the sudden disconnect from below.
 -- snip --
 set_write_register(0x6b, 0x0c);
 set_write_register(0x06, 0x10);

first, try if either of the following is enough to get past writing
register 0x06:
set_write_register(0x6b, 0x08);
set_write_register(0x6b, 0x04);

put that write to 0x6b into gl841_init, before the /* Write initial
registers */, and make sure the other places where 0x6b is written
preserve the needed bits. That may get scanimage to o further with a
freshly plugged in scanner.

Regards,
  Pierre

 -- snip --
 
 Both lines are required!
 (Note: disconnect has timestamp earlier than USBDEVFS message).
 
 Even with turned off LED and some motor sound (movement in the wrong
 direction ??), scanimage produced some pnm files.
 
 To be continued, but I really need some help, as I've no idea 
 about scanner hardware.
 
 -- dmesg output (kernel 2.6.23.13): --
 [ 5298.424302] usb 1-7: new high speed USB device using ehci_hcd and address 
 17
 [ 5298.480244] usb 1-7: OK: device descriptor read/64, error 0, mp 64 (0 0)
 [ 5298.491202] usb 1-7: configuration #1 chosen from 1 choice
 [ 5312.035169] usb 1-7: usbfs: USBDEVFS_CONTROL failed cmd scanimage rqt 64 
 rq 4 len 2 ret -71
 [ 5312.035148] usb 1-7: USB disconnect, address 17
 [ 5312.188163] usb 1-7: new high speed USB device using ehci_hcd and address 
 18
 [ 5312.244105] usb 1-7: OK: device descriptor read/64, error 0, mp 64 (0 0)
 [ 5312.255079] usb 1-7: configuration #1 chosen from 1 choice
 




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

2008-02-06 Thread Stefan Lucke
On Wednesday 06 February 2008, Reinhard Biegel wrote:
 
 Am Wednesday, 6. February 2008 schrieb Stefan Lucke:
  Even with turned off LED and some motor sound (movement in the wrong
  direction ??), scanimage produced some pnm files.
 
  To be continued, but I really need some help, as I've no idea
  about scanner hardware.
 
 Hi,
 
 I played around some time ago with the LiDE 80. IIRC I got the motor working 
 by adjusting its base resolution (2400 instead of 1200 or something). But I'm 
 not shure it it was the only thing.
 

Thanks for your reply.
Do you have some old sources of your changes ?

Playing with motor settings doesn't make a difference (at the moment).

-- 
Stefan Lucke



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

2008-02-06 Thread Stefan Lucke
On Wednesday 06 February 2008, Pierre Willenbrock wrote:
 Hi Stefan,
 
 (more text inline)
 
 Stefan Lucke schrieb:
  On Tuesday 05 February 2008, Stefan Lucke wrote:
  Hi,
 
  I've seen there is some progress on lide 90 and I want to step in and
  like to ask if there could be done something for my LiDE 80 too.
  I cloned the canon_lide_60_model entry
 
  -- scanimage with debug messages : --
  [sanei_debug] Setting debug level of genesys to 255.
  [genesys] SANE Genesys backend version 1.0 build 9 from sane-backends 
  1.0.18-cvs
  [genesys] sane_init: authorize != null
  [genesys] sane_init: little endian machine
  [genesys] sane_init: reading config file `genesys.conf'
  [genesys] sane_init: config file line 1: trying to attach `usb 0x04a9 
  0x2214'
  ..
  [genesys_gl841] gl841_bulk_write_register (elems = 104)
  [genesys_gl841] reg[0x01] = 0xa0
  [genesys_gl841] reg[0x02] = 0x38
  [genesys_gl841] reg[0x03] = 0x5f
  [genesys_gl841] reg[0x04] = 0x10
  [genesys_gl841] reg[0x05] = 0x40
  [genesys_gl841] reg[0x06] = 0x18
 
  -- I modified this, debug message is written before ..bulk_write..() . --
 
  [genesys_gl841] gl841_bulk_write_register: failed while writing command: 
  Invalid argument
  scanimage: open of device genesys:libusb:001:017 failed: Invalid argument
  [genesys] sane_exit: start
  [genesys] sane_exit: exit
  
  Some further info:
  I placed some win98 logfiles at http://lucke.in-berlin.de/lide-80/ .
  
  During my search in the list history, I found a test program in this mail:
  http://lists.alioth.debian.org/pipermail/sane-devel/2006-October/017930.html
 
 I must admit, i totally forgot about that.. lectures where starting at
 that time at my university.
 
  
  Using the following stripped down version of usbsnoop-300dpi_color.c,
  helped to get rid of the sudden disconnect from below.
  -- snip --
  set_write_register(0x6b, 0x0c);
  set_write_register(0x06, 0x10);
 
 first, try if either of the following is enough to get past writing
 register 0x06:
 set_write_register(0x6b, 0x08);
 set_write_register(0x6b, 0x04);
 
 put that write to 0x6b into gl841_init, before the /* Write initial
 registers */, and make sure the other places where 0x6b is written
 preserve the needed bits. That may get scanimage to o further with a
 freshly plugged in scanner.
 

A: set_write_register(0x6b, 0x08); with and without preserving reg_0x6b:
There is a small audible motor sound, but no movement.
Windows driver does a small forward , backward movement of scan head.

[genesys] sanei_genesys_write_register (0x0e, 0x00) completed
[genesys] sanei_genesys_write_register (0x6b, 0x08) completed
[genesys_gl841] gl841_bulk_write_register (size = 208)
[genesys_gl841] reg[0x01] = 0xa0
[genesys_gl841] reg[0x02] = 0x38
[genesys_gl841] reg[0x03] = 0x5f
[genesys_gl841] reg[0x04] = 0x10
[genesys_gl841] reg[0x05] = 0x40
[genesys_gl841] reg[0x06] = 0x18
[genesys_gl841] reg[0x07] = 0x00
[genesys_gl841] reg[0x08] = 0x00
..
[genesys_gl841] reg[0x6a] = 0x00
[genesys_gl841] reg[0x6c] = 0x00
..
[genesys] sanei_genesys_write_register (0x0f, 0x01) completed
[genesys] sanei_genesys_read_register (0x41, 0xd1) completed
[genesys] sanei_genesys_read_register (0x41, 0xd1) completed

B: set_write_register(0x6b, 0x04); 
  - one time with preserving 0x6b - as A:
  - one time  _bulk_write_ up to reg[0x06]
  - this time:
[genesys] sanei_genesys_write_register (0x6b, 0x04) completed
[genesys_gl841] gl841_bulk_write_register (size = 208)
..
[genesys_gl841] reg[0x06] = 0x18
[genesys_gl841] reg[0x07] = 0x00
[genesys_gl841] gl841_bulk_write_register: failed while writing command: 
Invalid argument


I'm wondering of the effects of playing with bit 2 and 3 of register 0x6b.
According to my spec of gl841 vers. 1.7 p 42,43 bit 0 and 1 and for GPO 17  18,
bit 2  3 are reserved ;-) .

-- 
Stefan Lucke



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

2008-02-06 Thread Reinhard Biegel
Am Wednesday, 6. February 2008 schrieb Stefan Lucke:

 Do you have some old sources of your changes ?

 Playing with motor settings doesn't make a difference (at the moment).

Sorry, I trashed the sources because I messed something up and then nothing 
was working any more. I planed to start over again but had no time to do so.

As far as I remember I simply set the registers as it is done by the windows 
driver after pluggin in the scanner and then I replaced them step by step 
with existing sane calls.

Ohi 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.

Regards,
Reinhard



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

2008-02-06 Thread Pierre Willenbrock
Stefan Lucke schrieb:
 On Wednesday 06 February 2008, Pierre Willenbrock wrote:
 Hi Stefan,

 (more text inline)

 Stefan Lucke schrieb:
 On Tuesday 05 February 2008, Stefan Lucke wrote:
 Hi,

 I've seen there is some progress on lide 90 and I want to step in and
 like to ask if there could be done something for my LiDE 80 too.
 I cloned the canon_lide_60_model entry

 -- scanimage with debug messages : --
 [sanei_debug] Setting debug level of genesys to 255.
 [genesys] SANE Genesys backend version 1.0 build 9 from sane-backends 
 1.0.18-cvs
 [genesys] sane_init: authorize != null
 [genesys] sane_init: little endian machine
 [genesys] sane_init: reading config file `genesys.conf'
 [genesys] sane_init: config file line 1: trying to attach `usb 0x04a9 
 0x2214'
 ..
 [genesys_gl841] gl841_bulk_write_register (elems = 104)
 [genesys_gl841] reg[0x01] = 0xa0
 [genesys_gl841] reg[0x02] = 0x38
 [genesys_gl841] reg[0x03] = 0x5f
 [genesys_gl841] reg[0x04] = 0x10
 [genesys_gl841] reg[0x05] = 0x40
 [genesys_gl841] reg[0x06] = 0x18

 -- I modified this, debug message is written before ..bulk_write..() . --

 [genesys_gl841] gl841_bulk_write_register: failed while writing command: 
 Invalid argument
 scanimage: open of device genesys:libusb:001:017 failed: Invalid argument
 [genesys] sane_exit: start
 [genesys] sane_exit: exit
 Some further info:
 I placed some win98 logfiles at http://lucke.in-berlin.de/lide-80/ .

 During my search in the list history, I found a test program in this mail:
 http://lists.alioth.debian.org/pipermail/sane-devel/2006-October/017930.html
 I must admit, i totally forgot about that.. lectures where starting at
 that time at my university.

 Using the following stripped down version of usbsnoop-300dpi_color.c,
 helped to get rid of the sudden disconnect from below.
 -- snip --
 set_write_register(0x6b, 0x0c);
 set_write_register(0x06, 0x10);
 first, try if either of the following is enough to get past writing
 register 0x06:
 set_write_register(0x6b, 0x08);
 set_write_register(0x6b, 0x04);

 put that write to 0x6b into gl841_init, before the /* Write initial
 registers */, and make sure the other places where 0x6b is written
 preserve the needed bits. That may get scanimage to o further with a
 freshly plugged in scanner.

 
 A: set_write_register(0x6b, 0x08); with and without preserving reg_0x6b:
 There is a small audible motor sound, but no movement.
 Windows driver does a small forward , backward movement of scan head.
 
 [genesys] sanei_genesys_write_register (0x0e, 0x00) completed
 [genesys] sanei_genesys_write_register (0x6b, 0x08) completed
 [genesys_gl841] gl841_bulk_write_register (size = 208)
 [genesys_gl841] reg[0x01] = 0xa0
 [genesys_gl841] reg[0x02] = 0x38
 [genesys_gl841] reg[0x03] = 0x5f
 [genesys_gl841] reg[0x04] = 0x10
 [genesys_gl841] reg[0x05] = 0x40
 [genesys_gl841] reg[0x06] = 0x18
 [genesys_gl841] reg[0x07] = 0x00
 [genesys_gl841] reg[0x08] = 0x00
 ..
 [genesys_gl841] reg[0x6a] = 0x00
 [genesys_gl841] reg[0x6c] = 0x00
 ..
 [genesys] sanei_genesys_write_register (0x0f, 0x01) completed
 [genesys] sanei_genesys_read_register (0x41, 0xd1) completed
 [genesys] sanei_genesys_read_register (0x41, 0xd1) completed
 
 B: set_write_register(0x6b, 0x04); 
   - one time with preserving 0x6b - as A:
   - one time  _bulk_write_ up to reg[0x06]
   - this time:
 [genesys] sanei_genesys_write_register (0x6b, 0x04) completed
 [genesys_gl841] gl841_bulk_write_register (size = 208)
 ..
 [genesys_gl841] reg[0x06] = 0x18
 [genesys_gl841] reg[0x07] = 0x00
 [genesys_gl841] gl841_bulk_write_register: failed while writing command: 
 Invalid argument
 
 
 I'm wondering of the effects of playing with bit 2 and 3 of register 0x6b.
 According to my spec of gl841 vers. 1.7 p 42,43 bit 0 and 1 and for GPO 17  
 18,
 bit 2  3 are reserved ;-) .
 

It may be possible to control gpo19/20 there, which may map to
MT(R)_4/5, similar to how gpo17/18 map to MT(R)_6/7. I don't see how the
gl841/2 determines what function is to control the MT(R)_6/7, another
possible job for bit 2/3.

The behavior regarding these pins seems to be not very well documented
in the public datasheets.

Regards,
  Pierre



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

2008-02-05 Thread Stefan Lucke
Hi,

I've seen there is some progress on lide 90 and I want to step in and
like to ask if there could be done something for my LiDE 80 too.
I cloned the canon_lide_60_model entry

-- scanimage with debug messages : --
[sanei_debug] Setting debug level of genesys to 255.
[genesys] SANE Genesys backend version 1.0 build 9 from sane-backends 1.0.18-cvs
[genesys] sane_init: authorize != null
[genesys] sane_init: little endian machine
[genesys] sane_init: reading config file `genesys.conf'
[genesys] sane_init: config file line 1: trying to attach `usb 0x04a9 0x2214'
[genesys] attach: start: devp != NULL, may_wait = 0
[genesys] attach: trying to open device `libusb:001:017'
[genesys] attach: device `libusb:001:017' successfully opened
[genesys] attach: found Canon flatbed scanner LiDE 80 at libusb:001:017
[genesys] attach: exit
[genesys] sane_init: exit
[genesys] sane_get_devices: start: local_only = false
[genesys] sane_get_devices: exit
[genesys] sane_open: start (devicename = `libusb:001:017')
[genesys] sane_open: found `canon-lide-80' in devlist
[genesys] init_options: start
[genesys] init_options: exit
[sanei_debug] Setting debug level of genesys_gl841 to 255.
[genesys_gl841] gl841_init
[genesys_gl841] gl841_init_registers
[genesys_gl841] gl841_setup_sensor
[genesys_gl841] gl841_init_registers complete
[genesys] sanei_genesys_write_register (0x0e, 0x00) completed
[genesys_gl841] gl841_bulk_write_register (elems = 104)
[genesys_gl841] reg[0x01] = 0xa0
[genesys_gl841] reg[0x02] = 0x38
[genesys_gl841] reg[0x03] = 0x5f
[genesys_gl841] reg[0x04] = 0x10
[genesys_gl841] reg[0x05] = 0x40
[genesys_gl841] reg[0x06] = 0x18

-- I modified this, debug message is written before ..bulk_write..() . --

[genesys_gl841] gl841_bulk_write_register: failed while writing command: 
Invalid argument
scanimage: open of device genesys:libusb:001:017 failed: Invalid argument
[genesys] sane_exit: start
[genesys] sane_exit: exit

-- dmesg output (kernel 2.6.23.13): --
[ 5298.424302] usb 1-7: new high speed USB device using ehci_hcd and address 17
[ 5298.480244] usb 1-7: OK: device descriptor read/64, error 0, mp 64 (0 0)
[ 5298.491202] usb 1-7: configuration #1 chosen from 1 choice
[ 5312.035169] usb 1-7: usbfs: USBDEVFS_CONTROL failed cmd scanimage rqt 64 rq 
4 len 2 ret -71
[ 5312.035148] usb 1-7: USB disconnect, address 17
[ 5312.188163] usb 1-7: new high speed USB device using ehci_hcd and address 18
[ 5312.244105] usb 1-7: OK: device descriptor read/64, error 0, mp 64 (0 0)
[ 5312.255079] usb 1-7: configuration #1 chosen from 1 choice

-- 
Stefan Lucke



[sane-devel] Canon LiDE 80

2008-02-05 Thread Stefan Lucke
Hi,

I've seen there is some progress on lide 90 and I want to step in and
like to ask if there could be done something for my LiDE 80 too.
I cloned the canon_lide_60_model entry

-- scanimage with debug messages : --
[sanei_debug] Setting debug level of genesys to 255.
[genesys] SANE Genesys backend version 1.0 build 9 from sane-backends 1.0.18-cvs
[genesys] sane_init: authorize != null
[genesys] sane_init: little endian machine
[genesys] sane_init: reading config file `genesys.conf'
[genesys] sane_init: config file line 1: trying to attach `usb 0x04a9 0x2214'
[genesys] attach: start: devp != NULL, may_wait = 0
[genesys] attach: trying to open device `libusb:001:017'
[genesys] attach: device `libusb:001:017' successfully opened
[genesys] attach: found Canon flatbed scanner LiDE 80 at libusb:001:017
[genesys] attach: exit
[genesys] sane_init: exit
[genesys] sane_get_devices: start: local_only = false
[genesys] sane_get_devices: exit
[genesys] sane_open: start (devicename = `libusb:001:017')
[genesys] sane_open: found `canon-lide-80' in devlist
[genesys] init_options: start
[genesys] init_options: exit
[sanei_debug] Setting debug level of genesys_gl841 to 255.
[genesys_gl841] gl841_init
[genesys_gl841] gl841_init_registers
[genesys_gl841] gl841_setup_sensor
[genesys_gl841] gl841_init_registers complete
[genesys] sanei_genesys_write_register (0x0e, 0x00) completed
[genesys_gl841] gl841_bulk_write_register (elems = 104)
[genesys_gl841] reg[0x01] = 0xa0
[genesys_gl841] reg[0x02] = 0x38
[genesys_gl841] reg[0x03] = 0x5f
[genesys_gl841] reg[0x04] = 0x10
[genesys_gl841] reg[0x05] = 0x40
[genesys_gl841] reg[0x06] = 0x18

-- I modified this, debug message is written before ..bulk_write..() . --

[genesys_gl841] gl841_bulk_write_register: failed while writing command: 
Invalid argument
scanimage: open of device genesys:libusb:001:017 failed: Invalid argument
[genesys] sane_exit: start
[genesys] sane_exit: exit

-- dmesg output (kernel 2.6.23.13): --
[ 5298.424302] usb 1-7: new high speed USB device using ehci_hcd and address 17
[ 5298.480244] usb 1-7: OK: device descriptor read/64, error 0, mp 64 (0 0)
[ 5298.491202] usb 1-7: configuration #1 chosen from 1 choice
[ 5312.035169] usb 1-7: usbfs: USBDEVFS_CONTROL failed cmd scanimage rqt 64 rq 
4 len 2 ret -71
[ 5312.035148] usb 1-7: USB disconnect, address 17
[ 5312.188163] usb 1-7: new high speed USB device using ehci_hcd and address 18
[ 5312.244105] usb 1-7: OK: device descriptor read/64, error 0, mp 64 (0 0)
[ 5312.255079] usb 1-7: configuration #1 chosen from 1 choice

-- 
Stefan Lucke



[sane-devel] Canon Lide 80, USB log

2006-10-23 Thread Aaron Lawrence
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20061022/be51b81a/attachment.html
From terren...@ak.net  Mon Oct 23 01:04:03 2006
From: terren...@ak.net (terren...@ak.net)
Date: Mon Oct 23 01:04:31 2006
Subject: [sane-devel] Attempting HP5200 with parallel port
Message-ID: Pine.LNX.4.64.0610221646490.4736@Knoppix

Hello all,
I've tried the USB interface on my HP scanner with 2 different 
operating systems, and am thinking the problems I've had are with the USB 
aspect of the interface, so I'm trying with parallel.  I had the parallel 
version going some time ago, but it's been long enough that I've forgotten 
exactly what I had to do to make it work.
I'm using an HP 5200 on an eMachines 433 mhz computer with 160 MB 
of ram.  I have the ppscsi driver installed, but I'm still not getting any 
scanning action.  It says there's no scanner devices found.  Is there 
something I should be passing to the --devicename=... option?  I tried 
google and the man pages, but they don't seem to be telling me anything 
useful.  I thought perhaps hp:/dev/scanner would work since it showed up 
as an example, but it didn't.  My original thought was that perhaps I 
should use /dev/lp0 since I have it plugged into the parallel port I'd 
been using for my printer, but that doesn't work.  So which device name 
should I be using if any, and/or where should I go to find that info?

Thanks,
Terrence


[sane-devel] Canon Lide 80, USB log

2006-10-21 Thread Aaron Lawrence
Hello all,

A while back I attempted to make some headway with getting the Canon 
Lide 80 to work with the sane backend. 

Tonight, I added in entries to the backend as described here: 
http://lists.alioth.debian.org/pipermail/sane-devel/2006-May/016972.html


sane-find-scanner detects the scanner.  scanimage -L output seems fine.  
Then I attempted scanimage  image.pnm and that's where I find problems.

Input...
export SANE_DEBUG_GENESYS_GL841=255  
export SANE_DEBUG_SANEI_USB=255
export SANE_DEBUG_GENESYS=255
scanimage  image.pnm


Output..
[sanei_debug] Setting debug level of sanei_usb to 255.
[sanei_usb] sanei_usb_init: Looking for kernel scanner devices
[sanei_usb] sanei_usb_init: can't stat /dev/usb/: No such file or directory
[sanei_usb] sanei_usb_init: Looking for libusb devices
usb_set_debug: Setting debugging level to 255 (on)
usb_os_find_busses: Found 003


[sanei_usb] sanei_usb_init: found libusb device (0x04a9/0x2214) 
interface 0  at libusb:001:012
...

[sanei_usb] sanei_usb_open: opened usb device `libusb:001:012' (*dn=1)
[genesys] init_options: start
[genesys] init_options: exit
[sanei_debug] Setting debug level of genesys_gl841 to 255.
[genesys_gl841] gl841_init
[genesys_gl841] gl841_init_registers
[genesys_gl841] gl841_setup_sensor
[genesys_gl841] gl841_init_registers complete
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 12, value = 135, 
index = 0, len = 1
[sanei_usb] : 04  

[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 12, value = 131, 
index = 0, len = 1
[sanei_usb] : 0E  

[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 12, value = 133, 
index = 0, len = 1
[sanei_usb] : 00  

[genesys] sanei_genesys_write_register (0x0e, 0x00) completed
[genesys_gl841] gl841_bulk_write_register (size = 208)
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, 
index = 0, len = 2
[sanei_usb] : 01 A0   

[genesys_gl841] reg[0x01] = 0xa0
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, 
index = 0, len = 2
[sanei_usb] : 02 38   
.8..
[genesys_gl841] reg[0x02] = 0x38
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, 
index = 0, len = 2
[sanei_usb] : 03 5F   
._..
[genesys_gl841] reg[0x03] = 0x5f
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, 
index = 0, len = 2
[sanei_usb] : 04 10   

[genesys_gl841] reg[0x04] = 0x10
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, 
index = 0, len = 2
[sanei_usb] : 05 40   
.@..
[genesys_gl841] reg[0x05] = 0x40
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, 
index = 0, len = 2
[sanei_usb] : 06 18   

[genesys_gl841] reg[0x06] = 0x18
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, 
index = 0, len = 2
[sanei_usb] : 07 00   

USB error: error sending control message: Protocol error
[sanei_usb] sanei_usb_control_msg: libusb complained: error sending 
control message: Protocol error
[genesys_gl841] gl841_bulk_write_register: failed while writing command: 
Invalid argument
scanimage: open of device genesys:libusb:001:012 failed: Invalid argument
[genesys] sane_exit: start
[genesys] sane_exit: exit



So it appears that the scanner resets when register 7 is written to (as 
someone had mentioned to me previously).  I was told to do a usbsnoop 
and get a log.

I used the awk and perl script on http://john.daltons.info/lide60/ to 
generate some output of plugging in the scanner, initializing and a 
300dpi color scan.  It was a while ago when I took the usb log but I 
believe I canceled the scan partway through. 
http://www.ford23.com/canon_lide_80/300dpi_color/00index.html

If someone can use this, or help me use this information it would be 
appreciated.  I have a windows xp laptop that can be available that I 
can use to acquire usb logs if more are needed.  I've had this scanner 
for about 4 years and 3 years ago I converted the house over to 100% 
linux.  The scanner has been collecting dust since.  I'd really like to 
get this working.

Thank you,

Aaron


[sane-devel] Canon Lide 80, USB log

2006-10-21 Thread Pierre Willenbrock
Aaron Lawrence schrieb:
 Hello all,
 
[...]
 
 I used the awk and perl script on http://john.daltons.info/lide60/ to
 generate some output of plugging in the scanner, initializing and a
 300dpi color scan.  It was a while ago when I took the usb log but I
 believe I canceled the scan partway through.
 http://www.ford23.com/canon_lide_80/300dpi_color/00index.html
 

Can you somehow give me access to the raw log? That way i should be able
to create a test program replicating the behavior in the log to figure
out which parts of the scanning process is missing. Private mail should
be possible, if your web server does not allow you to upload such large
amounts of data. Alternatively i can setup a ftp server.

Regards,
  Pierre


[sane-devel] canon lide 80

2004-06-05 Thread Henning Meier-Geinitz
Hi,

On Sun, May 30, 2004 at 07:56:07PM +0200, Mark Pustjens wrote:
 i wanted to confirm that the canon lide 80 indeed has the GL841 chip
 
 output from sane-find-scanner -v -v:
 
 found USB scanner (vendor=0x04a9 [Canon], product=0x2214 [CanoScan], 
 chip=GL841) at libusb:003:004

Thanks. I've added that to our lists.

Bye,
  Henning



[sane-devel] canon lide 80

2004-05-30 Thread Mark Pustjens
Hi,

i wanted to confirm that the canon lide 80 indeed has the GL841 chip

output from sane-find-scanner -v -v:

found USB scanner (vendor=0x04a9 [Canon], product=0x2214 [CanoScan], 
chip=GL841) at libusb:003:004

output from lsusb:

Bus 003 Device 002: ID 04a9:2214 Canon Inc. 
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass  255 Vendor Specific Class
  bDeviceSubClass   255 Vendor Specific Subclass
  bDeviceProtocol   255 Vendor Specific Protocol
  bMaxPacketSize064
  idVendor   0x04a9 Canon Inc.
  idProduct  0x2214 
  bcdDevice3.02
  iManufacturer   1 Canon
  iProduct2 CanoScan
  iSerial 0 
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   39
bNumInterfaces  1
bConfigurationValue 1
iConfiguration  0
bmAttributes 0xa0
  Remote Wakeup
MaxPower  500mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   3
  bInterfaceClass   255 Vendor Specific Class
  bInterfaceSubClass255 Vendor Specific Subclass
  bInterfaceProtocol255 Vendor Specific Protocol
  iInterface  0 
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes2
  Transfer TypeBulk
  Synch Type   none
wMaxPacketSize 64
bInterval   0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02  EP 2 OUT
bmAttributes2
  Transfer TypeBulk
  Synch Type   none
wMaxPacketSize 64
bInterval   0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83  EP 3 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   none
wMaxPacketSize  1
bInterval   8
  Language IDs: (length=4)
 0409 English(US)





[sane-devel] Canon LiDE 80 backend?

2004-01-26 Thread Henning Meier-Geinitz
Hi,

On Mon, Jan 26, 2004 at 01:35:29PM -0500, Jesse Sheidlower wrote:
 I see from the support list that the Canon LiDE 80 is not
 currently supported. Is this something that's likely to
 change in the very near future, or is no one working on it?

It may change in future. I'm (still) working on a backend for the
Genesys gl646 and gl841 chips but it's still not finished and I don't
have much time at the moment.

See http://www.meier-geinitz.de/sane/genesys-backend/

I wouldn't buy a scanner just because someone intends to write a
backend. Better buy an already supported device.

Could anyone who already owns such a scanner send me the output of
sane-find-scanner -v -v of SANE 1.0.13 or later?

Bye,
  Henning