Connection to printer failed

Asked by Saul A. Peebsen

LaserJet Pro MFP M127fn
hp-setup runs and finishes fine, printing does not work nor does the scanning.

error: Unable to communicate with device (code=12): hp:/net/HP_LaserJet_Pro_MFP_M127fn?ip=192.168.2.10
error: Unable to open device hp:/net/HP_LaserJet_Pro_MFP_M127fn?ip=192.168.2.10.

error: SANE: Error during device I/O (code=9)

This is on Gentoo. So I installed Mint 18 in a virtual machine, same problem. As a last resort installed W7 in virtual machine - scanning and printing works.

I purchased this unit only because it it is claimed to have full Linux support ...

https://paste.pound-python.org/show/14JZnEbKGpeDphJ4zZLd/

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Saul A. Peebsen
Solved:
Last query:
Last reply:
Revision history for this message
kritika arora (kritika-arora1) said :
#1

Hi,

You are required to install the updated version of HPLIP-3.16.9.

Download and install the latest HPLIP from
http://hplipopensource.com/hplip-web/install/install/index.html

install the run file using the following command.
sh hplip-3.16.9.run.

Then run the setup command : hp-setup IP

Thanks,
Kritika

Revision history for this message
Saul A. Peebsen (emeritus) said :
#2

No joy, still the same. Below is what I get with hp-testpage.

error: Unable to communicate with device (code=12): hp:/net/HP_LaserJet_Pro_MFP_M127fn?ip=192.168.2.10
error: Unable to print to printer. Please check device and try again.
error: Unable to communicate with printer HP_LaserJet_Pro_MFP_M127fn. Please check the printer and try again.

And this is with hp-scan.

Using device hpaio:/net/HP_LaserJet_Pro_MFP_M127fn?ip=192.168.2.10
Opening connection to device...
error: SANE: Error during device I/O (code=9)

Revision history for this message
Saul A. Peebsen (emeritus) said :
#3

I guess I shall open a bug? It's a shame every time I need to print or scan I need to start Windows in virtual machine, with printer/scanner allegedly fully supporting Linux.

Revision history for this message
Ajay Kedar (ajay-kedar) said :
#4

Hi,

Can you please generate the logs for scan and attached them here using following command.

Run this command in first terminal
tail -f /var/log/syslog 2>&1 | tee ~/error_log.txt

In another terminal run command for scan hp-scan -g

After scan is complete, press CTRL+C in first terminal. You will find the log in /home/username/error_log.txt

Please attach the same logs

Regards,
Ajay

Revision history for this message
Saul A. Peebsen (emeritus) said :
#5

This log is short:

Oct 6 05:40:04 zeus hp-scan[27626]: hp-scan[27626]: warning: No destinations specified. Adding 'file' destination by default.
Oct 6 05:40:10 zeus hp-scan[27626]: io/hpmud/jd.c 93: unable to read device-id
Oct 6 05:40:10 zeus hp-scan[27626]: scan/sane/soapht.c 478: unable to open device hp:/net/HP_LaserJet_Pro_MFP_M127fn?ip=192.168.2.10
Oct 6 05:40:10 zeus hp-scan[27626]: common/utils.c 220: Invalid Library hanlder pLibHandler = NULL.
Oct 6 05:40:10 zeus hp-scan[27626]: common/utils.c 220: Invalid Library hanlder pLibHandler = NULL.
Oct 6 05:40:10 zeus hp-scan[27626]: common/utils.c 220: Invalid Library hanlder pLibHandler = NULL.
Oct 6 05:40:10 zeus hp-scan[27626]: hp-scan[27626]: error: SANE: Error during device I/O (code=9)

Revision history for this message
Ajay Kedar (ajay-kedar) said :
#6

Hi,

It seems to be net snmp error. Can you please post the complete output of hp-check -t so that we can confirm net-smp is properly installed.

Also I am attaching the patch file for this code with more debug so that we can get to the bottom of the problem.

You can apply the patch by using following commands
"patch /path-to-hplip-source/io/hpmud/pml.c pml.patch"
After succesfully applying patch compile the code manually by using commands
make
sudo make install

After succesful installation Run this command in first terminal
tail -f /var/log/syslog 2>&1 | tee ~/error_log.txt

In another terminal run command for scan hp-scan -g

After scan is complete, press CTRL+C in first terminal. You will find the log in /home/username/error_log.txt

Please attach the same logs

Hope it will not be a problem. Thanks for your patience.
In case of problem please

Regards,
Ajay

Revision history for this message
Ajay Kedar (ajay-kedar) said :
#7

Hi,

I have added the patch in https://bugs.launchpad.net/bugs/1630577

Regards,
Ajay

Revision history for this message
Saul A. Peebsen (emeritus) said :
#8
Revision history for this message
Ajay Kedar (ajay-kedar) said :
#9

Hi Saul,

Sorry for late reply. I just checked your post in bug 1630577. Hope your problem is solved.

Regards,
Ajay

Revision history for this message
Saul A. Peebsen (emeritus) said :
#10

It appears with Linix hplip enabling SNMP in printer setup is mandatory.