Setting up a HP LaserJet P1102w Printer on Gentoo

Looking For an Ubuntu specific guide? Try here .

Today I finally replaced my aging Inkjet printer with a new Laser one. I eventually decided upon the HP LaserJet Pro P1102w printer, as from scouring forums it seems to have good support to Linux, in addition to being a relatively cheap WiFi laser printer. Setting it up under Gentoo wasn’t as simple as I’d hoped, but I now have it up and running on my WiFi network.

After unboxing and plugging in the printer ( via USB – and remembering not to plug the power into the UPS! – I found this out the hard way… ), the first thing to do is install hplip:

# emerge -va hplip

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] net-print/hplip-3.11.3a  USE="X hpcups
kde libnotify policykit qt4 snmp -doc -fax -hpijs -minimal -parport
-scanner -static-ppds -udev-acl"

It is important to supply the snmp USE flag, as without it network printing refuses to work. The printer can then be setup using the hp-setup command. Cups may have picked the printer up on its own, but you can ignore this ( or preferable delete the printer from CUPS using the web interface ( usually accessible from ) ) and run the command anyway ( as root – running as a normal user seems to prevent the setup software from finding the printer via USB ):

# hp-setup

Select the the USB option, and select the printer from the list. This particular printer requires a propitiatory plugin to work, so let the hp setup software download it, and the printer should then begin working. I recommend printing a test page and ensuring that the printer is working so far.

The next step is setting up the printer for WiFi. There is a “hp-wificonfig” command which apparently can configure HP printers for WiFi which are connected via USB , but unfortunately for this printer it doesn’t seem to work, so we will have to set it up manually.

You may have noticed there is a WiFi button on the left side of the printer, and pushing it makes it glow blue intermittently. Researching online seemed to indicate it will try to connect to open wifi networks, however this didn’t seem to happen for me. It looks like pressing the button makes the printer create an ad-hoc WiFi network, which you can connect to using a suitable device.

Once connected, your wireless device will be given a random IP address in the 169.*.*.* range, and so will the printer. To find the printer’s IP, hold the red ‘X’ button down on the printer, and it will print out a configuration sheet with lots of useful information, including the IP. Open the IP address in a web browser, and you should be able to navigate to the network settings, and enter your own WiFi settings. Ensure the settings are correct, as I’m not sure how you would reset the printer to defaults and put it back into Ad-Hoc mode again.

Upon applying the settings, the printer should connect to your actual wifi network, and if you wish ( to check it has connected properly ) again you can get the IP address using the print config method mentioned previously, or if you have avahi-discover installed, you can find it broadcasting it’s IP.

The final step is to setup the printer via WiFi. Unless you intend on plugging the printer back in via USB, I would delete the old copy of the printer in the web interface, then again run hp-setup, this time selecting the network option instead of USB:

# hp-setup

Follow the options, select the new printer and the printer should then be setup and ready to use.

To setup another Gentoo machine with the network printer, you will just need to emerge hp-setup ( ensuring the snmp USE flag is set ), then run hp-setup as root , and add the printer.