I am trying to use the scanner of my printer Laserjet M1212nf MFP with both xsane and Simple scan. For the first I got the following error:
Failed open device
'hpaio:usb/HP_LaserJet_Professional_M1212nf_MFP?serial=000000000ST10HPQPR1a':
Error during device I/O.
If I try Simple Scan, from both graphical interface and terminal the returned error is :
unable to connect to scanner.
The hplip plugin is intalled and the hp-scan -g gives the following information:
HP Linux Imaging and Printing System (ver. 3.18.9)
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.
hp-scan[3435]: debug: getDeviceUri(None, None, ['hpaio'], {'scan-type': (<built-in function gt>, 0)}, , True)
hp-scan[3435]: debug: Mode=0
warning: No destinations specified. Adding 'file' destination by default.
Using device hpaio:/usb/HP_LaserJet_Professional_M1212nf_MFP?serial=000000000ST10HPQPR1a
Opening connection to device...
error: SANE: Error during device I/O (code=9)
I reinstalled hplip several times following instructions of Official Hplip home page and nothing is working. Any suggestion is appreciated.
The Scanner in the M1212 is simply not supported by SANE anymore.
This answer from the question Xsane: Failed to open device `hpaio:/net/Photosmart_C5100_series?zc=HP5180': Error during device I/O works for me. I'm copying the steps:
sudo hp-plugin
The accepted answer is not correct. The printer (including the scanner) is fully supported by the HPLIP backend (and thus by SANE).
However, I too got
Error during device I/O (code=9)
when trying to scan after setting up the printer on Ubuntu 20.04 (printing worked just fine).Here's what worked for me: The HP support page for the M1212nf offers a firmware update (I bought the printer in 2010 and I don't recall ever updating its firmware).
Unfortunately the firmware update seems to exist only in the Windows section, but I had a Windows machine available. After the firmware update, scanning (via simple-scan) works like a charm.
I can't tell for sure whether it was actually the firmware update that got it from broken to fixed, but I can say this:
In March 2021, on Ubuntu 20.04, without using any hacks or workarounds when setting up the printer with HPLIP, scanning from the HP LaserJet m1212nf MFP via network is possible.