Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830015 - net-print/hplip-3.20.11-r2 no longer detects HP Color Laser MFP 179fnw scanner
Summary: net-print/hplip-3.20.11-r2 no longer detects HP Color Laser MFP 179fnw scanner
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-26 17:41 UTC by Benny Lønstrup Ammitzbøll
Modified: 2021-12-28 10:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info.txt,6.27 KB, text/plain)
2021-12-26 17:43 UTC, Benny Lønstrup Ammitzbøll
Details
hp-check -t (hp-check.txt,10.39 KB, text/plain)
2021-12-26 17:44 UTC, Benny Lønstrup Ammitzbøll
Details
dumpcap -f "port 5353" output (wireshark_wlan02LYSE1.pcapng,1.74 KB, application/x-pcapng)
2021-12-27 15:36 UTC, Benny Lønstrup Ammitzbøll
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benny Lønstrup Ammitzbøll 2021-12-26 17:41:19 UTC
I am no longer able to detect my HP Color Laser MFP 179fnw scanner after doing emerge update. It was working just a few weeks ago. In /usr/portage/net-print/hplip/ I can see that hplip-3.20.11-r2 is the oldest version available, so I can't even try to roll back to an older version..

Printing works (via cups). I have tried to delete the printer from cups and use hp-setup 10.0.0.157 to configure it, but it does not work.

hp-probe -bnet fails to detect it.

hp-setup 10.0.0.157 fails.

Note: avahi-discover-standalone can detect it. 

Reproducible: Always
Comment 1 Benny Lønstrup Ammitzbøll 2021-12-26 17:43:25 UTC
Created attachment 760219 [details]
emerge --info
Comment 2 Benny Lønstrup Ammitzbøll 2021-12-26 17:44:40 UTC
Created attachment 760220 [details]
hp-check -t
Comment 3 Jonas Stein gentoo-dev 2021-12-26 19:20:13 UTC
If you want to test it again with the old ebuild, you can restore the old ebuild from the mirror https://github.com/gentoo/gentoo for example.
Comment 4 Benny Lønstrup Ammitzbøll 2021-12-26 19:29:08 UTC
(In reply to Jonas Stein from comment #3)
> If you want to test it again with the old ebuild, you can restore the old
> ebuild from the mirror https://github.com/gentoo/gentoo for example.

Hm, ok, but last change in hplip was done Nov. 21? Definitely had my scanner working after that and I do emerge update almost daily.
Comment 5 Benny Lønstrup Ammitzbøll 2021-12-27 15:36:23 UTC
Created attachment 760582 [details]
dumpcap -f "port 5353" output

Using dumpcap/wireshark I looked at the packet flow when using hp-setup.

hp-setup using SLP: An SLP request is sent out, but no reply is seen.

hp-setup using mDNS/Bonjour: See attached wireshark_wlan02LYSE1.pcapng file. The printer/scanner replies to the query, but hp-setup sends 2 more queries as if it does not get the response or does not like/understand it?

hp-setup using Avahi: Fails immediately. Console shows error "Failed to create client object: Daemon not running". Ok, after starting the avahi-daemon I see MDNS query+response packets, but hp-setup dies with:

Searching... (bus=net, timeout=5, ttl=4, search=(None) desc=0, method=avahi)
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1340, in NextButton_clicked
    self.showDevicesPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 565, in showDevicesPage
    self.devices = device.probeDevices([self.bus], self.timeout, self.ttl,
  File "/usr/share/hplip/base/device.py", line 497, in probeDevices
    detected_devices = avahi.detectNetworkDevices(ttl, timeout)
  File "/usr/share/hplip/base/avahi.py", line 63, in detectNetworkDevices
    log.debug("ip=%s hn=%s ty=%s" %(ip,y['hn'], y['mdns']))
KeyError: 'mdns'
Comment 6 Benny Lønstrup Ammitzbøll 2021-12-27 15:56:17 UTC
This is the line /usr/share/hplip/base/avahi.py gets from the printer (that starts with '='):

=;wlan0;IPv4;HPB0227A5494EE\032\040HP\032Color\032Laser\032MFP\032178\032179\041;_printer._tcp;local;HPB0227A5494EE.local;10.0.0.157;515;"rfo=ipp/faxout" "Staple=F" "Sort=F" "Fax=T" "Scan=T" "Punch=0" "PaperMax=legal-A4" "PaperCustom=T" "Duplex=F" "Copies=T" "Color=T" "Collate=F" "Bind=F" "kind=document,envelope,label" "MDL=HP Color Laser MFP 179fnw" "MFG=HP" "usb_CMD=MFG:HP;CMD:SPLC,URF,FAX,FWV,PIC,RDS,AMPV,PWGRaster,EXT;PRN:4ZB97A;MDL:HP Color Laser MFP 178 179;CLS:PRINTER;CID:HPLJPCLMSV1;MODE:FAX3,SCN,SPL5,R000102;" "usb_MDL=HP Color Laser MFP 179fnw" "usb_MFG=HP" "adminurl=http://HPB0227A5494EE.local./sws/index.html?link=/sws/app/settings/network/AirPrint/AirPrint.html" "pdl=application/octet-stream,application/x-COLOR-GDI,image/jpeg,image/urf,application/PCLm" "product=(HP Color Laser MFP 179fnw)" "priority=49" "qtotal=1" "rp=auto" "ty=HP Color Laser MFP 178 179" "note=" "txtvers=1"

The details = bits[9].split('" "') part of that line is:

"rfo=ipp/faxout" "Staple=F" "Sort=F" "Fax=T" "Scan=T" "Punch=0" "PaperMax=legal-A4" "PaperCustom=T" "Duplex=F" "Copies=T" "Color=T" "Collate=F" "Bind=F" "kind=document,envelope,label" "MDL=HP Color Laser MFP 179fnw" "MFG=HP" "usb_CMD=MFG:HP;

Note how the "ty" key is not found here, but in bits[16]:

" "usb_MDL=HP Color Laser MFP 179fnw" "usb_MFG=HP" "adminurl=http://HPB0227A5494EE.local./sws/index.html?link=/sws/app/settings/network/AirPrint/AirPrint.html" "pdl=application/octet-stream,application/x-COLOR-GDI,image/jpeg,image/urf,application/PCLm" "product=(HP Color Laser MFP 179fnw)" "priority=49" "qtotal=1" "rp=auto" "ty=HP Color Laser MFP 178 179" "note=" "txtvers=1"
Comment 7 Benny Lønstrup Ammitzbøll 2021-12-27 16:23:28 UTC
Possible clue here for MDNS with hp-probe -bnet -mmdns -ldebug :

hp-probe[22323]: debug: Found 1 devices
hp-probe[22323]: debug: Cache miss: hp_color_laser_mfp_179fnw
hp-probe[22323]: debug: Reading file: /usr/share/hplip/data/models/models.dat
hp-probe[22323]: debug: Searching for section [hp_color_laser_mfp_179fnw] in file /usr/share/hplip/data/models/models.dat
Comment 8 Benny Lønstrup Ammitzbøll 2021-12-27 16:54:55 UTC
With this hack hp-setup was able to "detect" the printer (but only printer, not scanner):

/usr/share/hplip/base/models.py

    def __getitem__(self, model):
        model = model.lower()
        # hack:
        if model == "hp_color_laser_mfp_179fnw":
            model = "hp_colorlaserjet_mfp_m178-m181"
Comment 9 Benny Lønstrup Ammitzbøll 2021-12-27 17:27:39 UTC
Tried to copy old versions of /usr/share/hplip from my backup going months back - no luck. So I think something else must have been changed/updated, but I have no clue what it could be?

I am thinking this is the problem:

hp-probe[32167]: debug: Found 1 devices
hp-probe[32167]: debug: Cache miss: hp_color_laser_mfp_179fnw
hp-probe[32167]: debug: Reading file: /usr/share/hplip/data/models/models.dat
hp-probe[32167]: debug: Searching for section [hp_color_laser_mfp_179fnw] in file /usr/share/hplip/data/models/models.dat

It is unable to find "hp_color_laser_mfp_179fnw" in models.dat, but that would also be the case in earlier versions of hplip? The printer's system firmware version says JAN-27-2021, so I don't think the printer firmware has changed.

Please let me know if there is anything I can provide or try out to help debug this.
Comment 10 Benny Lønstrup Ammitzbøll 2021-12-28 10:26:12 UTC
Fixed the problem. I downloaded the printer/scanner driver again from https://support.hp.com/vn-en/drivers/selfservice/hp-color-laser-mfp-170-printer-series/24494365/model/24494369 (uld-hp_V1.00.39.12_00.15.tar.gz).

Running an install said both printer and scanner driver was already installed and had no effect. So I did an uninstall and then install again and that fixed the problem. So it seems something in the emerge updates wiped something that is now fixed by a reinstall of the driver.