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

Some USB printers return broken identification #588

Closed
michaelrsweet opened this issue Feb 23, 2004 · 2 comments
Closed

Some USB printers return broken identification #588

michaelrsweet opened this issue Feb 23, 2004 · 2 comments

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.1.20
CUPS.org User: kssingvo.suse

/usr/lib/cups/backend/usb returns an unwished identification string.

usb://Samsung0CMD:PCL5E,PCL60MDL:ML-1650;CLS:PRINTER;ML-1650;CLS:PRINTER
or
usb://Brother0CMD:PJL,PCL,PCLXL0MDL:HL-1250/series;CLS:PRINTER;%20HL-1250%20series;CLS:PRINT

I also noticed that in some ioctl's the serial number is present,
but isn't detected through a not yet supported keyword.

I attached a patch to fix this.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in CVS - the anonymous CVS repository will be updated at midnight EST.

@michaelrsweet
Copy link
Collaborator Author

"cups-1.1.20-usb_names.patch":

--- cups-1.1.20/backend/usb.c.orig 2003-09-02 22:19:17.000000000 +0200
+++ cups-1.1.20/backend/usb.c 2004-02-23 17:56:53.000000000 +0100
@@ -407,7 +407,21 @@
attr += 5;
else if ((attr = strstr(device_id, "SERIALNUMBER:")) != NULL)
attr += 13;

  • else if ((attr = strstr(device_id, ";SN:")) != NULL)
  • attr += 4;
  • if (mfg)
  • {
  • if ((delim = strchr(mfg, ';')) != NULL)
  •  *delim = '\0';
    
  • }
  • if (mdl)
  • {
  • if ((delim = strchr(mdl, ';')) != NULL)
  •  *delim = '\0';
    
  • }
  • if (attr)
    {
    strlcpy(serial_number, attr, sizeof(serial_number));

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