Scanning with SANE on Fedora 16 (HP Scanner)

Hadn't done much with scanning on linux but wanted to get going with it. As will soon be clear this is related to using an HP Photosmart C8100 series all-in-one device.

First step - see what devices are attached.

scanimage -L
device `hpaio:/net/Photosmart_C8100_series?ip=192.168.1.5' is a Hewlett-Packard Photosmart_C8100_series all-in-one

(Note the backtick quote at the beginning but the normal single tick at the end of the output - so cut and paste won't work here.)

Probably could have gotten to the answer faster by simply quoting the device name properly right away - the correct syntax is

scanimage -d 'hpaio:/net/Photosmart_C8100_series?ip=192.168.1.5' --format=tiff > out.tiff

Here the entire device name is correctly quoted including the ip address for this networked printer/scanner.

However, I tried some incorrect syntax and got some strange errors. If you leave off the ip address the command will be accepted but you'll get an error that mentions I/O error and could not open the device like so:

scanimage -d hpaio:/net/Photosmart_C8100_series
scanimage: open of device hpaio:/net/Photosmart_C8100_series failed: Error during device I/O

Based on some web research that led me in the (as it turned out unproductive) direction of "enabling SNMP on the device" I ran 

hp-check -t

which does a  scan of all your HP libraries and config files and tells you what is missing and what is wrong. 
As a result of hp-check I was told  (by hp-check) to 

   su -c "yum -y -d 10 -e 1 install cups-devel"
   su -c "yum -y -d 10 -e 1 install net-snmp-devel"
   su -c "yum -y -d 10 -e 1 install libusb-devel"
   su -c "yum -y -d 10 -e 1 install sane-backends-devel"
   su -c "yum -y -d 10 -e 1 install xsane"

I was also told by hp-check to add the string hpaio to  /etc/sane.d/dll.conf by simply editing that file.

I dutifully followed all the recommended steps.

Once this is done the easiest way to get going is to go the GUI route and simply start xsane and there are no command line parameters to figure out - the GUI will simply walk you through your various choices of devices, formats, resolutions - the whole nine yards.

So lessons learned for successful Linux scanning?

1. Properly quote the device name using single quotes when using scanimage and make sure the ip address (if it exists) is included on the command line.

2. Run hp-check and correct any problems found.

3. Once xsane is installed, it tends to be a bit easier to use than scanimage






Comments

Popular posts from this blog

Hit failing alternator with a hammer to confirm diagnosis of failing alternator due to bad brushes

alternatives --install gets stuck: failed to read link: No such file or directory

Using SSH, SOCKS, tsocks, and proxy settings to create a simultaneous "dual use" work/home computer