Scanner Access Now Easy ― Website Official website: http://sane-project.org/ GitLab Pages: https://sane-project.gitlab.io/website
Go to file
Henning Geinitz 8064c20643 Use English language web pages for SuSE RPMs. 2004-05-23 15:33:51 +00:00
backends/lhii
html
icons
images
lj98
man Updated HTML manpages from sane-backends CVS. 2004-05-18 18:21:25 +00:00
sane2
unsupported Added Canon scanner cardridges for printers. 2004-05-18 18:50:43 +00:00
COPYING
LICENSE
README.djpeg
README.linux Added link to information about libusb permissions as more and more questions 2004-04-21 17:05:49 +00:00
backend-writing.txt
bugs.html
contrib.html Added link to backend-writing.txt. 2004-02-14 19:50:11 +00:00
cvs.html
dll.c
docs.html Added link to information about libusb permissions as more and more questions 2004-04-21 17:05:49 +00:00
favicon.ico
imprint.html
index.html Changed links to main FTP server to ftp.sane-project.org. Added link to 2004-05-12 17:45:54 +00:00
intro.html
license.html
mailing-lists.html Mailinglists are up again. 2004-03-15 17:59:48 +00:00
manufacturers.html
related.html
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.00.html
sane-backends.html
sane-frontends.html Changed links to main FTP server to ftp.sane-project.org. Added link to 2004-05-12 17:45:54 +00:00
sane-mfgs.html
sane-support.html Updated Linux, MacOS X and OS/2. 2004-05-11 20:31:50 +00:00
sane-supported-devices.html
sane.ps
source.html Use English language web pages for SuSE RPMs. 2004-05-23 15:33:51 +00: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.

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.

The device files used by libusb are located in /proc/bus/usb/
(e.g. /proc/bus/usb/001/003).  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" seems to work,
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.  SANE itsself comes with a hotplug
script and related documentaion in the tools/hotplug/ directory. Please refer to
the README in that directory for the details.


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
=================

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