apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.94k stars 464 forks source link

Cannot connect HP Color Laser MFP 178nw over local network #6031

Open martinellison opened 2 years ago

martinellison commented 2 years ago

I have been unable to set up an HP colour laser printer. Please advise.

The printer is connected over the LAN and I can ping it without issues.

edit 1: There is a line in the model list: lsb/usr/HP/hp-color_laserjet_mfp_m178-m181-ps.ppd.gz HP ColorLaserJet MFP M178-M181 Postscript; can I use this somehow in CUPS?

edit 2: I can see that this might be really a firewall problem. It seems that Fedora replaced their old firewall by a new 'easy to understand' firewall and I have no idea what to do to get it working (or, even, whether this is a firewall issue at all). If you can help it would be good, at least by telling me whether it is really a firewall issue and if so who could help me.

HP Setup gives: (adding the IP address gives similar results).

~> hp-setup

HP Linux Imaging and Printing System (ver. 3.22.2)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Searching... (bus=net, timeout=5, ttl=4, search=(None) desc=0, method=slp)
error: No devices found on bus: net
error:  HPLIP cannot detect printers in your network.  This may be due to existing firewall settings blocking the required ports.
                When you are in a trusted network environment, you may open the ports for network services like mdns and slp in the firewall. For detailed steps follow the link.
                 https://developers.hp.com/hp-linux-imaging-and-printing/KnowledgeBase/Troubleshooting/TroubleshootNetwork  
Searching on USB bus...
error: No devices found on bus: usb
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 4129, resource id: 8502198, major code: 40 (TranslateCoords), minor code: 0

SNMP gives:

~> CUPS_DEBUG_LEVEL=2  /usr/lib/cups/backend/snmp @LOCAL >~/tmp/snmp.txt
DEBUG: Scanning for devices in "public" via "@LOCAL"...
DEBUG: Sending get request to 192.168.122.255...
DEBUG: OUT Hex Dump (43 bytes):
DEBUG: OUT 0000: 30 29 02 01  00 04 06 70  75 62 6c 69  63 a0 1c 02    0).....public...
DEBUG: OUT 0010: 01 01 02 01  00 02 01 00  30 11 30 0f  06 0b 2b 06    ........0.0...+.
DEBUG: OUT 0020: 01 02 01 19  03 02 01 02  01 05 00                    ...........
DEBUG: OUT Message:
DEBUG: OUT SEQUENCE 41 bytes
DEBUG: OUT     INTEGER 1 bytes 0
DEBUG: OUT     OCTET STRING 6 bytes "public"
DEBUG: OUT     Get-Request-PDU 28 bytes
DEBUG: OUT         INTEGER 1 bytes 1
DEBUG: OUT         INTEGER 1 bytes 0
DEBUG: OUT         INTEGER 1 bytes 0
DEBUG: OUT         SEQUENCE 17 bytes
DEBUG: OUT             SEQUENCE 15 bytes
DEBUG: OUT                 OID 11 bytes .1.3.6.1.2.1.25.3.2.1.2.1
DEBUG: OUT                 NULL VALUE 0 bytes
DEBUG: Sending get request to 192.168.98.255...
DEBUG: OUT Hex Dump (43 bytes):
DEBUG: OUT 0000: 30 29 02 01  00 04 06 70  75 62 6c 69  63 a0 1c 02    0).....public...
DEBUG: OUT 0010: 01 01 02 01  00 02 01 00  30 11 30 0f  06 0b 2b 06    ........0.0...+.
DEBUG: OUT 0020: 01 02 01 19  03 02 01 02  01 05 00                    ...........
DEBUG: OUT Message:
DEBUG: OUT SEQUENCE 41 bytes
DEBUG: OUT     INTEGER 1 bytes 0
DEBUG: OUT     OCTET STRING 6 bytes "public"
DEBUG: OUT     Get-Request-PDU 28 bytes
DEBUG: OUT         INTEGER 1 bytes 1
DEBUG: OUT         INTEGER 1 bytes 0
DEBUG: OUT         INTEGER 1 bytes 0
DEBUG: OUT         SEQUENCE 17 bytes
DEBUG: OUT             SEQUENCE 15 bytes
DEBUG: OUT                 OID 11 bytes .1.3.6.1.2.1.25.3.2.1.2.1
DEBUG: OUT                 NULL VALUE 0 bytes

snmpwalk gives (among many lines):

~> snmpwalk -Cc -v 1 -c public  192.168.0.158  
SNMPv2-MIB::sysDescr.0 = STRING: HP Color Laser MFP 178 179; V3.82.01.12     JAN-27-2021;Engine V1.00.14 2019-03-04;NIC V6.01.01;S/N CNB2PD6XW9
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.11.2.3.9.1
...
HOST-RESOURCES-MIB::hrSWInstalledName.1 = STRING: "HP Color Laser MFP 178nw Main, V3.82.01.12     JAN-27-2021"
HOST-RESOURCES-MIB::hrSWInstalledName.2 = STRING: "HP Color Laser MFP 178nw Engine, V1.00.14 2019-03-04"
HOST-RESOURCES-MIB::hrSWInstalledName.3 = STRING: "HP Color Laser MFP 178nw Emulation, PCL5e 7.45 02-04-2015"
HOST-RESOURCES-MIB::hrSWInstalledName.4 = STRING: "HP Color Laser MFP 178nw Emulation, V11.73_190212"
HOST-RESOURCES-MIB::hrSWInstalledName.5 = STRING: "HP Color Laser MFP 178nw Emulation, V11.73_190212"
HOST-RESOURCES-MIB::hrSWInstalledName.6 = STRING: "HP Color Laser MFP 178nw Emulation, V11.73_190212"
HOST-RESOURCES-MIB::hrSWInstalledName.7 = STRING: "HP Color Laser MFP 178nw Emulation, V11.73_190212"
HOST-RESOURCES-MIB::hrSWInstalledName.8 = STRING: "HP Color Laser MFP 178nw Emulation, V11.73_190212"
...
SNMPv2-SMI::mib-2.43.5.1.1.16.1 = STRING: "HP Color Laser MFP 178nw"
SNMPv2-SMI::mib-2.43.5.1.1.17.1 = STRING: "CNB2PD6XW9"
martinellison commented 2 years ago

Does anyone look at these issues?

hannemann commented 2 years ago

@martinellison I got it working on Fedora 36. I deleted the printer in the gnome settings and than used the CUPS web frontend to configure a new one.

Hope this helps

Edit: Scanner just worked with Simple Scan