I'm gonna mark this problem RESOLVED. With a little discussion ...
(Original) problem, in the OP:
Bottom-line: hplip tells me "Device Communications Error 5012"
Connection: USB connecting my NEW printer to my desktop PC (i.e., nothing is using Wifi)
Status: SOLVED.
Short version of the solution:
It is not a problem at all. It is expected. hplip does not play well at all with driverless / IPP Everyewhere / AirPrint printers. If driverless is active, the IPP will block the printer from USB printing, even if the job is in the job queue.
Best thing you can do to understand this is to read these:
5012 Device Communication Error:
https://answers.launchpad.net/hplip/+question/707639
https://answers.launchpad.net/hplip/+question/707694
And, BTW, I still have not installed an HP driverless printer as IPP-over-USB printer. I have had to go only with wireless.
[end of story]
Discussion:
The newer printers come with "driverless / IPP Everywhere / AirPrint" capability. It is really worthwhile to know how it all works. It makes the task of dealing with printers much easier. The best resource I found on it is this:
https://wiki.debian.org/CUPSDriverlessPrinting
Written in plain English, in tutorial style, technical terms are explained and/or linked to a Glossary. I spent a few worthwhile hours getting an education on all this.
In my trials, I am now familiar with HP Deskjet models 2734e, 2752e, 2755e, and 2742e. Don't even ask.
I have spend HOURS, many, this past week trying to set up a printer using available utilities (i.e., not by doing it the “Manual” way, which I would not trust myself at just yet).
Very frustrating. Does HP share in any blame here? Is their firmware buggy? I really have no definitive clue, but I’m pretty frustrated. No problem using HP exclusively since 1998, from cheap to expensive models. Until now.
Talking Linux now. If you configure an HP printer, and you have “driverless” capability (in the printer and in your installed software), IMO, you oughta uninstall hplip& gui, especially if you want to use the printer as USB. I still can’t configure one of those printers as USB, with or without hplip. I tried it using legacy drivers, you can send a print job to a queue, but it won’t actually print. Another related example: use hp-setup to install wireless printer, hp-setup asks that you temporarily use USB connection, you do so, and suddenly your get error 5012 Device Communication error because IPP driverless blocks that USB port by design. Rx: Uninstall hplip and then to manage your printers use two things: System Settings (K > Settings > System Settings > Printers); and CUPS -- enter in the browser window: localhost:631.
There are many ways to see if you have "driverless / IPP Everywhere / AirPrint" capability. (See the link to the Debian Wiki above.) I confirmed that my system had all the software needed, already installed on my system; and that the printer indicates it has the capability (e.g., the presence of 7/1/4 interfaces; Airprint; Mopria; etc.). However, it was not possible, using CUPS interface localhost:631 or Settings > Printer (in Kubuntu), to Add a printer as IPP-over-USB protocol/driverless, as seen on the local network. THAT, I suspect is a firmware bug in the printer, even if that printer is listed here: https://www.pwg.org/printers/.
I tried everything. CUPS filters simply do not offer anything but legacy drivers upon adding a printer using USB connection (with wireless turned off). (Maybe some expert could add it manually or by using one of the utilities to configure, again, manually.) And CUPS warns you that such legacy drivers will soon be deprecated.
Note on HPLIP versions: again, be careful! Might be best to simply use the version that is tailored to and comes with Kubuntu (that you’d see in Muon, for example). The newest version (downloaded at HP) may cause other issues with printing formats, as it did with me ... again IMO – YMMV.
Other problems along the way … HP 2755e, I set it up wireless, it would actually print … but very slowly, like 30 minutes per page; and I could not figure out how to fix it (Googled everything).
At one point, I got so many errors and a strange one, too (when trying to use hplip for set up) … sorry, didn’t record it and I lost it because of this: I finally decided to re-install my Kubuntu 22.04 … NBD, just 15-20 minutes with all updates, and I got a clean Kubuntu.
Finally, HP 2742e installed quickly, wirelessly, through Printer Settings/CUPS, no problems, and it prints according to format that I set. 5-minute setup. Not yet fully tested, but it looks OK. But, no USB as an independent on-its-own printer setup.
BTW, for scanning, I installed xsane, SANE: http://www.sane-project.org/, which you would then find in the K-menu (under Graphics, in 22.04). Tip on scanning: If you get the error about ‘document feeder empty/not found,’ close the xsane windows and try again. Or, select another printer that the scanner utility lists. For me, the driver choice eSCL always worked. Some scanning problems may be solved this way: simple-scan –debug. Also, you can use Skanlite (it might already be installed under K menu) (Claydoh).
Kind of like the introduction of UEFI in firmware, I believe that printers have firmware bugs in their implementation of IPP Everywhere/driverless. Again, a great place to learn about this stuff would be
https://wiki.debian.org/CUPSDriverlessPrinting
Re Debian Wiki, a quote from there:
I did not encounter such luck with Kubuntu and HP’s implementation. And note this passage:
(Comment: Exactly the issue I saw with a printer showing 7/1/4 interfaces. Without that "detaching" service, the IPP of the driverless printer would block any attempt to print using legacy USB, in my experience so far, and you’d get Error 5012 again. But, also, even if you don’t get blocked with Error 5012, as I saw in my tests, you can send a print job to the printer, it is seen, it sits there in queue, but no printing is started on it. Very frustrating: officially it prints, it isn’t blocked with Error 5012, but in practice nothing physically happens!)
I think I’ll stop here for now. Again, the 5012 Error was not actually a “regular” error! It was caused by hplip’s not working with the IPP driverless setup. As for me, I’ll be messing with the HP Deskjet 2742e to see further what’s going on, if anything. At least it prints pages of paper.
Edit, added, clarification:
My goal was to install a printer USB but more specifically by IPP-USB. An IPP-USB printer will not be seen as a legacy printer, but will be seen among the network printers.
(Original) problem, in the OP:
Bottom-line: hplip tells me "Device Communications Error 5012"
Connection: USB connecting my NEW printer to my desktop PC (i.e., nothing is using Wifi)
Status: SOLVED.
Short version of the solution:
It is not a problem at all. It is expected. hplip does not play well at all with driverless / IPP Everyewhere / AirPrint printers. If driverless is active, the IPP will block the printer from USB printing, even if the job is in the job queue.
Best thing you can do to understand this is to read these:
5012 Device Communication Error:
https://answers.launchpad.net/hplip/+question/707639
https://answers.launchpad.net/hplip/+question/707694
And, BTW, I still have not installed an HP driverless printer as IPP-over-USB printer. I have had to go only with wireless.
[end of story]
Discussion:
The newer printers come with "driverless / IPP Everywhere / AirPrint" capability. It is really worthwhile to know how it all works. It makes the task of dealing with printers much easier. The best resource I found on it is this:
https://wiki.debian.org/CUPSDriverlessPrinting
Written in plain English, in tutorial style, technical terms are explained and/or linked to a Glossary. I spent a few worthwhile hours getting an education on all this.
In my trials, I am now familiar with HP Deskjet models 2734e, 2752e, 2755e, and 2742e. Don't even ask.
I have spend HOURS, many, this past week trying to set up a printer using available utilities (i.e., not by doing it the “Manual” way, which I would not trust myself at just yet).
Very frustrating. Does HP share in any blame here? Is their firmware buggy? I really have no definitive clue, but I’m pretty frustrated. No problem using HP exclusively since 1998, from cheap to expensive models. Until now.
Talking Linux now. If you configure an HP printer, and you have “driverless” capability (in the printer and in your installed software), IMO, you oughta uninstall hplip& gui, especially if you want to use the printer as USB. I still can’t configure one of those printers as USB, with or without hplip. I tried it using legacy drivers, you can send a print job to a queue, but it won’t actually print. Another related example: use hp-setup to install wireless printer, hp-setup asks that you temporarily use USB connection, you do so, and suddenly your get error 5012 Device Communication error because IPP driverless blocks that USB port by design. Rx: Uninstall hplip and then to manage your printers use two things: System Settings (K > Settings > System Settings > Printers); and CUPS -- enter in the browser window: localhost:631.
There are many ways to see if you have "driverless / IPP Everywhere / AirPrint" capability. (See the link to the Debian Wiki above.) I confirmed that my system had all the software needed, already installed on my system; and that the printer indicates it has the capability (e.g., the presence of 7/1/4 interfaces; Airprint; Mopria; etc.). However, it was not possible, using CUPS interface localhost:631 or Settings > Printer (in Kubuntu), to Add a printer as IPP-over-USB protocol/driverless, as seen on the local network. THAT, I suspect is a firmware bug in the printer, even if that printer is listed here: https://www.pwg.org/printers/.
I tried everything. CUPS filters simply do not offer anything but legacy drivers upon adding a printer using USB connection (with wireless turned off). (Maybe some expert could add it manually or by using one of the utilities to configure, again, manually.) And CUPS warns you that such legacy drivers will soon be deprecated.
Note on HPLIP versions: again, be careful! Might be best to simply use the version that is tailored to and comes with Kubuntu (that you’d see in Muon, for example). The newest version (downloaded at HP) may cause other issues with printing formats, as it did with me ... again IMO – YMMV.
Other problems along the way … HP 2755e, I set it up wireless, it would actually print … but very slowly, like 30 minutes per page; and I could not figure out how to fix it (Googled everything).
At one point, I got so many errors and a strange one, too (when trying to use hplip for set up) … sorry, didn’t record it and I lost it because of this: I finally decided to re-install my Kubuntu 22.04 … NBD, just 15-20 minutes with all updates, and I got a clean Kubuntu.
Finally, HP 2742e installed quickly, wirelessly, through Printer Settings/CUPS, no problems, and it prints according to format that I set. 5-minute setup. Not yet fully tested, but it looks OK. But, no USB as an independent on-its-own printer setup.
BTW, for scanning, I installed xsane, SANE: http://www.sane-project.org/, which you would then find in the K-menu (under Graphics, in 22.04). Tip on scanning: If you get the error about ‘document feeder empty/not found,’ close the xsane windows and try again. Or, select another printer that the scanner utility lists. For me, the driver choice eSCL always worked. Some scanning problems may be solved this way: simple-scan –debug. Also, you can use Skanlite (it might already be installed under K menu) (Claydoh).
Kind of like the introduction of UEFI in firmware, I believe that printers have firmware bugs in their implementation of IPP Everywhere/driverless. Again, a great place to learn about this stuff would be
https://wiki.debian.org/CUPSDriverlessPrinting
Re Debian Wiki, a quote from there:
For a number of years the Printer Working Group (PWG) has been working with printer vendors and networking experts to implement IPP Everywhere. The standard for printers is now completed and IPP Everywhere devices are beginning to be marketed.
Debian supports printing via IPP using IPP Everywhere with
-- A networked printer
-- A USB connected printer that provides the IPP-over-USB protocol
Debian is ready:
With the incorporation of the two raster formats as a PDL in CUPS, IPP 2.0 to allow for querying the capabilities information from the printer and Bonjour/DNS-SD to find the printers in the network, Debian has everything needed for driverless printing to an IPP printer.
Debian supports printing via IPP using IPP Everywhere with
-- A networked printer
-- A USB connected printer that provides the IPP-over-USB protocol
Debian is ready:
With the incorporation of the two raster formats as a PDL in CUPS, IPP 2.0 to allow for querying the capabilities information from the printer and Bonjour/DNS-SD to find the printers in the network, Debian has everything needed for driverless printing to an IPP printer.
A small number of devices announce the presence of 7/1/4 interfaces but do not deliver IPP-over-USB support. Due to firmware bugs they fail to work with the protocol.
From version 0.9.22 onwards, ipp-usb deals with such devices by detaching itself immediately from the USB bus to allow the USB interfaces to be used by legacy/classic print queues and scanners.
From version 0.9.22 onwards, ipp-usb deals with such devices by detaching itself immediately from the USB bus to allow the USB interfaces to be used by legacy/classic print queues and scanners.
I think I’ll stop here for now. Again, the 5012 Error was not actually a “regular” error! It was caused by hplip’s not working with the IPP driverless setup. As for me, I’ll be messing with the HP Deskjet 2742e to see further what’s going on, if anything. At least it prints pages of paper.
Edit, added, clarification:
My goal was to install a printer USB but more specifically by IPP-USB. An IPP-USB printer will not be seen as a legacy printer, but will be seen among the network printers.
How to check if my printer is using a classic driver or running driverless?
Open http://localhost:631/printers/ 35 and click on a printer name. That will show you its connection path and a driver. If the path starts with ipp:// or ipps://, or if the driver contains “driverless” or “IPP Everywhere”, then it is a driverless setup.
Alternatively, you can open a terminal and run:
lpstat -v
Open http://localhost:631/printers/ 35 and click on a printer name. That will show you its connection path and a driver. If the path starts with ipp:// or ipps://, or if the driver contains “driverless” or “IPP Everywhere”, then it is a driverless setup.
Alternatively, you can open a terminal and run:
lpstat -v
Comment