Unable to communicate with device (code=12) when connected via wlan

Bug #521909 reported by Paul
34
This bug affects 8 people
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned
hplip (Debian)
Fix Released
Unknown

Bug Description

Installing my Officejet 6315 All-in-one with "HPLIP Toolbox" on a new install of Ubuntu 9.10x64 on my laptop and adding the hplip-cups package, as suggested in Bug #459275, I got an error message stating that hplip cannot connect to printer. Also hplip in the systray showed a "Device communication error".

Starting hp-systray from a terminal I got:
"error: Unable to communicate with device (code=12): hp:/net/Officejet_6300_series?zc=HP75A2A8"

The connection worked fine when I connected my laptop via LAN. It did not work when the laptop was connected via WLAN. The printer was always connected via LAN.

I could solve the problem changing the URI of the printer via System->Systemverwaltung->Drucker (english probably System->Administration->Printer) to

hp:/net/Officejet_6300_series?ip=192.168.1.2

and restarting hp-systray. (192.168.1.2 is the fixed ip-address assigned to my printer)

Revision history for this message
sam chan (schan-cs) wrote :

looks like host look up problem.

is avahi-daemon running? if not, start it up and see if it helps.

Revision history for this message
Chris Olive (chris46310) wrote :

I have the same problem only with an HP photo-smart 4500 and Ubuntu 10.4, I had hoped that upgrading from 9.10 would cure this problem but no joy.
Again it works fine over USB.
avai is running.
Spooled jobs print at once when the USB cable is connected, but not over Wi-Fi.
Have tried installing all HP add-ons.
Any ideas?

Revision history for this message
Jeff Turner (jeffturner) wrote :

I had the same problem on Ubuntu 10.4, hplip 3.10.2. The HP Device Manager initially reports "No Installed HP Devices Found". After clicking "Setup Device" and picking the "Network/Ethernet/Wireless" connection type, it quickly detects my HP Officejet printer with device URI 'hp:/net/Officejet_6500_E709n?zc=HP15208D'. However clicking "Next" causes it to pause and eventually return "Unable to communicate with the device. Please check the device and try again."

Thanks to Sam's hint, I found avahi-daemon was installed but disabled:

$ sudo status avahi-daemon
avahi-daemon stop/waiting

This seems to be the default situation on Ubuntu 10.4. After turning avahi on:

$ sudo start avahi-daemon
avahi-daemon start/running, process 26405

I clicked 'Retry', and the setup completed.

Perhaps the hplip package should be enabling avahi-daemon if it requires its functionality?

The OP reported getting it working through System -> Administration -> Printing. This works because a network printer added this way has a device URI something like 'hp:/net/Officejet_6500_E709n?ip=192.168.0.120': note 'ip' instead of 'zc', so avoiding the lack of zeroconf services provided by avahi-daemon. Incidentally for anyone using System -> Administration -> Printing, be sure to avoid 'AppSocket/HP JetDirect' - the HP Device Manager will completely ignore such devices even if they work for printing. Under 'Network Printer', if you wait a bit or click 'Find Network Printer', your printer should eventually appear, and that is the one to use.

Revision history for this message
Chris Olive (chris46310) wrote : Re: [Bug 521909] Re: Unable to communicate with device (code=12) when connected via wlan

On 07/27/2010 08:26 AM, Jeff Turner wrote:
> sudo start avahi-daemon
> avahi-daemon start/running, process 26405
Thanks for that I tried it and got "already running". Bought another
printer very cheap and use USB.
Thanks again
C

Revision history for this message
craig tewsley (craig-tewsley) wrote :

when selecting from USB / Wired /WILAN I couldn't get it to work until I went:

-Advanced Options
--Discovery method
---SLP

After that once I clicked next after finding my CM1312 I was able to configure properly. If I went with mDNS/Bonjour I got error 12

Revision history for this message
Roger (rogerx-oss) wrote :

Ditto. I kept running into this mysterious fluke (code=12 error) and a search on Google kept getting me no answers.

But then, clicking the advanced button after running hp-setup, and realizing the two lookup options were "mDNS/Bonjour" which is Avahi (I do not have installed here as I'm a minimalist) and SLP (Service Location Protocol) which seems to be the standard lookup method when using CUPS for printers.

Long story short, "mDNS" is the default lookup method when using hp-setup. The default should likely instead be "SLP", unless other wise stated on the second lookup or second user action on hp-setup.

Maybe a better solution would be to unhide the advanced menu within hp-setup GUI, or this option, and then putting in a comment stating, "Choose this if you use CUPS" and "Choose this if you use Avahi"?

Revision history for this message
Szymon Wartak (szymon-wartak) wrote :

my avahi-daemon is already running and I experienced the same issue. Restart (sudo restart avahi-daemon) solved the issue.

Revision history for this message
Ron Schwiesow (nanron62) wrote :

Observations consistent with previous posters. Same problem here with hplip 3.11.10 and Debian squeeze on a wired ethernet install of Officejet 7000. Worked previously with a CUPS install, but I wanted ink-level reporting with hplip. Repeated install tries with hp-setup gave "unable to communicate with device (code=12)." Solution or workaround came from a search that gave the suggestion for hp-setup of >show advanced options>manual discovery>show device URI with ip not zc. The ip came from the Network Configuration Page printed from the printer, so the network was up and known by the printer. This proves that this is a hplip software problem, at least to me. Perhaps start avahi-daemon would work for me, but this is beyond my current skill set.

Revision history for this message
Lee Hansen (lee-earthcookie) wrote :

I am on Kubuntu 11.04 and have an HP Officejet 6500 that was working until I accidentally uninstalled it. When trying to reinstall I kept getting the "Unable to communicate" error. Finally after exhausting every possibility I started mucking around with the hp command line utils and got it all working with: hp-setup 192.168.55.254 which I am guessing skips the SLP / mDNS stuff and just plunks it into the hplip conf.

Revision history for this message
ArashRouhani (tarrasch) wrote :

@nanron62: To restart avahi-deamon you issue the command `sudo service avahi-daemon restart`. Generally, every service X can be restarted with `sudo service X restart`. If you don't know exactly how X is spelled, there exists very smart tab-completion. :)

Oh and yes, restarting avahi-deamon worked for me too! :)

Revision history for this message
Stemby (carlo-stemberger) wrote :

Here is my workaround on Debian Wheezy:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687395

Regards,
Carlo

Changed in hplip (Debian):
status: Unknown → Confirmed
Changed in hplip (Debian):
status: Confirmed → Fix Released
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.