image
image
image

Setting up the Printer

image

As you will realize, you will need a physical output when you are implementing the Ham radio projects and thus, having a printer on standby is a prerequisite.

Installing CUPS on your Pi and permitting remote access

To link a printer with Pi, we first have to install CUPS (Common Unix Printing System). At this point, you’ll fire up your Pi then navigate to the terminal either via SSH or on the Pi itself.

You need to enter the command below at the terminal, to start installing CUPS:

image

When the ‘continue’ prompt pops up, simply type Y and then tap enter. Please feel free to grab a cup of coffee because CUPS is quite a beefy install. When the base installation completes, you need to make some administrative changes. The first thing you have to do is add yourself to the user group that can access the printers or printer queue. The user group created by CUPS is known as ‘lpadmin’. The Raspbian’s default user (and the user that we are logged into) is ‘pi’- you can however adjust the following command if you desire a different user to access the printer.

Type the following command at the terminal:

image

In case you are wondering, the switch labeled ‘-a’ enables you to add an existing user (that is ‘pi’) to an existing group (that is ‘lpadmin’) as specified by the switch labeled ‘-G.’

The last part of the pre-configuration process is to enable the remote editing of CUPS configuration. You can complete the rest of the configuration through the web browser on your Raspberry Pi. If you want to, you are free to use your windows desktop browser to finish the configuration; all you will need is to toggle a bit of value in /etc/cups/cupsd.conf. Enter the command below at the terminal:

image

Now look for this section within the file:

image

Now comment out the line labeled ‘Listen localhost:631’ and replace it with the line below:

image

This will instruct CUPS to start listening for all networking interface contacts, which are directed to the port 631. Make sure to scroll down further in the config file to get to the section that is labeled ‘locations’. In the following block, I have bolded any lines that need to be added to the config:

image

The ‘allow @local’ line addition enables the access to CUPS from any computer on your local network. Each time you do any changes in the CUPS configuration file, you will have to restart the CUPS server. Use the command below to do that:

image

Once you restart CUPS, you should be able to access the administration panel through any of your local network’s computer by pointing its web browser at this link: image

Add a printer to CUPS

image

When you navigate to this link: image,you will be able to see the CUPS homepage, as illustrated in the image above. However, are interested in the ‘administration’ tab so click on it.

image

Next, click ‘add printer’ in the administration panel. If you get a warning regarding the security certificate of the site, you can ignore it by clicking ‘proceed anyway’. You’ll be prompted to enter a username as well as the password.

image

Proceed and enter the username details as well as the password of the account that you added to the ‘lpadmin’ group earlier on in the tutorial. For instance, if you chose to use the raspbian install (the default), the login as well as the password should be ‘Pi’ and ‘raspberry’ respectively. Now click on log in. Once you log in, you will see all the printers available (those that are local and the networked at the same time). Choose the printer you want to add to the system.

image

Once you choose the printer, you’ll be given the chance to edit the description, location and name of the printer, and also to enable network sharing. Since the printer we’re using is already a network printer, we didn’t check the ‘share this printer’ box.

image

Once you edit the name of the printer and add a location, you will get a prompt to choose the specific driver that you want for your printer. While it discovered the printer and printer name automatically, CUPS doesn’t make any attempt to choose the correct driver for you. After installing the right driver, scroll down until you are able to see a model number matching your own. As an alternative, if you have a PPD file for the printer that you’ve downloaded from the manufacturer, simply load it with the button labeled ‘choose file’

image

The final step entails looking over general print settings such as the name and address of your preferred/default printer. the default paper source or size and so forth. It ought to default to the right presets, even though it never hurts to check though.

image

Once you click the ‘set default options’, you’ll be able to see the printer’s default administration page (this is for the printer you added to the CUPS system).

image

All looks well. The real test, nonetheless, is actually getting to print something. Fire up the default text editor of Raspbian, Leafpad, and send a message:

image

So far, if you have included the only user that has to access the printer to the ‘lpadmin’ group, and you have also added or included the only printer you want to access the CUPS system, that should be it. If you’ve got other users or additional printers you would want to add, just run through the individual steps that we’ve just discussed above to do so.