2003-09-23 15:30:05 +00:00
|
|
|
<HTML>
|
|
|
|
<HEAD>
|
|
|
|
<TITLE>sane-usb.5</TITLE>
|
|
|
|
</HEAD>
|
2003-09-24 17:24:12 +00:00
|
|
|
<BODY BGCOLOR=#FFFFFF TEXT=#000000><H1 ALIGN=CENTER><IMG SRC="/images/sane.png" HEIGHT=117 WIDTH=346></H1>
|
2003-09-23 15:30:05 +00:00
|
|
|
<H1>sane-usb.5</H1>
|
|
|
|
<HR>
|
|
|
|
<PRE>
|
|
|
|
<!-- Manpage converted by man2html 3.0.1 -->
|
|
|
|
<B><A HREF="sane-usb.5.html">sane-usb(5)</A></B> SANE Scanner Access Now Easy <B><A HREF="sane-usb.5.html">sane-usb(5)</A></B>
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
|
|
<H2>NAME</H2><PRE>
|
|
|
|
sane-usb - USB configuration tips for SANE
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
|
|
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.
|
|
|
|
|
|
|
|
This page applies to most backends and scanners, as they use the
|
|
|
|
generic sanei_usb interface. However, there are some exceptions: USB
|
2005-08-07 11:14:41 +00:00
|
|
|
Scanners supported by the microtek2 backend need a special USB kernel
|
|
|
|
driver, see <B><A HREF="sane-microtek2.5.html">sane-microtek2(5)</A></B> for details. The sm3600 backend accesses
|
|
|
|
scanners over libusb dierctly. See the appropriate section in this man-
|
|
|
|
page and <B><A HREF="sane-sm3600.5.html">sane-sm3600(5)</A></B>.
|
2003-09-23 15:30:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
|
|
<H2>QUICK START</H2><PRE>
|
|
|
|
This is a short HOWTO-like section. For the full details, read the fol-
|
|
|
|
lowing sections. The goal of this section is to get the scanner
|
2003-10-15 13:51:58 +00:00
|
|
|
detected by <B><A HREF="sane-find-scanner.1.html">sane-find-scanner(1)</A></B>.
|
2003-09-23 15:30:05 +00:00
|
|
|
|
|
|
|
Run sane-find-scanner. If it lists your scanner with the correct vendor
|
|
|
|
and product ids, you are done. See section <B>SANE</B> <B>ISSUES</B> for details on
|
|
|
|
how to go on.
|
|
|
|
|
|
|
|
Sane-find-scanner doesn't list your scanner? Does it work as root? If
|
2005-08-07 11:14:41 +00:00
|
|
|
yes, there is a permission issue. See the <B>LIBSUB</B> section for details.
|
2003-09-23 15:30:05 +00:00
|
|
|
|
2005-08-07 11:14:41 +00:00
|
|
|
Nothing is found even as root? Check that your kernel supports USB and
|
|
|
|
that libusb is installed (see section <B>LIBUSB</B>).
|
2003-09-23 15:30:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
|
|
<H2>USB ACCESS METHODS</H2><PRE>
|
2005-08-07 11:14:41 +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.
|
2003-09-23 15:30:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
|
|
<H2>LIBUSB</H2><PRE>
|
2004-11-07 19:26:31 +00:00
|
|
|
SANE can only use libusb 0.1.6 or newer. It needs to be installed at
|
2005-08-07 11:14:41 +00:00
|
|
|
build-time. Modern Linux distributions and other operating systems come
|
|
|
|
with libusb.
|
2003-09-23 15:30:05 +00:00
|
|
|
|
2005-08-07 11:14:41 +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
|
2003-09-23 15:30:05 +00:00
|
|
|
(e.g. rmmod scanner under Linux) or disable the driver when compiling a
|
|
|
|
new kernel. For Linux, your kernel needs support for the USB filesystem
|
|
|
|
(usbfs). For kernels older than 2.4.19, replace "usbfs" with "usbdevfs"
|
2005-08-07 11:14:41 +00:00
|
|
|
because the name has changed. This filesystem must be mounted. That's
|
|
|
|
done automatically at boot time, if /etc/fstab contains a line like
|
2003-09-23 15:30:05 +00:00
|
|
|
this:
|
|
|
|
|
|
|
|
none /proc/bus/usb usbfs defaults 0 0
|
|
|
|
|
2005-08-07 11:14:41 +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 <I>Linux</I>,
|
|
|
|
the devices are located in /proc/bus/usb/. 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 running
|
|
|
|
scanimage -L as root. Setting permissions with "chmod" is not perma-
|
|
|
|
nent, however. They will be reset after reboot or replugging the scan-
|
|
|
|
ner.
|
2004-05-18 18:21:25 +00:00
|
|
|
|
2005-08-07 11:14:41 +00:00
|
|
|
Usually the the hotplug utilities (<I>http://linux-hotplug.source-</I>
|
|
|
|
<I>forge.net/</I>) are used, which support dynamic setting of access permis-
|
|
|
|
sions. SANE comes with hotplug scripts in the directory tools/hotplug.
|
|
|
|
They can be used for setting permissions. Precompiled SANE packages
|
|
|
|
may have already installed such hotplug scrips in /etc/hotplug/.
|
2003-09-23 15:30:05 +00:00
|
|
|
|
2005-08-07 11:14:41 +00:00
|
|
|
For the <B>BSDs</B>, the device files used by libusb are named <I>/dev/ugen*</I>.
|
|
|
|
Use chmod to apply appropriate permissions.
|
2003-09-23 15:30:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
|
|
<H2>SANE ISSUES</H2><PRE>
|
2005-08-07 11:14:41 +00:00
|
|
|
This section assumes that your scanner is detected by sane-find-scan-
|
|
|
|
ner. It doesn't make sense to go on, if this is not the case. While
|
|
|
|
sane-find-scanner is able to detect any USB scanner, actual scanning
|
|
|
|
will only work if the scanner is supported by a SANE backend. Informa-
|
|
|
|
tion on the level of support can be found on the SANE webpage
|
2003-09-24 16:17:33 +00:00
|
|
|
(<I>http://www.sane-project.org/</I>), and the individual backend manpages.
|
2003-09-23 15:30:05 +00:00
|
|
|
|
|
|
|
Most backends can detect USB scanners automatically using "usb" config-
|
2005-08-07 11:14:41 +00:00
|
|
|
uration file lines. This method allows to identify scanners by the USB
|
|
|
|
vendor and product numbers. The syntax for specifying a scanner this
|
2003-09-23 15:30:05 +00:00
|
|
|
way is:
|
|
|
|
|
|
|
|
usb <I>VENDOR</I> <I>PRODUCT</I>
|
|
|
|
|
|
|
|
where <I>VENDOR</I> is the USB vendor id, and <I>PRODUCT</I> is the USB product id of
|
2005-08-07 11:14:41 +00:00
|
|
|
the scanner. Both ids are non-negative integer numbers in decimal or
|
2003-09-23 15:30:05 +00:00
|
|
|
hexadecimal format. The correct values for these fields can be found by
|
2005-08-07 11:14:41 +00:00
|
|
|
running sane-find-scanner, looking into the syslog (e.g., /var/log/mes-
|
|
|
|
sages) or under Linux by issuing the command "cat
|
|
|
|
/proc/bus/usb/devices/". This is an example of a config file line:
|
2003-09-23 15:30:05 +00:00
|
|
|
|
|
|
|
usb 0x055f 0x0006
|
|
|
|
|
2005-08-07 11:14:41 +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
|
2003-09-23 15:30:05 +00:00
|
|
|
by the backend.
|
|
|
|
|
2005-08-07 11:14:41 +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. For a detailed description of each backend's configu-
|
|
|
|
ration file, please refer to the relevant backend manual page (e.g.
|
|
|
|
<B><A HREF="sane-mustek_usb.5.html">sane-mustek_usb(5)</A></B> for Mustek USB scanners).
|
2003-09-23 15:30:05 +00:00
|
|
|
|
2004-11-07 19:26:31 +00:00
|
|
|
Do <B>not</B> create a symlink from <I>/dev/scanner</I> to the USB device because
|
|
|
|
this link is used by the SCSI backends. The scanner may be confused if
|
2003-09-23 15:30:05 +00:00
|
|
|
it receives SCSI commands.
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
|
|
<H2>ENVIRONMENT</H2><PRE>
|
|
|
|
<B>SANE_DEBUG_SANEI_USB</B>
|
2004-11-07 19:26:31 +00:00
|
|
|
If the library was compiled with debug support enabled, this
|
|
|
|
environment variable controls the debug level for the USB I/O
|
2003-09-23 15:30:05 +00:00
|
|
|
subsystem. E.g., a value of 128 requests all debug output to be
|
|
|
|
printed. Smaller levels reduce verbosity. Values greater than 4
|
2004-11-07 19:26:31 +00:00
|
|
|
enable libusb debugging (if available). Example: export
|
2003-09-23 15:30:05 +00:00
|
|
|
SANE_DEBUG_SANEI_USB=4.
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
|
|
<H2>SEE ALSO</H2><PRE>
|
|
|
|
<B><A HREF="sane.7.html">sane(7)</A></B>, <B><A HREF="sane-find-scanner.1.html">sane-find-scanner(1)</A></B>, <B>sane-"backendname"</B>(5), <B><A HREF="sane-scsi.5.html">sane-scsi(5)</A></B>
|
|
|
|
|
|
|
|
|
2005-08-07 11:14:41 +00:00
|
|
|
|
2003-09-23 15:30:05 +00:00
|
|
|
</PRE>
|
|
|
|
<H2>AUTHOR</H2><PRE>
|
2005-08-07 11:14:41 +00:00
|
|
|
Henning Meier-Geinitz <henning@meier-geinitz.de>
|
2003-09-23 15:30:05 +00:00
|
|
|
|
2005-08-07 11:14:41 +00:00
|
|
|
sane-backends 1.0.16 29 May 2005 <B><A HREF="sane-usb.5.html">sane-usb(5)</A></B>
|
2003-09-23 15:30:05 +00:00
|
|
|
</PRE>
|
|
|
|
<HR>
|
|
|
|
<ADDRESS>
|
|
|
|
Man(1) output converted with
|
|
|
|
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
|
|
|
|
</ADDRESS>
|
|
|
|
</BODY>
|
|
|
|
</HTML>
|