Pi Zero-W Print Server

Board version: Pi Zero W Rev 1.1
Memory: 512 MB
RPi OS version: Lite 32-bit


This project is no longer operational. This info is for reference only.


Pre Basic install OS

After you have installed the OS image on the SD card, two more files must be added. These two files must be placed in the root of the SD card.

  1. The SSH file, the well-known empty and extension-less file
  2. A file to get onto the wireless network immediately during start-up. Create a new text file with the following name:
    wpa_supplicant.conf : ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev network={ ssid="YOUR-SSID" psk="YOUR-Wifi-PASSWORD" }


Basic install OS

See Default Info page


Disable Bluetooth

$ sudo nano /boot/config.txt Add two lines to the bottom of the file, then save and reboot # turn bluetooth off dtoverlay=pi3-disable-bt


Using CUPS (print server)

Install this software by typing the following command into the terminal: $ sudo apt-get install cups

Add the pi user to the lpadmin group. This group will allow the pi user to access the administrative functions of CUPS without needing to use the superuser. $ sudo usermod -a -G lpadmin pi

There is one other thing that we will need to do to CUPS to ensure that it runs well on the home network and that is to make CUPS accessible across your whole network, at the moment it will block any non-localhost traffic.
We can get it to accept all traffic by running the following two commands: $ sudo cupsctl --remote-any $ sudo /etc/init.d/cups restart

Go to the following web address in your favorite web browser: http://192.168.x.x:631 You should get the CUPS homepage.


Setting up SAMBA for the Pi Print Server

If you intend on using your print server with Windows, then setting up SAMBA is, unfortunately, necessary. We will need to install SAMBA and make a few changes to its configuration to ensure that it runs correctly and utilizes the CUPS print drivers.

Now firstly, we should make sure we have SAMBA installed, the easiest way to do this is simply run the install command in the terminal.
We can do that by entering the following command in the terminal: $ sudo apt-get install samba

With SAMBA now installed to our Raspberry Pi, we will need to open its configuration file and make several edits, and we can open the file with the following command: $ sudo nano /etc/samba/smb.conf Now with the file open, we will need to scroll to the bottom of the file. The quickest way to do this is to use Ctrl+V. Once at the bottom of the file you should add or change the following lines. In my case, the [printers] and the [print$] sections were already in the file, so I just needed to change the values to match the following: # CUPS printing. [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = yes read only = yes create mask = 0700 # Windows clients look for this share name as a source of downloadable # printer drivers [print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = no guest ok = no

We can now restart SAMBA to get it to load in our new configuration, to do that, all we need to do is type the following command into the terminal: $ sudo /etc/init.d/samba restart


Install driver for Brother HL-L2300D on Pi

Goto Brother webpage and look for the above printer. Check and download Rasbian Lite driver. Upload this driver to the Pi.

Turn the Brother printer on (Pi should already be on) and connect the usb cable to the Raspberry Pi.
Wait a couple of seconds before you install the printer-driver.
Install driver with: $ sudo dpkg -i brgenprintml2pdrv-x.x.x-x.armhf.deb Use the right printer-driver name! Above is an example.

The printer driver installation is now completed.

For USB connections, make sure you connect the cable to the printer before installing the driver package. If you forgot to connect the cable, you can use the dpkg-reconfigure command to quickly configure your printer. Connect the cable and type the following in a terminal window: $ sudo dpkg-reconfigure brgenprintml2pdrv


Adding a printer to CUPS

Go to the CUPS web page: http://192.168.x.x:631
Add a new printer, a Brother HL-L2300D in this case:
  • Click Administration
  • Click on the Add Printer
  • Select the HL-L2300D and click Continue
  • Select your printer (again??
  • Add a name and discription and enable Share This Printer and click Continue
  • Final screen is the default settings screen, check and click the button


Add the CUPS printer to Windows 10

Go to Brother webpage. Please find, download and unpack the Win10 driver from your printer.

  • In Search search for add printer, it will return Printers & Scanners
  • Click Add a printer or scanner. Wait until your Win10 is finished searching and click The printer that I want isn't listed
  • Select Select a shared printer by name
  • And copy this into the text field: http://x.x.x.x:631/printers/Brother_HL-L2300D_series (Please copy the name of the printer out of the CUPS Printer page!)

  • When Win10 has found the printer select Have disk and look for the folder of the Win10 driver you just downloaded
  • When Win10 searched that folder, it presents a list of printers. Select yours and click ok
  • Win10 is finished now and you can print a test page, do that to see if everything is working


Put an Off button to the Pi

So you can safely shudown your Pi without the hassle of logging into your Pi and give the shutdown command.
See page An On/Off button to your Pi go to page LINK