lucasburlingham.me

Overcoming the printer nightmares - HP DeskJet 2752e

Published: 2024-11-21

Skip to the part where you fix your issues

Have you ever wanted to use your printer without any hastle? I certainly have.

Printers are one of the most expensive pieces of technology that you can buy. Not because they're expensive up-front (though they can be), but because maintenance, well, is worse than the healthcare industry. Ounce to ounce, ink can be twice as expensive than human blood. Source: Don McMillan. And if the printer is working, well, that's not something to be taken for granted.

I got an HP DeskJet 2752e for free (what it's MSRP should have been) from a buddy who couldn't figure out how to get it setup and didn't want to pay for HP's Instant Ink scam. I solved this problem by going to Walmart and buying refurbished ink cartridges. It's the midly-sketchy Great Value tech brand Onn, but hey, it works and I only paid $32 bucks. The ink can be found locked up (not next to the blood, they don't lock that up, not worth enough, remember?) under the printer's on display. (Coincedentally, it's also next to the HP DeskJet 2752e, which is also around $32.). I had a bit of a think, and it went like this:

  1. Buy the printer for $32
  2. Buy the ink for $32
  3. Return the printer for $32
  4. Return the ink for $32 (keeping the ink inside the printer)
  5. Profit

Just kidding. That's what GitHub Copilot came up with.

My Options:
  1. Buy the printer for $32
  2. Buy the ink for $32
  3. Subscribe to Instant Ink for $5/mo

As you can see, there was only one good option. I went with the second. No more subscriptions.

I plopped in the ink, connected the printer with a USB cable, and printed out a test page using normal Windows HP printers drivers. So far so good.

Now to get it working on my network. I have a NAS running OpenMediaVault (so Debian 12), which has CUPS pre-installed. I'm familiar with CUPS and a couple of it's implimentations, such as PaperCut or Lexmark PrintRelease (same difference really) and CUPS in it's raw form on *nix systems. So let's add a printer.

Head on over to your system's IP address on port 631. For example, https://203.0.113.0:631.

CUPS homepage featuring title OpenPrinting CUPS 2.4.2

Click on the "Administration" tab and then "Add Printer". You'll be prompted to login. Use your system's root/superuser credentials.

There's no surefire way of getting the right printer that's listed, click one and hit "Continue". You're looking for a printer with a URL starting with hp://, as this printer will use the official HP plugin for CUPS. Just having HPLIP installed is not enough.

If you do not see any printers with such a URL, hplip on Soureceforge.net will help you out. Find the latest version, and download the script ending in .run. Find a way to get that file to the system you're adding the printer to that runs CUPS, and do the following:

su --				# Login as root but stay in the same directory
chmod +x hplip.run		# Make the .run file executable
./hplip.run		 	# Run the executable

Follow the instructions and you should be good to go. Be sure to restart CUPS after the installation is done, and if prompted to install the HP plugins, do so.

CUPS Administration Add printer page

Now, back to CUPS. Click on the "Add Printer" button, find the printer with the hp:// URL, and hit "Continue". You'll be prompted to select a driver. Use the "HP DeskJet 2700 series" driver with the version of HPLIP that you downloaded (chances are your distro's software will be outdated - mine was at 3.22 and HPLIP was at 3.24), and hit "Add Printer".

Though not shown in the image above, be sure to toggle the "Share This Printer" checkbox and hit "Continue".

At this point, go to the "Printers" tab and click on the printer you just added. Click on "Maintenance" and then "Print Test Page". If it works, you're good to go. If not, you may need to restart CUPS or the printer. Be sure to open the firewall on the system running CUPS to allow connections to port 631. If you're using ufw, run

ufw allow 631

as root or superuser.


And that (should) be it. In addition to your new IPP printer, you can also install the Avahi daemon (called Bonjour on MacOS and Windows) to allow automatic setup of printers on computers in your local network.

The Debian GNOME printer page showing the printer that's been added via Avahi (Bonjour) protocol, avaliable for use via CUPS.

References