Update Image Scanners section for 8.X. Thanks to Ken Tom for the tests

on his hardware.
This commit is contained in:
Marc Fonvieille 2009-08-12 11:06:35 +00:00
parent 2088e24f92
commit 1cdd85dab9
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=34607

View file

@ -1484,7 +1484,8 @@ bktr0: Pinnacle/Miro TV, Philips SECAM tuner.</programlisting>
<application>SANE</application> has a <ulink
url="http://www.sane-project.org/sane-supported-devices.html">supported
devices</ulink> list that can provide you with information
about the support for a scanner and its status. The
about the support for a scanner and its status. On systems
prior to &os;&nbsp;8.X the
&man.uscanner.4; manual page also provides a list of supported
USB scanners.</para>
</sect2>
@ -1508,36 +1509,35 @@ bktr0: Pinnacle/Miro TV, Philips SECAM tuner.</programlisting>
<programlisting>device usb
device uhci
device ohci
device uscanner</programlisting>
device ehci</programlisting>
<para>Depending upon the USB chipset on your motherboard, you
will only need either <literal>device uhci</literal> or
<literal>device ohci</literal>, however having both in the
kernel configuration file is harmless.</para>
<para>On systems prior to &os;&nbsp;8.X, the following line is
also needed:</para>
<para>If you do not want to rebuild your kernel and your
kernel is not the <filename>GENERIC</filename> one, you can
directly load the &man.uscanner.4; device driver module with
the &man.kldload.8; command:</para>
<programlisting>device uscanner</programlisting>
<screen>&prompt.root; <userinput>kldload uscanner</userinput></screen>
<para>On these versions of &os;, the &man.uscanner.4; device
driver provides support for the USB scanners. Since
&os;&nbsp;8.0, this support is directly provided by
the &man.libusb.3; library.</para>
<para>To load this module at each system startup, add the
following line to
<filename>/boot/loader.conf</filename>:</para>
<programlisting>uscanner_load="YES"</programlisting>
<para>After rebooting with the correct kernel, or after
loading the required module, plug in your USB scanner. A
<para>After rebooting with the correct kernel,
plug in your USB scanner. A
line showing the detection of your
scanner should appear in the system message buffer
(&man.dmesg.8;):</para>
<screen>ugen0.2: &lt;EPSON&gt; at usbus0</screen>
<para>or on a &os;&nbsp;7.X system:</para>
<screen>uscanner0: EPSON EPSON Scanner, rev 1.10/3.02, addr 2</screen>
<para>This shows that our scanner is using the
<filename>/dev/uscanner0</filename> device node.</para>
<para>These messages show that our scanner is using
either <filename>/dev/ugen0.2</filename> or
<filename>/dev/uscanner0</filename> as device node according
to the &os; version we run. For this example, a
&epson.perfection; 1650 USB scanner was used.</para>
</sect3>
<sect3>
@ -1639,6 +1639,19 @@ found SCSI scanner "AGFA SNAPSCAN 600 1.10" at /dev/pass3</screen>
<screen>&prompt.root; <userinput>scanimage -L</userinput>
device `snapscan:/dev/pass3' is a AGFA SNAPSCAN 600 flatbed scanner</screen>
<para>Or, for example with the USB scanner used in the <xref
linkend="scanners-kernel-usb">:</para>
<screen>&prompt.root; <userinput>scanimage -L</userinput>
device 'epson2:libusb:/dev/usb:/dev/ugen0.2' is a Epson GT-8200 flatbed scanner</screen>
<para>This output comes from a &os;&nbsp;8.X system, the
<literal>`epson2:libusb:/dev/usb:/dev/ugen0.2'</literal> item
gives us the backend name (<literal>epson2</literal>) and the
device node (<literal>/dev/ugen0.2</literal>) used by our
scanner.</para>
<note>
<para>No output or a message saying that no scanners were
identified indicates that &man.scanimage.1; is unable to
identify the scanner. If this happens, you will need to edit
@ -1650,7 +1663,9 @@ device `snapscan:/dev/pass3' is a AGFA SNAPSCAN 600 flatbed scanner</screen>
scanners.</para>
<para>For example, with the USB scanner used in the <xref
linkend="scanners-kernel-usb">,
linkend="scanners-kernel-usb">, under &os;&nbsp;8.X the
scanner is perfectly detected and working but under prior
versions of &os; (where &man.uscanner.4; driver is used)
<command>sane-find-scanner</command> gives us the following
information:</para>
@ -1669,9 +1684,9 @@ sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).</screen>
<para>Since the scanner is not identified, we will need to edit
the <filename>/usr/local/etc/sane.d/epson.conf</filename>
the <filename>/usr/local/etc/sane.d/epson2.conf</filename>
file. The scanner model used was the &epson.perfection; 1650,
so we know the scanner will use the <literal>epson</literal>
so we know the scanner will use the <literal>epson2</literal>
backend. Be sure to read the help comments in the backends
configuration files. Line changes are quite simple: comment
out all lines that have the wrong interface for your scanner
@ -1696,6 +1711,7 @@ device `epson:/dev/uscanner0' is a Epson GT-8200 flatbed scanner</screen>
concerned with is the
<literal>`epson:/dev/uscanner0'</literal> field, which give us
the right backend name and the right device node.</para>
</note>
<para>Once the <command>scanimage -L</command> command is able
to see the scanner, the configuration is complete. The device
@ -1727,23 +1743,48 @@ device `epson:/dev/uscanner0' is a Epson GT-8200 flatbed scanner</screen>
to the scanner. The user will need read and write
permissions to the device node used by the scanner. As an
example, our USB scanner uses the device node
<filename>/dev/uscanner0</filename> which is owned by the
<groupname>operator</groupname> group. Adding the user
<username><replaceable>joe</replaceable></username> to the
<groupname>operator</groupname> group will allow him to use
the scanner:</para>
<filename>/dev/ugen0.2</filename> which is in fact just a
symlink to the real device node called
<filename>/dev/usb/0.2.0</filename> (a quick look at the
contain of the <filename class="directory">/dev</filename>
directory will confirm it). Both, the symlink and the
device node, are owned respectively by the
<groupname>wheel</groupname> and the
<groupname>operator</groupname> groups. Adding the user
<username><replaceable>joe</replaceable></username> to these
groups will allow him to use
the scanner but, for obvious security reasons, you should
think twice before adding a user to any group, especially the
<groupname>wheel</groupname> group. A better solution would
be creating a specific group for using the USB devices
and make the scanner device accessible to members of this
group.</para>
<screen>&prompt.root; <userinput>pw groupmod operator -m <replaceable>joe</replaceable></userinput></screen>
<para>So we will use, for example, a group called
<groupname><replaceable>usb</replaceable></groupname>. The
first step is the creation of this group with the help of the
&man.pw.8; command:</para>
<para>For more details read the &man.pw.8; manual page. You
also have to set the correct write permissions (0660 or 0664)
on the <filename>/dev/uscanner0</filename> device node, by
default the <groupname>operator</groupname> group can only
read the device node. This is done by adding the following
<screen>&prompt.root; <userinput>pw groupadd usb</userinput></screen>
<para>Then we have to make the <filename>/dev/ugen0.2</filename>
symlink and the <filename>/dev/usb/0.2.0</filename> device node accessible to the <groupname>usb</groupname> group
with the correct write permissions (<literal>0660</literal> or
<literal>0664</literal>), cause by default only the owner of
these files (<username>root</username>) can write to them.
All of this is done by adding the following
lines to the <filename>/etc/devfs.rules</filename> file:</para>
<programlisting>[system=5]
add path uscanner0 mode 660</programlisting>
add path ugen0.2 mode 660 group usb
add path usb/0.2.0 mode 0666 group usb</programlisting>
<para>For the &os;&nbsp;7.X users, the following lines with the
correct device node, most of time
<filename>/dev/uscanner0</filename>, are needed:</para>
<programlisting>[system=5]
add path uscanner0 mode 660 group usb</programlisting>
<para>Then add the following to
<filename>/etc/rc.conf</filename> and reboot the
@ -1754,11 +1795,13 @@ add path uscanner0 mode 660</programlisting>
<para>More information regarding these lines can be found in the
&man.devfs.8; manual page.</para>
<note>
<para>Of course, for security reasons, you should think twice
before adding a user to any group, especially the
<groupname>operator</groupname> group.</para>
</note>
<para>Now, one will just have to add users to the
<groupname><replaceable>usb</replaceable></groupname> group to
allow the access to the scanner:</para>
<screen>&prompt.root; <userinput>pw groupmod usb -m <replaceable>joe</replaceable></userinput></screen>
<para>For more details read the &man.pw.8; manual page.</para>
</sect2>
</sect1>
</chapter>