HP LaserJet Pro MFP M277dw Setup on Ubuntu 16.04 with HPLIP

May 7, 2017

I recently acquired a new printer and figured I'd jot down how I got both the print and scan functions working seamlessly on Ubuntu 16.04.2. My setup only involves an Ethernet and power connection to the printer. I suppose a Wi-Fi setup would be similar.

It seems that the only way to get the latest HPLIP support for this printer on Ubuntu 16.04.2 is to use HP's manual installer. At the time of writing, that is version 3.17.4, a bit newer than what is already included in Ubuntu 16.04.2 by default. Download the installer and then run it.

chmod +x hplip-3.17.4.run
./hplip-3.17.4.run

Follow the instructions. I did the custom option and basically only went after non graphical, printer and scan, and said no to anything not involving only that. It successfully builds and installs, but then craps out if you say yes to setup a printer. So, to actually setup the printer I used the standard Ubuntu System Settings Printer interface. It should find the network printer and then you need to search through the list of drivers and find the M277 driver. The interface will "recommend" the wrong driver by default.

After the printer is setup and working, scanning will still not be working. This can be verified with the following command.

sudo hp-check -r

This exposed two problems. Required dependencies were not installed and plugins were not installed. So, install the required plugins with the following command.

sudo hp-plugin

Then, install any require dependency packages. I had to install the following required dependencies to get it to clear the missing required dependencies.

sudo apt-get install libdbus-1-dev python-qt4-dbus

Finally, we can test scanning and bada bing bada boom. From here any SANE capable scanner software should work, including Ubuntu's default Simple Scan.

$ hp-scan
 
HP Linux Imaging and Printing System (ver. 3.17.4)
Scan Utility ver. 2.2
 
Copyright (c) 2001-15 HP 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.
 
warning: No destinations specified. Adding 'file' destination by default.
Using device hpaio:/net/HP_Color_LaserJet_MFP_M277dw?ip=192.168.0.42
Opening connection to device...
 
Resolution: 300dpi
Mode: gray
Compression: JPEG
Scan area (mm):
  Top left (x,y): (0.000000mm, 0.000000mm)
  Bottom right (x,y): (215.899994mm, 296.925995mm)
  Width: 215.899994mm
  Height: 296.925995mm
Destination(s): file
Output file: 
warning: File destination enabled with no output file specified.
Setting output format to PNG for greyscale mode.
warning: Defaulting to '/home/user/hpscan001.png'.
 
Warming up...
 
 
Scanning...
Reading data: [******************************************************************************************************************************************] 100%  8.5 MB     
Read 8.5 MB from scanner.
Closing device.
 
Outputting to destination 'file':
Saving to file /home/user/hpscan001.png
 
Done.

Related Posts