Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blacklist USB printers that do not work with the "usb" backend #4218

Closed
michaelrsweet opened this issue Oct 30, 2012 · 7 comments
Closed

blacklist USB printers that do not work with the "usb" backend #4218

michaelrsweet opened this issue Oct 30, 2012 · 7 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.6-current
CUPS.org User: jsmeix.suse

Some USB printers claim to support the USB printer class protocol,
but actually they require special methods for the USB data transfer
so that they do not work with the "usb" backend.

I ask for a feature to blacklist such USB printers so that the
"usb" backend does no longer show them by its "device discovery"
to avoid that end-users set up a print queue with the "usb" backend
for USB printers that do not work with the "usb" backend.

The current example for such printers are the
Canon SELPHY ES-series and CP-series printers, see the
"Updated spooler for Canon Selphy dye-sub printers"
mail thread dated Tue 30 Oct 2012 on the
gimp-print-devel@lists.sourceforge.net mailing list.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: jsmeix.suse

Regarding HP printers that do not print with
the CUPS backend "usb" I asked at HPLIP, see

https://answers.launchpad.net/hplip/+question/212758

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: jsmeix.suse

Regarding HP printers:

As far as the HPLIP developers currently know, any HP printer
should also work with the "usb" backend, see comment 2 and 3 at
https://answers.launchpad.net/hplip/+question/212758

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: pizza

This is the current list of the known Canon Dyesub printers that should be blacklisted. There are still five unknown PIDs, so followup patches will happen once the PIDs become known. (This list is taken from my WIP patch to Linux's usblp driver)

   { 0x04a9, 0x304a, USBLP_QUIRK_BLACKLIST }, /* Canon CP-10 */
   { 0x04a9, 0x3063, USBLP_QUIRK_BLACKLIST }, /* Canon CP-100 */
   { 0x04a9, 0x307c, USBLP_QUIRK_BLACKLIST }, /* Canon CP-200 */
   { 0x04a9, 0x307d, USBLP_QUIRK_BLACKLIST }, /* Canon CP-300 */
   { 0x04a9, 0x30bd, USBLP_QUIRK_BLACKLIST }, /* Canon CP-220 */
   { 0x04a9, 0x30be, USBLP_QUIRK_BLACKLIST }, /* Canon CP-330 */
   { 0x04a9, 0x30f6, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP400 */
   { 0x04a9, 0x310b, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP600 */
   { 0x04a9, 0x3127, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP710 */
   { 0x04a9, 0x3128, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP510 */
   { 0x04a9, 0x3141, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES1 */
   { 0x04a9, 0x3142, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP730 */
   { 0x04a9, 0x3143, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP720 */
   { 0x04a9, 0x3170, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP750 */
   { 0x04a9, 0x3171, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP740 */
   { 0x04a9, 0x3185, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES2 */
   { 0x04a9, 0x3186, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES20 */
   { 0x04a9, 0x31aa, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP770 */
   { 0x04a9, 0x31ab, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP760 */
   { 0x04a9, 0x31b0, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES30 */
   { 0x04a9, 0x31dd, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP780 */
   { 0x04a9, 0x31ee, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES40 */
   { 0x04a9, 0x3214, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP800 */
   { 0x04a9, 0x3255, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP900 */
   { 0x04a9, 0x3256, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP810 */
   /* MISSING PIDs:  ES3, CP500, CP520, CP530, CP790 */

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: pizza

One more:

   { 0x04a9, 0x30F5, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP500 */

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: pizza

One more for the blacklist:

   { 0x04a9, 0x31AF, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES3 */

As I write this, there are only three unknown PIDs:

Selphy CP520, Selphy CP530, Selphy CP790

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

File a new bug when you have the PIDs for the other Canon printers...

@michaelrsweet
Copy link
Collaborator Author

"str4218.patch":

Index: backend/usb-libusb.c

--- backend/usb-libusb.c (revision 10794)
+++ backend/usb-libusb.c (working copy)
@@ -3,7 +3,7 @@
*

  • LIBUSB interface code for CUPS.
  • * Copyright 2007-2012 by Apple Inc.
  • * Copyright 2007-2013 by Apple Inc.
    *
  • These coded instructions, statements, and computer programs are the
  • property of Apple Inc. and are protected by Federal copyright
    @@ -122,6 +122,7 @@
    #define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string /
    #define USBLP_QUIRK_BAD_CLASS 0x4 /
    descriptor uses vendor-specific
    Class or SubClass /
    +#define USBLP_QUICK_BLACKLIST 0x8 /
    these printers do not conform to the USB print spec /
    #define USBLP_QUIRK_RESET 0x4000 /
    After printing do a reset
    for clean-up /
    #define USBLP_QUIRK_NO_REATTACH 0x8000 /
    After printing we cannot re-attach
    @@ -178,6 +179,35 @@
    https://bugs.launchpad.net/bugs/1032456 /
    { 0x0a5f, 0x0000, USBLP_QUIRK_BIDIR }, /
    All Zebra devices,
    https://bugs.launchpad.net/bugs/1001028 */
  • /* Canon */
  • { 0x04a9, 0x304a, USBLP_QUIRK_BLACKLIST }, /* Canon CP-10 */
  • { 0x04a9, 0x3063, USBLP_QUIRK_BLACKLIST }, /* Canon CP-100 */
  • { 0x04a9, 0x307c, USBLP_QUIRK_BLACKLIST }, /* Canon CP-200 */
  • { 0x04a9, 0x307d, USBLP_QUIRK_BLACKLIST }, /* Canon CP-300 */
  • { 0x04a9, 0x30bd, USBLP_QUIRK_BLACKLIST }, /* Canon CP-220 */
  • { 0x04a9, 0x30be, USBLP_QUIRK_BLACKLIST }, /* Canon CP-330 */
  • { 0x04a9, 0x30f6, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP400 */
  • { 0x04a9, 0x310b, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP600 */
  • { 0x04a9, 0x3127, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP710 */
  • { 0x04a9, 0x3128, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP510 */
  • { 0x04a9, 0x3141, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES1 */
  • { 0x04a9, 0x3142, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP730 */
  • { 0x04a9, 0x3143, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP720 */
  • { 0x04a9, 0x3170, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP750 */
  • { 0x04a9, 0x3171, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP740 */
  • { 0x04a9, 0x3185, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES2 */
  • { 0x04a9, 0x3186, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES20 */
  • { 0x04a9, 0x31aa, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP770 */
  • { 0x04a9, 0x31ab, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP760 */
  • { 0x04a9, 0x31b0, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES30 */
  • { 0x04a9, 0x31dd, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP780 */
  • { 0x04a9, 0x31ee, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES40 */
  • { 0x04a9, 0x3214, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP800 */
  • { 0x04a9, 0x3255, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP900 */
  • { 0x04a9, 0x3256, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP810 */
  • { 0x04a9, 0x30F5, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP500 */
  • { 0x04a9, 0x31AF, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES3 */
  • /* MISSING PIDs: CP520, CP530, CP790 */
    { 0, 0 }
    };

@@ -889,8 +919,15 @@
!devdesc.idProduct)
continue;

  •  printer.quirks   = quirks(devdesc.idVendor, devdesc.idProduct);
    
  •  printer.quirks = quirks(devdesc.idVendor, devdesc.idProduct);
    
  • /*
    
  •  \* Ignore blacklisted printers...
    
  •  */
    
  •  if (printer.quirks & USBLP_QUIRK_BLACKLIST)
    
  •    continue;
    
    • for (conf = 0; conf < devdesc.bNumConfigurations; conf ++)
      {
      if (libusb_get_config_descriptor(device, conf, &confptr) < 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant