We have an old HP Deskjet F4480 printer that functions perfectly, however it doesn't support wireless printing and running a print server from another PC was a bit impractical due to it's location. Additionally, running a wireless scanning service required NAPS2 to be setup and running on that machine at all times as well. Instead of letting this printer end up with all the other e-waste of the world, let’s make it wireless! To do this I used an old Raspberry Pi 3 Model B to act as a print & scan server. This guide will run you through how to set this up.

Prerequisites

Setup Headless Pi

  1. Flash Raspberry Pi OS (64-bit) to a micro SD card (16GB+)
    1. Or any other Linux distro. A desktop environment is not required.
    2. I recommend using either Rufus or balenaEtcher; however, the Raspberry Pi Imager can also be used if preferred.
  2. Open the bootfs partition
  3. Create a userconf.txt file in the root of bootfs as a default is no longer created.
    1. In this file, we will create our username and password.
    2. Use WSL or another Linux distro to generate your encrypted password hash with: echo 'mypassword' | openssl passwd -6 -stdin
    3. Place the output from OpenSSL in the userconf.txt file in the format pi:encrypted_password_hash
  4. Enable SSH by adding a blank ssh file to boot partition. More info here: https://forums.raspberrypi.com/viewtopic.php?t=346393
  5. Put the micro SD Card into the RPI, connect your printer via USB, connect ethernet, and power it up!

Connect and Basic Configuration

  1. Check your router's DHCP leases to find your RPI’s IP for SSH. Or use ping raspberrypi.local
    1. This would be a good place to either set a static DHCP lease on your router or set a static-IP on the RPI.
  2. Connect via SSH and then use raspi-config and change your hostname to something like rpi-print-server
    1. Use raspi-config to configure WiFi if needed.