Skip to content

Scanner Access Now Easy - Apple AirScan (eSCL) driver

License

Unknown, GPL-2.0 licenses found

Licenses found

Unknown
LICENSE
GPL-2.0
COPYING
Notifications You must be signed in to change notification settings

edgomez/sane-airscan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sane-airscan -- Linux support of Apple AirScan (eSCL) compatible document scanners

If you are a lucky owner of scanner or MFP which works via network with Apple devices, I have a good news for you: now your scanner works with Linux as well!

In theory, this backend should work with any scanner that supports the eSCL protocol (unofficially known as AirScan or AirPrint scanning). In practice, it was tested on several devices from Canon, Kyocera and HP, and this list constantly grows, though slowly, so feedback regarding other devices is very welcomed.

Apple maintains a comprehensive list of compatible devices, but please note, this list contains not only scanners and MFP, but pure printers as well.

To use this backend, you don't need to install ScanGear from Canon, HPLIP from HP or some other proprietary software from hardware vendor. This backend works directly with your device and doesn't depend on a 3rd party closed source components.

Features

  1. Scan from platen and ADF, in duplex and simplex modes, multi-page scan from ADF supported as well
  2. Scan in color and gray scale modes
  3. Reasonably low memory footprint, achieved by on demand decompression of image received from scanner
  4. The cancel operation is as fast as possible, depending on your hardware
  5. Automatic discovery and configuration of the hardware
  6. Manual configuration is also possible, in case zeroconf doesn't work (i.e., computer and scanner are connected to the different subnets)
  7. Both IPv4 and IPv6 are supported

Compatibility

Any eSCL capable scanner expected to work. Here is a list of devices that were actually tested. If you have success with a scanner not included into this list, please let me know.

  • Canon D570
  • Canon ImageCLASS MF743cdw 1
  • Canon TR4529 (PIXMA TR4500 Series)
  • Canon TS 3100
  • Canon TS 3300
  • Canon TS 6151
  • EPSON WF-7710
  • EPSON XP-7100 Series
  • HP Color Laserjet MFP m178-m181
  • HP Color LaserJet MFP M281fdw
  • HP DeskJet 2540
  • HP ENVY 4500
  • HP ENVY 5540
  • HP LaserJet Pro M28w
  • HP Officejet 4630
  • HP Officejet Pro 6970
  • HP OfficeJet Pro 6978
  • HP OfficeJet Pro 8730
  • Kyocera ECOSYS M2040dn
  • TODO

1: this device requires manual activation of AirPrint scanning on its web console: Home->Menu->Preferences->Network->TCP/IP Settings->Network Link Scan Settings->On.

Installation from pre-build binaries

If you use one of the following Linux distros:

  • Debian (9.0 and 10)
  • Fedora (29, 30 and 31)
  • openSUSE (Leap and Tumbleweed)
  • Ubuntu (16.04, 18.04, 19.04 and 19.10)

Follow this link, where you will find packages and very detailed installation instructions.

Note, after a fresh build this link sometimes takes too long to update, so if you encounter "Resource is no longer available!" problems, there is a direct link to repositories: https://download.opensuse.org/repositories/home:/pzz/

I strongly recommend you to choose "Add repository and install manually" option rather that "Grab binary packages directly", because it will enable automatic updates of the sane-airscan package.

Linux Mint users may use Ubuntu packages:

  • Linux Mint 18.x - use packages for Ubuntu 16.04
  • Linux Mint 19.x - use packages for Ubuntu 18.04

For Arch Linux, there are packages, maintained by Thomas Kiss thomas.kiss001@stud.fh-dortmund.de:

Big thanks to openSUSE Build Service, for providing package build infrastructure.

If your distro is not listed, see Installation from sources section below.

Installation from sources

Install required libraries - Fedora and similar

As root, execute the following commands:

dnf install gcc git make pkgconf-pkg-config
dnf install avahi-devel avahi-glib-devel
dnf install glib2-devel libsoup-devel libxml2-devel
dnf install libjpeg-turbo-devel sane-backends-devel

Install required libraries - Ubuntu, Debian and similar

As root, execute the following commands:

apt-get install libavahi-client-dev libavahi-glib-dev
apt-get install gcc git make pkg-config
apt-get install libglib2.0-dev libsoup2.4-dev libxml2-dev
apt-get install libjpeg-dev libsane-dev

Download, build and install sane-airscan

git clone https://github.com/alexpevzner/sane-airscan.git
cd sane-airscan
make
make install

Code Quality

I greatly appreciate a good static code analysis tools, as they help to maintain a high code quality.

This project compiles without any warning by gcc and clang compilers.

Recently it was checked by PVS-Studio static code analyser, and it found a couple of bugs (that were immediately fixed, of course), so I can recommend this tool. Though this tool is commercial, they offer a free subscription for open source projects.

Reporting bugs

To report a bug, please create a new GitHub issue

To create a helpful bug report, please perform the following steps:

  1. Enable protocol trace in the sane-airscan, by adding the following entries into the configuration file
    (/etc/sane.d/airscan.conf):
[debug]
trace = ~/airscan/trace ; Path to directory where trace files will be saved

You may use an arbitrary directory path, assuming you have enough rights to create and write this directory. The directory will be created automatically.

  1. Reproduce the problem. Please, don't use any confidential documents when problem is being reproduces, as their content will be visible to others.

  2. Explain the problem carefully

  3. In the directory you've specified as the trace parameter, you will find two files. Assuming you are using program xsane and your device name is "Kyocera MFP Scanner", file names will be "xsane-Kyocera-MFP-Scanner.log" and "xsane-Kyocera-MFP-Scanner.tar". Please, attach both of these files to the new issue.

References

The eSCL protocol is not documented, but this is simple protocol, based on HTTP and XML, easy for reverse engineering. There are many Internet resources around, related to this protocol, and among others I want to note the following links:

  • kno10/python-scan-eSCL - a tiny Python script, able to scan from eSCL-compatible scanners
  • SimulPiscator/AirSane - this project solves the reverse problem, converting any SANE-compatible scanner into eSCL server. Author claims that it is compatible with Mopria and Apple clients
  • markosjal/AirScan-eSCL.txt - document, describing eSCL protocol, based on reverse engineering. Not complete and not always accurate, but gives the good introduction

About

Scanner Access Now Easy - Apple AirScan (eSCL) driver

Resources

License

Unknown, GPL-2.0 licenses found

Licenses found

Unknown
LICENSE
GPL-2.0
COPYING

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 96.2%
  • Roff 2.1%
  • Makefile 1.3%
  • Meson 0.4%