hplip causes scanimage -L to return the same hp scanner as two devices

Bug #1581597 reported by Sergio Callegari
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned
hplip (Ubuntu)
New
Undecided
Unassigned

Bug Description

I have a wifi connected HP multifunction printer that includes a scanner Officejet 4500.

cups is configured to recognize this printer "by name" as in

hp:/net/Officejet_4500_G510n-z?zc=HPxxxxxx

calling scanimage -L causes the scanner associated to the printer to be returned twice, once with a by-name url and once with a by-address url, namely as

device 'hpaio:/net/Officejet_4500_G510n-z?zc=HPxxxxxx' is a Hewlett-Packard Officejet_4500_G510n-z all-in-one

device `hpaio:/net/officejet_4500_g510n-z?ip=nnn.nnn.nnn.nnn&queue=false' is a Hewlett-Packard Officejet_4500_G510n-z all-in-one

This is somehow confusing.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: hplip 3.16.3+repack0-1
ProcVersionSignature: Ubuntu 4.4.0-22.39-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: KDE
Date: Fri May 13 18:20:49 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-12-12 (882 days ago)
InstallationMedia: Kubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
MachineType: Notebook W740SU
Papersize: a4
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.4.0-22-generic root=/dev/mapper/zagar_ssd--vg-root ro quiet splash resume=/dev/zagar_hd-vg/swap_1 acpi_backlight=vendor vt.handoff=7
SourcePackage: hplip
UpgradeStatus: Upgraded to xenial on 2016-04-21 (21 days ago)
dmi.bios.date: 10/02/2013
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 4.6.5
dmi.board.asset.tag: Tag 12345
dmi.board.name: W740SU
dmi.board.vendor: Notebook
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 9
dmi.chassis.vendor: Notebook
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr4.6.5:bd10/02/2013:svnNotebook:pnW740SU:pvrNotApplicable:rvnNotebook:rnW740SU:rvrNotApplicable:cvnNotebook:ct9:cvrN/A:
dmi.product.name: W740SU
dmi.product.version: Not Applicable
dmi.sys.vendor: Notebook
---
ProblemType: Bug
ApportVersion: 2.20.9-0ubuntu7.3
Architecture: amd64
CupsErrorLog:
 E [08/Sep/2018:00:09:57 +0200] Missing value on line 2050 of /var/cache/cups/job.cache.
 E [08/Sep/2018:00:09:57 +0200] Missing value on line 3400 of /var/cache/cups/job.cache.
 E [08/Sep/2018:09:09:37 +0200] [Client 78] Returning IPP client-error-not-possible for CUPS-Add-Modify-Printer (ipp://callegar@localhost:631/printers/OfficeJet_6950) from localhost
CurrentDesktop: KDE
DistroRelease: Ubuntu 18.04
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-12-12 (1730 days ago)
InstallationMedia: Kubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
MachineType: Notebook W740SU
Package: hplip 3.17.10+repack0-5
PackageArchitecture: amd64
Papersize: a4
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.15.0-33-generic root=/dev/mapper/zagar_ssd--vg-root ro quiet splash resume=/dev/zagar_ssd-vg/swap_1 acpi_backlight=vendor vt.handoff=1
ProcVersionSignature: Ubuntu 4.15.0-33.36-generic 4.15.18
Tags: bionic
Uname: Linux 4.15.0-33-generic x86_64
UpgradeStatus: Upgraded to bionic on 2018-06-08 (91 days ago)
UserGroups: adm cdrom davfs2 dialout dip fuse lpadmin pico plugdev sambashare sudo vboxusers video xpra
_MarkForUpload: True
dmi.bios.date: 10/02/2013
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 4.6.5
dmi.board.asset.tag: Tag 12345
dmi.board.name: W740SU
dmi.board.vendor: Notebook
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 9
dmi.chassis.vendor: Notebook
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr4.6.5:bd10/02/2013:svnNotebook:pnW740SU:pvrNotApplicable:rvnNotebook:rnW740SU:rvrNotApplicable:cvnNotebook:ct9:cvrN/A:
dmi.product.family: Not Applicable
dmi.product.name: W740SU
dmi.product.version: Not Applicable
dmi.sys.vendor: Notebook
---
ProblemType: Bug
ApportVersion: 2.20.9-0ubuntu7.3
Architecture: amd64
CupsErrorLog:
 E [08/Sep/2018:00:09:57 +0200] Missing value on line 2050 of /var/cache/cups/job.cache.
 E [08/Sep/2018:00:09:57 +0200] Missing value on line 3400 of /var/cache/cups/job.cache.
 E [08/Sep/2018:09:09:37 +0200] [Client 78] Returning IPP client-error-not-possible for CUPS-Add-Modify-Printer (ipp://callegar@localhost:631/printers/OfficeJet_6950) from localhost
CurrentDesktop: KDE
DistroRelease: Ubuntu 18.04
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-12-12 (1730 days ago)
InstallationMedia: Kubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
MachineType: Notebook W740SU
Package: hplip 3.17.10+repack0-5
PackageArchitecture: amd64
Papersize: a4
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.15.0-33-generic root=/dev/mapper/zagar_ssd--vg-root ro quiet splash resume=/dev/zagar_ssd-vg/swap_1 acpi_backlight=vendor vt.handoff=1
ProcVersionSignature: Ubuntu 4.15.0-33.36-generic 4.15.18
Tags: bionic
Uname: Linux 4.15.0-33-generic x86_64
UpgradeStatus: Upgraded to bionic on 2018-06-08 (91 days ago)
UserGroups: adm cdrom davfs2 dialout dip fuse lpadmin pico plugdev sambashare sudo vboxusers video xpra
_MarkForUpload: True
dmi.bios.date: 10/02/2013
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 4.6.5
dmi.board.asset.tag: Tag 12345
dmi.board.name: W740SU
dmi.board.vendor: Notebook
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 9
dmi.chassis.vendor: Notebook
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr4.6.5:bd10/02/2013:svnNotebook:pnW740SU:pvrNotApplicable:rvnNotebook:rnW740SU:rvrNotApplicable:cvnNotebook:ct9:cvrN/A:
dmi.product.family: Not Applicable
dmi.product.name: W740SU
dmi.product.version: Not Applicable
dmi.sys.vendor: Notebook

Revision history for this message
Sergio Callegari (callegar) wrote :
Revision history for this message
gf (gf-interlinks-deactivatedaccount) wrote :

Hello Sergio,
Thank you for submitting this bug and reporting a problem with hplip. You made this bug report some time ago and Ubuntu and hplip have been updated since then.

Could you confirm that this is no longer a problem and that we can close the ticket?
If it is still a problem, are you still interested in finding a solution to this bug?
If you are, could you let us know and, in the current version, could you run the following (only once):
apport-collect 1581597
and upload the updated logs and and any other logs that are relevant for this particular issue.

Thank you again for helping make Ubuntu and hplip better.
G
[Ubuntu Bug Squad volunteer triager]

Changed in hplip:
status: New → Incomplete
Changed in hplip (Ubuntu):
status: New → Incomplete
Revision history for this message
Sergio Callegari (callegar) wrote :

Looks like I cannot anymore use printer URIs with the ?zc=HPxxxxxx instead of the ?IP=xx.yy.zz.ww syntax anymore.

Not so easy to say, because the documentation says nothing about printer uris and hplip changelogs are a bit too "terse".

If this is the case, then yes, the bug is gone... but at a cost in the sense that a useful feature is removed (now you need to instruct your AP to always give the same IP address to your printer, otherwise it will stop printing, since it can be recognized only by IP and not by product code).

Revision history for this message
Sergio Callegari (callegar) wrote :

Please ignore previous post, just found that ?zc=HPXXYYZZ URIs still work. Only my printer was sleeping and late to answer...

Thus, BUG IS STILL PRESENT as of hplip 3.17.10 (in fact 3.17.10+repack0-5).

Revision history for this message
Sergio Callegari (callegar) wrote : CurrentDmesg.txt

apport information

tags: added: apport-collected bionic
description: updated
Revision history for this message
Sergio Callegari (callegar) wrote : Dependencies.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : Locale.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : Lpstat.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : Lspci.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : Lsusb.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : PpdFiles.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : PrintingPackages.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : ProcEnviron.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : ProcModules.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : UdevDb.txt

apport information

description: updated
Revision history for this message
Sergio Callegari (callegar) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : Dependencies.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : Locale.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : Lpstat.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : Lspci.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : Lsusb.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : PpdFiles.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : PrintingPackages.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : ProcEnviron.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : ProcModules.txt

apport information

Revision history for this message
Sergio Callegari (callegar) wrote : UdevDb.txt

apport information

Revision history for this message
gf (gf-interlinks-deactivatedaccount) wrote :

Hi Sergio. Thanks for the update and the apport info. I'll look at next steps.
Take care
:)
G

Changed in hplip:
status: Incomplete → New
Changed in hplip (Ubuntu):
status: Incomplete → New
Revision history for this message
gf (gf-interlinks-deactivatedaccount) wrote :

Hi Sergio,
Thank you for taking the time to attach the updated apport information to the bug report.

In order to prepare the bug report for the programmers I need some additional information.

Can you give the exact steps to get the results you describe? For example,
1. open terminal
2. ran ... command
etc.

Also, is the printer attached to your computer directly? (for example, by USB?) Or, is it through a network?

Thanks
G

Revision history for this message
Sergio Callegari (callegar) wrote :

To reproduce:

PREREQUISITE: an HP all-in-one that is network attached (e.g. wifi).

PREMISES:

The standard procedure for installing an all in one of this sort creates a configuration where the printer connection is represented as a special URI, with an "hp://" protocol, which includes the IP address that the printer has on the network. For instance:

hp:/net/OfficeJet_6950?ip=XX.YY.ZZ.WW

This connection descriptor can be seen in the system settings or in the cups configuration web page. This URI can be also obtained using the hp-makeuri utilitiy. E.g. invoking

hp-makeuri XX.YY.ZZ.WW

returns the uri above if a printer is found at that IP address.

This is generally OK and causes no issue with the scanner detection. However, there are cases where the printer IP address cannot be fixed. This typically occurs when the printer is in a wifi network with DHCP and the person installing the printer has no control on the DHCP server. If the printer changes its IP address, with a connection descriptor like the above, the printer cannot be found anymore. To avoid this issue, the hp:// protocol also offers the possibility to describe the printer connection via its network name, which is the name the printer gets on the "local" network via bonjour/avahi.

Using

hp-makeuri network_name

returns

hp:/net/OfficeJet_6950?zc=network_name

if the printer is found on that local network name. If this uri is substituted for the first one, then the printer still works perfectly and keeps to do so even if its IP address changes. However, a glitch is triggered in the scanner search utilities, so that its scanner starts being reported twice, once by network name and once by ip address.

Practical instructions:

1) Do the standard configuration of the all in one, verify the connection URI and that it contains an IP address. Check that the all-in-one works as intended.

2) Use avahi-browse -ar (may need to be run as superuser) to browse the local network. Find one entry corresponding to the printer (there will be multiple ones). Find the 'hostname' that will be something like HPxxxxxxxxxxxx.local. Annotate the part before the .local, that is the printer name on the network.

3) run hp-makeuri HPxxxxxxxxxxxx and annotate the cups uri that will be like hp:/net/OfficeJet_6950?zc=HPxxxxxxxxxxxx

4) Open the printer configuration panel in the system settings, and update the printer connection uri to the one found at point 3.

5) Check that the printer still works.

6) run scanimage -L (or open xsane). Verify that the scanner is now reported twice. If you use sane, you'll notice that the scanner works with either entry.

Hope this is helps.

Revision history for this message
gf (gf-interlinks-deactivatedaccount) wrote :

Hello Sergio,
Thank you very much for the detailed instructions. That is wonderful! I will look at your details and let you know if I have any more questions.
Take care
:)
G

To post a comment you must log in.