Cannot add an existing HP scanner to a 2nd Linux computer.

Bug #1760593 reported by Hans Deragon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
In Progress
Undecided
Unassigned

Bug Description

I have a HP-OfficeJet-Pro-6978 already setup with one computer, printing and scanning works well with it.

I want to add the already configured HP-OfficeJet-Pro-6978 to another laptop. However, hp-setup 192.168.1.157 fails, not finding it. why is that? I successfully added the device as a printer using the OS printer dialog (system-config-printer), but I fail to find a mean to add it as a scanner on the laptop. Why can't hp-setup simply connect to it and configure it as a scanner? I do not want to set it up with a USB cable nor should I, since it is already on the Wifi network, configured and working. hp-setup should simply connect to it.

The following ports are opened on the device :

Testing with nc -zv 192.168.1.157 1-65535
Connection to 192.168.1.157 80 port [tcp/http] succeeded!
Connection to 192.168.1.157 443 port [tcp/https] succeeded!
Connection to 192.168.1.157 631 port [tcp/ipp] succeeded!
Connection to 192.168.1.157 3910 port [tcp/*] succeeded!
Connection to 192.168.1.157 3911 port [tcp/*] succeeded!
Connection to 192.168.1.157 5355 port [tcp/hostmon] succeeded!
Connection to 192.168.1.157 8080 port [tcp/http-alt] succeeded!
Connection to 192.168.1.157 9100 port [tcp/*] succeeded!
Connection to 192.168.1.157 9220 port [tcp/*] succeeded!
Connection to 192.168.1.157 53048 port [tcp/*] succeeded!

Thank you,
Hans Deragon
<email address hidden>

Revision history for this message
brian_p (claremont102) wrote :

Hello Hans,

What does 'scanimage -L' from both laptops give?

Cheers,

Brian.

Changed in hplip:
status: New → In Progress
Revision history for this message
brian_p (claremont102) wrote :

> Why can't hp-setup simply connect to it and configure it as a scanner?

From hp-setup(1):

   Installs HPLIP printers and faxes in the CUPS spooler.

Perhaps it is because hp-setup doesn't claim to do what your imagination says it should do.

Cheers,

Brian.

Revision history for this message
Hans Deragon (deragon) wrote :

Desktop computer (the one with which the MFC was configured with):

  $ scanimage -L
  device `hpaio:/net/OfficeJet_Pro_6970?ip=192.168.1.157' is a Hewlett-Packard OfficeJet_Pro_6970 all-in-one
  device `brother3:net1;dev0' is a Brother MFC-J615W MFC-j615w

Laptop which cannot find the MFC on the same Wifi network:

  $ scanimage -L
  device `brother3:net1;dev1' is a Brother MFC-J615W MFC-j615w
  device `brother3:net1;dev0' is a Brother MFC-J615W MFC-j615w-USB

Notes:

- I ran 'scanimage -L' as root, just to ensure that there would be no permission problems. It is overkill, I admit, but lets eliminate all possible obstacles.

- The Brother MFC-J615W is no more connected to the network; it has been replaced by the HP OfficeJet Pro 6978.

hp-setup was used to configure the MFC, including its scanner. If hp-setup has nothing to do with the scanner setup, what configured the desktop to recognize the scanner?

Printers have 'system-config-printer' to add, manage and remove printers. IMHO, 'system-config-scanner' is missing to do the same for scanners.

Thanks for your help, Brian.

Revision history for this message
brian_p (claremont102) wrote :

The only thing needed for the scanning function to work from the desktop is to get its device URI. This is done by libsane-hpaio and its dependencies. The URI is formed from what is obtained from the dns-sd broadcasts of the OfficeJet Pro 6970 and an entry for it in /usr/share/hplip/data/models/models.dat. /etc/sane.d/dll.d/hplip contains "hpaio" and running something like xsane should just work.

I would check that these conditions are met by the laptop. sds-sd broadcasts can be examined with avahi-browse.

Not too important, but note that permissions are not needed for network discovery, only for USB.

Cheers,

Brian.

Revision history for this message
Hans Deragon (deragon) wrote :

This is what I got:

Laptop (scanner not discovered):

$ avahi-browse --all --terminate | fgrep OfficeJet | fgrep -i scan
+ wlo1 IPv6 HP OfficeJet Pro 6970 [C363F1] _uscans._tcp local
+ wlo1 IPv4 HP OfficeJet Pro 6970 [C363F1] _uscans._tcp local
+ wlo1 IPv6 HP OfficeJet Pro 6970 [C363F1] _uscan._tcp local
+ wlo1 IPv4 HP OfficeJet Pro 6970 [C363F1] _uscan._tcp local
+ wlo1 IPv6 HP OfficeJet Pro 6970 [C363F1] _scanner._tcp local
+ wlo1 IPv4 HP OfficeJet Pro 6970 [C363F1] _scanner._tcp local

Desktop (scanner working):

$ avahi-browse --all --terminate | fgrep OfficeJet | fgrep -i scan
+ br0 IPv6 HP OfficeJet Pro 6970 [C363F1] _uscans._tcp local
+ br0 IPv4 HP OfficeJet Pro 6970 [C363F1] _uscans._tcp local
+ br0 IPv6 HP OfficeJet Pro 6970 [C363F1] _uscan._tcp local
+ br0 IPv4 HP OfficeJet Pro 6970 [C363F1] _uscan._tcp local
+ br0 IPv6 HP OfficeJet Pro 6970 [C363F1] _scanner._tcp local
+ br0 IPv4 HP OfficeJet Pro 6970 [C363F1] _scanner._tcp local

There was a lot of output which I believe was not relevant, thus I filtered the output. If I am wrong, tell me what I should be looking for.

/etc/sane.d/dll.d/hplip on both machines are the same.

$ cat /etc/sane.d/dll.d/hplip
# dll.conf snippet for hplip
#

hpaio

However...

Laptop (scanner not discovered):

$ fgrep 697 /usr/share/hplip/data/models/models.dat
[deskjet_697]
model1=HP Deskjet 697c Printer

Desktop (scanner working):

$ /usr/share/hplip/data/models/models.dat
[deskjet_697]
model1=HP Deskjet 697c Printer
[officejet_pro_6970]
model1=HP OfficeJet Pro 6970 All-in-One
model2=HP OfficeJet Pro 6975 All-in-One
model3=HP OfficeJet Pro 6978 All-in-One

Could this be the problem? But how would a normal average, non technical user have this file setup properly? What official, user friendly tool (ideally GUI) could be use to set things correctly?

Thanks for your help, Brian.

Revision history for this message
brian_p (claremont102) wrote :

> There was a lot of output which I believe was not relevant,
> thus I filtered the output. If I am wrong, tell me what I
> should be looking for.

You believed correctly. We were only after finding out whether the laptop saw the Bonjour broadcasts.

> Could this be the problem?

Definitely. (Famous last words :) )

> But how would a normal average, non technical user have this
> file setup properly? What official, user friendly tool (ideally
> GUI) could be use to set things correctly?

There is never any need for such a user to touch this file or even know it exists. On Debian it comes in the libsane-hpaio package and just gets installed. The HPLIP team keep it up-to-date for each release. Here I have libsane-hpaio 3.16.11 and it has the officejet_pro_6970 as an entry. Only you would know (or be able to guess) why your desktop and laptop versions differ.

Copying the desktop file over to the laptop should fix your problem. Please let us know if it does.

Cheers,

Brian.

Revision history for this message
Hans Deragon (deragon) wrote :

Ok, copying models.dat from the desktop (which worked) to the laptop (which didn't work) made scanning possible. It resolved my problem (but not this issue).

Question remains, why the models.dat on my laptop was not the latest? Now, I do not recall how I installed hplip, but both my desktop and laptop have version 3.16.3+repack0-1 installed. I installed it months ago and lived with the scanning problem, and unfortunately, time erased my memory.

I believe that I downloaded hplip from https://developers.hp.com/hp-linux-imaging-and-printing/gethplip, pretty sure for the desktop, not sure for the laptop. But since the versions are the same on both machines, it looks like I installed hplip from the same downloaded package. It would fit my normal behavior.

If models.dat is already installed and a new version of hplip gets installed, is models.dat replaced? I expect so, but I must ask.

Any hope to figure out what went wrong?

Final note; curiously, when I only copied manually the section of models.dat that are related to my MFP to the old version of models.dat, it did not work. It only worked when I copied the whole file to the laptop. Thank you for your help.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.