HP Color Laserjet M280nw: scanner not working

I'm trying to make the HP M280nw scanner work, without success. I've tried on different operating systems, however, the one where it kind-of-works better is 19.10.

The printer works with any problems, but I'm having no luck with the scanner.

The report below is performed with the default 19.10 HP packages; installing the new ones doesn't yield any meaningful effect (scanning is supported since 3.18.5).

The program simple-scan detects the scanner, but it throws an error when trying to initiate a scan.

$ lsb_release --all
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:    19.10
Codename:   eoan

$ apt search 'libusb-|hpaio' | grep installed

hplip/eoan,now 3.19.6+dfsg0-1ubuntu1 amd64 [installed,automatic]
libsane-hpaio/eoan,now 3.19.6+dfsg0-1ubuntu1 amd64 [installed,automatic]
libusb-1.0-0/eoan,now 2:1.0.23-1 amd64 [installed]

$ dmesg -w

[  741.512933] usb 3-2: USB disconnect, device number 4
[  744.814194] usb 1-10: new high-speed USB device number 9 using xhci_hcd
[  745.063489] usb 1-10: New USB device found, idVendor=03f0, idProduct=ad2a, bcdDevice= 1.00
[  745.063492] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  745.063493] usb 1-10: Product: HP ColorLaserJet MFP M278-M281
[  745.063494] usb 1-10: Manufacturer: HP
[  745.063495] usb 1-10: SerialNumber: <SERIALHERE>
[  745.167646] usblp 1-10:1.0: usblp0: USB Bidirectional printer dev 9 if 0 alt 0 proto 2 vid 0x03F0 pid 0xAD2A

$ scanimage
scanimage: open of device hpaio:/usb/HP_ColorLaserJet_MFP_M278-M281?serial=<SERIALHERE> failed: Error during device I/O

$ dmesg -w | tail -n 1
[  828.364816] usblp0: removed

# Now, I unplug and plug the printer

$ sudo sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

could not fetch string descriptor: Pipe error
could not fetch string descriptor: Pipe error
found USB scanner (vendor=0x03f0 [HP], product=0xad2a [HP ColorLaserJet MFP M278-M281]) at libusb:001:009
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

$ scanimage -L
device `hpaio:/usb/HP_ColorLaserJet_MFP_M278-M281?serial=<SERIALHERE>' is a Hewlett-Packard HP_ColorLaserJet_MFP_M278-M281 all-in-one

$ hp-check -r
# output cut
PYEXT SCANCONF QUEUES PERMISSION                                                                                                                                                                            

Status Types:
    OK
    MISSING       - Missing Dependency or Permission or Plug-in
    INCOMPAT      - Incompatible dependency-version or Plugin-version

warning: ubuntu-19.10 version is not supported. Using ubuntu-19.04 versions dependencies to verify and install...

---------------
| SYSTEM INFO |
---------------

 Kernel: 5.3.0-18-generic #19-Ubuntu SMP Tue Oct 8 20:14:06 UTC 2019 GNU/Linux
 Host: ubuntu
 Proc: 5.3.0-18-generic #19-Ubuntu SMP Tue Oct 8 20:14:06 UTC 2019 GNU/Linux
 Distribution: ubuntu 19.10
 Bitness: 64 bit


-----------------------
| HPLIP CONFIGURATION |
-----------------------

HPLIP-Version: HPLIP 3.19.6
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for ubuntu distro  19.10 version 

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf.  Generated from hplip.conf.in by configure.

[hplip]
version=3.19.6

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hplip/HP
ppdbase=/usr/share/ppd/hplip
doc=/usr/share/doc/hplip
html=/usr/share/doc/hplip-doc
icon=no
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv
bin=/usr/bin
apparmor=/etc/apparmor.d
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=yes
foomatic-drv-install=yes
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.19.6
restricted-build=no
ui-toolkit=qt5
qt3=no
qt4=no
qt5=yes
policy-kit=yes
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=no
class-driver=no


Current contents of '/var/lib/hp/hplip.state' file:
Plugins are not installed. Could not access file: No such file or directory

Current contents of '~/.hplip/hplip.conf' file:
[installation]
date_time = 11/08/19 20:41:54
version = 3.19.6


 <Package-name>        <Package-Desc>      <Required/Optional> <Min-Version> <Installed-Version> <Status>   <Comment>

-------------------------
| External Dependencies |
-------------------------

 error: cups          CUPS - Common Unix Printing System                           REQUIRED        1.1             -               INCOMPAT   'CUPS may not be installed or not running'
 gs                   GhostScript - PostScript and PDF language interpreter and previewer REQUIRED        7.05            9.27            OK         -
 error: xsane         xsane - Graphical scanner frontend for SANE                  OPTIONAL        0.9             -               MISSING    'xsane needs to be installed'
 scanimage            scanimage - Shell scanning program                           OPTIONAL        1.0             1.0.27          OK         -
 error: dbus          DBus - Message bus system                                    REQUIRED        -               1.12.14         MISSING    'DBUS may not be installed or not running'
 policykit            PolicyKit - Administrative policy framework                  OPTIONAL        -               0.105           OK         -
 network              network -wget                                                OPTIONAL        -               1.20.3          OK         -
 avahi-utils          avahi-utils                                                  OPTIONAL        -               0.7             OK         -

------------------------
| General Dependencies |
------------------------

 error: libjpeg       libjpeg - JPEG library                                       REQUIRED        -               -               MISSING    'libjpeg needs to be installed'
 error: cups-devel    CUPS devel- Common Unix Printing System development files    REQUIRED        -               -               MISSING    'cups-devel needs to be installed'
 error: cups-image    CUPS image - CUPS image development files                    REQUIRED        -               -               MISSING    'cups-image needs to be installed'
 libpthread           libpthread - POSIX threads library                           REQUIRED        -               b'2.30'         OK         -
 error: libusb        libusb - USB library                                         REQUIRED        -               1.0             MISSING    'libusb needs to be installed'
 sane                 SANE - Scanning library                                      REQUIRED        -               -               OK         -
 error: sane-devel    SANE - Scanning library development files                    REQUIRED        -               -               MISSING    'sane-devel needs to be installed'
 error: libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED        5.0.9           -               MISSING    'libnetsnmp-devel needs to be installed'
 error: libcrypto     libcrypto - OpenSSL cryptographic library                    REQUIRED        -               1.1.1           MISSING    'libcrypto needs to be installed'
 python3X             Python 2.2 or greater - Python programming language          REQUIRED        2.2             3.7.5           OK         -
 error: python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL        -               -               MISSING    'python3-notify2 needs to be installed'
 error: python3-pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4                         OPTIONAL        4.0             -               MISSING    'python3-pyqt4-dbus needs to be installed'
 error: python3-pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x)         REQUIRED        4.0             -               MISSING    'python3-pyqt4 needs to be installed'
 python3-dbus         Python DBus - Python bindings for DBus                       REQUIRED        0.80.0          1.2.12          OK         -
 python3-xml          Python XML libraries                                         REQUIRED        -               2.2.7           OK         -
 error: python3-devel Python devel - Python development files                      REQUIRED        2.2             3.7.5           MISSING    'python3-devel needs to be installed'
Traceback (most recent call last):
  File "/usr/bin/hp-check", line 862, in <module>
    num_errors, num_warns = dep.validate(time_flag, is_quiet_mode)
  File "/usr/bin/hp-check", line 368, in validate
    self.core.dependencies[dep])
  File "/usr/bin/hp-check", line 210, in __update_deps_info
    installed_ver = self.core.version_func[deps_info[6]]()
  File "/usr/share/hplip/installer/dcheck.py", line 372, in get_pil_version
    return Image.VERSION
AttributeError: module 'PIL.Image' has no attribute 'VERSION'


Almost two year after, I gave it a go again, this time with an MFP M183fw.

I'm on 20.04 now, which ships the 3.20.3 version of hplip. Now everything work as expected, however, something that (I think) I previously wasn't aware of is the installation of the proprietary plugin (hp-plugin -i).

If I don't install the plugin on the new configuration, the scanner behaves like in the question - scanner detected, but error on scan.

Based on the above, my educated guess is that I was not installing the plugin.