Commit b4a1a513 authored by Petter Reinholdtsen's avatar Petter Reinholdtsen

Merge devel (v1.0.3) into head branch.

parent 760423d8
......@@ -9,12 +9,12 @@ Java API:
abaton: David Huggins-Daines
agfa: Karl Anders ygard
agfafocus: Karl Anders ygard
apple: Milon Firikis
artec: Chris Pinkham (*)
avision: Meino Christian Cramer, Rene Rebe(*)
canon: Helmut Koeberle, Manuel Panea (*), and Markus Mertinat
coolscan: Didier Carlier
coolscan: Didier Carlier, Andreas Rick (*)
dc25: Peter Fales (*)
dc210: Brian J. Murrell
dll: David Mosberger
......@@ -25,10 +25,13 @@ Backends:
m3096g: Randolph Bentson (*)
microtek: Matthew Marjanovic (*)
microtek2: Bernd Schroeder (*)
mustek: Andreas Bolsch, David Mosberger and Andreas Czechanowski
mustek: Andreas Bolsch, David Mosberger, Andreas Czechanowski and
Henning Meier-Geinitz (*)
mustek_pp: Jochen Eisinger (*)
net: Andreas Beck and David Mosberger
pnm: Andreas Beck, Gordon Matzigkeit, and David Mosberger
pint: Gordon Matzigkeit
plustek: Rick Bronson, Gerhard Jaeger (*)
qcam: Scott Laird (original driver), David Mosberger (SANE backend),
despeckling filter by Patrick Reynolds,
B&W fixes by Andrew Kuchling
......@@ -37,24 +40,35 @@ Backends:
sharp: FUKUDA Kazuya (*) and Abel Deuring (*)
snapscan: Kevin Charter, Franck Schneider, and Michel Roelofs
sp15c: Randolph Bentson (*)
st400: Ingo Wilken (*)
tamarack: Roger Wolff
umax: Oliver Rauch (*) and Michael K. Johnson
v4l: Juergen G. Schimmer
(*) Current active maintainer(s).
jscanimage: Jeff Freedman and Guido Muesch
saned: Andreas Beck and David Mosberger
scanimage: Andreas Beck, David Mosberger, Gordon Matzigkeit
xcam: David Mosberger
xscanimage: Tristan Tarrant, Andreas Beck, and David Mosberger
email addresses:
Please also read the file PROJECTS for projects that are planned or
not yet included into the SANE distribution.
CVS repository maintainer:
Petter Reinholdtsen
Email addresses:
Abel Deuring <>
Andreas Beck <>
Andreas Bolsch <>
Andreas Czechanowski <>
Andreas Rick <>
Andrew Kuchling <>
Bernd Schroeder <>
Brian J. Murrell <>
......@@ -66,12 +80,18 @@ David Huggins-Daines <>
David Mosberger <>
Didier Carlier <>
FUKUDA Kazuya <>
Juergen G. Schimmer <>
Feico W. Dillema <>
Franck Schneider <>
Gerhard Jaeger <>
Gordon Matzigkeit <>
Guido Muesch <>
Helmut Koeberle <>
Henning Meier-Geinitz <>
Ingo Schneider <>
Ingo Wilken <>
Jeff Freedman <>
Jochen Eisinger <>
Karl Anders ygard <>
Karl Heinz Kremer <>
Kazuhiro Sasayama <>
......@@ -87,6 +107,7 @@ Oliver Rauch <Oliver.Rauch@Wolfsburg.DE>
Patrick Reynolds <>
Peter Fales <>
Peter Kirchgessner <>
Petter Reinholdtsen <>
Randolph Bentson <>
Rene Rebe <>
Roger Wolff <>
......@@ -5,6 +5,9 @@ srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = .
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
......@@ -30,12 +33,21 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALLED_INCLUDES = $(addprefix $(top_srcdir)/include/sane/,sane.h sanei.h \
sanei_backend.h sanei_codec_ascii.h sanei_codec_bin.h sanei_debug.h \
sanei_net.h sanei_scsi.h sanei_wire.h saneopts.h) \
include/sane/config.h include/sane/sanei_pa4s2.h
SUBDIRS = lib sanei backend frontend doc tools
all: all-recursive
$(PACKAGE)-$(VERSION).lsm: $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE).lsm
( cat $(PACKAGE).lsm | \
sed -e "s|_DATE_|`date +%d%b%y`|g" \
-e "s|_VERSION_|$(VERSION)|g" \
-e "s|_T_S_|`find $(PACKAGE)-$(VERSION).tar.gz -printf \"%3k\"`|g"\
-e "s|_L_S_|`find $(PACKAGE).lsm -printf "%3k"`|g" > \
lsm: $(PACKAGE)-$(VERSION).lsm
install: install-recursive
$(MKDIR) $(includedir)/sane
Last update: Sun Apr 4 09:34:30 1999
Last update: Sun Jul 30 22:24:27 CEST 2000
- Compiling SANE aborts with error "virtual memory exhausted" on Slackware
linux with gcc. What goes wrong?
......@@ -11,7 +11,7 @@ Last update: Sun Apr 4 09:34:30 1999
make CFLAGS="-g -Wall"
- Avoiding damage on Mustek flatbed scanners
The Mustek flatbed scanners have no protection against exceeding
Most Mustek flatbed scanners have no protection against exceeding
the physical scan area height. That is, if a scan is attempted with
a height that exceeds the height of the scan surface, the scanner
begins making loud noises and the scan mechanism may be damaged.
......@@ -25,13 +25,12 @@ Last update: Sun Apr 4 09:34:30 1999
soon as it starts making noises). Once you know the proper height,
mail the following information to
- scanner name (label on the front of the scanner)
- scanner model (SCSI ID)
- firmware revision
- scanner name (labels on the front and back of the scanner)
- debug logfile
The last two items can be determined with a command of the form:
To get the debug logfile enter the following:
SANE_DEBUG_MUSTEK=3 scanimage -h -d mustek >/dev/null
SANE_DEBUG_MUSTEK=5 scanimage -L 2>logfile.txt
The current list of Mustek scanners that are known to work
properly can be found in man-page sane-mustek(5).
Sun Feb 28 19:17:53 1999
Sat Aug 5 17:57:45 CEST 2000
Here is a list of projects that various people have expressed interest
in. Before starting working on one of these projects, it may be a
good idea to get in touch with the relevant people. (A status of
"wip" means that it is work-in-progress.)
Frontend: Status: Contact:
---------- ------- ----------------------------------------
xcam wip David Mosberger
xscanimage wip Tristan Tarrant & David Mosberger
xsane wip Oliver Rauch <Oliver.Rauch@Wolfsburg.DE>
jscan wip (Java-based frontend to allow accessing
scanners through web pages, etc)
Jeff Freedman <>
Guido Muesch <>
Backend: Status: Contact: available hw:
-------- ------- ---------------------------------------- -------------
Primax planned
Polaroid wip Dick Bruijn <> Polaroid SprintScan
35 LE
Artec wip Chris Pinkham <> Artec AT3
Apple wip Milon Firikis <> AppleScanner
Coolscan wip Didier Carlier <> Nikon Coolscan II
DC25 wip Peter Fales <> Kodak DC25
DMC wip David Skoll <> Polaroid Digital
Microscope Camera
EpsPhoto wanted Jeff Tranter <tranter@software.Mitel.COM>PhotoPC500 (want)
Kodak wanted John Kodis <> Kodak DS-20 (want)
autoadj planned David Mosberger
(Autobrightness/contrast for cameras etc.)
Logitech planned Erik Troan <> ???
Plustek planned Antal Novak <>
SnapScan wip Kevin Charter <> Agfa SnapScan
Franck Schneider <>
Michel Roelofs <>
Canon wip Helmut Koeberle <> Canoscan 600
Manuel Panea <> Canon 2700F
Epson wip Kazuhiro Sasayama <> GT-5000
David L. Sifry <> 1200C
Valentin Hilbig <> GT6000
sgivl wip Erik Nygren <> SGI IndyCam
Microtek wip Matthew Marjanovic <> ScanMaker E6
MicrotekII wip Bernd Schroeder <> ScanMaker 630
ePhoto wip (?) Matthew K. Gray <> [prop] ePhoto
HP wip See
Misc: Status: Contact:
---------------- ------- --------
OS/2 support wip Jeff Freedman <>
good idea to get in touch with the relevant people. Please also read
the files AUTHORS and README for projects that are included into the
Status description
--------- ----------------------------------------------------------------
wanted Somebody would like to have this feature but can't do it himself.
planned Only plans but no code yet.
wip Work in progress. There is (more or less) working code. For details,
look at the web page or contact the author.
sanecgi: web interface to all SANE-compatible scanners (wip)
scanadf: a command-line frontend that offers additional capabilities that are
suited towards document scanners with automatic document feeders (wip)
xsane (wip)
Artec AS6E (wip)
Autobrightness/contrast for cameras etc. (planned?)
David Mosberger
Bell and Howell Copiscan (wip)
ePhoto (wip?)
Matthew K. Gray <>
EpsPhoto: for PhotoPC500 (wanted?)
Jeff Tranter <tranter@software.Mitel.COM>
Handheld scanner support: e.g. for Mustek CG-6000 (wip)
HP USB backend for HP 4200 (wip)
Mustek USB scanner: BearPaw 1200, ScanExpress 1200 CU, USB, UB (planned)
Henning Meier-Geinitz <>
NEC PC-IN500/4C support (wip)
Polaroid SprintScan 35 LE (wip)
Dick Bruijn <>
Primax parallel port scanners (wip)
SGI IndyCam (wip?)
Erik Nygren <>
Video for Linux 2 (wip)
SANE on non-Unix platforms:
BeOS port (wip)
OS/2 support (wip)
win32 port of SANE (planned)
Oliver Rauch <oliver.rauch@Wolfsburg.DE>
WinSANE: Win32 TWAIN DLL to interface with scanners supported by SANE over the network
There are two different projects. (wip)
TWAIN interface for xsane-win32 (planned)
Oliver Rauch <oliver.rauch@Wolfsburg.DE>
-*-Mode: Outline-*-
How to configure, build, and install SANE.
* Prerequisites
Quick install:
make install
In order to build SANE, the following tools and libraries are required:
......@@ -21,26 +27,18 @@ In order to build SANE, the following tools and libraries are required:
SANE is know to build on the following platforms:
SANE should build on most Unix-like systems. Support for OS/2 is also
available. For more details look at the operating system specific
README.* files. For a detailed support matrix, see:
- Digital Unix (Alpha) [no generic SCSI support]
- FreeBSD
- FreeSCO
- Linux (Alpha, m68k, x86)
- NetBSD (x86?)
- OpenStep/NeXTStep (x86) [xscanimage/xcam untested]
- OS/2
- Solaris (SPARC)
- SunOS (SPARC) [no generic SCSI support]
For a detailed support matrix, see:
This table may be out of date. Please send any corrections or additions
to together with your platform, os and version.
* Configuration
Simply invoke configure in the top-level directory. Besides the usual
GNU configure options, there are the following SANE specific options:
......@@ -57,10 +55,21 @@ GNU configure options, there are the following SANE specific options:
(<dlfcn.h> and -dl).
Preload backends into DLL backend. This is useful for debugging,
Preload backends into DLL backend. This is useful for debugging,
when dynamic loading is unavailable, or to reduce runtime linking
overheads. If dynamic loading or shared libraries are unavailable
or disabled, this option is turned on automatically.
Specify the buffer size of the buffer for SCSI commands. The default
value is 131072 bytes (128 kb). This may be changed at runtime by
setting the environment variable SANE_SG_BUFFERSIZE to the desired
value. The option is Linux-only at this time.
--enable-scsibuffersize and SANE_SG_BUFFERSIZE have no effect for
the Mustek, Umax and Sharp backends. For these backends, the buffer
size is set automatically and/or can be specified in the backend's
configuration file. Please refer to the backend's man pages for
In addition to these SANE-specific configuration options, there are
many standard-options. To get a description of available standard
......@@ -71,34 +80,17 @@ configure like this:
CFLAGS="-g -O -Wall" ./configure --disable-shared
** AIX
Under AIX, you'll need the generic SCSI device driver gsc written by
Matthew Jacob <> (nice piece of work!). When you
install this driver, copy the header file gscdds.h to /usr/include, as
we look for it there.
Find this driver under:
** HP-UX
Under HP-UX, it is necessary to add options -Aa and -D_HPUX_SOURCE to
the compiler flags when using HP's C compiler (not gcc). This can be
done by invoking configure with:
For operating system specific information, look at the README.* files.
** Solaris
See README.solaris.
* Build
To build SANE, simply type "make" in the top-level directory.
* Installation and Configuration
Installation and Configuration
Once the build has finished, install SANE with "make install". By
default, this will place the SANE libraries in /usr/local/lib/, the
......@@ -106,29 +98,72 @@ configuration files in /usr/local/etc/sane.d/, and the manual pages in
/usr/local/man/. The location of these directories can be overridden
with configure options; see "configure --help" for details.
Before running any SANE program, read the PROBLEMS file in this directory.
For information on configuring and trouble-shooting the various SANE
components, please refer to the manual pages listed below:
Regarding: Read:
----------------- ------------------------------------------
scanimage scanimage(1)
xscanimage xscanimage(1)
saned saned(1)
xcam no man-page---see frontend/xcam.README
Dynamic loading sane-dll(5)
Mustek scanners sane-mustek(5) and sane-scsi(5)
UMAX scanners sane-umax(5) and sane-scsi(5)
HP scanners sane-hp(5) and sane-scsi(5)
Networking sane-net(5) and saned(1)
PINT scanners sane-pint(5)
QuickCam sane-qcam(5)
components, please refer to the manual pages and other documentation listed
Regarding: Read:
----------------- ------------------------------------------
scanimage scanimage(1)
xscanimage xscanimage(1)
saned saned(1)
xcam xcam(1)
Backends for scanners:
Abaton sane-abaton(5)
AGFA Focus sane-agfafocus(5)
AGFA SnapScan sane-snapscan(5)
Apple sane-apple(5)
Artec sane-artec(5)
Avision sane-avision(5)
Canon sane-canon(5)
Nikon Coolscan sane-coolscan(5)
Epson sane-epson(5)
Fujitsu sane-fujitsu(5)
HP sane-hp(5)
Microtek sane-microtek(5)
Microtek SCSI-2 sane-microtek2(5)
Mustek sane-mustek(5)
Mustek parallel port sane-mustek_pp(5)
Plustek sane-plustek(5)
Ricoh sane-ricoh(5)
Sharp sane-sharp(5)
Siemens S9036 sane-s9036(5)
Siemens ST400,ST800 sane-st400(5)
Tamarack sane-tamarack(5)
UMAX sane-umax(5)
Backends for digital cameras:
Connectix QuickCam sane-qcam(5)
Kodak DC20/DC25 sane-dc25(5)
Kodak dc210 sane-dc210(5)
Polaroid sane-dmc(5)
Miscellaneous backends:
PNM image reader sane-pnm(5)
PINT scanners sane-pint(5)
Video for Linux sane-v4l(5)
Dynamic loading sane-dll(5)
Networking sane-net(5) and saned(1)
SCSI configuration sane-scsi(5)
For more details on supported scanners and cameras look at the SANE
Please note that the default configuration uses sane-dll as the
top-level backend. Hence it is probably a good idea to start with
reading sane-dll(5). The top-level backend is determined by the
libsane.* symlinks in /usr/local/lib/.
For SCSI scanners reading of sane-scsi(5) is recommended.
Please also read the file PROJECTS for projects that are planned or
not yet included into the SANE distribution.
If you encounter any problems with getting your device(s) recognized,
try setting the various environment variables that are there to assist
in debugging such problems. The environment variables are documented
......@@ -153,3 +188,19 @@ should produce output similar to this:
$ tools/find-scanner
find-scanner: found "MUSTEK MFC-06000CZ 1.01" at device /dev/scanner
find-scanner: found "MUSTEK MFC-06000CZ 1.01" at device /dev/sge
There may be several causes for the following messages from the
frontends: "scanimage: no SANE devices found" or "xscanimage: no
devices available." (together with a GTK error message).
* Your scanner is not recognized by any backend. It is not supported.
You may ask the maintainer of your backend (see AUTHORS) or if support is planned.
* SANE can't access the device files (e.g /dev/sga). Check the permissions.
* Your backend is not listed in dll.conf (or commented out).
The tools directory contains some small programs that may be helpfull. They
are described in tools/README.
Under HP-UX, it is necessary to add options -Aa and -D_HPUX_SOURCE to
the compiler flags when using HP's C compiler (not gcc). This can be
done by invoking configure with:
There seem to be problems with some versions of the jpeg library. If
compilation errors in the jpeg support files occur, disable jpeg and
the dc210 backend in configure: remove the line
LIBS="-ljpeg $LIBS"
and change the line
Information about SCSI scanners:
Under Linux, your kernel must have generic SCSI support (sg) as well as a
driver for your SCSI adapter. You may want to increase the SCSI buffer size
to increase scan speed. Details on all of the above can be found in
If your SCSI and sg driver are build as moduls you will need to load them
with modprobe:
# modprobe your-driver-name
# modprobe sg
You may find error messages in /var/log/messages. Look at the documentation
for your SCSI driver. Maybe you need to add options like the io port.
Now the SCSI adapter and your scanner should be visible at /proc/scsi/scsi.
# cat /proc/scsi/scsi
Host: scsi0 Channel: 00 Id: 06 Lun: 00
Vendor: SCANNER Model: Rev: 2.02
Type: Scanner ANSI SCSI revision: 01 CCS
In this case the real vendor and scanner name are not shown (Mustek
Scannexpress 12000SP) but SANE will detect it nevertheless.
If your scanner is supported by SANE, scanimage -L will list it now:
# scanimage -L
device mustek:/dev/scanner' is a Mustek ScanExpress 12000SP flatbed scanner
If this doesn't work you may have to add the right SCSI generic device name
to the configuration file. This should be documented in the man page for
your backend. To find out about the right SCSI device use tools/find-scanner:
# tools/find-scanner
find-scanner: found scanner "SCANNER 2.02" at device /dev/scanner
find-scanner: found scanner "SCANNER 2.02" at device /dev/sg0
find-scanner: found scanner "SCANNER 2.02" at device /dev/sga
It may help to set a soft link /dev/scanner to the respective device.
If you need more information on the Linux SCSI subsystem, look at Although this
documentation is about the 2.4 kernels, large parts are also valid for
older kernels. One important exception is the section on "Device Names
in devfs".
Adaptec 1542 SCSI adapter:
Using buffer sizes of more than 32768 bytes with the aha1542 driver can
lead to kernel panic. To avoid this, set --enable-scsibuffersize or
SANE_SG_BUFFERSIZE to 32768, or download and install the SG driver
2.1.37 or newer from
The Linux kernel "Emulation of a SCSI host adapter for IDE ATAPI
devices" (idescsi) is reported to cause problems in connection with
SANE. If your scanner isn't found or you encounter segmentation faults
try to disable idescsi.
SANE 1.01 for OS/2 - build 1
SANE 1.03 for OS/2 - build 1
07 Mar 1999, Yuri Dario <>
09 Jul 2000, Yuri Dario <>
This release of has been compiled with EMX 0.9D, so it doesn't work with
the previous runtime. You must upgrade to the latest runtime before running
SANE (actually EMX 0.9D fix 03).
SANE (Scanner Access Now Easy)
......@@ -15,21 +21,60 @@ You should also check the main site for an updated list of supported scanners.
Note that I can't say you if your scanner is supported; check SANE homepage
I'm sorry to tell you that it is hard for me to help you: if your scanner
doesn't work or your problem can't be reproduced on my pc, there are high
choices that I can't fix the bug. Most problems are specific to same PC/scanner
combinations, and can't be solved without having a full developement enviroment
and programming experience.
I have setup a mailing list for users, where I hope most people can find an
answer to their questions. You will find that I answer only sometimes, because
I'm too busy.
To subscribe please visit
and look for sane-os2, or fill the form available on my site.
To read docs with correct format, you should type
more < doc\sane-epson.txt
If someone has more ideas on how to get a correct .txt starting from a .man
file, he is welcome (actually I'm using groff).
Add aspirout.sys to your config.sys
If you already didn't it, install the correct driver for your scsi adapter.
The drivers has usually a .ADD extension and looks like
Then you need the ASPI driver: this driver is already in your OS2\BOOT
directory, so you have only to add
The /ALL switch is required only if you need to use other devices with
aspirout.sys, e.g. if you have a CD-RW and CDRecord/2 installed.
Last, add aspirout.sys to your config.sys
N.B. you can change the path to other directories.
Now reboot.
and reboot.
To run scanimage.exe you need also to download the latest EMX runtime,
available on Hobbes or Leo as; tested with version 0.9c fix4.
available on Hobbes or Leo as
find-scanner.exe can be used to recognize a scanner on the scsi bus. Then
you should edit your xxx.conf file and add the scanner address, a string like
b0t4l0. This can be simplified using autodetection: with autodetection you can
......@@ -54,8 +99,124 @@ aspirout.sys; on Warp4 you can use the Hardware Manager to check scanner
presence. Then look at your xxx.conf, maybe there is something wrong in the
Parallel Port
Once configured your system, create a proper .conf file (edit one of the
supplied templates) and run
scanimage -L
The output should be like
device `umax:b0t3l0' is a UMAX Vista-S8 flatbed scanner
device `pnm:0' is a Noname PNM file reader virtual device
device `pnm:1' is a Noname PNM file reader virtual device
The pnm devices are always available, while on the first line you should
read the id of your scanner.