Windmill

A long time ago, I complained about the crappy Windows software for the HP 2400 scanner. My struggles back then with getting the thing to work properly in the supported platform of Windows led me to avoid even trying to set it up for the past two years in the redheaded bastard stepchild oh-my-GOD-unsupported platform of GNU/Linux.

I don’t have the need to scan very much, and taking pictures of things with my camera has worked in a pinch. But recently I’ve felt motivated enough to work at it, and what do you know? It works! Unfortunately with the help of proprietary drivers, probably unauthorized, but it works! And in the end it probably wasn’t any worse than the struggles I had with using the thing in Windows.

Like the several other compromises (or downright capitulations) I make with using non-free software, I can justify this one to myself because I already have the hardware. I’ll try to do better on my next scanner purchase to find one that works out of the box with free software.

So! I wanted to post this to give hope and encouragement to others on the same path. I’m afraid this will be a hasty recounting of things, but at the least I can offer my testimonial that the scanner can be made to work, and I can point you to the sources I used.

As mentioned, this is about the HP Scanjet 2400 scanner. I currently have it working in Ubuntu 8.04, the Hardy Heron.

This may not have been the original pointer I found, but you can start with this thread in Ubuntu Forums: Hewlett-Packard Scanjet 2400.

Down a bit in the thread (page 2 by the default settings), it points to:

www.elcot.in, which claims to be the Electronics Corporation of Tamil Nadu Limited (ELCOT), a Government of Tamil Nadu Undertaking. I have no idea what that is all about our how much trust I should put in this site. But! They have drivers and instructions that make the magic happen. You’ll have to decide for yourself if you want to go down the same path as I did.

It took me a little bit of effort to get the scanner working. I went back and forth and tried lots of things and didn’t keep very good notes at first, so I’m not sure what was absolutely essential.

I installed sane-utils via apt-get in order to get scanimage and find-sane-scanner. Neither one of these found anything in my earlier attempts, but they were key to troubleshooting and figuring it all out.

The instructions have you copying things to /usr/lib and /usr/lib/sane. I didn’t follow them exactly, not wanting to untar archives as root from root, so I extracted them into a tmp dir and moved just the drivers over manually. I added the hp2400 entry to /etc/sane.d/dll.conf and eventually copied that file to the dll.d subdir, although I suspect that wasn’t needed. I copied libsane.so.1.0.14 and renamed to libsane.so.1.0.19 and modified symlinks to point to that, as suggested in some thread I read.

Tried a reboot somewhere in the early going as per some forum comments, but didn’t seem to help. Had been trying the XSane scanner. Tried the KDE Kooka software, which gave me something to think about, an error pointing to sanei something or other, which made me look at the README_hp2400.txt (from ELCOT) more closely. I decided to download the SANE distribution from www.sane-project.org, and I modified the EXTRA entry in backend/Makefile.in to include sanei_usb.lo. Configure ran ok, but mentioned I should have libusb, so I installed libusb-dev via apt-get and re-ran configure. Then make and make install.

Still no luck, but around this time I discovered the USB cable had been unplugged from the computer THE ENTIRE TIME. I plugged it in and:

scarpent@zodiac:/etc/init.d$ sudo sane-find-scanner 

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x0a01 [hp scanjet scanner], chip=GL646_HP) at libusb:007:004
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

scarpent@zodiac:/etc/init.d$ sudo scanimage -L
device `hp2400:libusb:007:004' is a Hewlett-Packard hp2400 flatbed scanner

Yay! And it scanned just fine using XSane. But! Then it didn’t work again after I unplugged things and plugged them back in. I eventually found that everything was also in /usr/local/lib and /usr/local/lib/sane/ and /usr/local/etc/sane.d/. Once I copied drivers there and modified dll.conf (adding the hp2400 line), all was well. Maybe the SANE install put things there, and it didn’t “take” right away so that I was using /usr and /etc stuff at first?

Anyway, there were more misadventures, but that’s what’s going on the books here. I hope this post is helpful for you in its jumbled and hasty way. I think I made it a lot harder for myself than it needed to be, especially with the little incident of NOT HAVING THE USB CABLE PLUGGED IN. In retrospect it seems less painful than my previous experiences with the scanner in Windows.

Other pages I came across and found things to try and think about:

Related