Note that I have renamed the slots of the CUPS Snap from printing and admin to cups and cups-control, to do it the standard way as slots have the same names as their respective plugs, as of the discussion here.
I have updated the sample command lines in my initial posting appropriately. If you have already installed the CUPS Snap, please update your CUPS Snap via
The last needed interface connections are now approved for auto-connection or not needed any more, so for everyone who installs the CUPS Snap from the Snap Store now, no manual interface connections are needed any more!
I have also updated the initial posting appropriately.
If you share a print queue it is advertised as AirPrint and as Mopria printer. So you can print now from iOS (iPhone, iPad, …) devices and also from Mopria clients (Windows, or Mopria app installed on phone).
I have HP P1102 over USB in Raspberry Pi with Ubuntu Server 20.04. And Ubuntu Desktop 20.04 in same local network.
Printer had not been found automatically. I added it manually over web interface (just one click in founded list).
Description: HP LaserJet Professional p1102s Printer
Location:
Driver: Local Raw Printer (grayscale, 2-sided printing)
Connection: dnssd://HP_LaserJet_Professional_P1102%20%40%20ubuntu._ipp._tcp.local/cups?uuid=a24df837-8136-34ed-5ed3-92078c855bc5
Defaults: job-sheets=none, none media=unknown
Sent test page from web interface and
Unable to locate printer “ubuntu.local”
Is it some sort of DNS problems? Or may be it has some sort of “bad” drivers (proprietary HP plugins)?
PS: printer works fine from many devices
@adasiko, first, where did you install the CUPS Snap? On the Raspberry Pi? On your Ubuntu Desktop? On both? Which web interface did you use? The one of the CUPS running on your Raspberry Pi? On your desktop? Or of the PostScript Printer Application on your Raspberry Pi?
Note that with the CUPS Snap and the PosyScript Printer Application no proprietary HPLIP drivers or plugins are involved, but if I check on a standard, classic setup with CUPS and HPLIP, your printer model requires the proprietary plugin from HP:
$ lpinfo -m | grep -i P1102
foo2zjs:0/ppd/foo2zjs/HP-LaserJet_Pro_P1102.ppd HP LaserJet Pro P1102 Foomatic/foo2zjs-z2 (recommended)
foo2zjs:0/ppd/foo2zjs/HP-LaserJet_Pro_P1102w.ppd HP LaserJet Pro P1102w Foomatic/foo2zjs-z2 (recommended)
hplip:0/ppd/hplip/HP/hp-laserjet_professional_p1102.ppd HP LaserJet Professional p1102, hpcups 3.21.2, requires proprietary plugin
hplip:1/ppd/hplip/HP/hp-laserjet_professional_p1102.ppd HP LaserJet Professional p1102, hpcups 3.21.2, requires proprietary plugin
hplip:2/ppd/hplip/HP/hp-laserjet_professional_p1102.ppd HP LaserJet Professional p1102, hpcups 3.21.2, requires proprietary plugin
drv:///hpcups.drv/hp-laserjet_professional_p1102.ppd HP LaserJet Professional p1102, hpcups 3.21.2, requires proprietary plugin
hplip:0/ppd/hplip/HP/hp-laserjet_professional_p1102s.ppd HP LaserJet Professional p1102s, hpcups 3.12.2, requires proprietary plugin
hplip:0/ppd/hplip/HP/hp-laserjet_professional_p1102w.ppd HP LaserJet Professional p1102w, hpcups 3.21.2, requires proprietary plugin
drv:///hpcups.drv/hp-laserjet_professional_p1102w.ppd HP LaserJet Professional p1102w, hpcups 3.21.2, requires proprietary plugin
$
Therefore it will not work with the PostScript Printer Application (it is not a PostScript printer). What you have to check is whether it simply works as a driverless (AirPrint, IPP Everywhere, Mopria) printer. In this case the CUPS Snap would pick it up fully automatically.
Could you run the command
driverless
on the Raspberry Pi, where you have connected the printer to USB and post the output here?
And I think that nothing driverless things on Raspberry Pi
> driverless -v
DEBUG: Started ippfind (PID 2834)
DEBUG: Started post-processing (PID 2835)
DEBUG: PID 2834 (ippfind) stopped with status 1!
DEBUG: PID 2835 (Post-processing) exited with no errors.
I don’t know how AirPrint works. But I can print from my iPhone by default.
@adasiko, first test whether you printer works on the Raspberry Pi. Print a file from a terminal on the Pi or print a test page from the Pi’s CUPS web interface. Make sure that your Pi shares the printer (CUPS must share printers in general and each printer needs to be shared individually). Probably this works already, your iPhone talking with the CUPS of the RaspBerry Pi. AirPrint as a server works on Ubuntu’s CUPS already for several years (as distro patch as CUPS upstream was maintained by Apple) but this support was rather rudimentary, not allowing to set options on the iPhone. Newer CUPS (2.4.x) which is maintained by OpenPrinting and not by Apple has full AirPrint support (for example the CUPS Snap).
If the Pi and your client machine running the CUPS Snap are in the same subnet, the CUPS Snap should see the printers on the Pi and automatically create a queue.
Your manual queue should principally work, the problem you mention seems to be a DNS problem. Can you log into the Pi via ssh ubuntu.local? Does a browser on your client display the Pi’s web interface via http://ubuntu.local:631/?