[figure]

SANE: Scanner Access Now Easy - on Unix

Petter Reinholdtsen <pere@hungry.com>

Abstract

SANE is an open source project to provide scanner support on Unix. It supports more then 200 different scanners and works on almost all Unix platforms.

[figure]

What is SANE

• Open Source multi-platform project with developers all over the world.

• Application programming interface (API) that provides standardized access to any raster image scanner hardware (flatbed scanner, hand-held scanner, video- and still-cameras, frame-grabbers, etc.).

• Network protocol to communicate with scanner servers — hosts with attached scanner hardware.

[figure]

Why another scanner API

When the SANE project started, there were no common scanner API on Unix. Some programs supported some scanners, but every program maintained it’s own drivers. TWAIN existed only on Windows and Macintosh. The TWAIN API is not usable, because GUI and scanner driver is one (i.e. platform dependent) and it has no network support.

[figure]

Example:

The MEMS Exchange Remote Microscope^{a}

• automated and remotely controllable semiconductor inspection microscopes

• lets MEMS designers view their wafers after critical processing steps from any location having an Internet connection.

Components • an optical microscope (currently a Leica INM200 or INS1000)

• a server which controls the microscope

• a JavaTM applet or servlet that constructs the client interface.

ahttp://www.mems-exchange.org/exchange/software/microscope/ SANE: Scanner Access Now Easy Petter Reinholdtsen

[figure]

A three layered architecture

• Frontend is backend and platforms independent

• Backends are platform independent

• The sane internal (sanei) API hides all platform dependent code (SCSI, parport, serial, network and config file API) from the backends.

SANE: Scanner Access Now Easy Petter Reinholdtsen

[figure]

Setting up SANE

Fetch and compile

Download latest distribution from http://www.mostang.com/sane/, current stable version is 1.0.2. Unpack:

tar zxvf sane-<version>.tar.gz

Compile:

./configure <--prefix=[/usr/local]>
make; make install.
When successful, scanimage, xscanimage, xcam, sane-config

should be available in /usr/local/bin;. xscanimage require the Gtk library and might be missing.

[figure]

Configuration

The SANE config files hide in <prefix>/etc/sane.d/.

• local scanner

– dll.conf

List of backends to load. Comment out the unused ones to reduce startup time. (’man sane-dll’ for details)

– <backend>.conf

Backend-dependent configuration, normally path to scanner device.

– Test with scanimage -L and scanimage -T

– If nothing works, try to set environment SANE DEBUG DLL=128 to get debug information.

[figure]

• network scanner

– /etc/inetd.conf and /etc/services (server side) to start

saned. (’man saned’ for details)

– saned.conf (server side)

List of hosts allowed to access scanner. Insert ’+’ to allow everyone and leave access control to tcp wrapper.

– net.conf (client side)

List of scanner server hosts to contact.

[figure]

Frontends

I’m aware of the following applications with SANE support. • scanimage for batch scanning

• xscanimage / xsane for GUI. (also as GIMP plugins)

• WWW frontend (SANEcgi)

• Pyton and Tcl/Tk client

• NextStep client (NSane)

• BeOS client

• OS/2 client (ScanIt/2)

• winsane / xsane for Windows xsane is the best client for Unix/X11 at the moment.

SANE: Scanner Access Now Easy Petter Reinholdtsen

[figure]

Supported scanners and platforms

• 35 backends and > 200 different models

• Mostly SCSI, some parallel port and some USB scanners

• Works on Unix (Linux, *BSD, HP/UX, OpenSTEP, DEC Unix, SCO *, Irix, Solaris, AUX, DomainOS), OS/2, BeOS and sometimes even on Windows.

UWA/CIIPS Seminar, Perth, 2000-07-27 11

[figure]

Thank you

                     http://www.mostang.com/sane/

SANE: Scanner Access Now Easy Petter Reinholdtsen