Feb 10, 2020

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.
 


No comments: