<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>
<channel>
	<title>G-Loaded Journal &#187; SANE</title>
	<atom:link href="http://www.g-loaded.eu/tag/sane/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.g-loaded.eu</link>
	<description>An open-source software and technology related journal</description>
	<lastBuildDate>Mon, 05 Dec 2011 19:55:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
		<item>
		<title>Viceo Backend for SANE with libusb support</title>
		<link>http://www.g-loaded.eu/2008/01/24/viceo-backend-for-sane-with-libusb-support/</link>
		<comments>http://www.g-loaded.eu/2008/01/24/viceo-backend-for-sane-with-libusb-support/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 15:00:43 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Imaging]]></category>
		<category><![CDATA[SANE]]></category>
		<category><![CDATA[Scanner]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2008/01/24/viceo-backend-for-sane-with-libusb-support/</guid>
		<description><![CDATA[After many years of failure, countless hours of digging into the World Wide Web for information, numerous failed attempts due to lack of knowledge to modify the v0.6 E3 driver for USB scanners (Viceo backend) and add support for libusb, yesterday I was sent a patch, which contained the Viceo backend for SANE with libusb [...]]]></description>
			<content:encoded><![CDATA[<p>After many years of failure, countless hours of digging into the World Wide Web for information, numerous failed attempts due to lack of knowledge to modify the v0.6 <a href="http://viceo.orcon.net.nz/">E3 driver</a> for USB scanners (Viceo backend) and add support for <a href="http://libusb.sourceforge.net/">libusb</a>, yesterday I was sent a patch, which contained the <em>Viceo</em> backend for <a href="http://www.sane-project.org/">SANE</a> with libusb support. My old <strong>Primax Colorado 19200 USB</strong> scanner worked for the first time under Linux. If you own such an old scanner and care to make it work under a modern Linux distribution, read on for instructions and files.<br />
<span id="more-481"></span><br />
It all happened when I stumbled upon Pat&#8217;s <a href="http://www.engsoc.org/~pat/log/index.cgi/2004/05/25#1085543907">blog post</a> a couple of days ago, which gave me hope that someone had cared to modify the E3 USB scanner driver and make it work with libusb. I sent an email to Pat and received a patch (<em>thanks a million</em>!) for <em>sane-backends-1.0.14</em>. The patch did not work initially with today&#8217;s <em>sane-backends-1.0.18</em>, but this would not stop a determined soul from fixing it. Adding support for libusb was completely out of my league, but fixing that particular patch was definitely something I could deal with. It took me some hours, but, finally, I, not only had a patch that could be applied succesfully into the sane-backends-1.0.18 source, but also had a working Viceo backend for SANE, which means&#8230; a working scanner under Linux. I admit that I use the scanner rather rarely, but knowing that this piece of hardware can work under Linux is good.</p>
<h4>Driver History</h4>
<p>Here goes some brief history about the driver.</p>
<p>The E3 driver was initially developed by Steven Ellis (<a href="http://viceo.orcon.net.nz/">http://viceo.orcon.net.nz/</a>). 0.6 was the last released version (2002), which lacked support for libusb. It seems that Steven abandoned the development of the driver at that point. Until a few days ago, the 0.6 release was what I had considered as the latest available version of the E3 driver.</p>
<p>What I missed, was the fact that Jimmy Nguyen had modified the 0.6 driver and had added support for libusb. I had spent countless hours searching the web in the past but I could not locate such a release of the driver. Anyhow, Jimmy&#8217;s patch was released in 2004 for sane-backends-1.0.14.</p>
<p>The rest has been already described above.</p>
<h4>Supported Devices</h4>
<p>This driver works with <strong>USB scanners</strong> equipped with the <strong>E3 chipset</strong>. Some of these scanner models (if not all) are the following:</p>
<ul>
<li>Genius Vivid Pro USB</li>
<li>Primax Colorado USB 19200</li>
<li>Visioneer OneTouch 7600</li>
<li>Visioneer OneTouch 6100</li>
<li>IBM IdeaScan 2000 USB</li>
<li>LG Electronics Scanworks 600U</li>
</ul>
<h4>Download</h4>
<p>I have modified the original patch in order to make it work with <code>sane-backends-1.0.18</code> and also wrote a <em>SPEC</em> file for RPM packaging. Using a package will greatly simplify the installation procedure.</p>
<p>Here follows a list of files you can download:</p>
<dl>
<dt>RPM &#8211; <a href="http://www.codetrax.org/attachments/download/42/sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.rpm">sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.rpm</a></dt>
<dd>RPM package of Viceo backend. <strong>Requires sane-backends-1.0.18</strong>. Installs the Viceo backend only and will not touch any other files. Please read the <em>Installation</em> and <em>Configuration</em> sections for instructions.</dd>
<dt>DEB &#8211; TODO</dt>
<dd>A DEB file for debian-based distributions is not currently available. You can still generate a deb package from the RPM using <strong>alien</strong>. In order to convert the the RPM package to a DEB, use alien like: <code>alien -k sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.rpm</code> and a deb package will be generated for you. You can install the DEB package with: <code>dpkg -i sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.deb</code>. Please note that this procedure <strong>has not been tested</strong>.</dd>
<dt>SPEC &#8211; <a href="http://www.codetrax.org/attachments/download/44/viceo.spec">viceo.spec</a></dt>
<dd>Required if you need to build the RPM package.</dd>
<dt>Patch &#8211; <a href="http://www.codetrax.org/attachments/download/41/sane-backends-1.0.18-viceo.diff.gz">sane-backends-1.0.18-viceo.diff.gz</a></dt>
<dd><strong>New</strong> Viceo backend patch for <strong>sane-backends 1.0.18</strong>. Note, that in addition to the required modifications in order to make this patch suitable for sane-backends-1.0.18, this diff does not include the modifications of the core SANE file <code>sanei/sanei_usb.c</code>. Everything seems to work just fine without having to patch any core SANE file.</dd>
<dt>Patch &#8211; <a href="http://www.codetrax.org/attachments/download/45/viceoDriver4Sane1.0.14.tar.gz">viceoDriver4Sane1.0.14.tar.gz</a></dt>
<dd><strong>Old</strong> package with Viceo patch for <em>sane-backends 1.0.14</em> and some notes by Jimmy Nguyen about the release. Reading them is recommended.</dd>
</dl>
<p>All versions are available from the development web site&#8217;s <a href="http://www.codetrax.org/projects/viceo-sane-backend/files">download area</a>.</p>
<h4>Installation</h4>
<p>Using the RPM or DEB package (see above for info) is the recommended method of installing. This package has been built in Fedora 8, but, since it is rather generic and does not contain any Fedora-specific information, it should work on any RPM-based distribution.</p>
<h5>Using the RPM</h5>
<p>The package <strong>sane-backends-1.0.18</strong> is a <em>dependency</em>. Make sure you have installed it.</p>
<pre class="console">
# wget http://www.codetrax.org/attachments/download/42/sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.rpm
# rpm -ivh sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.rpm
</pre>
<p>Please make sure you read the Configuration section for instructions on how to setup the scanner.</p>
<h5>Manual installation</h5>
<p>This information has been written with as much detail as possible, if you still have questions, please use the forums.</p>
<p>Note: The compilation of the backend should be performed by a regular user and not root.</p>
<p>First, download and extract the required packages. Although the sane-backends-1.0.18 package is used, we will only use it in order to build the Viceo backend.</p>
<pre class="console">
$ wget ftp://ftp.sane-project.org/pub/sane/sane-backends-1.0.18/sane-backends-1.0.18.tar.gz
$ tar -xzf sane-backends-1.0.18.tar.gz
$ wget http://www.codetrax.org/attachments/download/41/sane-backends-1.0.18-viceo.diff.gz
$ gunzip sane-backends-1.0.18-viceo.diff.gz
</pre>
<p>Patch the sane-backends source code:</p>
<pre class="console">
$ patch -p1 -b -d sane-backends-1.0.18/ < sane-backends-1.0.18-viceo.diff
</pre>
<p>Change to the sane-backends source code top-directory:</p>
</pre>
<pre class="console">
$ cd sane-backends-1.0.18/
</pre>
<p>We only care to build the Viceo backend, so set the <code>BACKENDS</code> environment variable to &#8220;<em>viceo</em>&#8220;.</p>
<pre class="console">
$ export BACKENDS=viceo
</pre>
<p>Compile the backend:</p>
<pre class="console">
$ ./configure --prefix=/usr --sysconfdir=/etc
$ make
</pre>
<p>We perform an installation in a temporary directory (<code>1_test_install</code>). This will help you pick up the correct files for the manual installation later. Also, you do not need root privileges for this.</p>
<pre class="console">
$ mkdir 1_test_install
$ make DESTDIR="$PWD/1_test_install" install
</pre>
<p>Now, SANE and the viceo backend have been temporarily installed in the 1_test_install/ directory.</p>
<p>The following actions need to be performed by root or you can use sudo.</p>
<p>Make sure that <strong>sane-backends</strong> has been installed using your distribution&#8217;s package manager. Then copy the following files to the proper locations:</p>
<pre class="console">
# cp 1_test_install/etc/sane.d/{e1.ini,lut.plg,viceo.conf} /etc/sane.d/
# cp 1_test_install/usr/lib/sane/libsane-viceo.so.1.0.18 /usr/lib/sane/
</pre>
<p>Finally, create a needed symbolic link to libsane-viceo.so.1.0.18.</p>
<pre class="console">
# ln -s /usr/lib/sane/libsane-viceo.so.1.0.18 /usr/lib/sane/libsane-viceo.so.1
</pre>
<p>Update the library database. Run:</p>
<pre class="console">
# ldconfig
</pre>
<p>That will be it.</p>
<h4>SANE Configuration</h4>
<p>The scanner configuration needs to be performed by root or you need to use sudo<br />
The first thing to do is to add the viceo backend in <code>/etc/sane.d/dll.conf</code>. Note that the RPM will not do this, so you need to perform this step manually. Either add the work &#8220;<strong>viceo</strong>&#8221; (without quotes) at the end of <code>/etc/sane.d/dll.conf</code> or use the following command:</p>
<pre class="console">
# echo "viceo" &gt;&gt; /etc/sane.d/dll.conf
</pre>
<p>If your scanner is not connected, please do so now.</p>
<p>Run the following command:</p>
<pre class="console">
# sane-find-scanner
</pre>
<p>Your scanner should be identified:</p>
<pre class="codesnp">
[...]
found USB scanner (vendor=0x0461 [Primax], product=0x0360 [Colorado USB 19200]) at libusb:002:003
[...]
</pre>
<p>Take a note of the vendor and product codes and add a line using the following format to <code>/etc/sane.d/viceo.conf</code>:</p>
<pre class="codesnp">
usb &lt;vendor&gt; &lt;product&gt;
</pre>
<p>For me, that line inside <strong>/etc/sane.d/viceo.conf</strong> should be:</p>
<pre class="codesnp">
usb 0x0461 0x0360
</pre>
<p>Now list the available imaging devices. You scanner should be listed:</p>
<pre class="console">
# scanimage -L
</pre>
<p>And this was the device listing:</p>
<pre class="codesnp">
device `viceo:usb 0x0461 0x0360' is a Visioneer Genius ColorPage-Vivid Pro USB flatbed scanner
</pre>
<h4>Scanning</h4>
<p>You can use the scanner either from the command-line or from within GIMP, provided that you have installed the <strong>xsane-gimp</strong> package.</p>
<p>If you use the scanner from the <strong>command line</strong>, wherever a device name is needed, use the device name that scanimage -L lists. For example:</p>
<pre class="console">
# scanimage -d "viceo:usb 0x0461 0x0360" --mode Color --format=tiff --resolution 200 > z_out.tiff
</pre>
<p>Alternatively, you can set the following environment variable:</p>
<pre class="console">
# export SANE_DEFAULT_DEVICE="viceo:usb 0x0461 0x0360"
</pre>
<p>Please read the SANE documentation for more information.</p>
<h4>Licensing</h4>
<p>The viceo backend is accompanied by two files which were included in the drivers for Windows, <code>e1.ini</code> and <code>lut.plg</code>. Although, you, as the owner of the hardware may use these files since you have paid for them, it is unclear whether there is a problem or not with distributing these files separately from the Windows driver package. The fact that these files are available from the home of the E3 driver v0.6, and are also included in <code>sane-backends-1.0.14-viceo.diff</code>, has led me to the conclusion that there is no problem in distributing these files. So, they are included in the my modified patch and RPM package. Please note that the aforementioned files <code>e1.ini</code> and <code>lut.plg</code> have neither been released nor distributed under the terms of a free license, eg GPL, so <strong>they are not free software</strong>.</p>
<h4>Conclusion</h4>
<p>Although the scanner is pretty old, it performs quite well. The driver won&#8217;t let you use resolutions over 600dpi, but I guess this is acceptable.</p>
<p>This article has been written in a fast pace. I have tried to provide as much detail as possible. If you still need help, please use our forums for your questions.</p>
<p>Happy scanning!</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2008/01/24/viceo-backend-for-sane-with-libusb-support/">Viceo Backend for SANE with libusb support</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2006/12/03/pdf2email-cups-backend/" rel="bookmark">pdf2email CUPS Backend</a></li>
<li><a href="http://www.g-loaded.eu/2005/11/06/meld/" rel="bookmark">Meld&#8230;</a></li>
<li><a href="http://www.g-loaded.eu/2005/10/30/creative-pc-cam-750/" rel="bookmark">Creative PC-CAM Series webcams in linux</a></li>
<li><a href="http://www.g-loaded.eu/2011/03/28/dd-wrt-support-for-wireless-n-routers/" rel="bookmark">DD-WRT support for Wireless N Routers</a></li>
<li><a href="http://www.g-loaded.eu/2006/09/09/kernel-2617-and-lirc_gpio-driver/" rel="bookmark">Kernel 2.6.17 and lirc_gpio driver</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2008/01/24/viceo-backend-for-sane-with-libusb-support/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
	</channel>
</rss>

