How To Get A Wireless HP OfficeJet Printer Working With A Linux Laptop

I have an HP OfficeJet J6480 all-in-one printer. This is connected via USB to our Windows XP desktop machine. I also have a Linux (Kubuntu 9.04 Jaunty Jackalope) Laptop which connects to the wireless network setup by our router. The printer also connects wirelessly to that network. Thus, if Im on the network on my laptop I have access to the printer.

This is the story of how I got the printer to work after having it stop working inexplicably one day. I consider myself a Linux novice; I am comfortable using it, but uncomfortable administering it.

Setting up the printer via USB on the Windows machine was trivially easy. I was unable, though to connect to the printer wirelessly either using Windows or Linux (my laptop is dualboot). Eventually, after spending far too long with HP Technical Support, I realised that the problem was simply that the router was using a channel with too much interference on it. By switching the channel to something else, we could confirm that the laptop (in Windows mode) could connect to the printer wirelessly. They hadnt heard of Linux, though, and so I was on my own from there.
Setting up the printer initially was actually very easy. Simply running hp-setup as root did the trick. However, although this recognized the printer I never was able to get double-sided printing to work. And I saw no way to access the scanning features of Linux.

After a while, the printer would inexplicably not be connected when I booted up the laptop and I would have to re-istall it using hp-setup again.

In the meantime, I stumbled upon CUPST (the common UNIX printing system) which is a great way to administer your printers and even comes with a nifty web interface. All it took was setting the J6480 to be the default printer and I could run lpr commands. This was important to me because I had written a bunch of scripts to make text files print out nicely. I was also able to install CUPS-PDF and thereby get a print to PDF option from KDE.

Eventually, though, the laptop failed to locate the printer. And, no matter how many times I tried, hp-setup just wasnt doing the trick. Not only that, but now my three printers (J6480, the J6480 fax machine that I never use, and CUPS-PDF) had disappeared from the KDE Printer Adminitstration tool.

So first Find about printer could talk to the wireless network. I did this by helpful site connecting to it manually using the console on the printer itself. I then printed out a wireless status report (again from the printer console) to get me the IP adress of the printer. Trying to run hp-setup with that IP address failed. And trying to ping that IP address from the laptop failed. Now I knew that the printer could talk to the network, the laptop could talk to the network (because I still had internet access), but the laptop could not talk to the printer on the network. Weird.

I looked on the internet for help and found that the hplip utility might help manage my printer. However, I was (and had been ever since I first learned of this tool) unable to install it using apt-get because of conflicts with other packages: libxml-sax-perl. So this time around (having finished the Perl work that needed those libraries), I removed the offending packages, cleared my package install cache (sudo apt-get clean), and installing the most recent version of hplip. Wow! This gave me a nifty new taskbar application for managing the printer. It even seemed to handle scanning and double-sided printing.

Things work better now. To scan a document I select the scan option from hplip, this brings up xsane, I select the copy option from xsane if its a single image, otherwise I select the multipage option from xsane being sure to specify the number of pages when all pages have finished scanning save the multipage project to a file. I still need to mess about with the resolution of the scanner because the scanned image is consistently quite dark.

But at any rate, I have a fully-functional all-in-one wireless printer working with Linux and I love it. And its just that easy.