2008-07-14 10:49:06 +00:00
|
|
|
.TH sane\-usb 5 "14 Jul 2008" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
|
|
|
|
.IX sane\-usb
|
2001-08-11 13:12:39 +00:00
|
|
|
.SH NAME
|
2008-07-14 10:49:06 +00:00
|
|
|
sane\-usb \- USB configuration tips for SANE
|
2001-08-11 13:12:39 +00:00
|
|
|
.SH DESCRIPTION
|
2002-11-19 15:30:39 +00:00
|
|
|
This manual page contains information on how to access scanners with a USB
|
|
|
|
interface. It focusses on two main topics: getting the scanner detected by the
|
|
|
|
operating system kernel and using it with SANE.
|
|
|
|
.PP
|
2005-08-16 19:50:34 +00:00
|
|
|
This page applies to USB most backends and scanners, as they use the generic
|
|
|
|
sanei_usb interface. However, there is one exceptions: USB Scanners
|
2005-05-29 19:55:15 +00:00
|
|
|
supported by the microtek2 backend need a special USB kernel
|
|
|
|
driver, see
|
2008-07-14 10:49:06 +00:00
|
|
|
.BR sane\-microtek2 (5)
|
2005-08-16 19:50:34 +00:00
|
|
|
for details.
|
2002-11-19 15:30:39 +00:00
|
|
|
|
|
|
|
.SH "QUICK START"
|
|
|
|
This is a short HOWTO-like section. For the full details, read the following
|
|
|
|
sections. The goal of this section is to get the scanner detected by
|
2008-07-14 10:49:06 +00:00
|
|
|
.BR sane\-find\-scanner (1).
|
2002-11-19 15:30:39 +00:00
|
|
|
.PP
|
2008-07-14 10:49:06 +00:00
|
|
|
Run sane\-find\-scanner. If it lists your scanner with the correct vendor and
|
2002-11-19 15:30:39 +00:00
|
|
|
product ids, you are done. See section
|
|
|
|
.B "SANE ISSUES"
|
|
|
|
for details on how to go on.
|
|
|
|
.PP
|
2008-07-14 10:49:06 +00:00
|
|
|
sane\-find\-scanner doesn't list your scanner? Does it work as root? If yes,
|
2005-05-29 19:55:15 +00:00
|
|
|
there is a permission issue. See the
|
2006-06-19 21:31:24 +00:00
|
|
|
.B LIBUSB
|
2005-05-29 19:55:15 +00:00
|
|
|
section for details.
|
|
|
|
.PP
|
|
|
|
Nothing is found even as root? Check that your kernel supports USB and that
|
|
|
|
libusb is installed (see section
|
|
|
|
.BR LIBUSB ).
|
2002-11-19 15:30:39 +00:00
|
|
|
|
|
|
|
.SH "USB ACCESS METHODS"
|
2005-05-29 19:55:15 +00:00
|
|
|
For accessing USB devices, the USB library libusb is used. There used to exist
|
|
|
|
another method to access USB devices: the kernel scanner driver. The kernel
|
|
|
|
scanner driver method is deprecated and shouldn't be used anymore. It may be
|
|
|
|
removed from SANE at any time. In Linux, the kernel scanner driver has been
|
|
|
|
removed in the 2.6.* kernel series. Only libusb access is documented in this
|
|
|
|
manual page.
|
2002-11-19 15:30:39 +00:00
|
|
|
|
|
|
|
.SH LIBUSB
|
|
|
|
SANE can only use libusb 0.1.6 or newer. It needs to be installed at
|
2005-05-29 19:55:15 +00:00
|
|
|
build-time. Modern Linux distributions and other operating systems come with
|
|
|
|
libusb.
|
2001-08-11 13:12:39 +00:00
|
|
|
.PP
|
2002-11-19 15:30:39 +00:00
|
|
|
Libusb can only access your scanner if it's not claimed by the kernel scanner
|
|
|
|
driver. If you want to use libusb, unload the kernel driver (e.g. rmmod
|
|
|
|
scanner under Linux) or disable the driver when compiling a new kernel. For
|
2003-01-14 20:38:01 +00:00
|
|
|
Linux, your kernel needs support for the USB filesystem (usbfs). For kernels
|
|
|
|
older than 2.4.19, replace "usbfs" with "usbdevfs" because the name has
|
|
|
|
changed. This filesystem must be mounted. That's done automatically at boot
|
|
|
|
time, if /etc/fstab contains a line like this:
|
2001-08-11 13:12:39 +00:00
|
|
|
.PP
|
|
|
|
.RS
|
2002-11-19 15:30:39 +00:00
|
|
|
none /proc/bus/usb usbfs defaults 0 0
|
2001-08-11 13:12:39 +00:00
|
|
|
.RE
|
|
|
|
.PP
|
2002-11-19 15:30:39 +00:00
|
|
|
The permissions for the device files used by libusb must be adjusted for user
|
|
|
|
access. Otherwise only root can use SANE devices. For
|
|
|
|
.IR Linux ,
|
2006-05-10 19:34:05 +00:00
|
|
|
the devices are located in /proc/bus/usb/ or in /dev/bus/usb, if you use
|
|
|
|
udev. There are directories named e.g. "001" (the bus name) containing files
|
|
|
|
"001", "002" etc. (the device files). The right device files can be found out by
|
2008-07-14 10:49:06 +00:00
|
|
|
running scanimage \-L as root. Setting permissions with "chmod" is not permanent,
|
2006-05-10 19:34:05 +00:00
|
|
|
however. They will be reset after reboot or replugging the scanner.
|
2004-04-24 10:42:00 +00:00
|
|
|
.PP
|
2006-05-10 19:34:05 +00:00
|
|
|
Usually udev or for older distributions the hotplug utilities are used, which
|
|
|
|
support dynamic setting of access permissions. SANE comes with udev and hotplug
|
|
|
|
scripts in the directory tools/udev and tools/hotplug. They can be used for
|
|
|
|
setting permissions, see @DOCDIR@/README.linux, tools/README and the README in
|
|
|
|
the tools/hotplug directory for more details.
|
2002-07-06 19:50:22 +00:00
|
|
|
.PP
|
2002-11-19 15:30:39 +00:00
|
|
|
For the
|
|
|
|
.BR BSDs ,
|
2005-05-29 19:55:15 +00:00
|
|
|
the device files used by libusb are named
|
2002-11-19 15:30:39 +00:00
|
|
|
.IR /dev/ugen* .
|
|
|
|
Use chmod to apply appropriate permissions.
|
2002-07-03 19:52:16 +00:00
|
|
|
|
2002-11-19 15:30:39 +00:00
|
|
|
.SH "SANE ISSUES"
|
|
|
|
.PP
|
2008-07-14 10:49:06 +00:00
|
|
|
This section assumes that your scanner is detected by sane\-find\-scanner. It
|
|
|
|
doesn't make sense to go on, if this is not the case. While sane\-find\-scanner
|
2002-11-19 15:30:39 +00:00
|
|
|
is able to detect any USB scanner, actual scanning will only work if the
|
|
|
|
scanner is supported by a SANE backend. Information on the level of support
|
|
|
|
can be found on the SANE webpage
|
2008-07-14 10:49:06 +00:00
|
|
|
.RI ( http://www.sane\-project.org/ ),
|
2002-11-19 15:30:39 +00:00
|
|
|
and the individual backend manpages.
|
|
|
|
.PP
|
|
|
|
Most backends can detect USB scanners automatically using "usb" configuration
|
2014-03-02 18:17:07 +00:00
|
|
|
file lines. This method allows one to identify scanners by the USB vendor and
|
2002-11-19 15:30:39 +00:00
|
|
|
product numbers. The syntax for specifying a scanner this way is:
|
2002-07-06 19:50:22 +00:00
|
|
|
.PP
|
|
|
|
.RS
|
2002-11-19 15:30:39 +00:00
|
|
|
usb
|
|
|
|
.I VENDOR PRODUCT
|
2002-07-06 19:50:22 +00:00
|
|
|
.RE
|
2002-07-03 19:52:16 +00:00
|
|
|
.PP
|
2002-11-19 15:30:39 +00:00
|
|
|
where
|
|
|
|
.I VENDOR
|
|
|
|
is the USB vendor id, and
|
|
|
|
.I PRODUCT
|
2005-05-29 19:55:15 +00:00
|
|
|
is the USB product id of the scanner. Both ids are non-negative integer numbers
|
|
|
|
in decimal or hexadecimal format. The correct values for these fields can be
|
2008-07-14 10:49:06 +00:00
|
|
|
found by running sane\-find\-scanner, looking into the syslog (e.g.,
|
2005-05-29 19:55:15 +00:00
|
|
|
/var/log/messages) or under Linux by issuing the command "cat
|
2006-06-19 11:47:45 +00:00
|
|
|
/proc/bus/usb/devices". This is an example of a config file line:
|
2002-07-06 19:50:22 +00:00
|
|
|
.PP
|
|
|
|
.RS
|
2002-11-19 15:30:39 +00:00
|
|
|
usb 0x055f 0x0006
|
2002-07-06 19:50:22 +00:00
|
|
|
.RE
|
|
|
|
.PP
|
2002-11-19 15:30:39 +00:00
|
|
|
would have the effect that all USB devices in the system with a vendor id of
|
|
|
|
0x55f and a product id of 0x0006 would be probed and recognized by the
|
|
|
|
backend.
|
2002-07-06 19:50:22 +00:00
|
|
|
.PP
|
2002-11-19 15:30:39 +00:00
|
|
|
If your scanner is not detected automatically, it may be necessary to edit the
|
|
|
|
appropriate backend configuration file before using SANE for the first time.
|
2005-05-29 19:55:15 +00:00
|
|
|
For a detailed description of each backend's configuration file, please refer to
|
|
|
|
the relevant backend manual page (e.g.
|
2008-07-14 10:49:06 +00:00
|
|
|
.BR sane\-mustek_usb (5)
|
2002-11-19 15:30:39 +00:00
|
|
|
for Mustek USB scanners).
|
|
|
|
.PP
|
|
|
|
Do
|
|
|
|
.B not
|
|
|
|
create a symlink from
|
|
|
|
.I /dev/scanner
|
|
|
|
to the USB device because this link is used by the SCSI backends. The scanner
|
|
|
|
may be confused if it receives SCSI commands.
|
2002-07-03 19:52:16 +00:00
|
|
|
|
2001-08-11 13:12:39 +00:00
|
|
|
.SH ENVIRONMENT
|
|
|
|
.TP
|
|
|
|
.B SANE_DEBUG_SANEI_USB
|
|
|
|
If the library was compiled with debug support enabled, this
|
|
|
|
environment variable controls the debug level for the USB I/O
|
|
|
|
subsystem. E.g., a value of 128 requests all debug output to be
|
2002-07-03 19:52:16 +00:00
|
|
|
printed. Smaller levels reduce verbosity. Values greater than 4 enable
|
2003-03-23 22:55:48 +00:00
|
|
|
libusb debugging (if available). Example: export SANE_DEBUG_SANEI_USB=4.
|
2002-11-19 15:30:39 +00:00
|
|
|
|
2001-08-11 13:12:39 +00:00
|
|
|
.SH "SEE ALSO"
|
2002-11-19 15:30:39 +00:00
|
|
|
.BR sane (7),
|
2008-07-14 10:49:06 +00:00
|
|
|
.BR sane\-find\-scanner (1),
|
|
|
|
.BR sane\-"backendname" (5),
|
|
|
|
.BR sane\-scsi (5)
|
2002-11-19 15:30:39 +00:00
|
|
|
|
2001-08-11 13:12:39 +00:00
|
|
|
.SH AUTHOR
|
2008-07-14 10:49:06 +00:00
|
|
|
Henning Meier-Geinitz <henning@meier\-geinitz.de>
|