"Device Communication error (5012)" - HP printer

19,717

Solution 1

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.

Cheers

Solution 2

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)

Solution 3

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

Solution 4

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.

Solution 5

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.

Share:
19,717

Related videos on Youtube

Matthieu Kints van
Author by

Matthieu Kints van

BY DAY: med student, bachelor physics, goldsmith, hobbyist BY NIGHT: sleeping, sometimes partying, but mostly sleeping or staring at my computerscreen. FOR fun: far to much.. I just wanna beable to understand and do all, in this little life time.. and i'm running out of time.

Updated on September 18, 2022

Comments

  • Matthieu Kints van
    Matthieu Kints van almost 2 years

    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

    hp:/usb/HP_Color_LaserJet_MFP_M477fdw?serial=XXXXXXXXX
    

    or

    hpfax:/usb/HP_Color_LaserJet_MFP_M477fdw?serial=XXXXXXXXX
    

    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
    

    ---------------------------------
    | INSTALLED CUPS PRINTER QUEUES |
    ---------------------------------
    
    HP-Color-LaserJet-MFP-M477fdw
    -----------------------------
    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): 
    hp:/usb/HP_Color_LaserJet_MFP_M477fdw?serial=VNBKKDH3WN**
    **error: Device not found**
    **error: Communication status: Failed**
    
    HP-Color-LaserJet-MFP-M477fdw-Fax-2
    -----------------------------------
    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): 
    hpfax:/usb/HP_Color_LaserJet_MFP_M477fdw?serial=VNBKKDH3WN**
    **error: Device not found**
    **error: Communication status: Failed**
    
    --------------
    | PERMISSION |
    --------------
    
    -----------
    | SUMMARY |
    -----------
    
    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?

    • pdc
      pdc over 6 years
      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
    • Matthieu Kints van
      Matthieu Kints van over 6 years
      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.
    • Matthieu Kints van
      Matthieu Kints van over 6 years
      this is rather importent to me as i believe the majority of my problems will be solved fixing this.
    • Thomas Ward
      Thomas Ward over 6 years
      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.
    • Matthieu Kints van
      Matthieu Kints van over 6 years
      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)
  • BeastOfCaerbannog
    BeastOfCaerbannog almost 3 years
    What do you mean "This solved my problem in Ubuntu 20.04.3"? You linked Google search results. Can you link the specific post/article that helped you?
  • Matthieu Kints van
    Matthieu Kints van almost 3 years
    guess he refers to the first link in the search: askubuntu.com/questions/1233521/…