Post navigation

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 support. My old Primax Colorado 19200 USB 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.
It all happened when I stumbled upon Pat’s blog post (note: page is down) 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 (thanks a million!) for sane-backends-1.0.14. The patch did not work initially with today’s sane-backends-1.0.18, 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… 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.

Driver History

Here goes some brief history about the driver.

The E3 driver was initially developed by Steven Ellis (http://viceo.orcon.net.nz/). 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.

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’s patch was released in 2004 for sane-backends-1.0.14.

The rest has been already described above.

Supported Devices

This driver works with USB scanners equipped with the E3 chipset. Some of these scanner models (if not all) are the following:

Genius Vivid Pro USB

Primax Colorado USB 19200

Visioneer OneTouch 7600

Visioneer OneTouch 6100

IBM IdeaScan 2000 USB

LG Electronics Scanworks 600U

Download

I have modified the original patch in order to make it work with sane-backends-1.0.18 and also wrote a SPEC file for RPM packaging. Using a package will greatly simplify the installation procedure.

RPM package of Viceo backend. Requires sane-backends-1.0.18. Installs the Viceo backend only and will not touch any other files. Please read the Installation and Configuration sections for instructions.

DEB – TODO

A DEB file for debian-based distributions is not currently available. You can still generate a deb package from the RPM using alien. In order to convert the the RPM package to a DEB, use alien like: alien -k sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.rpm and a deb package will be generated for you. You can install the DEB package with: dpkg -i sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.deb. Please note that this procedure has not been tested.

New Viceo backend patch for sane-backends 1.0.18. 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 sanei/sanei_usb.c. Everything seems to work just fine without having to patch any core SANE file.

Old package with Viceo patch for sane-backends 1.0.14 and some notes by Jimmy Nguyen about the release. Reading them is recommended.

All versions are available from the development web site’s download area.

Installation

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.

Using the RPM

The package sane-backends-1.0.18 is a dependency. Make sure you have installed it.

SANE Configuration

The scanner configuration needs to be performed by root or you need to use sudo
The first thing to do is to add the viceo backend in /etc/sane.d/dll.conf. Note that the RPM will not do this, so you need to perform this step manually. Either add the work “viceo” (without quotes) at the end of /etc/sane.d/dll.conf or use the following command:

Licensing

The viceo backend is accompanied by two files which were included in the drivers for Windows, e1.ini and lut.plg. 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 sane-backends-1.0.14-viceo.diff, 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 e1.ini and lut.plg have neither been released nor distributed under the terms of a free license, eg GPL, so they are not free software.

Conclusion

Although the scanner is pretty old, it performs quite well. The driver won’t let you use resolutions over 600dpi, but I guess this is acceptable.

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.

About George Notaras

George Notaras is the editor of the G-Loaded Journal, a technical blog about Free and Open-Source Software. George, among other things, is an enthusiast self-taught GNU/Linux system administrator. He has created this web site to share the IT knowledge and experience he has gained over the years with other people. George primarily uses CentOS and Fedora. He has also developed some open-source software projects in his spare time.

just a few days ago I was informed about the DEB not working with Ubuntu 7.10. This is because this Ubuntu version includes a CVS version (1.0.19 unstable) of sane-backends and not sane-backends v1.0.18, which has been used in order to create the initial RPM package. Please note that the package is actually named libsane in Ubuntu.

The solutions to this problem are:

1) to download the source of the CVS version with:

apt-get source libsane

then try to apply the patch to the source and continue with the manual installation. This would work, but my patch does not apply correcty to this source code at the current time. It needs some adjustments for sane-backends-1.0.19. I will make these modifications as soon as I find some free time. So, this is not a solution at the moment…

2) The second workaround is to manually compile sane-backends-1.0.18 in your home directory and set some environment variables so that the system finds and uses your custom installation of the sane-backends.

I had posted the following instructions in a greek forum a few days ago and it was reported that this workaround works for Ubuntu Gutsy.

The following steps are described in detail, so that even a non experienced Ubuntu user can perform the manual unstallation. If any user has further questions, please feel free to post a comment.

i) Download sane-backends-1.0.18 and the patch and follow the steps of the “manual installation” described in the above article until the step:

make DESTDIR="$PWD/1_test_install" install

Make sure you also issue that last command above. After issuing it, follow the rest of the installation instructions here:

ii) Without changing directory, issue the command:

pwd

iii) pwd will print the current directory path to the stdout. Substitute XXX with that path in the commands below:

Anyway, I’ve spent at least a whole day (dial-up) trying to make sense out of the conflicting packages/versions in Gutsy repo, as well as the sources found in Sourceforge. I still need further clarification regarding certain things. Following solution no. 2,

1.) which do I compile, sane-backends-1.0.18 (sourceforge version) or sane-backends_1.0.18.orig.tar.gz (http://es.archive.ubuntu.com/ubuntu/pool/main/s/sane-backends)?
2.) If I am to take sane-backends source from ubuntu, do I need to rename my source to libsane.xxx, or to the filename preferred in your instruction?

[ If this seem too elementary to most… sorry, I’m just a newbie, but I’ll get better. ;) ]

In both these cases there might be additional problems if saned is running as a user.group which doesn’t have unrestricted access to the scanner device.

There’s an obvious inetd hack which experienced users might like to try with due consideration to the security implications, but the correct way to tackle the problem is to get device node security right which I think implies udev hacking.

Some time ago I invested quite some time to modify the linux GPL driver of the E3 chip found on

[Moderated: Link removed as per the new comment policy]

in order to make it work using USB (this one uses parallel port). I had success on my Primax Colorado USB 19200. However, my code is messy and only works through the scanimage command. It is actually not really usable right now, and unfortunately I don’t have anymore time to work on it…

Running on Fedora 10. de-installed sane-backends-1.0.19.12 using yumex, noted the package dependencies that were also deinstalled, downloaded old version of sane-backends-1.0.18, installed by following instructions above, re-installed sane-backends-1.0.19 and the other packages that had been removed, and tried it in gimp. Worked first time.

You, Sir, are a gentleman and a scholar. Thank you for the work you have put in and for the easy-to-follow instructions. It worked first time for me, I’ve been trying for a long time to get this scanner working. (Primax Colorado 19200 USB).

@Paul: Thanks a lot for the feedback about Fedora 10. Very useful information. As soon as I find some free time I will organize things better here. I am glad this information has been useful to you. Best regards.

Thanks a lot for the nice step by step guide.
It works for my Visioneer 6100 (old, but still nice)

I’m using debian lenny, and the “alien rpm…” did not work for me, instead I compiled and installed the backend with checkinstall.

In case anybody wants to giveit a try (its a great way if you did not install the libsane deb):

checkinstall is an amazing tool, it creates a .deb package from a source dir (using make/make install)
All you have to do is the ./configure step, then make, then execute “checkinstall” in the same dir, and it builds a deb which you can easily remove in case you want to. (checkinstall ~= make install for debian)

I can get it detected, and scanimage -L gives:device `viceo:usb 0x04b3 0x7512′ is a Visioneer Unknown Scanner – Update viceo.c flatbed scanner
after I have updated viceo.conf, but don’t know what to update in viceo.c, and then when I run scanimage -d 'viceo:usb 0x04b3 0x7512' ... it just stalls for me.

Great instructions! Got this running on Ubuntu 12.04 in about 30 minutes. Manual install worked perfectly. Visoneer OneTouch 7600USB. The very first scan with resolution 200 was completely blank…maybe it just wasn’t warmed up, but 100, 300, 600 all worked great!
I love the internet!

About

G-Loaded Journal is a technical blog that publishes news, guides and tutorials about GNU/Linux and other Free Open-Source Software. Our mission is to share our experience and knowledge about system administration, automation and programming.