[sane-devel] Canon Maxifiy MB2000 series

Rolf Bensch rolf at bensch-online.de
Wed Mar 23 21:13:01 UTC 2016


Hi,

Based on the wireshark logfile you sent me before, I prepared a 1st patch.

To use this patch you need to install Sane from source as described in
README.linux in chapter "Step by step install on Linux 2.6.* and 3.*"
(http://sane-project.org/docs.html).

Then you need to patch the file "backend/pixma_mp150.c" with the
attached file "pixma_mp150.c.patch1":
(1) save attached file to folder backend
(2) cd into folder backend
(3) run command:
    $ patch pixma_mp150.c pixma_mp150.c.patch1
(4) make and install Sane
    $ cd ..
    $ make && sudo make install

Please try scanning one page from ADF, then 2 pages and after this try
duplex ADF.

The scanner may hang anywhere. Please create a log file for this test
function.

Many thanks for your help.

Cheers,
Rolf


Am 23.03.2016 um 16:59 schrieb Jörn-Ingo Weigert:
> Hi Rolf,
> The scanner reacts on scanimage --source "Automatic Document Feeder" -l
> 100 -x 10 -y 10 2>
> pixma.log > pixma.pnm (wokeup yes, displaying "Progress .. please
> wait... ") 
> 
> unfortunately it dont feed the paper into the adf nor try to scan.
> 
> I attached pixma.log and output--test.txt (made with scanimage --test)
> 
> hope it help.
> 
> 2016-03-22 14:15 GMT+01:00 Rolf Bensch <rolf at bensch-online.de
> <mailto:rolf at bensch-online.de>>:
> 
>     Hi,
> 
>     Sorry, there was a copy and paste error inside the command:
>     "Transparency Unit" must be replaced by "Automatic Document Feeder". The
>     command for scanning a *single* page is:
> 
>     $ scanimage --source "Automatic Document Feeder" -l 100 -x 10 -y 10 2>
>     pixma.log > pixma.pnm
> 
>     Maybe the scanner hangs. Then the log file will help debugging this
>     issue.
> 
>     If you want to use scanimage or xsane scanning more than one page from
>     ADF, you need to enable batch mode. Please read the man pages for
>     details.
> 
>     Therefore I prefer gscan2pdf for ADF scans.
> 
>     You can create log files in a terminal window with:
> 
>     $ SANE_DEBUG_PIXMA=11 gscan2pdf &> pixma.log
> 
>     Maybe you want to check the capabilities of your scanner:
> 
>     $ scanimage --help
> 
>     The scanner must be switched on for this test.
> 
>     Hope this helps.
> 
>     Cheers,
>     Rolf
> 
> 
> 
>     Am 20.03.2016 um 13:05 schrieb Jörn-Ingo Weigert:
>     > Here ist a logfile made with scanimage --test because I dont know how to
>     > select the ADF as source,
>     >
>     > I tried scanimage --source "Automatic Document Feeder" and also
>     > scanimage --source "ADF"
>     >
>     > Any thoughts?
>     >
>     > Kind regards,
>     >
>     > Jörn-Ingo Weigert
>     >
>     > 2015-11-02 22:37 GMT+01:00 Rolf Bensch <rolf at bensch-online.de <mailto:rolf at bensch-online.de>
>     > <mailto:rolf at bensch-online.de <mailto:rolf at bensch-online.de>>>:
>     >
>     >     Hi,
>     >
>     >     Sorry for my late response.
>     >
>     >     Am 25.10.2015 um 10:55 schrieb Jörn-Ingo Weigert:
>     >     > I can report that sane does support the rudimentary scanning
>     with the
>     >     > Canon Maxify MB2000 series MFP printer under Ubuntu 14.04 LTS.
>     >     >
>     >     > I installed the drivers from Canon Website for Linux.
>     >     > Configured the appropriate permissions to access the scanner
>     device
>     >     > via USB.
>     >     >
>     >     > What works:
>     >     > - Scanning in 300 / 600dpi works from Flatbed with Ubuntu
>     own Simple
>     >     > Scan and XSane
>     >     >
>     >     OK. Many thanks for your report.
>     >
>     >     > What does not work:
>     >     > - Scanning over / with ADF: The Scanner recognize that there
>     comes a
>     >     > command (display lights up, showing "Process command..." but
>     does NOT
>     >     > activate the feeder or start to scan. :-(
>     >     > Scanning via Canon own tool scangear works on both flatbed
>     and adf scan.
>     >     >
>     >     Please sniff the USB protocols from a small scangear adf scan,
>     e.g.
>     >     10x10mm @ 75dpi with wireshark.
>     >     And again in a different log file from Sane in a Linux terminal:
>     >
>     >     (1) $ export SANE_DEBUG_PIXMA=11
>     >     (2) $ scanimage --source "Transparency Unit" -l 100 -x 10 -y 10 2>
>     >     pixma.log > pixma.pnm
>     >
>     >     Then I can compare both log files and prepare a patch.
>     >
>     >     > - Scanning in higher resolution like 1200dpi / 2400dpi
>     result in a
>     >     > doubled interlaced scanning image, however the scan themself
>     work but
>     >     > result in bad image.
>     >
>     >     OK. I can prepare a Patch for 1200 dpi. XSane shouldn't show
>     the option
>     >     for 2400dpi.
>     >
>     >     Please zip the log files. The mailing list rejects large emails.
>     >
>     >     Cheers,
>     >     Rolf
>     >
>     >
> 
> 
-------------- next part --------------
--- ./pixma_mp150.c	2016-03-23 21:32:46.281066505 +0100
+++ ../sane-backends/backend/pixma_mp150.c	2016-03-23 21:46:49.369926823 +0100
@@ -748,13 +748,24 @@
           data[0x01] = 0x02;
           data[0x1e] = 0x02;
         }
-      data[0x02] = 0x01;
-      if (is_scanning_from_adfdup (s))
+      /* scanner specific ADF settings */
+      if (s->cfg->pid == MB2000_PID)
+      {
+        data[0x02] = (is_scanning_from_adfdup (s)) ? 0x04 : 0x01;
+        data[0x03] = (is_scanning_from_adfdup (s)) ? 0x03 : ((is_scanning_from_adf (s)) ? 0x01 : 0x00);
+      }
+      else
+      {
+        data[0x02] = 0x01;
+        if (is_scanning_from_adfdup (s))
         {
           data[0x02] = 0x03;
           data[0x03] = 0x03;
         }
-      data[0x05] = 0x01;	/* This one also seen at 0. Don't know yet what's used for */
+        data[0x05] = 0x01;        /* This one also seen at 0. Don't know yet what's used for */
+      }
+      data[0x1f] = (is_scanning_from_adf (s)) ? 0x01 : 0x00;
+
       pixma_set_be16 (s->param->xdpi | 0x8000, data + 0x08);
       pixma_set_be16 (s->param->ydpi | 0x8000, data + 0x0a);
       /*PDBG (pixma_dbg (4, "*send_scan_param gen. 3+ ***** Setting: xdpi=%hi ydpi=%hi  x=%i y=%i  w=%i ***** \n",
@@ -773,7 +784,6 @@
                                                  * ((is_ccd_grayscale (s) || is_ccd_lineart (s)) ? 3 : s->param->channels));   /* bits per pixel */
 #endif
 
-      data[0x1f] = 0x01;        /* This one also seen at 0. Don't know yet what's used for */
       data[0x20] = 0xff;
       data[0x21] = 0x81;
       data[0x23] = 0x02;


More information about the sane-devel mailing list