Scanner Access Now Easy ― Website Official website: http://sane-project.org/ GitLab Pages: https://sane-project.gitlab.io/website
Go to file
Henning Geinitz 39ba19711b Added links to all scanners supported by hp3900 (bug #302968). 2006-01-29 21:18:10 +00:00
backends/lhii Added the old lhii backend and kernel code for Mustek and other hand scanners. 2003-11-09 17:06:54 +00:00
htdig Added htdig files to the central repositor. 2005-11-17 19:02:20 +00:00
html Updated SANE standard from sane-backends CVS. 2006-01-03 13:38:48 +00:00
icons Added some more icons. 2003-10-15 13:43:59 +00:00
images Added small SANE logo. 2003-09-30 14:17:04 +00:00
lj98 Added SANE tutorial. 2003-09-23 17:03:44 +00:00
man Updated manual pages from sane-backends 1.0.17. 2005-12-18 15:23:45 +00:00
sane2 Removed. See sane2-todo.html. 2004-07-11 13:08:11 +00:00
unsupported Added links to all scanners supported by hp3900 (bug #302968). 2006-01-29 21:18:10 +00:00
COPYING Added information about the SANE license. 2003-09-23 19:43:05 +00:00
LICENSE Added an FAQ section to the license. 2005-04-23 18:28:17 +00:00
README.djpeg Added information about the SANE license. 2003-09-23 19:43:05 +00:00
README.linux Updated from sane-backends CVS. 2006-01-05 17:39:17 +00:00
backend-writing.txt Updated from sane-backends CVS. 2006-01-05 17:39:17 +00:00
bugs.html url update group_id from 1308 to 30186 2004-08-08 17:22:07 +00:00
contrib.html Fixed link. 2004-11-20 20:29:27 +00:00
cvs.html Anonymous CVS works again. 2005-08-18 15:20:48 +00:00
dll.c Added information about the SANE license. 2003-09-23 19:43:05 +00:00
docs.html Added more hints when to read README.linux. 2005-10-03 15:10:45 +00:00
favicon.ico Added SANE favicon. 2003-09-19 17:52:06 +00:00
how-scanners-work.html Added some content about scanner types, accessories and CCD sensors. 2006-01-05 22:00:32 +00:00
imprint.html Added warning to not phone me for support requests. 2005-10-10 19:40:03 +00:00
index.html Announce sane-backends 1.0.17. 2005-12-18 15:31:59 +00:00
intro.html Fixed links. 2003-09-23 20:37:28 +00:00
license.html Added an FAQ section to the license. 2005-04-23 18:28:17 +00:00
mailing-lists.html Changed the link to point to the new location of the search engine. 2005-11-17 19:14:13 +00:00
manufacturers.html Fixed link. 2005-10-03 15:35:30 +00:00
related.html Update URL LPROF package 2005-10-08 12:22:55 +00:00
robots.txt Added robots.txt to disallow indexing the image directories. 2003-10-02 17:21:18 +00:00
sane-backends-1.0.1.html Added lists of supported devices from mostang.com. Added some more explanations 2003-09-23 12:08:19 +00:00
sane-backends-1.0.2.html Added lists of supported devices from mostang.com. Added some more explanations 2003-09-23 12:08:19 +00:00
sane-backends-1.0.3.html Added lists of supported devices from mostang.com. Added some more explanations 2003-09-23 12:08:19 +00:00
sane-backends-1.0.4.html Added lists of supported devices from mostang.com. Added some more explanations 2003-09-23 12:08:19 +00:00
sane-backends-1.0.5.html Added lists of supported devices from mostang.com. Added some more explanations 2003-09-23 12:08:19 +00:00
sane-backends-1.0.6.html Added lists of supported devices from mostang.com. Added some more explanations 2003-09-23 12:08:19 +00:00
sane-backends-1.0.7.html Added lists of supported devices from mostang.com. Added some more explanations 2003-09-23 12:08:19 +00:00
sane-backends-1.0.8.html Added lists of supported devices from mostang.com. Added some more explanations 2003-09-23 12:08:19 +00:00
sane-backends-1.0.9.html Added lists of supported devices from mostang.com. Added some more explanations 2003-09-23 12:08:19 +00:00
sane-backends-1.0.10.html Added lists of supported devices from mostang.com. Added some more explanations 2003-09-23 12:08:19 +00:00
sane-backends-1.0.12.html Updated website for release of sane-backends 1.0.13. 2003-11-23 12:03:17 +00:00
sane-backends-1.0.13.html Updated scanner lists for 1.0.14. 2004-05-29 06:40:23 +00:00
sane-backends-1.0.14.html Updated scanner lists. 2004-11-07 19:08:24 +00:00
sane-backends-1.0.15.html Updated scanner lists for 1.0.16. 2005-08-07 11:07:16 +00:00
sane-backends-1.0.16.html Updated scanner lists for sane-backends 1.0.17. 2005-12-18 15:26:58 +00:00
sane-backends-1.00.html Added lists of supported devices from mostang.com. Added some more explanations 2003-09-23 12:08:19 +00:00
sane-backends.html Updated scanner lists for sane-backends 1.0.17. 2005-12-18 15:26:58 +00:00
sane-frontends.html Mention that QuiteInsane is discontinued (bug #302699). 2005-12-12 16:05:43 +00:00
sane-mfgs.html Updated scanner lists for sane-backends 1.0.17. 2005-12-18 15:26:58 +00:00
sane-support.html Updated concerning HP/UX and OpenBSD ix86. 2005-12-20 17:33:21 +00:00
sane-supported-devices.html Updated scanner lists for sane-backends 1.0.17. 2005-12-18 15:26:58 +00:00
sane.ps Updated SANE standard from sane-backends CVS. 2006-01-03 13:38:48 +00:00
source.html Fixed lind description. 2005-10-03 15:27:05 +00:00
twain-to-sane-bridge.txt Added description of twain to sane bridge. 2003-09-23 15:03:01 +00:00

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.

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.

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 are the Linux hot-plug tools that
should come with any current distribution. Your distribution should have set up
the scripts to automatically change permissions correctly. Look for
"libsane.usermap" and "libusbscanner" in /etc/hotplug/usb. 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 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 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