I admit it. I’m late to the party. But it’s still quite a good party. Raspberry Pi is tasty.
My wife upgraded her Mac to Mavericks, and then the shared printer stopped working. The printer is hosted on a WinXP system. (Yeah, I know XP is going out of service really soon, getting it upgraded is on my to-do list. It’s turned into the kids’ PC so I don’t invest much in it.) So Apple apparently made some changes in Mavericks so that it doesn’t play well with SMB on WinXP. That laser is our family workhorse printer. She’s frustrated she can’t print to it. I’m not going to be able to get to the XP upgrade for a month or two, so what to do until then?
Aha! Use a Raspberry Pi as a standalone print server. I would like an excuse to get an R-Pi and play with it. So I go online and order the model B with an SD card preinstalled with NOOBS, a nice long USB power cable to go with the power supply, and a case. $87 with tax and shipping, more than I expected.
It arrived this morning. I assembled the case – the most difficult part was peeling off the protective film. Except that the power connector was just a hair too big to fit through the case – get out the Dremmel tool and grind a little bit of the acrylic plastic away on the case, and after a couple tries it fits fine. I found a really good article at HowToGeek on general setup of the R-Pi. I plug the HDMI cable into my PC monitor, ethernet into my home router, power into the wall, and USB into the and keyboard and mouse. Select Raspberian. After some apt-get work to fetch the latest software and install CUPS, it’s ready for customization. Now get sshd running on it using raspi-config, so I can remotely login without a physically-attached monitor/keyboard/mouse, now I can reuse one of the USB ports to connect my printer. It is really cool that a Linux machine running X11 costs only $35 and isn’t much bigger than a credit card (except for the thickness). I give it a static IP on my home network, since it is a server.
I follow more helpful instructions on configuring CUPS locally on the R-Pi, then try printing a test page locally from the CUPS admin panel. The first try using the “Foomatic/foo2zjs-z1″ recommended driver (built-in) didn’t result in anything happening , I then tried the “CUPS+Gutenprint v5.2.9″ driver (built-in) and it works! No need to download a ppd file from HP.
From a Mac, now in the Settings for “Print & Scan”, click on plus sign to add a printer, and it shows up automatically as a Bonjour printer. Sweet! That was painless.
Now to get it printing from a WinXP client – changing it from a local printer to a remote printer. First delete the local printer. Using the bartbania site listed above it suggested that I define the printer on XP using it’s share name of \\192.168.1.99:631\printers\HP_LaserJet_1022. But that fails to add the printer. A bit more searching and I find the CUPS docs that suggest the other radio button to add it to XP with a remote URI of http://192.168.1.99:631/printers/HP_LaserJet_1022. That works! IPP was first added to Windows in XP. So now it’s working from both Mac and Windows clients. Mission accomplished.
Bonus points: I can print from my iOS device using AirPrint! It turns out that AirPrint is just an an extension to IPP, and CUPS seems to handle it fine. I’ve printed from my iPhone and from my wife’s iPad. It should work for any iOS app that is AirPrint enabled. I didn’t have to do any more work than what is already described above.
More bonus points: it’s not much more work to enable this printer for Google Cloud Print. Just follow these instructions. Basically you need to just install Chromium and do some configuration with it, before you unplug the keyboard, mouse, and HDMI.
Now tuck this little box neatly away next to the printer. But in a way that I can still see the LEDs. Maybe sometime in the future I’ll attach a USB disk drive as use it as a NAS or DLNA server.