http://www.linuxquestions.org/questions/linux-software-2/cups-unable-to-discover-an-hp-1022n-network-printer-710492/
Here are the essential instructions:
- Configure the printer with its own facility, getting into its web page: http://the-actual-ip-address.
- There, assign a static IP address of your choice.
- You would have to (recommended) restart the printer with the new assigned static IP.
- Configure manually the printer within CUPS.
- Follow instructions up to the point where you are asked to specify the URI. There, write socket://the-new-ip-address
- Specify it is an HPLIP printer, and when prompted to specify the type of printer, scroll down and find the "HP LaserJet 1022n Foomatic/hpijs, hpijs 2.8.10.33" (for example, version is actually the one shown in my system, could be some other).
- Choose Add Printer.
- Print a Test Page and...
- Voila...!!