[cups.bugs] [LOW] STR #3348: cups unable to work with my usb printer

Stanislav Ievlev inger at altlinux.org
Wed Sep 30 00:37:59 PDT 2009


Hello, Mike!

I can't understand how to add the comment on site, therefore, I'm sending this message.

1. If you *do* URI-encode, why I *see* 'dot' in output of usb backend then?

Let's see usb-libusb.c source:
--
  ...
  if ((sern = cupsGetOption("SERIALNUMBER", num_values, values)) == NULL)
    if ((sern = cupsGetOption("SERN", num_values, values)) == NULL)
      if ((sern = cupsGetOption("SN", num_values, values)) == NULL)
      {
       /*
        * Try getting the serial number from the device itself...
        */

        int length = usb_get_string_simple(printer->handle,
                                           printer->device->descriptor.
                                               iSerialNumber,
                                           tempsern, sizeof(tempsern) -
1);
        if (length > 0)
        {
          tempsern[length] = '\0';
          sern             = tempsern;
        }
      }
 ....
  if (sern)
  {
    if (printer->iface > 0)
      snprintf(options, sizeof(options), "?serial=%s&interface=%d", sern,
               printer->iface);
    else
      snprintf(options, sizeof(options), "?serial=%s", sern);
  }
....
--
And where is an encoding of serial number? In my case you are simply "sprintf"
the result of usb_get_string_simple without any encoding.

2. I *see* printer in output of backend, but I *don't see* this printer in web-interface. How to debug it?

My second printer (Canon Selphy CP750) has no 'dot' in serial number and I
see it both in web interface and in output from usb backend.

On Tue, Sep 29, 2009 at 09:45:56AM -0700, Michael Sweet wrote:
> 
> [STR Closed w/o Resolution]
> 
> Um, the dot in the serial number doesn't matter, and we *do* URI-encode
> characters that are not otherwise allowed in a URI already.
> 
> Link: http://www.cups.org/str.php?L3348
> Version: 1.4.1
> Fix Version: None





More information about the cups-devel mailing list