Convert an older model USB printer to a networked printer using a Raspberry Pi or other Linux-based computer — also works well for making an older printer compatible with a newer version of MacOS

We originally set out to do this because we were having problems getting an older model laser printer, specifically a Konica Minolta PP1350W, to work with MacOS High Sierra (10.13).  With previous versions of MacOS we’d been able to connect the printer directly to the computer, and with some fiddling with drivers and other software, get it to work.  But newer versions of MacOS seem to be far less tolerant of this, and we had a spare Raspberry Pi, so the idea came to us to use the Raspberry Pi as a bridge between the printer and any computers on the local network from which we wanted to be able to print.  The bonus is that the printer is no longer tethered to a single machine, but instead can potentially be used by any computer on the local network.

You do not need to have a Raspberry Pi to make this work – any computer that can run Linux will do.  And of course the Raspberry Pi or other Linux computer can be used for other purposes besides this.  We do not guarantee that this technique will work for every older printer out there, but this will work with a surprising number of them.

If you use a Raspberry Pi, it should already have some version of Raspbian installed, but it can be either Raspbian Lite or the full version of Raspbian.  If you use a different type of computer, be aware that our instructions are geared toward users of Debian, Raspbian, Ubuntu, Linux Mint, or similar Debian-based distributions, though we imagine that with a little modification they could be adapted to other Linux distributions.

Because the Raspberry Pi is so (relatively) inexpensive, from here on we will just refer to the Raspberry Pi, but if you are using a different computer running Linux that term applies to your computer as well.

Assuming your operating system is already installed, we also suggest that if you have not done so, you give your Raspberry Pi a static IP address on your network.  This can be done in your router settings, by reserving a specific IP address for your Raspberry Pi’s MAC address, or by changing the networking settings on the Raspberry Pi itself.  If you don’t do this, other computers on your network may not be able to find your Raspberry Pi when you want to print something, if its IP address has changed.

With that out of the way, here is how you make this work.  Commands shown below are entered in the terminal program, or in a ssh session (in other words you must be at a Linux command prompt):

1. Install CUPS:

sudo apt upgrade
sudo apt install cups

This will install CUPS (the Common Unix Printing System) and several dependencies.  Okay, a LOT of dependencies.  Just let them all install.

2. Look to see if there is a specific driver for your printer:

apt-cache search printer-driver

This will return a list of available printer drivers.  Look though the list and see if any of them look like ones that might be used with your printer.  For example, we found this:

printer-driver-min12xxw - printer driver for KonicaMinolta PagePro 1[234]xxW

Since this definitely covers our model PP1350W printer, we installed it using:

sudo apt install printer-driver-min12xxw

Of course you would substitute the driver for your printer, if one is available.  Alternately, some printer manufacturers may offer a Linux printer driver on their web sites, but you may need to compile it yourself, or they may provide a script that will compile it for you.  In any case, it is almost always better to install the printer driver for your printer, because then CUPS can find and use it.  Otherwise it may try to use a more generic printer driver that doesn’t work as well (or at all).

If all else fails, try putting “Linux printer driver for (your make and model of printer)” into a search engine and see if anything relevant is returned.  But beware of installing pre-compiled printer drivers on a Raspberry Pi – you would need a version built for an ARM-based device, not one built for a standard Intel/AMD CPU architecture.

3. Add your user to the lpadmin group:

sudo usermod -a -G lpadmin username

Replace username with your user name.  For example, on a Raspberry Pi, you would probably use sudo usermod -a -G lpadmin pi unless you have created another user.  The “-a -G” options add the user to the supplementary group, in this case the lpadmin group.

4. (Optional) At this point you could edit the CUPS configuration in a web browser on your Raspberry Pi, if you are running a desktop version of Raspbian.  But if you want to be able to modify the CUPS configuration from another computer on your network, you need edit the /etc/cups/cupsd.conf file to allow it:

sudo nano /etc/cups/cupsd.conf

Feel free to use any text editor of your choosing if you don’t care for nano.  Here are the sections that need to be modified – the modifications are shown in red:

# Only listen for connections from the local machine.
# Listen localhost:631
Port 631
Listen /var/run/cups/cups.sock

Please note that the line “Listen localhost:631” has been commented out. Then, a bit further down in the file:

# Restrict access to the server...
<Location />
Order allow,deny
Allow @local
</Location>

# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
Allow @local
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
Allow @local
</Location>

5. (Optional unless you have performed step 4, or made any other changes to the cupsd.conf file) Restart the CUPS server:

sudo /etc/init.d/cups restart

6. In a web browser go to one of the following addresses.  If you are using a web browser on the Raspberry Pi itself, go to:

https://localhost:631

If you are using a web browser on any other machine on your local network (and assuming you completed steps 4 and 5), go to:

https://ip address or host name of raspberry pi:631

Note that your browser will probably complain about the site being insecure because you have a self-signed certificate – just go ahead and tell the browser it’s okay to connect to this site.  You actually can connect to the main page using http rather than https, but the moment you try to do any actual configuration it will force you to switch to https, so you may as well start out there.

7. Configure your printer.  If you haven’t already done so, you should power up your printer now. You should be at a page that looks something like this:

CUPS home page
You want to click the Administration link, which is highlighted in yellow above.  On the next page you will see this at the top:

Top of CUPS administration page
On that page you want to click the Add Printer button, which again we have highlighted in yellow. You may be asked to login at this point, if so, use the username and password you’d use to login to your Raspberry Pi. Next, you should see something like this:

CUPS - first add printer screen
Hopefully you will see your printer as shown above — if not, try rebooting the Raspberry Pi while the printer remains powered up.  When you do see it, select it and click the Continue button, and then you should see something like this:

CUPS - second add printer screen
The two things you need to do on the above screen are fill in the location, which can be anything you want, but the most important thing is to check the “Share This Printer” checkbox, which we have highlighted in yellow above. Then click Continue, and you should get a screen like this:

CUPS - third add printer screen
All you have to do in this screen is pick the make of your printer from the list and click Continue.  If you wonder why ours is in ALL CAPS, that’s because we installed printer-driver-min12xxw back up in step 2, and that’s what CUPS is finding here.  You want to use the entry associated with any printer driver you might have installed, which hopefully will be this obvious.  Then you click Continue.  An alternative is to upload a PPD (PostScript Printer Description) file on this page, but we didn’t need to do that.  After you click Continue, you may see another screen such as this:

CUPS - fourth add printer screen
The purpose of the above screen is to allow you to pick a specific model printer.  You should pick the one that corresponds to your printer.  This screen also gives you one more opportunity to provide a PPD file, in case your printer model isn’t listed.  After you have selected your printer, you click the Add Printer button. At that point you will have the opportunity to set your default printer options:

CUPS set default printer options
Most of these options will probably be filled in correctly but one or two might not be – for us, the page size was set to A4 and we had to change it to Letter.  Set them as you wish, but keep in mind that most software with printing capabilities can override the defaults if you instruct the software to do so in a printer setup dialog.  After you have made any changes, click the Set Default Options button.  After you do that, the system may display an intermediate page but then should take you to the Printers page:

CUPS Printers page
This shows that your printer has been set up. You could use it now from the Raspberry Pi itself, but of course the goal it to use it from other computers on your local network. In most cases, this should be very easy – you just go to your system’s printers dialog and add the printer. For example, in MacOS you would go to System Preferences, then Printers & Scanners. Then click the + at the bottom of the printers list, and your printer should appear in a panel like the one shown below, assuming that the Raspberry Pi and the printer are both powered up:

MacOS add printer dialog
Click on the printer to select it, and the fields at the bottom of the panel should populate with the printer information:

MacOS add printer dialog - printer selected
Just click the Add button and now the printer should show up in your printers list, and be available for use:

Mac OS Printers Panel showing added printer
Be sure to select your newly added printer as the Default printer, if that’s what you want.  Note there is a “Share this printer on the network” checkbox, but you should NOT check that because the printer is not being shared from your Mac, it is being shared by the Raspberry Pi.

The procedure for adding the printer would likely be similar on a Windows or Linux machine.  In fact you may not need to do anything; on one Ubuntu system we checked the printer just appeared and was available from printing applications without any additional action on our part.

We hope this will give some added life to some of those USB-connected printers that still are capable of working quite well, but that are no longer directly supported by modern operating systems.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.