⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scanners.html

📁 FreeBSD操作系统的详细使用手册
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy, see www.w3.org" /><title>Image Scanners</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD Handbook" href="index.html" /><link rel="UP" title="Multimedia" href="multimedia.html" /><link rel="PREVIOUS" title="Setting Up TV Cards" href="tvcard.html" /><link rel="NEXT" title="Configuring the FreeBSD Kernel" href="kernelconfig.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /></head><body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"alink="#0000FF"><div class="NAVHEADER"><table summary="Header navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><th colspan="3" align="center">FreeBSD Handbook</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="tvcard.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Chapter 7 Multimedia</td><td width="10%" align="right" valign="bottom"><a href="kernelconfig.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="SCANNERS" name="SCANNERS">7.6 Image Scanners</a></h1><i class="AUTHORGROUP"><span class="CONTRIB">Written by</span> Marc Fonvieille.</i> <div class="SECT2"><h2 class="SECT2"><a id="AEN9074" name="AEN9074">7.6.1 Introduction</a></h2><p>FreeBSD, like any modern operating system, allows the use of image scanners.Standardized access to scanners is provided by the <b class="APPLICATION">SANE</b>(Scanner Access Now Easy) <acronym title="Application Programming Interface"class="ACRONYM">API</acronym> available through the FreeBSD Ports Collection. <bclass="APPLICATION">SANE</b> will also use some FreeBSD devices drivers to access to thescanner hardware.</p><p>FreeBSD supports both SCSI and USB scanners. Be sure your scanner is supported by <bclass="APPLICATION">SANE</b> prior to performing any configuration. <bclass="APPLICATION">SANE</b> has a <ahref="http://sane-project.org/sane-supported-devices.html" target="_top">supporteddevices</a> list that can provide you with information about the support for a scannerand its status. The <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=uscanner&sektion=4"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">uscanner</span>(4)</span></a> manualpage also provides a list of supported USB scanners.</p></div><div class="SECT2"><h2 class="SECT2"><a id="AEN9087" name="AEN9087">7.6.2 Kernel Configuration</a></h2><p>As mentioned above both SCSI and USB interfaces are supported. According to yourscanner interface, different device drivers are required.</p><div class="SECT3"><h3 class="SECT3"><a id="SCANNERS-KERNEL-USB" name="SCANNERS-KERNEL-USB">7.6.2.1 USBInterface</a></h3><p>The <tt class="FILENAME">GENERIC</tt> kernel by default includes the device driversneeded to support USB scanners. Should you decide to use a custom kernel, be sure thatthe following lines are present in your kernel configuration file:</p><pre class="PROGRAMLISTING">device usbdevice uhcidevice ohcidevice uscanner</pre><p>Depending upon the USB chipset on your motherboard, you will only need either <varclass="LITERAL">device uhci</var> or <var class="LITERAL">device ohci</var>, howeverhaving both in the kernel configuration file is harmless.</p><p>If you do not want to rebuild your kernel and your kernel is not the <ttclass="FILENAME">GENERIC</tt> one, you can directly load the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=uscanner&sektion=4"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">uscanner</span>(4)</span></a> devicedriver module with the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=kldload&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">kldload</span>(8)</span></a>command:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">kldload uscanner</kbd></pre><p>To load this module at each system startup, add the following line to <ttclass="FILENAME">/boot/loader.conf</tt>:</p><pre class="PROGRAMLISTING">uscanner_load="YES"</pre><p>After rebooting with the correct kernel, or after loading the required module, plug inyour USB scanner. The scanner should appear in your system message buffer (<ahref="http://www.FreeBSD.org/cgi/man.cgi?query=dmesg&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">dmesg</span>(8)</span></a>) as somethinglike:</p><pre class="SCREEN">uscanner0: EPSON EPSON Scanner, rev 1.10/3.02, addr 2</pre><p>This shows that our scanner is using the <tt class="FILENAME">/dev/uscanner0</tt>device node.</p><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> On FreeBSD&nbsp;4.X, the USB daemon (<ahref="http://www.FreeBSD.org/cgi/man.cgi?query=usbd&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">usbd</span>(8)</span></a>) must berunning to be able to see some USB devices. To enable this, add <varclass="LITERAL">usbd_enable="YES"</var> to your <tt class="FILENAME">/etc/rc.conf</tt>file and reboot the machine.</p></blockquote></div></div><div class="SECT3"><h3 class="SECT3"><a id="AEN9126" name="AEN9126">7.6.2.2 SCSI Interface</a></h3><p>If your scanner comes with a SCSI interface, it is important to know which SCSIcontroller board you will use. According to the SCSI chipset used, you will have to tuneyour kernel configuration file. The <tt class="FILENAME">GENERIC</tt> kernel supports themost common SCSI controllers. Be sure to read the <tt class="FILENAME">NOTES</tt> file(<tt class="FILENAME">LINT</tt> under FreeBSD&nbsp;4.X) and add the correct line to yourkernel configuration file. In addition to the SCSI adapter driver, you need to have thefollowing lines in your kernel configuration file:</p><pre class="PROGRAMLISTING">device scbusdevice pass</pre><p>Once your kernel has been properly compiled, you should be able to see the devices inyour system message buffer, when booting:</p><pre class="SCREEN">pass2 at aic0 bus 0 target 2 lun 0pass2: &lt;AGFA SNAPSCAN 600 1.10&gt; Fixed Scanner SCSI-2 devicepass2: 3.300MB/s transfers</pre><p>If your scanner was not powered-on at system boot, it is still possible to manuallyforce the detection by performing a SCSI bus scan with the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=camcontrol&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">camcontrol</span>(8)</span></a>command:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">camcontrol rescan all</kbd>Re-scan of bus 0 was successfulRe-scan of bus 1 was successfulRe-scan of bus 2 was successfulRe-scan of bus 3 was successful</pre><p>Then the scanner will appear in the SCSI devices list:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">camcontrol devlist</kbd>&lt;IBM DDRS-34560 S97B&gt;              at scbus0 target 5 lun 0 (pass0,da0)&lt;IBM DDRS-34560 S97B&gt;              at scbus0 target 6 lun 0 (pass1,da1)&lt;AGFA SNAPSCAN 600 1.10&gt;           at scbus1 target 2 lun 0 (pass3)&lt;PHILIPS CDD3610 CD-R/RW 1.00&gt;     at scbus2 target 0 lun 0 (pass2,cd0)</pre><p>More details about SCSI devices, are available in the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=scsi&sektion=4"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">scsi</span>(4)</span></a> and <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=camcontrol&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">camcontrol</span>(8)</span></a> manualpages.</p></div></div><div class="SECT2"><h2 class="SECT2"><a id="AEN9153" name="AEN9153">7.6.3 SANE Configuration</a></h2><p>The <b class="APPLICATION">SANE</b> system has been splitted in two parts: thebackends (<ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/graphics/sane-backends/pkg-descr"><ttclass="FILENAME">graphics/sane-backends</tt></a>) and the frontends (<a

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -