<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tripad</title>
    <description>The latest articles on DEV Community by Tripad (@tripad).</description>
    <link>https://dev.to/tripad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F201822%2Fecc2ff29-a0f9-4e4d-b27f-e85791df0e47.jpg</url>
      <title>DEV Community: Tripad</title>
      <link>https://dev.to/tripad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tripad"/>
    <language>en</language>
    <item>
      <title>Raspberry Pi + Old Printer = Wireless Network Printer</title>
      <dc:creator>Tripad</dc:creator>
      <pubDate>Tue, 29 Dec 2020 17:29:31 +0000</pubDate>
      <link>https://dev.to/tripad/raspberry-pi-old-printer-wireless-network-printer-5ce2</link>
      <guid>https://dev.to/tripad/raspberry-pi-old-printer-wireless-network-printer-5ce2</guid>
      <description>&lt;p&gt;Every few weeks my dad would remind me that I need to print a physical piece of paper for “keeping records”. And like the weeks before I would keep forgetting to do so until one day I get another reminder saying that its been almost a month since the last reminder. Oh Well!&lt;/p&gt;

&lt;h3&gt;
  
  
  So here is the Scenario :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Connect my old but trusty HP LaserJet 1020 to the home WiFi network (Using a Raspberry Pi)&lt;/li&gt;
&lt;li&gt;Make it easy (and reliable) enough for my (not so tech-savvy) parents to print from their phones&lt;/li&gt;
&lt;li&gt;Never be asked to print anything ever again :)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Here’s the Setup I used:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;nHook up the printer to a Raspberry Pi (&lt;em&gt;Literally any Pi works here, I am using a “Headless” Raspberry Pi 3B because I have it handy&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;Connect the Raspberry Pi to your network (&lt;em&gt;I am using WiFi .. I guess thats the point of this guide 😛&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;Use &lt;a href="http://cups.org/" rel="noopener noreferrer"&gt;CUPS&lt;/a&gt; to start sharing the printer using IPP — Internet Printing Protocol&lt;/li&gt;
&lt;li&gt;Install/Setup CUPS support on Android and Windows Clients&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  But wait … Why Not:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Connect it to a computer .. use Google Cloud Print .. yada yada ? Because it still needs a computer to be booted up and running for when someone wants a print out. My Raspberry Pi is already Pi-Hole and is a lot more energy efficient&lt;/li&gt;
&lt;li&gt;Buy a new WiFi Printer ? Because even after being a printer from mid 2000s, trusty LaserJet 1020 is fast, virtually maintenance free and its “compatible” toner cartridges sell for as low as ₹400 (~ US$ 5)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Installing Stuff on the Raspberry Pi
&lt;/h2&gt;

&lt;p&gt;All we need to make this setup to work is CUPS (Common Unix Printing System) which is the thing that makes Linux computers spit out paper.&lt;/p&gt;

&lt;p&gt;Installing CUPS is rather straight forward on Rasbian/RPi OS.&lt;/p&gt;

&lt;p&gt;Here are the steps:&lt;/p&gt;

&lt;h3&gt;
  
  
  0. Connecting Raspberry Pi (over WiFi) to your Network
&lt;/h3&gt;

&lt;p&gt;Like with everything on the Pi there are multiple ways to connect the Pi to your network (using WiFi)&lt;/p&gt;

&lt;p&gt;*If you have a keyboard/mouse/monitor connected : Use &lt;a href="https://www.raspberrypi.org/documentation/configuration/raspi-config.md" rel="noopener noreferrer"&gt;Raspi-Config&lt;/a&gt; to connect to WiFi&lt;/p&gt;

&lt;p&gt;*If you just burnt your OS image to the card : &lt;a href="https://howchoo.com/g/ndy1zte2yjn/how-to-set-up-wifi-on-your-raspberry-pi-without-ethernet" rel="noopener noreferrer"&gt;Setup WiFi &amp;amp; SSH Without a Monitor&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*Having a wired/wireless network connection with a static IP address will make your life easy — checkout &lt;a href="https://www.raspberrypi.org/documentation/configuration/tcpip/" rel="noopener noreferrer"&gt;this guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I prefer to keep the Raspberry Pi’s network configuration set to DHCP and assign a static lease on the router. In my opinion, this makes it easier to make changes to my network setup without remembering to reconfigure the Pi.&lt;/p&gt;

&lt;p&gt;In my setup, even with almost 3 walls between my Pi and WiFi router, the signal strength is pretty good.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Update the Raspberry Pi
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update
sudo apt-get upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Lets Install CUPS server
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install cups
sudo usermod -a -G lpadmin pi
sudo cupsctl --remote-any
sudo systemctl restart cups
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CUPS server should now be accessible on &lt;code&gt;http://[RaspberryPi's-IP]:631&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Tip: to quickly find the IP of the Pi — Run &lt;code&gt;hostname -I&lt;/code&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Adding any user to the &lt;strong&gt;lpadmin&lt;/strong&gt; group gives that user access to the administrative options of the web console.&lt;/p&gt;

&lt;p&gt;I’ve added the &lt;strong&gt;pi&lt;/strong&gt; user to the lpadmin user group using the &lt;code&gt;sudo usermod -a -G lpadmin pi&lt;/code&gt; command&lt;/p&gt;

&lt;p&gt;By default CUPS is only accessible on the Pi itself. To make it available remotely, we have change the access rule using &lt;code&gt;cupsctl --remote-any&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(This makes the server available to all IPs which is not secure — We can change this layer in cups conf file using the website console)&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Adding a Printer to CUPS Server
&lt;/h3&gt;

&lt;p&gt;Plug in your printer to any USB port of the Raspberry Pi and power it on.&lt;/p&gt;

&lt;p&gt;Navigate to the CUPS console and follow these steps&lt;/p&gt;

&lt;p&gt;*https://(Your-Pi-IP):631&lt;br&gt;
*Administration → Printers → Add Printers&lt;br&gt;
*Should give you the prompt to login — you use your Pi user's credentials to continue&lt;/p&gt;

&lt;p&gt;You should be able to see the printer you have connected: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhiztk25poo70b72xyzwc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhiztk25poo70b72xyzwc.png" alt="Add A Printer Section on Cups"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*Select the printer from list and click continue&lt;br&gt;
&lt;em&gt;(If you are able to see your printer in the “Local Printers” list : check if the printer is turned on and is connected with a good USB cable. My printer wasn’t showing up in the list and so changing the USB cable fixed this issue for me)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;On the next screen you would be able to set some identification for the printer you are adding. Ensure that your enable *“Share this Printer”&lt;/em&gt; option at this screen and click continue&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2yhv0h92udnizcuq0s2h.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2yhv0h92udnizcuq0s2h.jpg" alt="Adding Printer Step 2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CUPS will show a list of models and drivers for your printer model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Femy6414u2jgc8081zuvy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Femy6414u2jgc8081zuvy.jpg" alt="CUPS Driver List"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(PS : Here is where you might need to search the interwebs for which drivers work best for your model) &lt;br&gt;
(PS : If you are trying to setup &lt;strong&gt;HP LaserJet 1020&lt;/strong&gt; or a Host-Based Printer see instructions &lt;a href="https://tripad.medium.com/turning-my-old-printer-into-a-wireless-printer-with-a-raspberry-pi-1fb6d73e35a4#21f6" rel="noopener noreferrer"&gt;posted here&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On the final screen you would be presented with some options to set default options for the printer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Felbz1ofjya5hphxlglyo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Felbz1ofjya5hphxlglyo.jpg" alt="Printer Defaults"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This pretty much wraps it up for your CUPS setup. Go ahead and try a test print!
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnc5rvczyaxmplkhw82zz.jpg" alt="Test Print Option"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdohqvz41wlp29j8oyk35.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdohqvz41wlp29j8oyk35.jpg" alt="A Test Printer Page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Oh Yeah! If you have reached this far .. give your self a pat on the back&lt;br&gt;
&lt;a href="https://i.giphy.com/media/gFi7V9CRBQVW0/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/gFi7V9CRBQVW0/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Next Up : Setting up your Client Devices
&lt;/h3&gt;

&lt;h4&gt;
  
  
  For Android :
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Install CUPS (IPP) Support:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I found the easiest way to achieve this was using an open-source app by &lt;a href="https://benoitduffez.github.io/AndroidCupsPrint/" rel="noopener noreferrer"&gt;UpActivity&lt;/a&gt; called CUPS Printing on:&lt;/p&gt;

&lt;p&gt;Google Play: &lt;a href="https://play.google.com/store/apps/details?id=io.github.benoitduffez.cupsprint" rel="noopener noreferrer"&gt;https://play.google.com/store/apps/details?id=io.github.benoitduffez.cupsprint&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;F-Droid : &lt;a href="https://f-droid.org/packages/io.github.benoitduffez.cupsprint/" rel="noopener noreferrer"&gt;https://f-droid.org/packages/io.github.benoitduffez.cupsprint/&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  For Windows 10 :
&lt;/h4&gt;

&lt;p&gt;Internet Printing Protocol support is enabled on Windows 10&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Under **Control Panel →  “Printers &amp;amp; Scanner”&lt;/em&gt;*- Click &lt;em&gt;Add Printers &amp;amp; Scanner.&lt;/em&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Click on the “The Printer that I want isn’t listed” option&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On the next screen, copy/paste the CUPS printer URL to the “Select a Shared Printer By Name” textfield. Do ensure that you copy the HTTP URL and not the HTTPS one&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fedu5574cx420gzjhertg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fedu5574cx420gzjhertg.jpg" alt="Windows 10"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If the connection is successful, on the next screen you will be presented with a list of drivers to choose from. Find and choose the appropriate driver from the list or download the driver files from the manufacturer’s website. Thats it!&lt;/p&gt;




&lt;p&gt;Though nothing in a DIYers life is as smooth as a tutorial so I have documented some challenges I have with cables and power supply in my &lt;a href="https://tripad.medium.com/turning-my-old-printer-into-a-wireless-printer-with-a-raspberry-pi-1fb6d73e35a4#6e4d" rel="noopener noreferrer"&gt;original post&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope this helps in getting started with your own printer server setup. If you have any question, do ping me Twitter: &lt;a href="https://twitter.com/_Tripad" rel="noopener noreferrer"&gt;https://twitter.com/_Tripad&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👋Until Next Time&lt;/p&gt;

</description>
      <category>diy</category>
      <category>raspberrypi</category>
    </item>
  </channel>
</rss>
