Feb 10, 2020

Simple AirPrint server for iPad, iPhone, Android, and Chrombook/Chromebox & LibreELEC too!

No matter what device you use printing is a necessay evil. If you try it Apple's way it can get pretty expensive buying a network direct printer to print from iOS.

This is not only for iOS, because the same solution fills the void in Android, Chromebook, and Chromebox too. If your printer is not compatible with OSX and you have an OSX machine this can also be useful to work-around that incompatibility.

Over the last several months I have tested a low cost Raspberry Pi 3 based print server. Although I use it mostly on Android, I have tested extensively from Chromebook as well.

My particular configuration used a $50 USD Raspberry Pi 3. The main trick is to ensure you have a printer with good linux driver support on the Raspberry Pi 3. Not all printers with Linux support have Linux drivers for Raspberry Pi 3. Many open source drivers are quite good though, and will work on Raspberry Pi.

Here is a good place to start checking printer compatibility:
http://www.openprinting.org/printers

Of course you can also check the printer manufacturer's web site

CUPS (Common Unix Printing System) used in Linux now has all AirPrint functionality built in. It will act as a Go-between for AirPrint and your printer. 

Installing a Raspberry Pi 3 based print server is a fairly straightforward process. It is a process I will not detail here as there are many guides on the Internet already. Here I will tell you how this can also work for Android, & Chromebook/Chromebox

In iOS once the print server is configured the printer should appear as any AirPrint device

On Android 7.0 and up you can install either the CUPS printing or Mopria Print. Your printer need not have android support directly.  I prefer Mopria Print over CUPS as the interface is more refined.

On Chromebook or Chromebox, you can install the CUPS or IPP printer extension.

LibreELEC, with Kodi, you can install the CUPS or IPP printer extension. This install in the Crome browser making printing available from the browser.

If your printer was incompatible with OSX, it is now compatible with OSX, and driverless. One such example is th HP Color Laserjet CP1215. This printer has no Mac OSX drivers available. It does have very good Linux driver support. http://www.openprinting.org/printer/HP/HP-Color_LaserJet_CP1215 and apparently is supported on Raspberry Pi 3 with those drivers. With the Raspberry Pi 3 between OSX and CP1215 you will have no issues printing although both Apple and HP will say you can not do it.

If you set up CUPS correctly you can even have Windows auto-install the drivers from the CUPS server. 

In any case  no matter what the mix of operating systems in your home or office you can use this method to work-around most any printer incompatibility with most an OS. In fact you can make a non OSX compatible printer OSX compatible! OSX and Windows will use any CUPS printer sending it generic PDF or Postscript data by way of the print server which the print server reformats for the printer.

It is fast cheap, reliable and far better than any stand-alone print server you buy.

While messing with the Raspberry Pi , you may also want to consider adding support for a scanner by way of SANE, or how about an Asterisk server to manage phone calls in the house? You want to transfer that call to the bedroom?

Aside from my Raspberry Pi 3 working as a print server it has been running as a scanner server and asterisk server. The scan server allows me to scan from Android, Windows, Linux or even using a web browser, all from the same scanner. As for Asterisk I am running 3 VoIP numbers in, a cellular network and a local fixed line. I get the advantage of least cost routing and have failover when the unreliable landline dies , as it sometimes does. 





 


How to write a SANE Backend when you have no idea how.

A couple of years ago I started to see if I could write something to make my wonderful Halo Magic Scanner and Ion Aircopy scanners work with linux. As these two scanners are identical, what works for one should work for the other.

What I developed over time was a web interface. An Interface that allowd me to scan from a web browser. It will even run on a Raspberry Pi. It will do image conversions to PDF, PNG, resize, crop, etc.

Then later I started seeing that there was a more standardized way of scanning appearing on the market. Apple calls it AirScan but it is eSCL.

After reviewing more about this protocol, it became obvious that this protocol hit far closer to home than learning a new programming language and learning how to write a SANE back-end. But, why for Dog's sakes was there no support for eSCL scanners in SANE? I did test a couple of projects that made claims but none were ready for prime-time.

Continuing with my web GUI project I continued writing PHP to emulate the eSCL protocol.

Months later I was successfully able to test from VueScan but still no joy from OSX nor the Mopria client.

Most recently I discovered sane-airscan https://github.com/alexpevzner/sane-airscan and thought I would give it a whirl. I figured if I was emulating the eSCL protocol adequately and there was now a Back-end for eSCL protocol on SANE , it should work. I knew I was 99% there after all.

Much to my surprise my eSCL protocol after minimal tweaking communicated perfectly with sane-airscan.

What this really means is that one can emulate a more standardized protocol by way of a simple web server and create SANE compatibility using sane-airscan , yea baby!

So together with the sane-airscan project we have added several new scanners to the SANE compatibility list.
 

Those compatible scanners are:
  • ION AirCopy
  • ION AirCopy E-Post Edition
  • iScan Fly
  • Halo Magic Scanner 
  • Mustek iScan Air / S400W
  • Century CPS-A4WF
  • Transcription Patri Kun A4 Wi-Fi Portable Scanner 
  • 転写パットリくん A4 Wi-Fiポータブルスキャナー
to get full SANE support on these scanners, you will need BOTH

https://github.com/markosjal/AirScan
https://github.com/alexpevzner/sane-airscan

I hope someone finds this post useful, but most of all I hope you enjoy your scanner using it with SANE.