Scanner Access Now Easy ― Website Official website: http://sane-project.org/ GitLab Pages: https://sane-project.gitlab.io/website
Go to file
Ralph Little 22d4e59d47 various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
backends/lhii
htdig Update mailing lists addresses to new location 2018-04-18 21:30:55 +09:00
html Update mailing lists addresses to new location 2018-04-18 21:30:55 +09:00
icons
images
lj98
man Update for sane-backends- release 2023-02-06 22:22:48 -05:00
old-archive various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
sane2 various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
snapshots Fix backends source archive file name pattern 2021-02-15 19:53:07 +09:00
unsupported various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
.gitignore
.gitlab-ci.yml Update .gitlab-ci.yml file 2021-04-05 14:55:08 +00:00
COPYING
LICENSE
README.djpeg
README.linux
backend-writing.txt
bugs.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
contrib.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
cvs.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
dll.c
docs.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
favicon.ico
form-answer.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
how-scanners-work.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
imprint.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
index.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
intro.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
license.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
mailing-lists.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
manufacturers.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
related.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
report.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
robots.txt
sane-backends-1.0.1.html
sane-backends-1.0.2.html
sane-backends-1.0.3.html
sane-backends-1.0.4.html
sane-backends-1.0.5.html
sane-backends-1.0.6.html
sane-backends-1.0.7.html
sane-backends-1.0.8.html
sane-backends-1.0.9.html
sane-backends-1.0.10.html
sane-backends-1.0.12.html
sane-backends-1.0.13.html Update mail archive links to point to new location 2018-04-18 20:59:35 +09:00
sane-backends-1.0.14.html Update mail archive links to point to new location 2018-04-18 20:59:35 +09:00
sane-backends-1.0.15.html Update mail archive links to point to new location 2018-04-18 20:59:35 +09:00
sane-backends-1.0.16.html Update mail archive links to point to new location 2018-04-18 20:59:35 +09:00
sane-backends-1.0.17.html Update mail archive links to point to new location 2018-04-18 20:59:35 +09:00
sane-backends-1.0.18.html Update mail archive links to point to new location 2018-04-18 20:59:35 +09:00
sane-backends-1.0.19.html Update mail archive links to point to new location 2018-04-18 20:59:35 +09:00
sane-backends-1.0.20.html Update mail archive links to point to new location 2018-04-18 20:59:35 +09:00
sane-backends-1.0.21.html Update mail archive links to point to new location 2018-04-18 20:59:35 +09:00
sane-backends-1.0.22.html Update mail archive links to point to new location 2018-04-18 20:59:35 +09:00
sane-backends-1.0.23.html Update mail archive links to point to new location 2018-04-18 20:59:35 +09:00
sane-backends-1.0.24.html Update mail archive links to point to new location 2018-04-18 20:59:35 +09:00
sane-backends-1.0.25.html Update mail archive links to point to new location 2018-04-18 20:59:35 +09:00
sane-backends-1.0.27.html Update supported devices info following release of 1.0.28 2019-07-31 21:36:31 +09:00
sane-backends-1.0.28.html Update website to reflect sane-backends-1.0.29 release 2020-02-02 20:58:06 +09:00
sane-backends-1.0.29.html Update for sane-backends-1.0.30 release 2020-05-17 21:17:08 +09:00
sane-backends-1.0.30.html Update for sane-backends-1.0.31 release 2020-09-02 21:23:54 +09:00
sane-backends-1.0.31.html Update supported device info for 1.0.32 release 2021-02-14 21:06:24 +09:00
sane-backends-1.0.32.html Update documentation from 1.1.1 release 2022-01-20 02:09:42 +02:00
sane-backends-1.00.html
sane-backends-1.1.1.html Update for sane-backends- release 2023-02-06 22:22:48 -05:00
sane-backends.html update version number in scanner lists 2023-02-06 22:27:26 -05:00
sane-frontends.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
sane-mfgs.html update version number in scanner lists 2023-02-06 22:27:26 -05:00
sane-support.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
sane-supported-devices.html various: Removed references to now defunct Debian Alioth service. 2023-10-30 15:29:53 -07:00
sane.pdf
sane.ps
source.html source: updated dead TWAIN SANE links to point to Web Archive. 2021-09-27 18:38:14 -07:00
twain-to-sane-bridge.txt

README.linux

Information about USB scanners:
================================

With Linux 2.4.* you could either use the kernel scanner module or libusb to
access USB scanners.  In Linux 2.6.4 the kernel scanner module was removed.
Therefore with this and later kernels libusb must be used.

Permissions:
------------
While SANE automatically uses libusb when the library and its header file were
present during the build of sane-backends, setting permissions will require some
attention. So if scanimage -L lists your scanner as root but not as normal user
read on this text.

Most distributions support setting permissions without much manual
configuration. Usually you must just add the users that are allowed to access
the scanner to group "scanner". To make that change active, the user must login
again. For more details, see your distribution's documentation e.g. for Debian:
README.debian.gz. If this doesn't work you you want to know more, read on.

The device files used by libusb are located in /proc/bus/usb/
(e.g. /proc/bus/usb/001/003) or in /dev/bus/usb/ (e.g. /dev/bus/usb/001/003), if
you use udev.  The exact file name can be found out by running sane-find-scanner
which would print "libusb:001:003" in this case.  While setting permissions with
e.g. "chmod a+rw /proc/bus/usb/001/003" works, this change is not permanent.
The permissions will be reset when the scanner is replugged or Linux is
rebooted.

One solution to set permissions on-the-fly is Linux udev which comes with
current distributions. SANE comes with a udev rules file in the tools/udev
directory which may be used by distributions or can be copied to
/etc/udev/rules.d manually. The file format is explained on top of the file
itself. Either you need libusb 0.1.12 or newer or USB_DEVFS_PATH=/dev/bus/usb
must be exported as a system-wide environment variable.

Older distributions may use the Linux hot-plug tools (or hotplug-ng). Your
distribution should have set up the scripts to automatically change permissions
correctly. Look for "libsane.usermap" and "libusbscanner" in /etc/hotplug/usb.
If you build SANE from source you can use the hotplug script that comes with
SANE. See the tools/hotplug/ directory in the source distribution. Please refer
to the README in that directory for the details.

Gentoo information:
-------------------
Gentoo users: If your USB scanner is not detected at all check that USE=usb is
set when emerging.

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
sane-scsi(5).

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.
Example:

# 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 sane-find-scanner:

# sane-find-scanner
found SCSI scanner "SCANNER  2.02" at /dev/scanner
found SCSI scanner "SCANNER  2.02" at /dev/sg0
found SCSI scanner "SCANNER  2.02" at /dev/sga 

It may help to set a symbolic link /dev/scanner to the respective device if
automatic detection does not work.

If you need more information on the Linux SCSI subsystem, look at
http://www.torque.net/scsi/linux_scsi_24/index.html. 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 with older kernels. To avoid this, run configure with 
  the option --enable-scsibuffersize or set the environment variable
  SANE_SG_BUFFERSIZE to 32768 before running scanimage or another frontend, 
  or download and install the SG driver 2.1.37 or newer from 
  http://www.torque.net/sg.

idescsi:
  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.

SCSI Direct IO: Recent versions of the Linux SG driver for the 2.4 kernels 
  support direct IO, i.e., the SCSI adapter's DMA chip copies data directly 
  to/from user memory. Direct IO reduces memory usage, but it can lead to 
  access conflicts, if a backend uses shared memory. SANE does not use 
  direct IO by default. If you want to use it, run

	configure --enable-scsi-directio=yes

Very old Linux distributions are missing the /usr/include/scsi directory.  In
such a case, it is necessary to copy the relevant files from the kernel
distribution.  Normally, the command:

  cp -a /usr/src/linux/include/scsi /usr/include

should fix this problem. Don't do this if you don't get compilation errors
about missing SCSI headers.


Other Information
=================

ld.so.conf configuration:
  "/usr/local/lib/sane" or "/usr/lib/sane" MUST NOT be listed in
  /etc/ld.so.conf. If your scanner is not detected or only Video for Linux
  devices are found, check for one of the above lines in ld.so.conf.
  A line "/usr/local/lib" or "/usr/lib" in ld.so.conf is ok, however.

Excessive warnings "pointer of type `void *' used in arithmetic":
  Some older versions of glibc generate these warnings not related to SANE
  source code. To suppress these warnings do

  export CFLAGS="-g -O2 -D__NO_STRING_INLINES"

  and rerun configure.

If you use DEC cc on Linux Alpha, you may need to set LDFLAGS="-N" to
  be able to build sane-backends.

The Intel C++ Compiler for IA32 and IA64 isn't supported yet. If you want
  to try nevertheless, you will experience undefined references to inb
  and outb functions. To avoid those replace #include <sys/io.h> with

  #if defined(__ICC) && __ICC >= 700
  # define __GNUC__ 2
  #endif
  #include <sys/io.h>
  #if defined(__ICC) && __ICC >= 700
  # undef __GNUC__
  #elif defined(__ICC) && defined(HAVE_ASM_IO_H)
  # include <asm/io.h>
  #endif

Have a lot of fun with the latest SANE backend.