I have encountered a poorly documented issue regarding HP network printers on Linux.
The printer will be discovered and installed normally through the HPLIP installation tools. However, printing and other operations on the printer won’t work. When attempting to print, HP Device Manager will report a Device Communication Error code 5012.
Troubleshooting with the
hp-check utility will yield an error code as well:
Unable to communicate with device (code=12)
The cause for this issue is most likely SNMP. As discovered by @vik on linuxquestions.org, these symptoms arise when the default SNMP community
public is disabled. Linux drivers apparently need it enabled to communicate with the printer and query its status.
I have a wireless networked HP printer and was getting this error: Unable to communicate with device (code=12). I ran hp-check, hp-setup, hp-plugin, etc. After a few days’ worth of frustration, I’ve figured it out.
The key was this: http://hplipopensource.com/node/216
So after running
Code:snmpwalk -Os -c public -v 1 ip.address.of.printer 188.8.131.52.184.108.40.206.220.127.116.11.7.0I got this message: Timeout: No Response from ip.address.of.printer
Then I remembered that I had previously turned off SNMP discovery on the printer. All of my Windows computers were working fine with it off so no harm done, right? Well hplip on Linux needs it for some reason, even if you manually specify the IP address of the printer.
@vik on LinuxQuestions.org
- open up a web browser and type http://ip.address.of.printer
- click on networking tab
- click on SNMP in left pane
- enable SNMP read-only access
- try the snmpwalk command again
- you should now see your printer, be able to print, etc.
The solution is, at least in my case, simple. Enable the default SNMP
public community inside the printer’s configuration dialog.
Original LinuxQuestions.org thread (Archived)