There are two methods to ask a printer to identify itself:

1. lsusb

2. The IEEE-1284 device ID, on USB requested via IOCTLs, see the
following simple programs

http://www.linuxprinting.org/download/printing/usb_id_test.c
http://www.linuxprinting.org/download/printing/getusbprinterid.pl

both to be called with "<program name> /dev/usblp0".

The second method is also available for parallel printers, use

cat /proc/sys/dev/parport/parport*/autoprobe*

to obtain the device IDs for the printer(s) on the parallel port(s).

Unfortunately, the firmware of some printers is not consistent and gives
two different results with the different methods.

lsusb sometimes does not give manufacturer/model info at all whereas the
device ID always gives manufacturer/model info and if the device IDs of
two printers are equal, they accept exactly the same info and therefore
work with the same driver and PPD. Therefore, when using only one of the
two methods it is more reliable to assign the correct driver to a
printer when polling the device ID.

The numerical vendor/product IDs, which lsusb reads out are completely
unsuitable for printers, as for example nearly all Epson printers have
the same vendor/product IDs. Therefore I switched the printer detection
from vendor/product IDs to the IEEE-1284 device ID in Mandriva Linux
(printerdrake) years ago.

CUPS and HPLIP use IEEE-1284 device IDs and modern Linux distributions
usually detect printers through CUPS (and this triggers also detection
through HPLIP, due to HPLIP's CUPS backend "hp").

In your case of HP printers every HP printer is sold in different
flavours for different markets. The hardware of a series of printers is
equal, but they come with different Windows toys or different input
voltages. HP gives similar model names, like DeskJet 5100 and DeskJet
5160. The IEEE-1284 device IDs are the same in such a case (for example
"DeskJet 5100 series").

The problem is only cosmetic, as all printers of such a series work with
the same driver. So your 5150 will work without problems.

The only solution for this bug report would be to probe every detected
printer also with "lsusb" and if there is manufacturer/model info use
this only for the menu/list entry and use the IEEE-1284 device ID only
for selecting the correct PPD/driver. Or one simply adds a text like the
following to the auto-detection results list in the printer setup tools:

Note: Printers do not necessarily identify themselves with the model
name as specified on the printer's case, but the precision of the self
identification is sufficient for selecting the correct driver.

-- 
HP Deskjet 5150 shows up as an HP Deskjet 5100 in various places
https://launchpad.net/bugs/79607

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to