[sane-devel] LiDE 90

2008-04-17 Thread Guillaume Gastebois
Hello,

Me again !

I'm trying to find what are GPIO14,13,12 and 11 for.

I find GPIO11=home switch and must be 0.
I thought I found GPIO14 was half CCD but by adding :
/* gpio part. here: for canon lide 90 */
if (dev-model-gpo_type == GPO_CANONLIDE90)
{
r = sanei_genesys_get_address (reg, 0x6c);
if (half_ccd)
r-value |= 0x20;
else
r-value = ~0x20;
}

in genesys_gl841.c line ~2053 I had image compressed x2 in the left and
second right part black with 0x6c=12 and not with 0x6c=1a. Strange.

I decided to comment out these lines yet for tests.

In genesys_841.c I see conditions with GPO_CANONLIDE35 for gl841_feed
function (lines ~4309 and ~4913). I added GPO_CANONLIDE90 too. What is
this function for ? Is it usefull to add lide 90 ?

tests I made were :
0x1a=00 and 0x6c=02 : bad calibration vertical lines
0x1a=00 and 0x6c=0a : bad calibration vertical lines (motor sometimes
locks at the end with noise).
0x1a=00 and 0x6c=12 : image like before (small calibration problems)
0x1a=00 and 0x6c=1a : image like before (small calibration problems)
0x1a=00 and 0x6c=22 : bad calibration vertical lines
0x1a=00 and 0x6c=2a : bad calibration vertical lines
0x1a=00 and 0x6c=32 : very good quality image but take only the half
left part of the page
0x1a=00 and 0x6c=3a : very good quality image but take only the half
left part of the page

0x1a=24 and 0x6c=02 or 0a or 12 or 1a or 22 or 2a or 32 or 3a : always
black image!

All the results can be found on :
http://ggastebois.free.fr/lide90_snoop/test_00 (for tests with 0x1a=00)
http://ggastebois.free.fr/lide90_snoop/test_24 (for tests with 0x1a=24)

The number in the tar name is the value off 0x6c. I think looking at
0x6c=32 or 3a is very interesting.

Why sane always produces black images with same 0x1a value as windows
driver 

Regards
Guillaume

ps. : Pierre can you send me a sample entropy processed offset image to
see what I must obtain. Thank you.



[sane-devel] LiDE 90

2008-04-17 Thread Pierre Willenbrock
Guillaume Gastebois schrieb:
 Hello,
 
 Me again !
 
 I'm trying to find what are GPIO14,13,12 and 11 for.
 
 I find GPIO11=home switch and must be 0.
 I thought I found GPIO14 was half CCD but by adding :
 /* gpio part. here: for canon lide 90 */
 if (dev-model-gpo_type == GPO_CANONLIDE90)
 {
 r = sanei_genesys_get_address (reg, 0x6c);
 if (half_ccd)
 r-value |= 0x20;
 else
 r-value = ~0x20;
 }
 
 in genesys_gl841.c line ~2053 I had image compressed x2 in the left and
 second right part black with 0x6c=12 and not with 0x6c=1a. Strange.
 
 I decided to comment out these lines yet for tests.
 
 In genesys_841.c I see conditions with GPO_CANONLIDE35 for gl841_feed
 function (lines ~4309 and ~4913). I added GPO_CANONLIDE90 too. What is
 this function for ? Is it usefull to add lide 90 ?

no, these don't help your scanner. the feed is used to position the 
scanning head at the white calibration strip. This is(should not) be 
needed for your scanner.

 tests I made were :
 0x1a=00 and 0x6c=02 : bad calibration vertical lines
 0x1a=00 and 0x6c=0a : bad calibration vertical lines (motor sometimes
 locks at the end with noise).
 0x1a=00 and 0x6c=12 : image like before (small calibration problems)
 0x1a=00 and 0x6c=1a : image like before (small calibration problems)
 0x1a=00 and 0x6c=22 : bad calibration vertical lines
 0x1a=00 and 0x6c=2a : bad calibration vertical lines
 0x1a=00 and 0x6c=32 : very good quality image but take only the half
 left part of the page
 0x1a=00 and 0x6c=3a : very good quality image but take only the half
 left part of the page
 
 0x1a=24 and 0x6c=02 or 0a or 12 or 1a or 22 or 2a or 32 or 3a : always
 black image!
 
 All the results can be found on :
 http://ggastebois.free.fr/lide90_snoop/test_00 (for tests with 0x1a=00)
 http://ggastebois.free.fr/lide90_snoop/test_24 (for tests with 0x1a=24)
 
 The number in the tar name is the value off 0x6c. I think looking at
 0x6c=32 or 3a is very interesting.
 
 Why sane always produces black images with same 0x1a value as windows
 driver 

Because the rest of the clock registers are setup incorrectly. This 
probably leads to the CCD bar not getting correct pulses to move the 
electrical charges. No charge means black pixel. It should be possible 
to simulate the behavior when the clock generators are switched to 
automatic, but this default behavior is not well documented.

 Regards
 Guillaume
 
 ps. : Pierre can you send me a sample entropy processed offset image to
 see what I must obtain. Thank you.

Attached is the result of the dark part of a shading calibration run. 
When doing offset calibration, most of the time i only see a single 
line(sometimes with a wraparound into the next line).

Note that the image is nearly symmetrical to the diagonal axis, meaning 
two consecutive bytes are uncorrelated. The result of the white part 
shows a larger band, typical around 20 pixels width, but with a lot of 
speckles(which is in no way an indicator of problems).

Regards,
   Pierre

-- next part --
A non-text attachment was scrubbed...
Name: correl.png
Type: image/png
Size: 1997 bytes
Desc: not available
Url : 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080417/bc0a379c/attachment.png
 


[sane-devel] LiDE 90

2008-04-17 Thread Pierre Willenbrock
Guillaume Gastebois schrieb:
 Hello,
 
 Me again !
 
 I'm trying to find what are GPIO14,13,12 and 11 for.
 
 I find GPIO11=home switch and must be 0.
 I thought I found GPIO14 was half CCD but by adding :
 /* gpio part. here: for canon lide 90 */
 if (dev-model-gpo_type == GPO_CANONLIDE90)
 {
 r = sanei_genesys_get_address (reg, 0x6c);
 if (half_ccd)
 r-value |= 0x20;
 else
 r-value = ~0x20;
 }
 
 in genesys_gl841.c line ~2053 I had image compressed x2 in the left and
 second right part black with 0x6c=12 and not with 0x6c=1a. Strange.
 
 I decided to comment out these lines yet for tests.
 
 In genesys_841.c I see conditions with GPO_CANONLIDE35 for gl841_feed
 function (lines ~4309 and ~4913). I added GPO_CANONLIDE90 too. What is
 this function for ? Is it usefull to add lide 90 ?
 
 tests I made were :
 0x1a=00 and 0x6c=02 : bad calibration vertical lines
 0x1a=00 and 0x6c=0a : bad calibration vertical lines (motor sometimes
 locks at the end with noise).
 0x1a=00 and 0x6c=12 : image like before (small calibration problems)
 0x1a=00 and 0x6c=1a : image like before (small calibration problems)
 0x1a=00 and 0x6c=22 : bad calibration vertical lines
 0x1a=00 and 0x6c=2a : bad calibration vertical lines
 0x1a=00 and 0x6c=32 : very good quality image but take only the half
 left part of the page
 0x1a=00 and 0x6c=3a : very good quality image but take only the half
 left part of the page
 
 0x1a=24 and 0x6c=02 or 0a or 12 or 1a or 22 or 2a or 32 or 3a : always
 black image!

try 0x1a=0x24 with
   dev-reg[reg_0x77].value = 0x00;
   dev-reg[reg_0x78].value = 0x00;
   dev-reg[reg_0x79].value = 0x3f;
   dev-reg[reg_0x7a].value = 0x00;
   dev-reg[reg_0x7b].value = 0x00;
   dev-reg[reg_0x7c].value = 0x3f;

if this does not work, try adding more bits/removing bits from ck3map or 
ck4map(for example 0:0f:ff, or 0:00:0f) or inverting one of the maps.
(My scanner uses clock1 and clock2, clock2 is just clock1 inverted, so 
there is only one map. Using 0:00:3f on ck1map works for me, but so does 
00:0f:ff and 00:00:0f.) I guess the default is a 50% duty cycle for the 
clocks. The number of master clocks the clock1/clock2/clock3/clock4 is 
set high then depends on the actual number of master clocks per pixel.

 All the results can be found on :
 http://ggastebois.free.fr/lide90_snoop/test_00 (for tests with 0x1a=00)
 http://ggastebois.free.fr/lide90_snoop/test_24 (for tests with 0x1a=24)
 
 The number in the tar name is the value off 0x6c. I think looking at
 0x6c=32 or 3a is very interesting.
 
 Why sane always produces black images with same 0x1a value as windows
 driver 
 
 Regards
 Guillaume
 
 ps. : Pierre can you send me a sample entropy processed offset image to
 see what I must obtain. Thank you.




[sane-devel] Canon imageClass MFP's

2008-04-17 Thread Nicolas
Hi,

Currently maintaining the pixma backend, I can give you tips and
knowledge on it if you want to design a backend for those Canon MFPs. 

Especially if the protocol used by them is similar to the PIXMA
protocol, then it can be easy to integrate them either in the pixma
backend (the easiest, let's say as a separate pixma_ImageClass.c file
for instance), or in a separate imageclass backend, that would probably
use most of the pixma code.

To have a first idea of what it looks like, could you send me (at mail
address) a zipped USB snoop of a typical scan session under Windows

Then, we can discuss on the best solution to implement the backend.

Nicolas

Le mercredi 16 avril 2008 ? 18:04 -0700, Dennis Lou a ?crit :
 Hi,
 
 I recently acquired a Canon imageClass MF4270 and am interested in 
 contributing a sane backend for it.  This is my progress so far:
 
 +Examined Windows driver package.  Found references to:
 --Canon MF5650
 --Canon MF5630
 --Canon MF3110
 --Canon MF8100
 --Canon MF5730
 --Canon MF5750
 --Canon MF5770
 --Canon MF6500 Series
 --Canon MF3200 Series
 --Canon MF4100 Series
 --Canon MF4600 Series
 --Canon MF4010 Series
 --Canon MF4200 Series
 
 +Ran sane-find-scanner -v -v
 +Ran cat /proc/bus/usb/devices
 +Created various logs using USB snooper in Windows
 +Isolated sections of log pertaining to connect, init, scan and de-init
 +Generated C code from logs and replayed USB commands in Linux
 +Reversed engineered some commands and responses
 +Modified C code to generate PNM/BMP files; performed scans from code
 
 
 
 Attached are output from sane-find-scanner and /proc/bus/usb/devices
 
 Looking at the logs, it seems very similar to the pixma MP series.
 
 Is anybody else working on this series?
 
 -Dennis
 
 
 
 
   
 
 Be a better friend, newshound, and 
 know-it-all with Yahoo! Mobile.  Try it now.  
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ




[sane-devel] Canon imageClass MFP's

2008-04-17 Thread Dennis Lou
I dug around some more and I think I've decoded most of the commands and 
protocols.  Of the 3 pixma subfamilies, it most closely resembles the mp730.c 
code.  Lamp/calibration/busy flags seem to be moved around a little but the 
has-paper flag seems the same (on a side note, I have yet to observe a cold 
lamp on this machine) and the step1() sequence is slightly different.  I think 
I have enough info to start writing the backend at this point.

I agree that a seperate pixma_imageclass.c is the easiest (don't have to worry 
about breaking existing code) and it'd be easier for end-users to find the 
right driver and/or add devices.  Besides, if imageclass should be merged to an 
existing file, so should mp150/mp730/mp750.  However, it might be close enough 
that all I have to do is add the USB PID's to mp730.c and change a couple lines 
here and there.

I will be sending snoop logs in a separate email shortly.

-Dennis

- Original Message 
From: Nicolas nicolas.mar...@freesurf.fr
To: Dennis Lou dlou99 at yahoo.com
Cc: sane-devel at lists.alioth.debian.org
Sent: Thursday, April 17, 2008 1:12:09 PM
Subject: Re: [sane-devel] Canon imageClass MFP's

Hi,

Currently maintaining the pixma backend, I can give you tips and
knowledge on it if you want to design a backend for those Canon MFPs. 

Especially if the protocol used by them is similar to the PIXMA
protocol, then it can be easy to integrate them either in the pixma
backend (the easiest, let's say as a separate pixma_ImageClass.c file
for instance), or in a separate imageclass backend, that would probably
use most of the pixma code.

To have a first idea of what it looks like, could you send me (at mail
address) a zipped USB snoop of a typical scan session under Windows

Then, we can discuss on the best solution to implement the backend.

Nicolas

Le mercredi 16 avril 2008 ? 18:04 -0700, Dennis Lou a ?crit :
 Hi,
 
 I recently acquired a Canon imageClass MF4270 and am interested in 
 contributing a sane backend for it.  This is my progress so far:
 
 +Examined Windows driver package.  Found references to:
 --Canon MF5650
 --Canon MF5630
 --Canon MF3110
 --Canon MF8100
 --Canon MF5730
 --Canon MF5750
 --Canon MF5770
 --Canon MF6500 Series
 --Canon MF3200 Series
 --Canon MF4100 Series
 --Canon MF4600 Series
 --Canon MF4010 Series
 --Canon MF4200 Series
 
 +Ran sane-find-scanner -v -v
 +Ran cat /proc/bus/usb/devices
 +Created various logs using USB snooper in Windows
 +Isolated sections of log pertaining to connect, init, scan and de-init
 +Generated C code from logs and replayed USB commands in Linux
 +Reversed engineered some commands and responses
 +Modified C code to generate PNM/BMP files; performed scans from code
 
 
 
 Attached are output from sane-find-scanner and /proc/bus/usb/devices
 
 Looking at the logs, it seems very similar to the pixma MP series.
 
 Is anybody else working on this series?
 
 -Dennis
 
 
 
 
   
 
 Be a better friend, newshound, and 
 know-it-all with Yahoo! Mobile.  Try it now.  
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ






  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ