Vieri l33t
Joined: 18 Dec 2005 Posts: 874
|
Posted: Thu Mar 20, 2014 10:18 am Post subject: CUPS USB device URI |
|
|
Hi,
I'm trying to figure out the format of a CUPS USB device URI.
If I setup a printer via CUPS web admin then I can see it usually creates a URI like so:
Code: | usb://HP/LaserJet%20Professional%20P1606dn?serial=000000000QA7618NPR1a |
I also noticed that the serial value can be found with this method:
Code: |
c_usb_serial=$( lsusb -d "${prn_vendor}:${prn_product}" -v | grep iSerial )
c_usb_serial=${c_usb_serial##* }
|
where
prn_vendor=0x03f0
prn_product=0x0a2a
First of all, will the vendor and product IDs (0x03f0:0x0a2a) always be the same for a given brand and model (I guess so)?
I'd also like to know if there's any other way of specifying a USB device URI instead of passing it the ?serial= parameter.
Is there anything else I could use?
I also tried to setup the URI usb://HP/LaserJet%20Professional%20P1606dn since the client will only be using 1 printer but it doesn't seem to work (no printing).
I'd also like to know why the serial number given by lsusb differs from the one on the product label.
Thanks,
Vieri |
|