Skip to main content

Network Printer + Apple AirPrint Server on your Raspberry Pi ******Featured Information********

 

 Raspberry Pi als AirPrint server gebruiken - appletips

 

 

On this project, we will be showing you how to set up your Raspberry Pi as an AirPrint server.

 AirPrint is a printing protocol designed by Apple so that their devices would not need to download or install drivers.

By following this guide, you will be able to add AirPrint functionality to any printer that is connected to your Raspberry Pi.

This project is an excellent way of adding extra functionality to both cheap and old printers. Implementing AirPrint support will allow you to print from your Apple device to your connected printer easily.

Before following this project, you will need to have first set up the CUPS software on your device.

Cups is what will act as the brains of your AirPrint server on your Raspberry Pi. It will handle the communication between your Raspberry Pi and the connected printer.

 

Equipment List

Below are the pieces of equipment that you will need for this tutorial on installing AirPrint on your Raspberry Pi.

Recommended

Raspberry Pi

Micro SD Card

Ethernet Cord
USB Printer

Optional

Raspberry Pi Case

USB Keyboard

USB Mouse

This project on setting up your Raspberry Pi as an AirPrint server was tested on a Raspberry Pi 4 running the latest version of Raspbian Buster. 

Raspberry Pi Print Server: Setup a Network Printer

The process of getting the software installed is pretty simple, but configuring it and getting a Windows network to find the print server is a bit more of an involved process.

Setting up a print server is a simple way of bringing your regular USB printer to more modern standards without you having to shell out hundreds of dollars.

The software allows you to move the printer to wherever you want and have it accessible by multiple computers rather than having it connected straight into a single computer.

It’s also a great way to share a printer without needing a costly tower computer running all the time.

To make this all work, we will be making use of a piece of software called CUPS. CUPS stands for Common Unix Printing System and is the backbone of most Linux printing software.

Basically it is the software that communicates with your printer and gets it to print files correctly.

If you want to make sure the CUPS printing software supports your printer, then go to their website at open printing and look up your specific model number.

  To get started we should first update the Raspberry Pi to ensure we are running the latest software.

You can do this by entering the following commands into the terminal.

sudo apt-get update
sudo apt-get upgrade

2. Once the Raspberry Pi has been updated, we can now start installing the print server software.

In this case, we will be installing CUPS. This software manages printers connected via USB or over the network, and it has the bonus of providing a management interface that you can view over the internet.

Install this software by typing the following command into the terminal.

sudo apt-get install cups

3. When CUPS has finished installing there are a few extra things that we will need to do.

The first thing to do is 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

4. 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 Cups is set up so that 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 systemctl restart cups

5. Now we should be able to access the Raspberry Pi print server from any computer within the network.

If you are unsure on what your Raspberry Pi’s local IP Address is then you can make use of the following command.

hostname -I

6. Once you have your Raspberry Pi’s IP Address, go to the following web address in your favorite web browser.

Make sure to swap out my IP address (192.168.1.105) with your own.

http://192.168.1.105:631

Below we look at setting up SAMBA correctly to ensure Windows can properly identify the print server running on the Raspberry Pi.

We will also show you how to add a printer using the CUPS interface.

Setting up SAMBA for the Pi Print Server

If you intend on using your print server with Windows, then setting up SAMBA correctly is 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.

1. 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

2. With SAMBA now installed to our Raspberry Pi, we will need to open its configuration file and make several edits.

We can open the file with the nano text editor by using the following command:

sudo nano /etc/samba/smb.conf

3. 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 the following key combination: 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

Save the file by pressing CTRL + X and then pressing Y and then ENTER.

4. We can now restart SAMBA to get it to load in our new configuration.

To restart SAMBA, all we need to do is type the following command into the terminal:

sudo systemctl restart smbd

Adding a printer to CUPS

1. Adding a printer to CUPS is a rather simple process, but first, we need to load up the CUPS web interface.

If you’re unsure what your Raspberry Pi’s IP address is, then run the following command in the terminal.

hostname -I

2. With your Raspberry Pi’s IP address in hand, you need to go to the following address in your web browser.

When typing in this address make sure that you swap out our IP address (“192.168.1.105“) with your own.

https://192.168.1.105:631

3. You should be greeted with the following homepage.

On here we need to clickAdministration” in the navigation menu at the top of the screen.

 4. You will be taken to the Cups administration page.

On here, we need to click on the “Add Printer” button.

 5. With the “Add Printer” screen now loaded, we can select the printer we want to set up Cups for.

In our case, that printer is the “Canon MG2500 series” printer.

Once you have your printed selected, click the “Continue” button.

 If your printer is not showing up on this screen, ensure that you have plugged it into one of the USB ports on the Raspberry Pi and that it is turned on.

You may need to restart your Raspberry Pi if it is still refusing to show up, ensure the printer is turned on and plugged in when you restart.

6. On this screen, you need to select the model of your printer. CUPS will try and automatically detect the model and pick the correct driver.

However, in some cases this will not function correctly, so you will have to go through the list yourself and find the most relevant driver.

Once you are satisfied everything is correct, click the “Add Printer” button.

7. Now, this is the last screen you need to deal with before the printer is successfully added.

On this screen you can set the name and description to whatever you want.

It is helpful to set the location if you have multiple printers in your house that you need to deal with.

Also, make sure you enable “Share This Printer“, otherwise other computers will not be able to access it.

Once you are happy with the settings, feel free to click the “Continue” button.

 8. The final screen that you will be presented with after setting up your printer is pictured right below.

This screen allows you to change a few of the printer’s specific settings. Such as the page print size, the print quality, and various other options.

Now we will go over how to add our newly setup Raspberry Pi print server to Windows.

It should be a relatively easy process thanks to setting up SAMBA earlier in the tutorial.

Adding a Raspberry Pi Print Server to Windows

1. Adding a CUPS printer to Windows can be a bit of work, mainly because you need to select the driver for Windows to be able to connect to and understand the printer.

To get started, first go to the network page in Windows, one of the fastest ways to get to this is to load up “My Computer” or “This PC” and click on “network” in the sidebar.

Once there you should have a screen that looks like the one below with your Raspberry Pi’s hostname there, in my case it is RASPBERRYPI.

Double click on your Raspberry Pi’s share, it may ask for a username and password.

If just pressing enter doesn’t work, try entering pi as the username.

 2. You should now be greeted with a screen displaying the printers available on your Raspberry Pi print server.

Double click on the printer you want to have connected to your computer.

 3. Upon double clicking this, you will likely be greeted with the warning message below.

Just click the “OK” button to continue with the tutorial.

 4. Now you will need to find your printer within this list, on the left is a list of all the brands, and on the right, is a list of all the printers for that brand that Windows has drivers for.

If you don’t find your printer on here, then try looking up your printer’s model online and download the appropriate drivers for it.

In my case, I had to look for the Canon MG2500 series as shown below.

Once you have selected your printer, click the “Ok” button to continue.

 5. This process will now load up a connection with your printer.

If you want to make this the default printer for the computer, then clickPrinter” -> “Set as Default Printer“.

6. The printer should now be successfully added to your computer and be available for any program to use.

You can ensure the printer is correctly set up by printing a file.

If you have any issues with the file printing, ensure that you have selected the correct printer driver in both CUPS and Windows.

Make sure your printer is also switched on, some printers like the Canon MG2500 series don’t automatically turn back on when a file is sent to it to be printed.

Setting up AirPrint on your Raspberry Pi

Before you can set up AirPrint on your Raspberry Pi, make sure you have followed our print server tutorial listed above.

That tutorial will walk you through all of the steps you need to get the CUPS software up and running on your device.

Cups is a powerful software that allows communication between your Raspberry Pi and a printer.

The AirPrint software will work on top of the Cups software, allowing communication between your Apple device and your Raspberry Pi.

1. Before you can complete this tutorial, you must have completed our Raspberry Pi print server tutorial mentioned above.

Without completing these steps, you will be unable to connect to a printer using AirPrint.

2. Before we install the AirPrint software, we need to ensure everything is up to date

Updating packages on your device is a straightforward process and can be done with the following two commands.

sudo apt update
sudo apt full-upgrade

3. To be able to get AirPrint on your device, you will need to install the “Avahi daemon

You can install this package to your Raspberry Pi by running the following command.

sudo apt install avahi-daemon

This package is an implementation of Apple’s Zeroconf architecture. This architecture typically goes by the name Bonjour.

Bonjour is what AirPrint uses to connect two separate devices such as an iPhone and your Raspberry Pi.

The files you want to print will be sent through the Bonjour daemon and then sent to the connected printer.

4. To make sure everything is now working correctly and the AirPrint server has started properly, let us restart the device.

To restart the Raspberry Pi, run the following command on your device.

sudo reboot

5. Once your Raspberry Pi has finished rebooting, you can now test that everything is working.

At this stage, you should now be able to send stuff from your AirPrint devices to your connected printer.

Conclusion

At this point, you should now have successfully set up your Raspberry Pi to operate as an AirPrint server.

We achieved this by installing the Avahi daemon. This daemon is what implements the bonjour protocol that AirPrint communicates over.

 

Comments

  1. Network Printer + Apple Airprint Server On Your Raspberry Pi ******Featured Information******** >>>>> Download Now

    >>>>> Download Full

    Network Printer + Apple Airprint Server On Your Raspberry Pi ******Featured Information******** >>>>> Download LINK

    >>>>> Download Now

    Network Printer + Apple Airprint Server On Your Raspberry Pi ******Featured Information******** >>>>> Download Full

    >>>>> Download LINK zS

    ReplyDelete

Post a Comment

Popular posts from this blog

How to Setup Fail2ban on the Raspberry Pi or use the Pi- Hole setup

    In this Raspberry Pi Fail2ban tutorial, we will be showing you how to set up and configure the Fail2ban software on your Raspberry Pi. Fail2ban is a crucial piece of software when it comes to improving the security of your Raspberry Pi. It is especially useful if you have your Raspberry Pi publicly accessible via the internet as it is an active and learning form of defense. For those who do not know what Fail2ban is , it is a piece of software that attempts to block malicious connections to your device, which in our case is our Raspberry Pi. It is important if you have SSH or even a web server that is publicly accessible. Fail2ban works by continually scanning your log files and looking for signs of potential attacks. These include attacks such as too many password failures as well as scanning for exploits and much more. Once it finds unusual activity it then automatically updates your firewall to ban that IP address. Equipment You will need the following eq...

HiMovies App Policy

   Privacy PolicyYour privacy is important to us. It is HiMovies App Policypolicy to respect your privacy regarding any information we may collect from you across our website, HiMovies App Policyand other sites we own and operate.We only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.We only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorised access, disclosure, copying, use or modification.We don’t share any personally identifying information publicly or with third-parties, except when required to by law.Our website may link to external sites that are not operated by us. Please be aware that we have no control over the conte...

Most Visited Of the Week

AdGuard Home on your Raspberry Pi

      Equipment Below you can view all of the equipment we used for running AdGuard Home on the Raspberry Pi. Recommended Raspberry Pi Micro SD Card (8GB+) Network Connection Optional Raspberry Pi Case USB Keyboard USB Mouse We tested this tutorial on a Pi 400 running the latest version of Raspberry Pi OS Buster. Installing AdGuard Home to your Raspberry Pi This section will show you how to install the AdGuard home software to your Raspberry Pi. This is a relatively simple process as we can download the compiled version of the ad blocker directly from their website. Before beginning, we highly recommend that you set up your Raspberry Pi with a static IP address. As AdGuard Home works by acting as a DNS server, it must retain the same IP address every time it reboots. 1. Our first step is to update and upgrade our operating system. We can update the package list and upgrade all of the installed packages using the following two commands. sudo apt update sudo apt ful...

Raspberry Pi to monitor broadband speed

How to use your Raspberry Pi to monitor broadband speed Step 1: Check for updates As usual, let’s start with checking for the latest updates. Run the following commands in Terminal: sudo apt-get update sudo apt-get upgrade Step 2: Install speedtest-cli There are various methods to measure the speed of broadband connection. We’re going to use speedtest-cli , which, in the words of its creator, is “a command line interface for testing internet bandwidth using speedtest.net.” speedtest-cli isn’t available right away from the Raspbian archives, but we can install it from the Python Package Index (PyPI). That’s easy to do so by using a tool called pip that comes preinstalled on Raspbian Jessie and Stretch. You can make sure that you have pip by running this command: sudo apt-get install python-pip If you a message that reads “python-pip is already the newest version,” that means that we’re good to go. Next, let’s use pip to install speedtest-cli: sudo pip install speedtest-cli...

How to Setup Fail2ban on the Raspberry Pi or use the Pi- Hole setup

    In this Raspberry Pi Fail2ban tutorial, we will be showing you how to set up and configure the Fail2ban software on your Raspberry Pi. Fail2ban is a crucial piece of software when it comes to improving the security of your Raspberry Pi. It is especially useful if you have your Raspberry Pi publicly accessible via the internet as it is an active and learning form of defense. For those who do not know what Fail2ban is , it is a piece of software that attempts to block malicious connections to your device, which in our case is our Raspberry Pi. It is important if you have SSH or even a web server that is publicly accessible. Fail2ban works by continually scanning your log files and looking for signs of potential attacks. These include attacks such as too many password failures as well as scanning for exploits and much more. Once it finds unusual activity it then automatically updates your firewall to ban that IP address. Equipment You will need the following eq...