Wednesday, July 25, 2012

Install Wireless / USB HP Printer in Ubuntu



Installing/Verifying the Drivers

The HPLIP software

HPLIP is an interface developed by HP to give Linux printing, scanning and fax functionalities.
The last version available at the moment (2.8.9) supports 1.445 models of HP printers and most probably the printer you're going to install is listed there.
To be sure of this, you just need to check the page that contains the entire list of the supported printers.
After having identified your model of printer in the list, pay attention to the first parameter, Min. HPLIP Version, which represents the minimum version of HPLIP that you need.
Every Ubuntu system contains a version of HPLIP (i.e. mine is the 2.8.2) by default. To verify this, type the following command on terminal:

dpkg -l hplip


You shall get a message similar to this:


Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                 Version                              Description
+++-====================================-====================================-========================================================================================
ii  hplip                                3.11.7-1ubuntu3.1                    HP Linux Printing and Imaging System (HPLIP)


If in the first column you read the "ii" characters, it means that the version showed in the third column is currently installed on your computer.
If the installed version of HPLIP is lower that the minimum version that you require, keep reading, or skip to the next paragraph about the installation of a printer.


Installing the Printer

Enter `sudo hp-setup -i` and follow the instructions accordingly. -i is for interactive mode.
Here, I have listed how my interactive conversion with hp-setup went. :-) I needed to setup a printer via wireless. Setting up the USB connection is also pretty easy.



$ sudo hp-setup -i

HP Linux Imaging and Printing System (ver. 3.11.7)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)


--------------------------------
| SELECT CONNECTION (I/O) TYPE |
--------------------------------

  Num       Connection  Description                                            
            Type                                                                
  --------  ----------  ----------------------------------------------------------
  0*        usb         Universal Serial Bus (USB)                              
  1         net         Network/Ethernet/Wireless (direct connection or JetDirect)
  2         par         Parallel Port (LPT:)                                    

Enter number 0...2 for connection type (q=quit, enter=usb*) ? 1

Using connection type: net

Using device: hp:/net/HP_LaserJet_Professional_M1212nf_MFP?zc=NPI915B32


Setting up device: hp:/net/HP_LaserJet_Professional_M1212nf_MFP?zc=NPI915B32



------------------------
| PLUG-IN INSTALLATION |
------------------------


HP Linux Imaging and Printing System (ver. 3.11.7)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)

/
-----------------------------------------
| PLUG-IN INSTALLATION FOR HPLIP 3.11.7 |
-----------------------------------------

  Option      Description                                    
  ----------  --------------------------------------------------
  d           Download plug-in from HP (recomended)          
  p           Specify a path to the plug-in (advanced)        
  q           Quit hp-plugin (skip installation)              

Enter option (d=download*, p=specify path, q=quit) ? d

--------------------------
| DOWNLOAD CONFIGURATION |
--------------------------

Checking for network connection...
Downloading configuration file from: http://hplip.sf.net/plugin.conf
Downloading configuration: [\                                                                                                                      ] 0%  

-------------------
| DOWNLOAD PLUGIN |
-------------------

Checking for network connection...
Downloading plug-in from: http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-3.11.7-plugin.run
Downloading plug-in: [****************************************************************************************************************************] 100%  8.0 KB   Receiving digital keys: /usr/bin/gpg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0xA59047B9


----------------------
| INSTALLING PLUG-IN |
----------------------

Verifying archive integrity... All good.
Uncompressing HPLIP 3.11.7 Plugin Self Extracting Archive.........................................

HP Linux Imaging and Printing System (ver. 3.11.7)
Plugin Installer ver. 3.0

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Plug-in version: 3.11.7
Installed HPLIP version: 3.11.7
Number of files to install: 36

You must agree to the license terms before installing the plug-in:

LICENSE TERMS FOR HP Linux Imaging and Printing (HPLIP) Driver Plug-in                                                                                                


These License Terms govern your Use of the HPLIP Driver Plug-in Software (the "Software"). USE OF THE SOFTWARE INCLUDING, WITHOUT LIMITATION, ANY DOCUMENTATION, IS    
SUBJECT TO THESE LICENSE TERMS AND THE APPLICABLE AS-IS WARRANTY STATEMENT. BY DOWNLOADING AND INSTALLING THE SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THESE TERMS. IF
YOU DO NOT AGREE TO ALL OF THESE TERMS, DO NOT DOWNLOAD AND INSTALL THE SOFTWARE ON YOUR SYSTEM.                                                                      


1. License Grant. HP grants you a license to Use one copy of the Software with HP printing products only. "Use" includes using, storing, loading, installing, executing,
and displaying the Software. You may not modify the Software or disable any licensing or control features of the Software.                                            


2. Ownership. The Software is owned and copyrighted by HP or its third party suppliers. Your license confers no title to, or ownership in, the Software and is not a sale
of any rights in the Software. HP's third party suppliers may protect their rights in the Software in the event of any violation of these license terms.              


3. Copies and Adaptations. You may only make copies or adaptations of the Software for archival purposes or when copying or adaptation is an essential step in the    
authorized Use of the Software. You must reproduce all copyright notices in the original Software on all copies or adaptations. You may not copy the Software onto any
public network.                                                                                                                                                        


4. No Disassembly. You may not Disassemble the Software unless HP's prior written consent is obtained. "Disassemble" includes disassembling, decompiling, decrypting, and
reverse engineering. In some jurisdictions, HP's consent may not be required for limited Disassembly. Upon request, you will provide HP with reasonably detailed      
information regarding any Disassembly.                                                                                                                                


5. No Transfer. You may not assign, sublicense or otherwise transfer all or any part of these License Terms or the Software.                                          


6. Termination. HP may terminate your license, upon notice, for failure to comply with any of these License Terms. Upon termination, you must immediately destroy the  
Software, together with all copies, adaptations and merged portions in any form.                                                                                      


7. Export Requirements. You may not export or re-export the Software or any copy or adaptation in violation of any applicable laws or regulations.                    


8. U.S. Government Restricted Rights. The Software has been developed entirely at private expense. It is delivered and licensed, as defined in any applicable DFARS,  
FARS, or other equivalent federal agency regulation or contract clause, as either "commercial computer software" or "restricted computer software", whichever is      
applicable. You have only those rights provided for such Software by the applicable clause or regulation or by these License Terms.                                    


9. DISCLAIMER OF WARRANTIES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, HP AND ITS SUPPLIERS PROVIDE THE SOFTWARE "AS IS" AND WITH ALL FAULTS, AND HEREBY      
DISCLAIM ALL OTHER WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF TITLE AND NON-INFRINGEMENT, ANY IMPLIED
WARRANTIES, DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, AND OF LACK OF VIRUSES ALL WITH REGARD TO THE SOFTWARE. Some                
states/jurisdictions do not allow exclusion of implied warranties or limitations on the duration of implied warranties, so the above disclaimer may not apply to you in
its entirety.                                                                                                                                                          


10. LIMITATION OF LIABILITY. Notwithstanding any damages that you might incur, the entire liability of HP and any of its suppliers under any provision of this agreement
and your exclusive remedy for all of the foregoing shall be limited to the greater of the amount actually paid by you separately for the Software or U.S. $5.00. TO THE
MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL HP OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,                                              
INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF PROFITS OR CONFIDENTIAL OR OTHER INFORMATION, FOR BUSINESS          
INTERRUPTION, FOR PERSONAL INJURY, FOR LOSS OF PRIVACY ARISING OUT OF OR IN ANY WAY RELATED TO THE USE OF OR INABILITY TO USE THE SOFTWARE, OR OTHERWISE IN CONNECTION
WITH ANY PROVISION OF THIS AGREEMENT, EVEN IF HP OR ANY SUPPLIER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND EVEN IF THE REMEDY FAILS OF ITS ESSENTIAL    
PURPOSE. Some states/jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to
you.                                                                                                                                                                  

Do you accept the license terms for the plug-in (y=yes*, n=no, q=quit) ? y

Done.

Done.

---------------------
| PRINT QUEUE SETUP |
---------------------

warning: One or more print queues already exist for this device: 59-4th-floor-HP-LaserJet-M1212nf.

Would you like to install another print queue for this device (y=yes, n=no*, q=quit) ? y

Please enter a name for this print queue (m=use model name:'HP_LaserJet_Professional_M1212nf_MFP'*, q=quit) ?
Using queue name: HP_LaserJet_Professional_M1212nf_MFP
Locating PPD file... Please wait.

Found PPD file: drv:///hpcups.drv/hp-laserjet_professional_m1212nf_mfp.ppd
Description:

Note: The model number may vary slightly from the actual model number on the device.

Does this PPD file appear to be the correct one (y=yes*, n=no, q=quit) ?
Enter a location description for this printer (q=quit) ?
Enter additonal information or notes for this printer (q=quit) ?4th floor printer

Adding print queue to CUPS:
Device URI: hp:/net/HP_LaserJet_Professional_M1212nf_MFP?zc=NPI915B32
Queue name: HP_LaserJet_Professional_M1212nf_MFP
PPD file: drv:///hpcups.drv/hp-laserjet_professional_m1212nf_mfp.ppd
Location:
Information: 4th floor printer


-------------------
| FAX QUEUE SETUP |
-------------------


Please enter a name for this fax queue (m=use model name:'HP_LaserJet_Professional_M1212nf_MFP_fax'*, q=quit) ?q
OK, done.