Transforming my Wired Printer to Wireless

Amit Sharma
7 min readSep 10, 2023

--

The Background

Up until the last year or so, I’ve always questioned the need for a wireless printer — why would I even need one? All it takes is plugging in a printer USB cable to my laptop. Printing is not a usual activity for me, or for that matter, for most of us. And, I’ve to go collect my printed paper sheets from the printer anyways, so it’s not like it’s saving me a field trip either. So, why do I pay extra to buy a wireless printer. But that was quite some time back.

2 kids and 12 devices at home later, I’ve never felt the need for a wireless printer more. This monochrome Laser printer (RICOH SP210SU) that I purchased years ago, was at the time, one of my best home-office investments. It prints fast and has only run out of ink once in last 5 years! But it’s not wireless and that’s where it started to get a little sore.

First, I figured my printer had official driver support for Windows machines only — no Mac, no Linux — just Windows! I and my wife use MacBooks and our kids have taken over our Windows laptops for their school/personal use. So every time we needed to print anything, we would save the file to a shared drive location on the intranet and then use one of the kids laptops to print it. That, sometimes, meant disturbing them while they are in an online class, doing their homework or maybe playing an online game. I’ve come to realize that, as they grow up, kids don’t take to letting parents interrupt their laptop usage every now and then very kindly 😅

Our printing requirements had shot up in frequency and volumes — multiple users across multiple devices including cellphones. So, the need for a wireless printer was super clear at this time — it was the only peaceful and sustainable way to manage print jobs across the family. Something needed to be done, soon!

I’d a choice to make — either buy a new wireless printer or convert the current wired one into wireless — the second option comes from my maker instincts so if it doesn’t make a lot of sense to you, it’s perfectly normal. So, I got onto this interesting journey of converting my printer to wireless except it wasn’t as smooth as I thought it will be. Here’s how the story goes -

Hardware options

I did my research on how folks go about converting their wired printers into wireless and here are some of the options and my analysis of what it meant for me -

  1. My printer was not in the physical proximity of any router with USB printing capability, so no point exploring this any further.
  2. Another option was to hook up a spare Windows laptop permanently connected to the printer with a shared printer setup. But I didn’t have a spare Windows laptop and even if I had one, it was not my preferred way for the reason that I’d need to put a brick charger along with it. Also, the space occupied as well as the power consumption would be higher than to my liking. So this Windows laptop option was out of the window for me (ironical isn’t it 😊)
  3. I could bring in my favorite Raspberry/Orange Pi Zero W into the equation as it fit my dream of small footprint both on power consumption as well as physical real estate. Another benefit it brings to the table is the ability to add some cool features using its GPIO (General Purpose Input/Output) pins in the future e.g., Printer status LEDs. All I needed was Linux drivers for my printer model which wasn’t available on RICOH’s official site but after some more research, I finally found an unofficial driver for Linux for my printer model — thank you droidzone 👍

Challenges faced

Once I installed the printer driver for linux on my Pi, I quickly realized that I was dealing with a different architecture i.e., arm as against the x86 linux arch that the drivers were built for. The drivers installed alright (because the installer was likely built for multi-arch install) but when it came to actually printing a test page, it got stuck and failed at executing one of the key driver programs that goes by the name rastertolilo — it was an x86 executable and simply refused to execute on an arm machine i.e., Pi.

So next, I looked up if there was a way to run x86 executables on an arm machine and figured I can go with one of the 2 options below

  1. Build the printer driver code from source on arm but there was no source code to begin with — so no joy here.
  2. Use a x86 emulator on my Pi to run the executable — figured there is this qemu emulator built just for this purpose.

Went ahead with Option #2 with a lot of hope that I will get past that x86 executable barrier now — but, turns out that it was going to be a dead end soon.

Fig 1 — Attempt to run x86 printer driver using qemu emulator (Failed)

When I tried to run rastertolilo on top of qemu, I ended up getting errors — one library missing after the other e.g., lib.so.6, glibc version issues, and one or the other dependencies missing or conflicting! So, after a day or two of pulling my hair trying to resolve them, I gave up on this approach.

I still needed something which could help me run the x86 printer driver executable on an arm machine! And qemu-emulator alone wasn’t going to cut it for me. Could docker help here, I kept thinking…

Docker to rescue

I’d never imagined that I’ll be running docker on a very humble Pi with 512MB RAM but I bit the bullet. With a lot of apprehension, I gave it a shot and to my delight, I was able to pull and run an Ubuntu x86 OS image on arm Pi powered by qemu emulator. For the first time, I was able to see this darned rastertolilo file run within ubuntu on docker! And it ran successfully.

But then came the next issue — the USB port was not reliably accessible across the docker boundary — it was very iffy and would end up disconnecting quite often. This meant I could not run entire print job from within docker — it had to be a combination of running the rasterlilo file from within docker and running rest of the print job from Pi host itself which would have a reliable USB connection.

So, I modified the local rastertolilo on Pi host to invoke the rastertolilo in the container to see if that worked, and to my extreme delight, it did! Here’s the exact content of the executable

root@printserver:~# cat /usr/lib/cups/filter/rastertolilo
#!/bin/bash
docker exec -i cups /bin/sh -c "/usr/lib/cups/filter/rastertolilo"
root@printserver:~#

And, finally, I had a working printer setup — YaY!

Fig 2 — Working version of the solution with cups+qemu+docker

To serve up the printer wirelessly on my home network, I used an open source software CUPS (Common Unix Printing System) from Apple which supports a host of printer devices and enables managing printer services wirelessly. This is one of the best options out there if one wants to serve up their printers wirelessly — was an easy choice to make!

Fig 3 — My RICOH printer added to CUPS interface for wireless printing

This is the final picture of my wireless printing adapter running off of an Orange Pi Zero — looks sweet, doesn’t it 😍 Yes, the enclosure for Orange Pi Zero is 3D printed, but that’s a story for another day 😊

Fig 4 — My RICOH SP210SU Laser Monochrome printer with Orange Pi Zero server sitting right on top of it

Many of you might wonder as to what was the overhead of adding qemu+docker on my print job performance. It might have added a few seconds to the overall print time but, practically speaking, that’s nothing compared to the overall time it used to take anyways. And, the pleasure of being able to submit your print jobs wirelessly from any device across the home more than compensates for the marginal performance overhead.

So, that’s my story. Did I tell you about we printing more from our cellphones directly now than from either MacBooks or Windows laptops 😊

Hope this article helps someone out there to get their own wired printer converted to wireless with a low profile Raspberry Pi Zero W or an Orange Pi Zero. Please feel free to reach out to me if you need any assist in this regard — after all, it’s my time to pay it forward 👍

--

--

Amit Sharma

Passionate about Tech, Engineering, AI, IoT and Electronics