[cups-devel] Hacking USB uris to make them more predictable

Justin Carlson foozle at gmail.com
Wed Feb 22 18:02:11 PST 2017

I appreciate the perspective, Solomon.  It may be that biting the bullet
and just round-tripping to CUPS directly ends up being the right way
forward.  It seems there are no good answers in this space, only degrees of


On Wed, Feb 22, 2017 at 4:32 PM Solomon Peachy <pizza at shaftnet.org> wrote:

> On Wed, Feb 22, 2017 at 09:49:41PM +0000, Justin Carlson wrote:
> > Do you have any sense for whether 'serial-number-is-bogus' is reliably
> > detectable across manufacturers?  Like, people leave it a zero-length
> > field, or set to all zeros, or similar?  No device manufacturer would do
> > something like set the same non-zero serial number for all devices, would
> > they?  Would They?
> Unfortunately, it is absolutely unreliably unreliable.
> I have a printer here made by a major (non-conusumer) manufacturer that
> has a valid serial number that matches the sticker on the side.  I've
> seen two other examples of this same model that have a serial number of
> '00000'
> I've seen them with null strings, all 0s, equal non-null, and seemingly
> unique but not even remotely matching any labels on the device or
> packaging.  I've also seen them report badness via the USB (or IEEE1284)
> descriptors but provide a vendor-specific mechanism to query the real
> serial number.
> (...so as hairy as the CUPS usb backend is, the one I wrote for
>  various dyesub models supported by Gutenprint is all that, and worse.  :)
> I started down the path you did, using USB topology info when the serial
> number was unknown.. only to give up as the cure turned out to be worse
> than the disease...
> In all seriousness, your best bet will probably be, at startup, to call
> the usb backend without any arguments, as that'll give you the URIs of
> all printers that can be detected.
> ...Anyway...
>  - Solomon
> --
> Solomon Peachy                         pizza at shaftnet dot org
> Delray Beach, FL                          ^^ (email/xmpp) ^^
> Quidquid latine dictum sit, altum videtur.
> _______________________________________________
> cups-devel mailing list
> cups-devel at cups.org
> https://lists.cups.org/mailman/listinfo/cups-devel

More information about the cups mailing list