Ubuntu, Dell Vostro 1500, Snapscan E50 scanner: 'invalid argument' from SANE

Q I have installed Ubuntu 8.04 on my Dell Vostro 1500. With my old Snapscan E50 scanner connected, XSane can see my scanner but shows the following:

Error: "Failed to open device 'snapscan: libusb:003:006': Invalid argument."

But if I plug the scanner into my PC running Windows XP for a moment and then plug it back to my Dell, XSane kicks in and works beautifully. I can reboot the laptop, or turn it off and on again, with no problem. However if I switch off the power to the scanner, the problem appears again. I have to plug the USB cable into the Windows computer and back into the Dell to be able to use the scanner on the laptop. What is missing from my Ubuntu machine that it can't start the scanner?

A When a device works only after having been used in Windows, you can be sure it requires a firmware upload. Many devices, particularly communication devices, do not have all of their operating code built in. Some - maybe most - of the code is contained in a firmware file that is uploaded by the driver when the device is first used, and the device itself may contain only enough code to permit it to receive and use the firmware upload. The firmware then stays in place until the device is switched off, so when you switch from Windows to Linux without power cycling the scanner, it will still work.

Why do manufacturers do it this way? Because it is cheaper and more convenient for them. They can have different firmware versions to comply with the laws of various countries without having to produce specific versions of the hardware. This is why it is particularly commonplace on wireless devices, because countries have different restrictions on power, channels and so on. It also makes updates easy, as they only have to replace the driver. This whole process is transparent to Windows users as it is all handled by the driver, and a driver update automatically installs the latest firmware. The process is almost as automatic on Linux - you just have to know about the need for a firmware file in the first place. The details are on http://snapscan.sourceforge.net but all you need is the file called snape50.bin, which will be installed on your Windows partition. Copy this to somewhere on your Linux setup (/lib/firmware is the standard location for such files), and edit /etc/sane.d/snapscan.conf to include the line

firmware /lib/firmware/snape50.bin

You'll need to use sudo to do this as root and the path you put in snapscan.conf must match the location of the file. Now that Sane's snapscan driver knows about the firmware file, it will upload it for you, removing another dependency on Windows. If you ever install an updated driver on Windows, you may want to copy the new firmware file over, although if the old one works for you, why mess with it?

Back to the list