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

📄 x722.html

📁 usb develop guide
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//Norman Walsh//DTD DocBook HTML 1.0//EN"><HTML><HEAD><TITLE>Using a USB Scanner</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet"><LINKREL="HOME"TITLE="The Linux USB sub-system"HREF="book1.html"><LINKREL="UP"TITLE="Using Linux USB"HREF="c607.html"><LINKREL="PREVIOUS"TITLE="Communicating with the Diamond Rio 500"HREF="x719.html"><LINKREL="NEXT"TITLE="About this Guide"HREF="p814.html"></HEAD><BODY><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">The Linux USB sub-system</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="x719.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 3. Using Linux USB</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="p814.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="AEN722">Using a USB Scanner</A></H1><P>As noted in the installation part, the scanner driver provides a linkfor a suitable user space program to access the scanner hardware. Thissection deals with getting the user space program (SANE) set up correctly.</P><P>If you don't have SANE installed, you can get it from from theany of the sites referenced at <AHREF="http://www.mostang.com/sane/source.html"TARGET="_top">http://www.mostang.com/sane/source.html</A>.</P><P>At this point, you need to do different things depending on what sort of scanneryou have. Mostly you need to change configuration files.If you selected the default install location, SANE's configurationfiles are located in <TTCLASS="FILENAME">/usr/local/etc/sane.d/</TT>. If SANEcame installed with your distribution, the configuration files are probably in<TTCLASS="FILENAME">/usr/etc/sane.d/</TT>.</P><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN730">Hewlett Packard Scanners</A></H2><P>Not all Hewlett Packard scanners are supported by the sane-hp backend driver.The only ones with a reasonable chance of working are HP4100C, HP5200C,HP6200C and HP6300C. The Photosmart S20 should also work.Note that the HP3300C and HP4200C are not included inthe devices with a working backend.</P><P>For a HP scanner, you need to change<TTCLASS="FILENAME">/usr/local/etc/sane.d/hp.conf</TT> to contain just thefollowing two lines:<TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="SCREEN">/dev/usb/scanner0  option connect-device</PRE></TD></TR></TABLE></P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN736">Epson Scanners</A></H2><P>The Perfection 636U and Perfection 1200U scanners have a reasonablechance of working with the sane-epson backend driver.</P><P>For an Epson scanner, you need to<TTCLASS="FILENAME">/usr/local/etc/sane.d/epson.conf</TT> to contain thefollowing line:<TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="SCREEN">usb /dev/usb/scanner0</PRE></TD></TR></TABLE></P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN742">AGFA ScapScan 1212U</A></H2><P>This scanner comes in two versions. The version 2 model needs its firmwaredownloaded. Both version 1 and version 2 need patches to SANE.</P><P>Check the driver disk that came with your scanner for a file named<TTCLASS="FILENAME">SnapScan 1212U_2.bin</TT>. If there is no file by that name,you probably have a version 1 scanner and can proceed on.Otherwise you need to copy that file off,and obtain a suitable firmware downloader, such as the agfafirm tool from<AHREF="http://hem.fyristorg.com/henrikj/snapscan/downloads/agfafirm"TARGET="_top">http://hem.fyristorg.com/henrikj/snapscan/downloads/agfafirm</A>. With thistool, you then do<BCLASS="COMMAND">agfafirm /dev/usb/scanner0 "SnapScan 1212U_2.bin"</B>. The statuslamp on the scanner should flash.</P><P>You need to modify the SANE sane-snapscan backend. This requires the sourcecode. Complete the following steps:<P></P><UL><LI><P>Obtain the source code from<AHREF="ftp://ftp.mostang.com/pub/sane/sane-1.0.1.tar.gz"TARGET="_top"> ftp://ftp.mostang.com/pub/sane/sane-1.0.1.tar.gz</A>.</P></LI><LI><P>unpack the sources with the following command:<BCLASS="COMMAND">tar xvzf sane-1.0.1.tar.gz</B></P></LI><LI><P>change into the sane source directory:<BCLASS="COMMAND">cd sane-1.0.1</B></P></LI><LI><P>obtain the required patch from<AHREF="http://hem.fyristorg.com/henrikj/snapscan/downloads/sane-1.0.1-usb.diff"TARGET="_top">http://hem.fyristorg.com/henrikj/snapscan/downloads/sane-1.0.1-usb.diff</A>.</P></LI><LI><P>Apply the patch with the following command:<BCLASS="COMMAND">patch -p1 &#60; sane-1.0.1-usb.diff</B></P></LI><LI><P>Build and install SANE with the following command:<BCLASS="COMMAND"> ./configure; make; make install</B></P></LI></UL></P><P>Note that this patch will not apply cleanly to SANE 1.0.2, but there you caneither apply the rejects by hand or use a development patch. I assume that ifyou can do this, you won't need detailed instructions.</P><P>If you do not have a functional SANE at this point, likely problems arelinking to an obsolete SANE backend (check your install target for oldlibsane-snapscan entries.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN771">Prisa Acerscan Scanners</A></H2><P>In addition to SANE changes, the Prisa Acerscan 620U and 640U needfirmware downloaded.</P><P>Check the driver disk that came with your scanner for a file named<TTCLASS="FILENAME">u96v057.bin</TT> in the<TTCLASS="FILENAME">DRIVERS/DISK1/BIN/</TT> directory. Copy thisfile off the driver disk.</P><P>You need to obtain a suitable firmware downloader, such as the acerfirm tool from<AHREF="http://utopia.knoware.nl/~joey/linux/acerfirm"TARGET="_top">http://utopia.knoware.nl/~joey/linux/acerfirm</A>. With thistool, you then do<BCLASS="COMMAND">acerfirm /dev/usb/scanner0 "u96v057.bin"</B>. The statuslamp on the scanner should flash.</P><P>You need to modify the SANE sane-snapscan backend. This requires the sourcecode. Complete the following steps:<P></P><UL><LI><P>Obtain the source code from<AHREF="ftp://ftp.mostang.com/pub/sane/sane-1.0.1.tar.gz"TARGET="_top"> ftp://ftp.mostang.com/pub/sane/sane-1.0.1.tar.gz</A>.</P></LI><LI><P>unpack the sources with the following command:<BCLASS="COMMAND">tar xvzf sane-1.0.1.tar.gz</B></P></LI><LI><P>change into the sane source directory:<BCLASS="COMMAND">cd sane-1.0.1</B></P></LI><LI><P>obtain the required patch from<AHREF="http://hem.fyristorg.com/henrikj/snapscan/downloads/sane-1.0.1-usb.diff"TARGET="_top">http://hem.fyristorg.com/henrikj/snapscan/downloads/sane-1.0.1-usb.diff</A>.</P></LI><LI><P>Apply the patch with the following command:<BCLASS="COMMAND">patch -p1 &#60; sane-1.0.1-usb.diff</B></P></LI><LI><P>Hand edit the following area in<TTCLASS="FILENAME">backend/snapscan.h</TT><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="90%"><TR><TD><PRECLASS="PROGRAMLISTING">static struct SnapScan_Model_desc scanners[] ={  /* SCSI model name -&#62; enum value */  { "FlatbedScanner_4", VUEGO310S },  { "SNAPSCAN 1212U", SNAPSCAN1236S },  { "SNAPSCAN 1212U_2", SNAPSCAN1236S },  { "SNAPSCAN 1236",    SNAPSCAN1236S },  { "SNAPSCAN 310",     SNAPSCAN310 },  { "SNAPSCAN 600",     SNAPSCAN600 },  { "SnapScan",         SNAPSCAN300 },};</PRE></TD></TR></TABLE>to include the following additional entry:<TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="90%"><TR><TD><PRECLASS="PROGRAMLISTING"> { "FlatbedScanner13",  SNAPSCAN600 },</PRE></TD></TR></TABLE></P></LI><LI><P>Build and install SANE with the following command:<BCLASS="COMMAND"> ./configure; make; make install</B></P></LI></UL></P><P>Note that this patch will not apply cleanly to SANE 1.0.2, but there you caneither apply the rejects by hand or use a development patch. I assume that ifyou can do this, you won't need detailed instructions.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN806">Using SANE</A></H2><P>You should now be able to use a SANE frontend(<TTCLASS="USERINPUT"><B>xscanimage</B></TT> or <TTCLASS="USERINPUT"><B>scanimage</B></TT>) to scan images. You may need to specify what device you are using as a command line option (-d) to <TTCLASS="USERINPUT"><B>scanimage</B></TT>. Much more information is available in the various SANE man pages, including how to get <AHREF="http://www.gimp.org"TARGET="_top">GIMP</A> and <TTCLASS="USERINPUT"><B>xscanimage</B></TT> working together.</P></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="x719.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="book1.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="p814.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Communicating with the Diamond Rio 500</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="c607.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">About this Guide</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

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