<-- Back -- Feedback

HP ScanJet 5100C under Linux

Tux?
Introduction
Installation

Introduction

Mad update - 05/03/10 !!!

Are you hating Ubuntu? Are you enraged that your skills as a UNIX administrator are worthless in the face of Ubuntu?

Are you crying man-tears due to the impossibility of getting your ScanJet 5100C working after doing a kernel upgrade?

WELL LOOK NO FURTHER! Some form of demi-god has provided a patch of radiating excellence to spare us poor mortals of our scanner-less fate - and has made it available HERE!!!!.

Please note: This was originally written some years ago(2005-2006) and was the only way to get it functioning at that time. I had to repeat this back in 2008, however it may not be necessary to do anymore. In the case of it ever being needed, here it is.

Installation

First, make sure you have the source for your current kernel. You can find out by typing 'uname -r', then seeing if it matches your kernel source directory in /usr/src.
krux linux # uname -r
2.6.20-gentoo-r8
krux linux # ls /usr/src/
linux-2.6.20-gentoo-r8
krux linux #
It is best to, at this point, create a symlink named linux to your kernel directory with the command: ln -s /usr/src/linux-2.6.20-gentoo-r8 /usr/src/linux - Be sure to replace linux-2.6.20-gentoo-r8 with your kernel directory.

Then you need to prepare your kernel to have the ability to load parallel port devices. You will need to activate the following as modules:
	Device Drivers ---> Parallel port support ---> Parallel port support
	PC-style hardware
	Multi-IO cards
	Use FIFO/DMA
Next, we download and unarchive the PpSCSI patch, using the following commands.
krux linux # cd /usr/src
krux linux # wget http://penguin-breeder.org/kernel/download/linux-ppscsi-2.6.x-20060424.gz
krux linux # gunzip linux-ppscsi-2.6.x-20060424.gz
Now we open /usr/src/linux/drivers/parport/share.c with a text editor to see if we need to add the line, "EXPORT_SYMBOL(parport_get_port);". First check to see if this line is on line 1005, if not, add it at the end of the EXPORT_SYMBOL list, which should be line 1009.

We should now patch our kernel with the ppscsi patch, then compile and install the modules using the following commands.
krux linux # cd /usr/src/linux
krux linux # patch -p1 < /usr/src/linux-ppscsi-2.6.x-20060424
krux linux # make modules
krux linux # make modules_install
krux linux # cd /usr/src
krux linux # wget http://penguin-breeder.org/kernel/download/ppscsi-beta2-20060424.tar.gz 
krux linux # tar -zxvf ppscsi-beta2-20060424.tar.gz
krux linux # cd ppscsi-beta2
krux linux # make
krux linux # cp ppscsi.ko /lib/modules/2.6.20-gentoo-r8/kernel/drivers/parport/
krux linux # cp epst.ko /lib/modules/2.6.20-gentoo-r8/kernel/drivers/parport/
We can now activate the modules with the following: krux linux # modprobe parport krux linux # modprobe parport_pc krux linux # modprobe ppscsi krux linux # modprobe epst You should configure your system to automatically load these modules on boot. For configuring that, consult your distribution's website or a search engine. You might also have to also add the modules scsi_mod and sg first, depending on your setup.

You might need to change permissions on the scanner device, which should be /dev/sg0 or /dev/sg1 with the command chmod a+rw /dev/sg0 or chmod a+rw /dev/sg1

You will now need to install SANE. Once you get that installed, you can now scan, even without a graphical frontend, such as xsane, with the command:
krux linux # scanimage -d hp:/dev/sg1 --mode=color > image
Be sure to replace /dev/sg1 with the appropriate device name. 3 common valid options to mode are color, grayscale and lineart.

0.0038111209869385 µs