Bug 556016

Summary: HP OfficeJet 7310 connected via network doesn't work
Product: [openSUSE] openSUSE 11.2 Reporter: Dmitry Golub <nucleo701>
Component: PrintingAssignee: Johannes Meixner <jsmeix>
Status: RESOLVED FEATURE QA Contact: Johannes Meixner <jsmeix>
Severity: Normal    
Priority: P5 - None CC: forgotten_--EoyBps8f, forgotten_x7Ms9HcTTQ, icebike
Version: Final   
Target Milestone: Future 11.3   
Hardware: Other   
OS: openSUSE 11.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Dmitry Golub 2009-11-17 02:49:01 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4) Gecko/20091016 SUSE/3.5.4-1.1.2 Firefox/3.5.4

Printing only works when setting it up in Yast, test page is going throuth, but non of KDE4 apps prints. HPLIP shows device status as "Communication error 5012".
Printer is HP All in one device: OfficeJet 7310, connected over network.
It was working in previous release: 11.1. 

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Actual Results:  
Start -> System -> Monitor -> HP-Tool Box (HP device Manager), click on it, HP-Tool Box appears in sys tray, then right click on it -> Device Manager, the HP Device Manager window appears, every device in window has red cross on it, and notification appears saying: HPLIP Device Status: Device Communication Error, code 5012.

Expected Results:  
It should show status of the device, ink, how manyh jobs in queue. When trying to print, dialog box shows configured printer, but nothing happens after clicking: Print.
Comment 1 Johannes Meixner 2009-11-17 08:31:57 UTC
If the device was connected via USB it would have
been a duplicate of bug #542473.

But in your case it is connected via network.

On the other hand when printing the test page from
YaST works it indicates that printing works in any
case because even if the test page print job was
submitted by root who runs YaST, the processing of
the print job happens as any other print job by
the cupsd and various filters which run as user "lp"
so that also any normal user should be able to print.

Test this as normal user via
lp -d <queue_name> /usr/share/YaST2/data/testprint.ps


In contrast to plain printing when a normal user
who runs hp-toolbox wants to get the device state,
the normal user needs write permissions to the device
to send the device state query to the device and
additionally the normal user needs read permissions
to get the device state data from the device.

When the device is connected via network, a running
firewall allows by default outgoing network connections
so that plain printing could work but the firewall does
by default not allow incomming network stuff so that
by default device state should not work.

When the device is connected via network, plain printing
happens usually via port 9100 but device state happens
usually via SNMP queries so that a firewall may not allow
incomming SNMP stuff.

Furthermore the up-to-date HPLIP has mDNS/Bonjour support
(ports 5353 and 427) so that this may additionally
have to be allowed in a firewall.

There is a /etc/sysconfig/SuSEfirewall2.d/services/hplip
to allow mDNS/Bonjour support in the Suse Firewall.

To verify if a firewal is the reason, disable a possibly
running firewall and test if it works then.
Comment 2 john andersen 2009-11-17 20:19:41 UTC
In my case, I was trying to access a HP Officejet 7310xi (network attached).
hp-setup did not find the device initially.
Hp-Toolbox, run as user could not find any devices via scanning.

I was able to direct it to to the device with the option titled "manual scan" by providing the ip and port (9100) of the device.

At that point I was able to print and fax, but not scan.

A day later I decided to see if this was a firewall issue.  I used the suse fireall tool in yast to allow cups, mDNS/Bonjour Support for Hplip.  
I was still not able to scan.

Other requirements dictated the installation of Samba. But still no scanner found.
Finally I added Zeroconf/Bonjour multi-cast DNS and the scanner was found.

(There is nothing in the Opensuse firewall specifically labeled SNMP.)

When you add HPLIP in Ubuntu it opens the necessary ports (I believe there was a prompt about this).  All functions of the device worked from day one on ubuntu and the device was found right away.

It would appear that had OpenSuse opened the ports (or prompted the user to do so) upon installation of HPLIP that much aggravation could be averted.

However there is an additional problem.  Scanning (xsane) only works when launched from the HP-Toolbox (hp-status service).

If Xsane is launched from the menu does not know about any scanners.  I have still not found a solution to this.

I have to say this ALL worked perfectly in Kubuntu on the very first Go!
So there are several steps needed in hplip setup that Opensuse overlooks.
Comment 3 john andersen 2009-11-17 20:29:46 UTC
Further to the above.....

Scanner was found after manually editing /etc/sane.d/dll.conf 
and Un-commenting the last line that says hpaio.

The line was in there, but commented out.
Comment 4 Johannes Meixner 2009-11-18 09:17:54 UTC
Many thanks for the detailed explanation.
Let's see what we can improve for the next openSUSE version.

By the way:
If you used the YaST scanner module, the hpaio line
in /etc/sane.d/dll.conf would have been enabled.
Comment 5 Forgotten User x7Ms9HcTTQ 2009-11-18 23:37:12 UTC
I did use Yast Scanner module, but of course it can't find the
network attached scanner until HPlip is installed, and hplip
can't find the scanner until you un-comment the hpaio line.

So it appears like a perfect catch 22 here.