[sane-devel] Canon MX430 / MX510 / MX925 - does not recover when ADF out of paper

Rolf Bensch rolf at bensch-online.de
Thu Mar 20 17:05:41 UTC 2014


Hi Matthias,

Please don't mix different testings in one log file and at the same
time. Please keep them in mind and let us go step by step.

I assume that "normal" ADF scanning works with new patch 3.

Am 19.03.2014 19:46, schrieb Matthias Peter Walther:
> 
> Standard debug level 4 scan, the last 1 mm is still missing. As this
> seems to be firmware related, I think sane won't be able to change this.
> The linux binary has the same problem. And I tested it in windows with
> IrfanView. The last mm is still missing under windows, too. I think this
> is a firmware issue?
> 

I guess the ADF hardware needs the last 1mm for the paper detector.

> Maybe you just set the maximum height of an adf page to that last line
> it scans. That is 870 pixels @75 dpi.
> 

I won't do so. What's when you want to scan a 14" sheet or A5 format?
Please set the used paper size in the frontend. Then you can also crop
left and right ADF frame.

> And in the debug level 11 Iog I stopped the 2nd paper by hand. Scanner
> and sane aborts. But after removing the paper and pressing ok on the
> device, nothing happens anymore.
> 

I see this error in the log file: "cancelled by hardware". The problem
is that the scan process has not been closed and the scanner cannot be
initialised for a new scan session because the previous is still active
in the scanner.

To fix this I need the exact position in the code where "cancelled by
hardware" is detected. Please create a new log file with usb messages
with attached patch "pixma_mp150.c.patch4".

And please scan a small area @ 75 dpi, not a whole page. This reduces
log file size.

> The same bug comes, if you interrupt the scan with ctrl + C (scanimage).
> The printer continues pulling pages, but does not recover after it has
> finished. That works correctly with the binary. If I recover the scanner
> with the binary driver, that requires up to three attempts. During the
> first and often the second, it searches the scanner for 2 minuites and
> aborts then. After that the second failure the scanner works prefectly
> again. Maybe it's just a timeout in the devices firmware?
> 

I assume that this is the same problem as above.

> By the way. The timeouts in the sane logs are still rediculous. When it
> counts down, between each line it waits up the 40 seconds and not the
> amount of seconds it says in the log.
> 

Maybe "pixma_common.c.patch4" will fix this.

> I had to zip the logs, cause they are larger than 100 KB and the mailing
> list server doesn't accept that.
> 
> Last question: Is it possible to autodetect if adf has paper and
> autoswitch the input method? Some scanner are able to do that.
> 

Please keep this in mind.

Cheers,
Rolf
-------------- next part --------------
--- ./pixma_mp150.c	2014-03-20 17:37:13.000000000 +0100
+++ ../sane-backends/backend/pixma_mp150.c	2014-03-20 17:41:28.000000000 +0100
@@ -1485,7 +1485,10 @@
   do
     {
       if (s->cancel)
+      {
+        PDBG (pixma_dbg (4, "*mp150_fill_buffer***** s->cancel  *****\n"));
         return PIXMA_ECANCELED;
+      }
       if ((mp->last_block & 0x28) == 0x28)
         {  /* end of image */
            PDBG (pixma_dbg (4, "*mp150_fill_buffer***** end of image  *****\n"));
@@ -1497,6 +1500,7 @@
       error = read_image_block (s, header, mp->imgbuf + mp->data_left_len);
       if (error < 0)
         {
+          PDBG (pixma_dbg (4, "*mp150_fill_buffer***** error = %d  *****\n", error));
           if (error == PIXMA_ECANCELED)
             {
                /* NOTE: I see this in traffic logs but I don't know its meaning. */
-------------- next part --------------
--- ./pixma_common.c	2014-03-20 17:37:13.000000000 +0100
+++ ../sane-backends/backend/pixma_common.c	2014-03-20 17:55:36.000000000 +0100
@@ -657,7 +657,7 @@
       if (error == PIXMA_ETIMEDOUT)
       {
         PDBG (pixma_dbg (2, "No response yet. Timed out in %d sec.\n", tmo));
-        pixma_sleep (1000000);          /* 1s timeout */
+        /*pixma_sleep (1000000);*/          /* 1s timeout */
       }
     }
   while (error == PIXMA_ETIMEDOUT && --tmo != 0);


More information about the sane-devel mailing list