[sane-devel] New "SANE" driver, or sort of "Middleware"?

Till Kamppeter till.kamppeter at gmail.com
Thu Feb 3 21:00:47 GMT 2022


This form of scanner driver is not a SANE driver but a Scanner 
Application, an emulation of a driverless (in your case eSCL, other 
driverless protocols are WSD and IPP Scan) scanner by software, where 
the emulator communicates with the actual, physical scanner, advertises 
the presence of the scanner via DNS-SD (aka mDNS, Bonjour), and converts 
the standard protocol (eSCL here) into the scanner's proprietary 
protocol (S400W here).

If the Scanner Application is sharing to the network, clients with any 
not too old OS can scan, as modern OSes support driverless scanning. All 
modern network multi-function devices do both driverless printing and 
scanning and so you can use them with any not too old client device.

SANE makes the bridge between SANE frontends (any Linux app which scans) 
and driverless scanners (or Scanner Applications) with the sane-airscan 
backend which currently supports both eSCL and WSD (IPP Scan will be 
added later).

Scanner Applications are the future of scanner driver packaging as they 
allow sandboxed packaging (like Snap and flatpak) of scanner drivers and 
scanning frontends and so distribution-independent driver packages. The 
communication between the two goes via IP with the three driverless 
protocols. Separate sandboxing of frontend and driver with SANE is not 
possible, as the drivers are shared library files to be dropped in a 
defined directory and to be dynamically loaded by the frontend.

In addition Scanner Applications can be joined with Printer Applications 
for multi-function devices.

Mark, you already could make use of this new scanning architecture, by 
sandbox-packaging your Scanner Application and putting it into the 
stores for Snap, flatpak, ... and then every Linux user can simply 
download and install it, regardless of which distro and he can scan on 
the supported scanners. sane-airscan is already included in the standard 
distros and automatically discovers your Scanner Application making the 
supported scanners available to all SANE clients.

    Till


On 03/02/2022 16:23, Mark Dm wrote:
> Ok I have spent a few years making various versions of GUIs and tools 
> for s400w based scanners which include Century CPS-A4WF, Halo Magic 
> Scanner, ION AirCopy, ION AirCopy E-Post Edition, iScan Fly, Kaiser Baas 
> WiFi Photo & Document Scanner, Mustek iScan Air / S400W, Transcription 
> Patri Kun A4 Wi-Fi Portable Scanner. Heretofore referred to collectively 
> as s4000w.  Most of my work has been based around the command line 
> driver for these same units by Bastel
> https://sites.google.com/site/bast3l78/s400w/main 
> <https://sites.google.com/site/bast3l78/s400w/main>
> 
> More recently I have worked on Twain2AirScan to allow a Windows Twain or 
> WIA Scanner to be shared over the eSCL protocol.
> 
> Recently it came to mind to simplify one particular version of something 
> I had previously written. As the Bastel command line driver I use in 
> other projects handles communication to/from s400w scanner, and I had 
> already created an eSCL (AirScan) interface  in PHP the new product is 
> NOT a GUI it is only an eSCL to Bastel s400 bridge. It receives and 
> sends eSCL commands on one side and on the other side sends and 
> receives commands to/from the s400w by way of the Bastel driver.
> 
> End result? The end result is with the SANE-Airscan backend (not to be 
> confused with the eSCL Back-end)  these s400w scanners now become 
> compatible  with not only SANE , but the same code runs on Mac OSX_64 
> (with included Mac X86-64 Binary ) for native Mac scanning.
> 
> There are Linux Binaries for x86_32, x86_64, Arm32(Pi 2 & 3). Sorry I 
> have no M1 machine to make an M1 binary and cross-compiling seems daunting.
> 
> This will be added to my http://ScannerShare.com 
> <http://ScannerShare.com> page with Twain2AirScan that allows sharing a 
> Windows TWAIN or WIA Scanner to eSCL/AirScan clients like Mac or Linux, 
> Android, or Linux (using SANE-AirScan)  at http://scannershare.com 
> <http://scannershare.com>. For now however there is no direct link 
> for the new  s400w product but you  can get the file by requesting it at 
> the bottom of the page at http://scannershare.com 
> <http://scannershare.com> Anyone with an s400w scanner and Linux or 
> MacX86_64 is encouraged to test, please.
> 
> To be clear this solution runs on Apache2 with PHP or other web server. 
> PHP handles all the translation to/from eSCL/BastelS400W. It runs fine 
> on 'localhost' and even supports automatic scanner detection 
> via Bonjour..Avahi. It also simultaneously shares the scanner over your 
> entire network using eSCL/AirScan . You will need a dedicated WiFi 
> interface for the scanner, aside from whatever you use to connect to 
> your normal network/Internet.
> 
> Mark
> 



More information about the sane-devel mailing list