HOWTO Connect a Linux computer to an HP PhotoSmart C7280 Printer
The HP PhotoSmart C7280 All-In-One printer contains a photo printer, scanner, and fax machine. It can be setup as a wired Ethernet print server, wireless 802.11g print server, or a local USB printer. It is very nice, and if you watch the NewEgg specials, you can often find one for a very good price every so often. I have enjoyed using it from my Windows workstation; however, since I have the C7280 connected to my network through its Ethernet port (a wired print server), I would like to be able to use my Linux laptop to also print to it.
Fortunately, most HP printers are well supported in Linux. So, I had high hopes!
As mentioned in other posts, my current favorite distribution of Linux is Gentoo, so my directions will be for Gentoo; however, you can probably adapt them to your favorite distro.
CUPS is the modern Unix/Linux printing interface. It provides both a server and client for the common printing tasks (lpr, lpq, lpstat, etc.). Therefore, CUPS must be installed before you can do anything else.
I added a few extra USE flags to my CUPS install, although I don’t think these are necessary in general:
$ echo 'net-print/cups dbus ppds' >> /etc/portage/package.use
Beyond that, installation is simple:
$ emerge cups
Since we are connecting to the C7280 via the network, no configuration changes are required for CUPS. However, you will have to fire up the CUPS daemon and add it to your start-up services:
$ /etc/init.d/cupsd start $ rc-update add cupsd default
You can find more info on configuring CUPS to work on Gentoo with other setups here:
The HP printer drivers are based on a standard HPLIP package, which is used with all modern HP printers, and a PPD file, which is specific to your printer model. The latest HPLIP package can be installed in Gentoo, like so:
# For AMD64, Intel Core2, and newer x86 64-bit archs $ echo 'net-print/hplip ~amd64' >>/etc/portage/package.keywords # Install HPLIP $ emerge hplip
The latest PPD file for the C7280 should be downloaded from the Linux Printing repository. Currently, the C7200 model covers the C7280, and it’s PPD can be downloaded from here:
On a Gentoo box, the PPD file should be saved in a certain location, and only root should have access to it:
mv <path_to_download>/HP-PhotoSmart_C7200-hpijs.ppd /usr/share/ppd/HP/ chown root:root /usr/share/ppd/HP/HP-PhotoSmart_C7200-hpijs.ppd
With that put in place, you are now ready to configure the HPLIP program, like so:
The wizard should make everything self-explanatory, except you may have to manually search for the PPD file, if the wizard cannot find it for you. When I used the wizard, it was able to find the printer automatically and very quickly. However, I had to locate the PPD file for it.
If everything goes smoothly, you will be done. All that remains is to restart cups, like so:
$ /etc/init.d/cupsd restart
If things don’t go smoothly, you may have to add the printer manually through the CUPS interface or to the printers.conf file, as I had to do.
Manually Adding the C7280 to CUPS
Unfortunately, the HPLIP setup wizard was not working correctly, and I had to manually add the printer to CUPS. I used the web interface to CUPS, which can be accessed using a web-browser on the Linux box at:
From here, I clicked on “Add Printer”, and manually entered the necessary information. (You should know the IP address of the C7280 printer on your network.) Most of it was obvious, except these two bits: The device connection type was:
And, the “Device URI” was:
Of course, you will have to change the above IP address to match your needs. … If you have already configured a Windows box to use the same printer, you can get some clues for the above info in the Windows’ printer’s properties.
The CUPS wizard may request a user id and password. Any requested userid is referring to root and root’s login password. These are needed near the end of the CUPS wizard, so it can edit the CUPS configuration files for you.
After entering the necessary info, pointing to the downloaded PPD file, and completing the web install, I was printing my first test page in no time!
If you prefer to work on the command line, and you are comfortable with CUPS, here are the modifications to my CUPS’ files:
# Printer configuration file for CUPS v1.3.8 # Written by cupsd on 2008-10-30 17:37 <DefaultPrinter HP-PhotoSmart-C7280> Info HP PhotoSmart C7280 Location My Office DeviceURI socket://192.168.0.11:9100 State Idle StateTime 1225405864 Accepting Yes Shared Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy stop-printer </Printer>
And, for good measure, you should always restart CUPS after monkeying around with its files:
$ /etc/init.d/cupsd restart
Well, it took a little longer than I first hoped, but it was not so bad. Now, I can print, scan, and fax from HP PhotoSmart C7280 using my Gentoo Linux laptop. 🙂