Converting the Raspberry Pi to a wireless print server

Setting Up a Client

Once the printer service is up and running on your Raspberry Pi system, you need to configure the other computers on your network to connect to it.

On Linux systems running Gnome, you can access the printer configuration via System settings. After clicking Unlock, you can press Add printer to do exactly that. Gnome automatically finds the printer because you enabled the appropriate services for the local network in the previous step.

Windows systems all have a similar means for adding a printer through the Control Panel. See your Windows Help system, and remember you are adding a network printer (not a local printer).

On a Mac, choose System Preferences from the Apple menu, then click on Print & Fax. Next, click on the plus symbol at the bottom of the printer list, which brings up the Add Printer dialog box. Click on the IP icon at the top and leave the Protocol as Line Printer Daemon - LPD. In the Address box, enter the IP address of your printer. The Mac now looks for the IP address and should shortly return with a valid and complete address and the correct printer driver in the Print Using drop-down box. Clicking Add brings up the Installable Options dialog. When you click Continue, your printer will now show up in the list of printers in the original Print & Fax dialog. On an Android tablet, I successfully added my Raspberry Pi printer using the (commercial) PrintBot app.

Providing a Scanner

To provide the printer's scan function on the network, you need the services of the Sane daemon, saned. The corresponding Sane tools should already be set up after the installation of CUPS – if not, enter:

sudo apt-get install sane-utils

Then, in /etc/default/saned, configure the service as a daemon with automatic startup behavior by changing RUN=no to RUN=yes.

The entry for the local network – here, the 192.168.4.0/24 line in the /etc/sane.d/saned.conf file – allows clients to access the scanner on the local network. Entering

sudo /etc/init.d/saned restart

restarts the daemon to enable the new configuration.

On a Linux client, a call to scanimage -L tells you whether the scan utility is available on the network: The scanner then reports back with output, as shown in Listing 2.

As with printers, you will also need a scanner client system running on the computers that access the scanner. Xsane is a simple client for scanning under Linux. When the program starts, it searches for available scanners and also finds scanners that it can reach via the local network (Figure 1).

Figure 1: Xsane also integrates scanners that are reachable on the network.

If you are running a Windows or Mac system, you can look online for information about connecting to a sane scanner. Windows users often use the SaneTwain [4] tool. The counterpart for Macs is a tool called Twain-Sane [5].

The standard Raspberry Pi cases sold in the marketplace do not include space for accessories and add-ons. A DIY case built using a 3D printing service offers a good solution, but some planning is in order.