I have just updated my Ubuntu and set my printer back to factory settings, after which I reinstalled my printer (same way as before) but this time I'm getting a "Device Communication error (5012)".

I googled and found this solution and several referrals to it. The issue they mention seems to be exactly mine, only the way the solution is solved gives me questions.

Neither in hp-toolbox nor hp-setup do I find a field in which I can modify the




and change the serial=XXXXXXXX to ip=192.168.0.xxx.

Does anyone have any ideas about this? Maybe I can manually edit a file? Or, in the hp-setup I did see the fields network identification/hostname, but I didn't want to mess with this as I'm not sure, as it also wouldn't change the serial= to ip=, just the name to the number.

I just realised that when i plug in my usb cable the fax and printer under hp toolbox seem to be oke. the issue under hp-check still remains though but no Device Communication error (5012).

so to me it seems like the printer is not installed as wifi but as usb, maybe it is just that that is being fixed by changing the "serial=XXXXXXXX" to "ip=192.168.0.xxx",i'm really not sure.

summary of output:

# hp-check -i

Saving output in log file: /home/matt/hp-check.log

HP Linux Imaging and Printing System (ver. 3.17.10)
Dependency/Version Check Utility ver. 15.1


Type: Printer
Device URI: hp:/usb/HP_Color_LaserJet_MFP_M477fdw?serial=VNBKKDH3WN
PPD: /etc/cups/ppd/HP-Color-LaserJet-MFP-M477fdw.ppd
**warning: Failed to read /etc/cups/ppd/HP-Color-LaserJet-MFP-M477fdw.ppd ppd file**
PPD Description: 
Printer status: printer HP-Color-LaserJet-MFP-M477fdw is idle.          
enabled since Tue 06 Mar 2018 23:07:59 CET
Required plug-in status: Installed
**error: Unable to communicate with device (code=12): 
**error: Device not found**
**error: Communication status: Failed**

Type: Fax
Device URI: hpfax:/usb/HP_Color_LaserJet_MFP_M477fdw?serial=VNBKKDH3WN
PPD: /etc/cups/ppd/HP-Color-LaserJet-MFP-M477fdw-Fax-2.ppd
**warning: Failed to read /etc/cups/ppd/HP-Color-LaserJet-MFP-M477fdw-
Fax-2.ppd ppd file**
PPD Description: 
Printer status: printer HP-Color-LaserJet-MFP-M477fdw-Fax-2 is idle.  
enabled since Tue 06 Mar 2018 23:08:05 CET
Required plug-in status: Installed
**error: Unable to communicate with device (code=12): 
**error: Device not found**
**error: Communication status: Failed**



Missing Required Dependencies
error: 'libcups2' package is missing/incompatible 
error: 'libdbus-1-dev' package is missing/incompatible 
error: 'libjpeg-dev' package is missing/incompatible 
error: 'libcups2-dev' package is missing/incompatible 
error: 'cups-bsd' package is missing/incompatible 
error: 'cups-client' package is missing/incompatible 
error: 'libcupsimage2-dev' package is missing/incompatible 
error: 'libsane-dev' package is missing/incompatible 
error: 'libsnmp-dev' package is missing/incompatible 
error: 'snmp-mibs-downloader' package is missing/incompatible 
error: 'openssl' package is missing/incompatible 
error: 'python3-pyqt4' package is missing/incompatible 
error: 'gtk2-engines-pixbuf' package is missing/incompatible 

Missing Optional Dependencies
error: 'python3-dbus.mainloop.qt' package is missing/incompatible 

Total Errors: 12
Total Warnings: 0

sorry i couldn't get the bold in the code to work?

  • so I think you have 2 threads running? This device only needed 3.15 developers.hp.com/hp-linux-imaging-and-printing/… so no need to install a newer version of hplip; ....... worth checking the hplip site before getting newer versions
    – pdc
    Mar 7, 2018 at 7:36
  • yes i do, but i kept the two questions seperate for a reason, non the less thank you for telling me this but i already did just that. but also it is ver coinfusing. the hp website also tells there is added support for ubuntu 17.10 in hplip 3.17.11. none the less there are lots of dependency issues! even now running 3.17.10, (see output hp-check -i, see added above) but apperently this is no issue! so i'll leave that as it is for now, but as said that is not my question in this thread. my question here is how to change those fields. so my pc can get contact with my printer again. Mar 7, 2018 at 11:13
  • this is rather importent to me as i believe the majority of my problems will be solved fixing this. Mar 7, 2018 at 11:14
  • Do not edit the title to say "solved". It is unnecessary. Just accept your own answer, and the question will be marked as answered/solved.
    – Thomas Ward
    Mar 7, 2018 at 16:28
  • one can't accept your own answer and yes i found in necessairy becaus of the how. a how that is generally strongly discouradged in contrast to what hp advices. so i did it with a valid reason. Rules are there for a reason i understand that, but also, sometimes rules block that what is needed ! something that seems to occur a lot what you edit. (just my humble opinion) Mar 7, 2018 at 16:30

9 Answers 9


For the record: The problem is present in 18.04 with hplip 3.17.10 .

'hp-check -i' reports

warning: 12-18.04 version is not supported. Using 12-17.04 versions dependencies to verify and install...

warning: HPLIP-Installation: Auto installation is not supported for 12 distro 18.04 version


I had the same error as mentioned above Unable to communicate with device (code=12) You would also notice that "sudo hp-check" reports errors for the scanner.

Googling that error I found a German Ubuntu page suggesting the following fix which also helped in my case (even not knowing German it is easy to follow): https://forum.ubuntuusers.de/topic/hp-deskjet-3636-device-communication-error/

So essentially you only have to run this one-liner:

sudo apt purge ippusbxd

and then unplug/replug your printer. I re-ran sudo hp-check and all errors had gone and scanning worked like a charm.


  • Solved my issue and saved my time :) Thanks Nov 12, 2022 at 18:14

My Ubuntu 18.04 LTS suddenly got the same error message. Before, the printer worked just fine for some weeks. I solved my problem by observing that the printer, an HP Color Laserjet Pro MFP M280 nw, connected over the LAN, appeared twice in the Ubuntu printer dialog:

  • HP ... M278-M281
  • HP ... M280nw_ ...

The error appeared on the first entry; the second works just fine.


This is what I did to solve it.

  1. Installed fresh install from Ubuntu 17.10:

    sudo do-release-upgrade -d
  2. Removed all references (so far I knew to find them) from /etc/cups basically sudo-ed and cleaned the entire folder out.

  3. auto-removed hplip-gui

    sudo apt remove --auto-remove hplip-gui
  4. Somewhere here I was asked to partially update Ubuntu, which afterwards showed that it became a development version of 18.04. Unfortunately I'm not sure if that was induced or just happened, and also don't know it that matters or how to find out.

  5. auto-removed hplip

    sudo apt remove --auto-remove hplip
  6. Downloaded hplip-3.17.11 from the HP website.

  7. Installed hplip-3.17.11 following the installation notes from HP website.

  8. Paid special attention to the installation notes at the beginning of the installation and followed them as such.

    8a. Software & Updates: Made sure it was on main-server.
    8b. Locked the CD-ROM by:

    eject -i 1
  9. Installed hplip-3.17.11

    cd Desktop
    sudo sh hplip-3.17.11.run

    There were no dependency problems at all!

  10. Installed printer during install via GUI.

The printer seems to be properly set -up, no communication error 5012,
via wifi, just still not found by xsane.

Update: I get an unsupported platform warning when running hp-doctor and an HPLIP error: Unable to communicate with device (code=12)


Check your groups (with groups command): lp is required for hplip, not lpadmin only. So:

# usermod -a -G lp $USER
# usermod -a -G lpadmin $USER

The latter may be excess, not sure for that. But the first is required. Keep in mind re-login is requred then.


For me the problem was the USB port. When I plugged the printer into another USB - then all worked fine :D


This solved my problem in Ubuntu 20.04.3:


I did the following:

  1. Run the following command in Terminal

    sudo apt purge ippusbxd
  2. Reinstall the printer by going to Settings → Printers.

  3. Then remove all existing printers.

  4. Switch on the printer, connect on USB Port and Add Printer.


I arrived here because I was having the same problem. Turned out my networking was funky.

It was my own fault, I had my laptop (Thinkpad T580 running Ubuntu 20.04 LTS) on both the wifi that the printer was on (HP Color LaserJet CM3530 MFP) and plugged into a POE switch to work on a raspberry pi thing. Unplugged my laptop from the wired network and then things worked fine.

My main complaint is that the error and its handling could have been less cryptic. The document simply didn't print, no error message or feedback. I only found the "device communication error" when I opened up the Printers dialog.


For Ubuntu 22.04:

sudo apt remove ipp-usb

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .