"Unable to send data to printer." after one successful print
Posted by: misterikkit ()
Date: October 24, 2016 01:45AM

Hello, I don't know how to debug this further. Can someone recommend steps? Thanks in advance!

I'm trying to use HP LaserJet Pro P1606dn on a Raspberry Pi.
I followed the install instructions from the main page. (I did make, make install, make install-hotplug, make cups)
The first test page succeeded. (full duplex, printed the test page on both sides of one sheet.)
All subsequent prints and test pages fail in the same way. ("Unable to send data to printer.")

I tried rebooting all the things.
I also tried foo2zjs-wrapper like so,
pi@greenpi:~/foo2zjs $ foo2zjs-wrapper testpage.ps >xxx.prn
pi@greenpi:~/foo2zjs $ sudo usb_printerid /dev/usb/lp0
GET_DEVICE_ID string:
MFG:Hewlett-Packard;MDL:HP LaserJet Professional P1606dn;CMD:ZJS,URF,PCLm,PJL,ACL,HTTP,PCL;CLS:PRINTER;DES:HP LaserJet Professional P1606dn;FWVER:20130703;CID:HPLJPCLMSMV1;
pi@greenpi:~/foo2zjs $ sudo cp xxx.prn  /dev/usb/lp0
cp: error writing ‘/dev/usb/lp0’: Input/output error
cp: failed to extend ‘/dev/usb/lp0’: Input/output error


I found this in the CUPS error log, but I don't know if it's useful:
D [23/Oct/2016:20:44:04 -0700] [Job 5] ready to print
D [23/Oct/2016:20:44:04 -0700] [Job 5] PID 1537 (/usr/lib/cups/backend/hp) exited with no errors.
D [23/Oct/2016:20:44:04 -0700] [Job 5] End of messages
D [23/Oct/2016:20:44:04 -0700] [Job 5] printer-state=3(idle)
D [23/Oct/2016:20:44:04 -0700] [Job 5] printer-state-message="ready to print"
D [23/Oct/2016:20:44:04 -0700] [Job 5] printer-state-reasons=none
E [23/Oct/2016:20:49:04 -0700] [Job 5] Stopping unresponsive job.
W [23/Oct/2016:21:40:56 -0700] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id 'HP_LaserJet_P1606dn-Gray..' already exists
E [23/Oct/2016:21:44:39 -0700] Unable to communicate with avahi-daemon: An unexpected D-Bus error occured
E [23/Oct/2016:21:45:53 -0700] Missing printer-uri, job-uri, or ppd-name attribute
E [23/Oct/2016:21:45:56 -0700] [Client 18] Returning IPP client-error-bad-request for windows-ext (no URI) from [v1.fe80::4845:994a:5971:488d+wlan0]
E [23/Oct/2016:21:47:17 -0700] [Job 7] Unable to send data to printer.
E [23/Oct/2016:21:53:39 -0700] Unable to communicate with avahi-daemon: An unexpected D-Bus error occured
E [23/Oct/2016:21:57:27 -0700] [Job 9] Unable to send data to printer.
E [23/Oct/2016:22:02:31 -0700] [Job 9] Stopping unresponsive job.
E [23/Oct/2016:22:04:33 -0700] Missing printer-uri, job-uri, or ppd-name attribute
E [23/Oct/2016:22:04:33 -0700] [Client 17] Returning IPP client-error-bad-request for windows-ext (no URI) from [v1.fe80::4845:994a:5971:488d+wlan0]
E [23/Oct/2016:22:09:25 -0700] Missing printer-uri, job-uri, or ppd-name attribute
E [23/Oct/2016:22:09:25 -0700] [Client 17] Returning IPP client-error-bad-request for windows-ext (no URI) from [v1.fe80::4845:994a:5971:488d+wlan0]
E [23/Oct/2016:22:09:44 -0700] [Job 9] Unable to send data to printer.
E [23/Oct/2016:22:11:16 -0700] [Job 9] Unable to send data to printer.

Re: "Unable to send data to printer." after one successful print
Posted by: rickrich ()
Date: October 24, 2016 08:14AM

$ head -50 foo2zjs-wrapper
...snip...
#
# Printer Notes:
#
# Minolta/QMS 2300 DL   - Does not need clipping, -X16, or -P.  But it doesn't
#                         break anything if you use them.
#
# Minolta/QMS 2200 DL   - Requires -X16 (which is on by default)
#                       - Requires clipping
#
# HP LaserJet 1000      - Same as 2200 DL, plus needs -P
# HP LaserJet 1005      - Same as 2200 DL, plus needs -P
#
# HP LaserJet 1018      - Same as 2200 DL, plus needs -P -z1 -L0
# HP LaserJet 1020      - Same as 2200 DL, plus needs -P -z1 -L0
# HP LaserJet 1022      - Same as 2200 DL, plus needs -P -z1 -L0
# HP LaserJet M1319 MFP - Same as 2200 DL, plus needs -P -z1 -L0
# HP LaserJet P2035     - Same as 2200 DL, plus needs -P -z1 -L0
# HP LaserJet P2035n    - Same as 2200 DL, plus needs -P -z1 -L0
#
# HP LaserJet Pro P1102 - Same as 2200 DL, plus needs -P -z2 -L0
# HP LaserJet Pro P1102w- Same as 2200 DL, plus needs -P -z2 -L0
# HP LaserJet Pro P1566 - Same as 2200 DL, plus needs -P -z2 -L0
# HP LaserJet Pro P1606dn- Same as 2200 DL, plus needs -P -z2 -L0
#
# HP LaserJet Pro CP1025nw- Same as 2200 DL, plus needs -P -z3 -L0
#

You should use:
$ cd foo2zjs
$ foo2zjs-wrapper -P -z2 -L0 testpage.ps > xxx.prn
$ sudo bash
# cat xxx.prn  > /dev/usb/lp0   # one print job
# cat xxx.prn  > /dev/usb/lp0   # two print jobs
# cat xxx.prn  > /dev/usb/lp0   # three print jobs
... etc ...
# exit

Note: this is for "letter" page size. If you are using A4, then add -pa4 or -p9 to the foo2zjs-wrapper command line.



Edited 2 time(s). Last edit at 10/24/2016 08:22AM by rickrich.

Re: "Unable to send data to printer." after one successful print
Posted by: misterikkit ()
Date: October 25, 2016 02:14AM

Thanks for pointing that out! When I use the flags you recommend, the test page prints just fine. CUPS can print a test page too, but printing from a windows 7 machine is still not working. Looking closer, it seems it was just a print job from the windows machine that was "unable to send data to printer."

I think I've given up on fixing the win7 part for now.

Sorry, only registered users may post in this forum.
This forum powered by Phorum.