[sane-devel] Imageclass d530

Rolf Bensch rolf at bensch-online.de
Tue Dec 17 11:29:52 UTC 2013


Hi Nate,

Attached is the next patch pixma_imageclass.c.patch2 for
pixma_imageclass.c. I assume that your scanner is a generation 1 type.

In the meantime I did some work in pixma_imageclass.c. Maybe you need to
fetch the latest code from git and patch with pixma_imageclass.c.patch2_all.

Please send a new pixma.log if the code is buggy.

Cheers,
Rolf



Am 11.12.2013 21:48, schrieb Nate Fuhriman:
> I got pass the not starting problem. This machine has to be put into
> "remote scanner" mode at the actual device.
> 
> When I try to scan now it just hangs on me and the display on the
> device says "An error has occured" and the following appears in my
> /var/log/messages. I have also attached the usblyzer html output as
> requested.
> 
> Dec 11 13:47:07 r2d2 kernel: [  661.651208] usb 2-1: usbfs: interface 1
> claimed by usblp while 'scanimage' sets config #1
> Dec 11 13:47:15 r2d2 kernel: [  670.385064] usb 2-1: usbfs: interface 1
> claimed by usblp while 'scanimage' sets config #1
> Dec 11 13:47:16 r2d2 kernel: [  670.913699] usb 2-1: usbfs: interface 1
> claimed by usblp while 'scanimage' sets config #1
> Dec 11 13:47:19 r2d2 kernel: [  674.327016] hub 2-0:1.0: port 1 disabled
> by hub (EMI?), re-enabling...
> Dec 11 13:47:19 r2d2 kernel: [  674.330553] usb 2-1: USB disconnect,
> device number 2
> Dec 11 13:47:19 r2d2 kernel: [  674.341357] usblp0: removed
> Dec 11 13:47:19 r2d2 colord: device removed: sysfs-Canon_Inc-D530_D560
> Dec 11 13:47:19 r2d2 systemd[1]: Service printer.target is not needed
> anymore. Stopping.
> Dec 11 13:47:19 r2d2 systemd[1]: Stopping Printer.
> Dec 11 13:47:19 r2d2 systemd[1]: Stopped target Printer.
> Dec 11 13:47:20 r2d2 kernel: [  674.559025] usb 2-1: new high-speed USB
> device number 3 using ehci-pci
> Dec 11 13:47:20 r2d2 kernel: [  674.684038] usb 2-1: New USB device
> found, idVendor=04a9, idProduct=2775
> Dec 11 13:47:20 r2d2 kernel: [  674.687474] usb 2-1: New USB device
> strings: Mfr=1, Product=2, SerialNumber=3
> Dec 11 13:47:20 r2d2 kernel: [  674.690815] usb 2-1: Product: D530/D560
> Dec 11 13:47:20 r2d2 kernel: [  674.694190] usb 2-1: Manufacturer: Canon
> Inc
> Dec 11 13:47:20 r2d2 kernel: [  674.697478] usb 2-1: SerialNumber:
> 1131T3600452
> Dec 11 13:47:20 r2d2 kernel: [  674.719116] usblp 2-1:1.1: usblp0: USB
> Bidirectional printer dev 3 if 1 alt 0 proto 2 vid 0x04A9 pid 0x2775
> Dec 11 13:47:20 r2d2 mtp-probe: checking bus 2, device 3:
> "/sys/devices/pci0000:00/0000:00:13.2/usb2/2-1"
> Dec 11 13:47:20 r2d2 mtp-probe: bus: 2, device: 3 was not an MTP device
> Dec 11 13:47:20 r2d2 colord: Device added: sysfs-Canon_Inc-D530_D560
> Dec 11 13:47:20 r2d2 systemd[1]: Starting Printer.
> Dec 11 13:47:20 r2d2 systemd[1]: Reached target Printer.
> Dec 11 13:47:20 r2d2 systemd[1]: Starting Configure Plugged-In
> Printer...
> Dec 11 13:47:20 r2d2 systemd[1]: Started Configure Plugged-In Printer.
> Dec 11 13:47:21 r2d2 udev-configure-printer: no corresponding CUPS
> device found
> 
> 
-------------- next part --------------
--- ./pixma_imageclass.c	2013-12-17 11:54:43.000000000 +0100
+++ ../sane-backends/backend/pixma_imageclass.c	2013-12-17 12:10:15.000000000 +0100
@@ -413,8 +413,9 @@
     return error;
   if (s->param->source == PIXMA_SOURCE_ADF && !has_paper (s))
     return PIXMA_ENO_PAPER;
-  /* activate only seen for generation 1 scanners */
-  if (mf->generation == 1)
+  /* activate only seen for generation 1 scanners
+   * but not for D530 */
+  if (mf->generation == 1 && s->cfg->pid != D530_PID)
     {
       if (error >= 0)
         error = activate (s, 0);
@@ -471,8 +472,9 @@
   mf->cb.cmd_header_len = 10;
   mf->cb.cmd_len_field_ofs = 7;
 
-  /* set generation = 2 for new multifunctionals */
-  mf->generation = (s->cfg->pid >= MF8030_PID) ? 2 : 1;
+  /* set generation = 2 for new multifunctionals
+   * except D530 is a generation 1 scanner */
+  mf->generation = (s->cfg->pid >= MF8030_PID && s->cfg->pid != D530_PID) ? 2 : 1;
   PDBG (pixma_dbg (3, "*iclass_open***** This is a generation %d scanner.  *****\n", mf->generation));
 
   PDBG (pixma_dbg (3, "Trying to clear the interrupt buffer...\n"));
-------------- next part --------------
--- ./pixma_imageclass.c	2013-12-17 12:24:09.000000000 +0100
+++ ../sane-backends/backend/pixma_imageclass.c	2013-12-17 12:24:24.000000000 +0100
@@ -94,6 +94,7 @@
 #define IR1133_PID 0x2742
 #define MF4570_PID 0x275a
 #define MF4800_PID 0x2773
+#define D530_PID   0x2775
 
 
 enum iclass_state_t
@@ -412,8 +413,9 @@
     return error;
   if (s->param->source == PIXMA_SOURCE_ADF && !has_paper (s))
     return PIXMA_ENO_PAPER;
-  /* activate only seen for generation 1 scanners */
-  if (mf->generation == 1)
+  /* activate only seen for generation 1 scanners
+   * but not for D530 */
+  if (mf->generation == 1 && s->cfg->pid != D530_PID)
     {
       if (error >= 0)
         error = activate (s, 0);
@@ -470,8 +472,9 @@
   mf->cb.cmd_header_len = 10;
   mf->cb.cmd_len_field_ofs = 7;
 
-  /* set generation = 2 for new multifunctionals */
-  mf->generation = (s->cfg->pid >= MF8030_PID) ? 2 : 1;
+  /* set generation = 2 for new multifunctionals
+   * except D530 is a generation 1 scanner */
+  mf->generation = (s->cfg->pid >= MF8030_PID && s->cfg->pid != D530_PID) ? 2 : 1;
   PDBG (pixma_dbg (3, "*iclass_open***** This is a generation %d scanner.  *****\n", mf->generation));
 
   PDBG (pixma_dbg (3, "Trying to clear the interrupt buffer...\n"));
@@ -784,5 +787,6 @@
   DEV ("Canon imageCLASS MF4570dw", "MF4570dw", MF4570_PID, 600, 640, 877, 0),
   DEV ("Canon imageRUNNER 1133", "iR1133", IR1133_PID, 600, 637, 877, PIXMA_CAP_ADFDUP),
   DEV ("Canon i-SENSYS MF4800 Series", "MF4800", MF4800_PID, 600, 640, 877, 0),
+  DEV ("Canon imageCLASS D530", "D530", D530_PID, 600, 640, 877, 0),
   DEV (NULL, NULL, 0, 0, 0, 0, 0)
 };


More information about the sane-devel mailing list