Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News

SYS-CON.TV
Cloud Expo & Virtualization 2009 East
PLATINUM SPONSORS:
IBM
Smarter Business Solutions Through Dynamic Infrastructure
IBM
Smarter Insights: How the CIO Becomes a Hero Again
Microsoft
Windows Azure
GOLD SPONSORS:
Appsense
Why VDI?
CA
Maximizing the Business Value of Virtualization in Enterprise and Cloud Computing Environments
ExactTarget
Messaging in the Cloud - Email, SMS and Voice
Freedom OSS
Stairway to the Cloud
Sun
Sun's Incubation Platform: Helping Startups Serve the Enterprise
POWER PANELS:
Cloud Computing & Enterprise IT: Cost & Operational Benefits
How and Why is a Flexible IT Infrastructure the Key To the Future?
Click For 2008 West
Event Webcasts
SANE once again
How to configure an HP scanner to use SANE via USB on Mandrake 7.2

(LinuxWorld) -- It wasn't easy. I followed several paths that did not lead to nirvana. But now there is peace and harmony. My HP ScanJet 5200C is a tamed beast. The scanner is not only docile and compliant, but it speaks fluent USB. You may recall that in a recent column (see Resources for a link), I described my frustration with trying to get the scanner working. It had worked once -- though only partially and ever so briefly. But after I reinstalled everything so I could faithfully take notes and report my experiences in the column, I was unable to make the scanner work again.

My quest led me to try multiple versions of the kernel: from 2.2.18-x to test releases of 2.4. When they didn't bring relief, I changed distributions. I switched from Red Hat 7.0 to Debian Potato to SuSE 7.0 to Mandrake 7.2, to no avail.

But after receiving clues and inspiration from my local LUG's mailing list, I finally realized I had been looking in all the wrong places. It's the hardware, stupid, not the Linux kernel or the distribution. A bad motherboard. A very bad motherboard.

In the message that helped me, the author noted how easily he made the same scanner work using USB on Mandrake 7.2. No need to upgrade the kernel at all. After just a few simple steps (I'll go over the complete process later), he was enjoying his new scanner. Naturally, I misread the answer. I was still in my "blame the software" funk and concluded that if I just installed Mandrake 7.2, I could use my new scanner too.

I ran into town and picked up a copy of Mandrake 7.2. SuSE came off my system; Mandrake went on. I followed the mailing list's instructions to the letter. The results were different, but still not good. Instead of giving me segfaults when I started xscanimage, the application just sat there and did nothing.

Out of curiosity, I decided to run usbview. When I started it, an empty window appeared. But when I clicked on Refresh in the Usbview Menu, the screen filled with information about the scanner. Amazingly enough, accessing USB with usbview caused the xscanimage program to come unstuck.

The xscanimage opening screen appeared just a few seconds after I hit Refresh: very suspicious behavior. A tiny LED in the back of my head began to blink "Hardware Error!" But even after usbview's push start, xscanimage still would not work. When I tried to do a scan preview, xscanimage would start the preview and then freeze. I was becoming convinced that I was suffering from a case of bad iron.

I made another trip to town. A message on the mailing list had said you could buy a PCI USB card for only $20. I found a Gigabyte mainboard marked down to $50. I figured that for the extra $30, I could swap out all possible hardware and firmware causes. Out came the Jetway motherboard; in went the Gigabyte. Without changing any settings, I tried xscanimage hp again. Praise Baud! It worked. My HP did a full scan and picked up all three photos I had in the scanner bed. Then I experimented with the preview scan and found I could select any part of the scan bed and scan only that area. Finally, after weeks of frustration, I had a working USB scanner.

As my editor pointed out a couple of weeks ago, SANE stands for Scanner Access Now Easy. When I was still suffering from faulty silicon, that seemed like a misnomer. Now I see that it really is easy. A new version of SANE has been released since I first tried to make my HP scanner work. Among other things, SANE is now divided into two parts: one for the backend, which talks to the scanner, and one for the frontend, which talks to the user. That's a natural division because SANE is designed to access a scanner across a LAN. In a small office or a home LAN, it may be more convenient to attach a scanner to one machine and share it by accessing it from other machines, just like you would with a network printer.

Making SANE work with a HP ScanJet 5200C

Follow these steps to make the latest version of SANE (1.0.4) work with your HP ScanJet 5200C, connected via USB, running Mandrake 7.2. If you don't wish to compile and install the latest version, you can skip the first step and find binary packages elsewhere on the Web or use those included with your distribution.

  • Download sane-backends-1.0.4 to your home directory from the SANE homepage. (See Resources for a link.)
  • Decompress the downloaded file by typing tar xzf sane-backends-1.0.4.tar.gz.
  • Enter the subdirectory that contains the decompressed data by typing cd sane-backends-1.0.4.
  • Run the make configuration script by typing ./configure.
  • Compile the software by typing make.
  • As root, type make install.
  • Repeat those steps, substituting sane-frontends for sane-backends.

OK. If those instructions made you tense, relax. If there is a hard part, that was it. The rest of the process -- configuring the system -- is a snap. Whether you've installed from executable binaries or built the programs yourself, this is all you have left to do.

  • As root, type mknod /dev/usbscanner c 180 48.
  • As root, type chown username.groupname /dev/usbscanner where username and groupname are correct for you.
  • As root, edit /etc/sane.d/hp.conf to replace the two default lines (which assume SCSI connectivity) with: /dev/usbscanner option connect-device
  • As root, type insmod scanner.

That's it. You're done. As a normal user, type xscanimage hp and enjoy the scanner. It's all so easy now, compared to the death march I endured before. The xscanimage program can run as a plug-in for GIMP. I've found that to be a very good thing; I almost always run GIMP to modify and save the raw scanned image. Making xscanimage accessible from GIMP is easy too.

All you need to do, assuming you have GIMP installed and have used it at least once, is type ln -s /usr/bin/xscanimage ~/.gimp-1.1/plug-ins. Different distributions may put xscanimage elsewhere. If it's not in /usr/bin, use the locate xscanimage command to track it down. The next time you start GIMP, you can access the scanner from the Xtns, Acquire Image, Device Dialog menu selection. It is very handy indeed to have that great software working together.

There is an alternative GUI frontend to the xscanimage program called XSane. Like xscanimage, XSane can run in standalone mode or as a GIMP plug-in. XSane does not operate strictly as a scanner. In copy mode, it outputs the scanned image as a postscript file for immediate printing. In fax mode, it feeds the output directly to a fax program, such as HylaFAX.

You can download, configure, make, and install the latest version of XSane (0.69 was released on Dec. 30, 2000) by getting it from the XSane homepage (see Resources for a link) and following the steps above -- use the XSane file and directory name instead of sane-frontend. You can also find binary versions on the Net or packaged with your Linux distribution.

To access XSane from GIMP, simply type ln -s /usr/local/bin/xsane ~/.gimp-1.1/plug-ins to create the symbolic link. From inside GIMP, access XSane from the File, Acquire, XSane menu options -- not from the Xtns menu, as with xscanimage. It's good to have a fast, high-quality scanner attached to your Linux machine. SANE makes it work, and XSane lets it do more for you. Throw in the GIMP, and you have a remarkably nice scanning environment.

About Joe Barr
Joe Barr is a freelance journalist covering Linux, open source and network security. His 'Version Control' column has been a regular feature of Linux.SYS-CON.com since its inception. As far as we know, he is the only living journalist whose works have appeared both in phrack, the legendary underground zine, and IBM Personal Systems Magazine.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Latest Cloud Developer Stories
Rackspace Hosting, the service leader in cloud computing, on Thursday announced its acquisition of SharePoint911, an industry leader in SharePoint consulting, training, and "JumpStart" services within SharePoint. The unification of both companies provides capabilities to deliver ...
With Cloud Expo 2012 New York (10th Cloud Expo) now under four months away, what better time to start introducing you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference... We have techn...
Nimble, the social CRM platform has announced the launch of Nimble 2.0, billed as the “most social” CRM platform on the market today. Nimble was designed entirely with social CRM in mind and is the first social business platform that empowers companies with the ability to get clo...
2011 was a year of rapid adoption for public and private cloud services. Instant and on-demand server provisioning was the driving force behind the massive growth. On top, cloud server templates and script automation simplified application installation for simple and pre-defined ...
"Having been in the IT field for many years, I believe the cloud computing chapter in the industry is an exciting one and I am proud to be a part of it," said National Reconaissance Office (NRO) Chief Information Officer Jill T. Singer Tuesday, as it was announced that she was on...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON Featured Whitepapers
ADS BY GOOGLE