Scan with HP LaserJet Pro MFP M28a fails

Bug #1811504 reported by Lucazade
158
This bug affects 34 people
Affects Status Importance Assigned to Milestone
hplip (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

I’m trying to scan with my new printer Hp LaserJet MFP M28-M31 but I always get this error when scanning using SANE:

error: SANE: Error during device I/O (code=9)

I’ve installed hplip hplip-plugins and any other dependencies listed in hp-check but without luck.

any hints?

Revision history for this message
Lucazade (lucazade) wrote :
Revision history for this message
Lucazade (lucazade) wrote :
Revision history for this message
Lucazade (lucazade) wrote :
Revision history for this message
brian_p (claremont102) wrote :

Message #5:

https://bugs.launchpad.net/hplip/+bug/1809287

Any joy?

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

still no luck!
modified models.dat but always get sane: i/o error. and no scan at all.
Tried in ubuntu 18.04.1 and Manjaro with hplip-3.18.12 but same issue.

Revision history for this message
brian_p (claremont102) wrote :

Anything shown with 'journalctl'?

Please post the output of

  avahi-browse -rt _uscan._tcp

for the device.

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

-> % avahi-browse -rt _uscan._tcp
+ wlp6s0 IPv4 HP LaserJet MFP M28w (4FA59A) _uscan._tcp local
= wlp6s0 IPv4 HP LaserJet MFP M28w (4FA59A) _uscan._tcp local
   hostname = [NPI4FA59A.local]
   address = [192.168.1.173]
   port = [8080]
   txt = ["note=" "duplex=F" "is=platen" "cs=color,grayscale" "pdl=application/pdf,image/jpeg" "uuid=564e4333-4b34-3438-3737-84a93e4fa59a" "rs=eSCL" "representation=http://NPI4FA59A.local./ipp/images/printer.png" "vers=2.63" "usb_MDL=HP LaserJet MFP M28-M31" "usb_MFG=HP" "mdl=LaserJet MFP M28-M31" "mfg=HP" "ty=HP LaserJet MFP M28-M31" "adminurl=http://NPI4FA59A.local." "txtvers=1"]

> % scanimage --device "hpaio:/usb/HP_LaserJet_MFP_M28-M31?serial=VNC3K44877" --format=png --resolution 300 >scan01.png
scanimage: sane_start: Error during device I/O

Revision history for this message
brian_p (claremont102) wrote :

Your avahi-browse output shows

  ty=HP LaserJet MFP M28-M31

As

  https://bugs.launchpad.net/hplip/+bug/1797501

discusses, the first three characters are removed and the software looks for "laserJet mtp_m28-m31" in models.dat. There are no entries in models.dat for this device. I am very surprised journalctl does not inform you of this.

Look again. There is more than one entry found in models.dat when I search for "m28".

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

if I remove "hp_" prefix in both entries in models.dat the printer is not recognized during hp-setup:

-> % hp-setup

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

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.

Searching... (bus=usb, search=(None), desc=0)
error: No devices found on bus: usb

Done.

Revision history for this message
brian_p (claremont102) wrote :

Apologies - I hadn't fully appreciated you were using a USB connection. You could disconnect it and try wireless.

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

Yes, I'm using a USB connection.
I tried also via wireless but it fails the same way (i/o error code 9) when it starts scanning.

I believe the relevant part of journalctl is:

io/hpmud/musb.c 1566: invalid HP-ESCL-SCAN channel=26
io/hpmud/musb.c 975: removed HP-ESCL-SCAN channel=26 clientCnt=0 channelCnt=0
http.c 263: unable to open HP-ESCL-SCAN channel
...
http.c 322: invalid http_status=409
http.c 328: dumping len=127
http.c 153: hpmud_read_channel failed retrying (2) more times)
http.c 153: hpmud_read_channel failed retrying (1) more times)
http.c 153: hpmud_read_channel failed retrying (0) more times)
http.c 157: read_stream error stat=49
http.c 189: -read_stream() bytes_read=0 s.index=0 s.cnt=0 stat=1
bb_escl.c 828: http_read_header returned error code(1) hence exiting..
(attached full log)

I'm wondering why there is a 409 http error code.. it looks like there is some conflict or broken communication somewhere, maybe because of unreachble HP-ESCL-SCAN channel.

The scanner works ok with vuescan proprietary engine so the issue seems related to sane/hpaio backend.

Revision history for this message
brian_p (claremont102) wrote :

A 409 http error code indicates a conflict. A portion of the data which is sent conflicts with the software's idea of what the scanner is capable of. The capabilities are shown in your journalctl file by the "Platen" entries.

bb_esc comes with the plug-in. According to models.dat, you device does not need such software. You could remove it from /usr/share/hplip and see how you go on.

--
Brian.

Revision history for this message
brian_p (claremont102) wrote :

bb_esc ---> bb_escl

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

if I remove /usr/share/hplip/scan/plugins/bb_escl.so

-> % scanimage --device "hpaio:/usb/HP_LaserJet_MFP_M28-M31?serial=VNC3K44877" --format=png --resolution 300 >scan01.png
scanimage: open of device hpaio:/usb/HP_LaserJet_MFP_M28-M31?serial=VNC3K44877 failed: Error during device I/O

scan/sane/escl.c 418: escl_open() session=(nil)
io/hpmud/musb.c 427: Found interface conf=0, iface=0, altset=0, index=1
io/hpmud/musb.c 389: Active kernel driver on interface=0 ret=0
io/hpmud/musb.c 535: claimed 7/1/2 interface
io/hpmud/musb.c 780: read actual device_id successfully fd=1 len=239
io/hpmud/musb.c 561: released 7/1/2 interface
common/utils.c 245: unable to load library libm.so: /usr/lib/libm.so: invalid ELF header
common/utils.c 245: unable to load library /usr/share/hplip/scan/plugins/bb_escl.so: /usr/share/hplip/scan/plugins/bb_escl.so: cannot open shared object file: No such file or directory
scan/sane/escl.c 89: Calling escl bb_unload:

Revision history for this message
brian_p (claremont102) wrote :

The evidence from models.dat is that a plug-in is not required. This is repeated at

https://developers.hp.com/hp-linux-imaging-and-printing/binary_plugin.html

Perhaps it would be as well to tell HPLIP there is no plug-in installed by moving /var/lib/hp/hplip.state out of the way or editing it. The plug-in software may not be the problem, but it complicates matters.

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

Interesting! The plugin seems not required but when I scan with hp-scan it asks me to install the plugin (I previously uninstalled the plugin and moved out /var/lib/hp/hplip.state)

How to tell to not require the plugin installation? Maybe in models.dat?

Revision history for this message
Lucazade (lucazade) wrote :

ok made some progress but still no luck!

* modified /var/lib/hp/hplip.state
[plugin]
installed = 0
eula = 1
version = 3.18.12

* modified models.dat by removing "hp_" prefix

and now it seems to start scanning but it hangs after a little.
Now it say http error 503.. attached full log

Revision history for this message
brian_p (claremont102) wrote :

I cannot account for your experience with hp-scan. Using it with a USB-connected PSC 1300 here does no such thing. Altering models.dat? That shouldn't be needed as it has "plugin=0". Try xsane or simple-scan.

In your journalctl there is the line

  bb_escl.c 1558: Requested_width = [2550], max_width = [2549]

This is immediately followed by the 409 because a request is made which conflicts with max_width. My thinking is that bb_escl.c has it wrong. The max_width here is 2550. I can give you a command if you want to find what it is for your device, but the device has to be on the network.

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

I can scan via network and I get a 503 error like previous test.
409 error seems disappeared after I removed the plugin.

I can try your command to test out max-width!

Revision history for this message
brian_p (claremont102) wrote :

curl -v -s http://<IP_or_hostname.local>:8080/eSCL/ScannerCapabilities

I'd be interested in seeing what you get so that I can compare it with my machine's ouput.

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

here is the output! hope you can find the culprit! :)

Revision history for this message
brian_p (claremont102) wrote :

Please would you describe how you got scan-debug_wifi.txt?

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

using hp-scan and network device and looking output in journalctl -f

Revision history for this message
brian_p (claremont102) wrote :

scan-debug_wifi.txt
-------------------
scl_open() calling bb_escl.so PASSED
scan/sane/escl.c 89: Calling escl bb_unload:

Plug-in software appears to be still available and being used. Whenever I have wanted to get rid of it I have deleted all associated directories in /usr/share/h[lip. It's possible the 503 error merely replaces the 409 error. 503 is given when the web server on the scanner refuses to accept something.

ScannerCapabilities.txt
-----------------------
In conradiction to your logs - MaxWidth>2550<
I cannot think of any other simple approach to tackle this issue or a way of reproducing it here. If the problen lies entirely with libsane-hpaio, I haven't much to offer. BTW, I am working with Debian packages.

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

I've uninstalled hplip and removed /usr/share/hplip dir and reinstalled it back.

Unfortunately it always ask for plugin installation even modifying models.dat (stripping hp_).

So without plugin the scan process doesn't start.. instead if I install the plugin it says 503.
Frustating!

Do you know how to ask support directly to hplip developers?

Revision history for this message
brian_p (claremont102) wrote :

> I've uninstalled hplip and removed /usr/share/hplip dir and reinstalled it back.
>
> Unfortunately it always ask for plugin installation even modifying models.dat
> (stripping hp_).

The stripping would (IMO) only be needed for a network printer with mdns. Being asked (or made) to install a plugin is beyond my experience.

> So without plugin the scan process doesn't start.. instead if I install the plugin
> it says 503.
> Frustating!

Very; particularly when all the documentation indicates one isn't need. Sorry it didn't work out.

> Do you know how to ask support directly to hplip developers?

There is only Launchpad. HPLIP developers do read the reports and often respond to them.

Scanning here is generally of full pages over wireless with a set resolution. Nothing fancy; just get the job done. Users are given the script scan.py, obtainable from

  https://github.com/kno10/python-scan-eSCL

Make it executable and

  scan.py <output_file> <resolution>

output_file is a jpeg. With your device, resolution is in the range 200-600. Rudimentary, but it works well for me. All processing takes place on the device, so no HPLIP or other software is needed. It could suit you.

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

no luck also with this tool!
the webserver on the printer always answers with a 503 error.

Revision history for this message
brian_p (claremont102) wrote :

Dispiriting! I imagine you have tried switching the device on and off?

The scanner is found and a scan request is made. The response is a location. Accessing the location should cause scanning to take place and a file to be downloaded to out.jpeg.

Location: http://192.168.1.173:80/eSCL/ScanJobs/pcluyfwp-bt6d-cdkq-1003-qviyb7lo

I reckon the port should be 8080. It is what I use here and it is what you used earlier to get the scanner capabilities. I do not know why the scanner says it is port 80, but the service (scanning and downloading) is unavailable on this port. At least, that is my theory. Let's test it.

Use scan.py again. Copy and paste the location, change it to

http://192.168.1.173:8080/eSCL/ScanJobs/<Whatever_UUID_is_given>/NextDocument

and do

curl -v -s http://192.168.1.173:8080/eSCL/ScanJobs/<Whatever_UUID_is_given>/NextDocument > out.jpg

You have to be quick with this because the request expires in about 30 seconds.

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

I was trying with wget to get the image and it works!. I didn't think about curl :)
Now I'm modifying scan.py to suit my needs!

Well we found a workaround.. I'm really happy! thanks for your great support mate!

What remains a mystery is why I receive a 503 error using the other tools! https? certificate? auth?

Revision history for this message
brian_p (claremont102) wrote :

wget is as suitable a tool as curl; the location should also display in a web browser. Did port 80 work with wget? (I was thinking in terms of a firmware bug). Perhaps not all HP eSCL scanners work in exactly the same way.

I'm glad we got somewhere with this, even though it does not solve the HPLIP problem. Your extensive logging and testing helped considerably; thanks. When you complete your scan.py modifications would you please post the new script here?

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

Port 80 here works the same way as 8080. I don't know why it is automatically choosen instead of 8080.

Attached there is my modified scan.py script.
I'm not a python expert so it could prettier but it works for me :)

Revision history for this message
brian_p (claremont102) wrote :

> Port 80 here works the same way as 8080.

So I found out earlier. Confirmation is good to get.

> Attached there is my modified scan.py script.
> I'm not a python expert so it could prettier but it works for me :)

Thanks. I don't know any python - but can fiddle. :)

From before:

> The evidence from models.dat is that a plug-in is not required.

Famous last words! Knowing now exactly what the MFP is (HP LaserJet MFP M28w), a closer look at models.dat indicates that (as you said all along) it is required. Recalling

> bb_escl.c 1558: Requested_width = [2550], max_width = [2549]

I wonder what happens if a width less than 2549 is requested.This should do it

hp-scan -d <USB_or_network_URI> -a 0,0,20,20

Does that scan?

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

unfortunately it doesn't work :(
any other way to pass width? maybe hardcode bb_escl.c? just wondering!

-> % hp-scan -d "hpaio:/net/laserjet_mfp_m28-m31?ip=192.168.1.173&queue=false" -a 0,0,20,20
HP Linux Imaging and Printing System (ver. 3.18.12)
Scan Utility ver. 2.2
warning: No destinations specified. Adding 'file' destination by default.
Using device hpaio:/net/laserjet_mfp_m28-m31?ip=192.168.1.173&queue=false
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): (20.000000mm, 20.000000mm)
  Width: 20.000000mm
  Height: 20.000000mm
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/luca/hpscan001.png'.

Warming up...
Scanning...
error: SANE: Error during device I/O (code=9)
Closing device.

-> % hp-scan -d "hpaio:/usb/HP_LaserJet_MFP_M28-M31?serial=VNC3K44877" -a 0,0,20,20
HP Linux Imaging and Printing System (ver. 3.18.12)
Scan Utility ver. 2.2
warning: No destinations specified. Adding 'file' destination by default.
Using device hpaio:/usb/HP_LaserJet_MFP_M28-M31?serial=VNC3K44877
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): (20.000000mm, 20.000000mm)
  Width: 20.000000mm
  Height: 20.000000mm
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/luca/hpscan001.png'.

Warming up...
Scanning...
error: SANE: Error during device I/O (code=9)
Closing device.

Revision history for this message
brian_p (claremont102) wrote :

> any other way to pass width? maybe hardcode bb_escl.c? just wondering!

No; bb_escl.c is closed source. Anyway, I'm not even sure it is the problem, although I must admit I'm leaning towards a bug in the plugin as the cause. Anyway, you are not the only one:

https://answers.launchpad.net/hplip/+question/675574

Time to move on. The developers can assess what we have done and go from there. You can now scan and I know more about scanning than I knew previously. Nice to have worked with you.

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

Thanks for your support! Really appreciated!
I hope some developer will take care of this issue in the plugin.
Have a nice day ;)

Revision history for this message
petrj (petrjanousek-net) wrote :

I've just craeted command line scanning tool as a workaround for this bug. It works only with printer connected via network. Script scan.py did not work for me.

https://github.com/petrj/HPWifiScan

Enjoy

Revision history for this message
Samuele Rini (samuele-rini) wrote :

I have the same problem with latest hplip (now is @ version 3.19.3, released a few hours ago) and same printer, both with wi-fi or USB.
Linux Mint 19.1.

Any news on this issue?
Thanks.

Revision history for this message
Umesh Mahindrakar (umesh.mahindrakar) wrote :

Hi All,

This issue is seen as if we did not enable “ Enable Remote User Auto Capture “ option in the EWS page of the device.
Once we enabled this option, we were able to do the scan.

To enable the option :
1) Connect the device and PC in same network
2) Open a Web browser, and in the address field, type the device IP address exactly as it displays on the Configuration Page, and then press Enter.
NOTE: If the Web browser displays a message indicating that accessing the website might not be safe, select the option to continue to the website. Accessing this website will not harm the computer.
3) On the top navigation tabs, select the Security tab.
4) In the Web Scan Auto Capture Jobs, select the Enable Remote User Auto Capture check box.
After that restart the device (i.e., printer/scanner)

Thanks,
Umesh

Changed in hplip:
status: New → In Progress
Revision history for this message
brian_p (claremont102) wrote :

@lucazade and Samuele Rini (and anyone else who is interested).

The result of testing Umesh's advice would be appreciated. There are quite a few reports of scanning not working for this device. Testing should be done with an HPLIP version of 3.18.9 or greater to avoid bug 1797501.

--
Brian.

Revision history for this message
brian_p (claremont102) wrote :

> Testing should be done with an HPLIP version of 3.18.9
> or greater to avoid bug 1797501.

That advice applies only if the scanner is on the network.

--
Brian.

Revision history for this message
Lucazade (lucazade) wrote :

@brian_p @Umesh Mahindrakar

I cannot find "Web Scan Auto Capture Jobs" and "Enable Remote User Auto Capture" check box in the settings.
This is my security setting page

Revision history for this message
brian_p (claremont102) wrote :

Thank you for your response, Luca.

Part of the reason I asked was because I could not find any mention of these settings in the manual. Also, the advice will not help with the M28a (USB only) as said in Message #11 at bug 1819742.

You earlier journalctl file has:

> scanimage[1676]: http.c 263: unable to open HP-ESCL-SCAN channel

ESCL is scan-type=9 in models.dat. The MFP M28-M31 section also has

   tech-class=Hbpl1
   family-class=PCLM

From a non-detailed analysis of the rest of models.dat it seems to me that these two lines are associated with scan-type=5. I reckon changing scan-type=9 to scan-type=5 in the relevant MFP M28-M31 section (there are two of them) is worth a try.

--
Brian.

Revision history for this message
brian_p (claremont102) wrote :

> .....is worth a try.

It was tried unsuccessfully in bug 1819742 (Message #13). Also, the EWS settings observation is commented on in bug 1821932 and bug 1819742 (Message #11).

--
Brian.

Revision history for this message
Ben Bipod (benbipod) wrote :

The command line wifi scanning tool (not using HPLIP) given in comment #36 works for me. Thanks a lot, @petrj!

Revision history for this message
Ben Bipod (benbipod) wrote :

To summarize the state of wifi scanning: hp-scan fails with output

> error: SANE: Error during device I/O (code=9)

corresponding to

> Apr 26 20:04:57 myhost /hp-scan[11160]: http.c 322: invalid http_status=503

in systemd journal/syslog. This is as far as you can get with HPLIP at the moment.

Then there is the generic eSCL scan tool (non-HPLIP) at https://github.com/kno10/python-scan-eSCL. It also fails with

> urllib2.HTTPError: HTTP Error 503: Service Unavailable

@Lucazade in comment #31 posted a modified version of that tool, essentially just delaying the retrieval of the scan result for 20 seconds after the scan request has been issued, thus avoiding the HTTP 503 error. I confirm this works for me and encourage everybody affected by this bug to try it out.

Also, @petrj in comment #36 announced another custom eSCL based scan tool at https://github.com/petrj/HPWifiScan, which I can also confirm works for me. Again, waiting for the result seems to be the essential feature, this tool more dynamically polls the job status instead of waiting for a fixed amount of time.

Many thanks to both @Lucazade and @petrj! I hope some HPLIP developer is reviewing this and can base a fix to the HPLIP software on the work done here.

Revision history for this message
MarkosJal (markosjal) wrote :

That Scan.py script fails on several printers I know of . If you have an android device try Mopria client when scanner is connected to network

Revision history for this message
Joel Maxuel (joel-maxuel) wrote :

It seems to me the error is of SANE timing out prematurely, as if it assumes the `hpaio` class all have automatic feeders.

It wouldn't be the first time a timeout needed to be adjusted:
> https://unix.stackexchange.com/questions/349850/xsane-error-during-read-error-during-device-i-o-canon-pixma-mg3550-scanner

This would work outside/avoiding the models.dat file model. However I cannot find the acceptable config option to suggest a change in timeout to `/etc/sane.d/hpaio.conf`.

Maybe someone would be better at discovering the SANE documentation for the `hpaio` backend than I am.

Revision history for this message
Jarno (yannick-jarno) wrote :

Hi,
no news since May....does anyone know if hp is working on this bug or if definitely the problem will not be solved .
rgds
Yannick

Revision history for this message
Gaurav Sood (gaurav-sood) wrote :

Hi
we are working on this. and will update you this week.

Revision history for this message
shivani mandora (shivani1708) wrote :

Hi,

We are seeing the issue with the scan for Hp LaserJet MFP M28-M31 in 3.18.4 release.
The scan issue has been fixed in 3.19.6 release.
Can you please download the latest HPLIP driver 3.19.6 and plugin file from the portal and check again. We have tested from our side.It should work fine.
If you face any problem please let me know.

Changed in hplip:
status: In Progress → Fix Released
Revision history for this message
Lucazade (lucazade) wrote :

It seems to work well.. tried with xscan, skanlite and skanimage and everything is fine.
I just get an I/O error sometimes, probably because I tried to scan to quickly after another scan.
I will continue to test and give feedback :)

Revision history for this message
jidge (jacques-guezenec) wrote :

No change with the problem with me. Context Xubuntu 19.04, One minute before scan work between each page to scan.

I have deleted and re-installed HP-Lip 3.19.6: do nothing best. No change for the pb.

affects: hplip → ubuntu
Revision history for this message
Fulvio Brosio (fulvio-grrr) wrote :

Hi,
I've installed hplip 3.19.6 on my Debian Buster using experimental repositories. I've just purchased an M28a LaserJet.
With the new driver I'm able to scan just in text mode and 300dpi or 600dpi resolution (using Gnome simple scan tool). If I set the color scan mode (or picture mode), I get I/O error.

Thanks,
Fulvio

Revision history for this message
Jarno (yannick-jarno) wrote :

Hi,
Good news, it works.
The automatic installation of the plugin did not work, I had to install it manually
Thanks for your help
Yannick

Revision history for this message
Thomas Moreau (t-moreau) wrote :

Hi,
**Works** for me via WiFi with the 'hp-scan' CLI and Simple Scan 3.28.0

Fails with XSane 0.999

on Ubuntu MATE 18.04.2 LTS (32 bit)
with HPLIP 3.19.6 (from https://developers.hp.com/hp-linux-imaging-and-printing/gethplip)
and HPLIP-plugin 3.19.6 (from https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/)

I can provide more details if needed.

Thanks.

Revision history for this message
Lorenzo J. Lucchini (ljl) wrote :

Did you have to install a binary plugin (using hp-plugin) for it to work, Thomas? (In theory none is required for this model.)

Did it work with Simple Scan without changing anything in particular?

Revision history for this message
brian_p (claremont102) wrote :

I would not have revisited this bug report if it had not been for

https://bugs.launchpad.net/hplip/+bug/1840842

Now I find it is fixed. However, I feel like complaining about the way the issue has been treated.

1. Bug reported on 2019-01-12; fix announced on 2019-07-17. A 6 month wait.

2. In 3.19.6, models.dat still has "plugin=0". Why then is a plugin required? Nobody has ever explained.

3. "scan-type=9" is still undocumented.

4. The Release Notes for 3.19.6 have absolutely no mention of this bug (or any other bug) being fixed. Talk about keeping everyone in the dark. I regard this lack of changelog detail as a serious defect.

5. Correct information about the cause or origin of the issue is completely lacking. If upstream do not know, at least say so; we are not mushrooms. :)

6. HPLIP is important, quality software. It deserves better.

--
Brian.

Revision history for this message
Thomas Moreau (t-moreau) wrote :

Hi,

@Lorenzo J. Lucchini (ljl):
1. Yes, you do need to install the plugin, despite the documentation saying the opposite.
2. Actually, it seems to work with both Simple Scan and XSane, but only in text/gray mode, not in image/color mode (my tests were not extensive enough. I probably declared victory too early...).

brian_p (claremont102) raised really good points. I'd like them to be addressed.

Thomas.

Revision history for this message
Fabian Leven (fleven) wrote :

Hi,

this bug also affects me.

Printer: HP LaserJet MFP M28-M31
hplip-version: 3.19.11
Operating System: Linux Mint 19.2

I have similar/the same issues as the ones @t-moreau pointed out:

Using "Simple Scan", scanning in "Text" mode with 150 or 300 dpi works. Higher dpi-settings do not work. Using "Photo" mode fails.

It was pointed out earlier, that a timeout might be causing the troubles. This idea would be supported by the fact that scanning with a higher resolution or in "Photo" mode takes longer.

Is someone still looking into this?

Revision history for this message
Alessandro Pellizzari (alex+pk) wrote :

Hi all,

just wanted to add my experience to this.

I'm using hplip 3.19.12 with the plugin installed, on Ubuntu 19.10 with xsane 0.999-7. I can scan at 300 dpi in either color or grey, but setting 200 or 600 dpi, as well as trying to get a preview, fails with a 503.

I also tried to add a sleep to the scan.py script and found it works with just 3-5 seconds delay.

Revision history for this message
MarkosJal (markosjal) wrote :

Just FYI there is now a new solution, no need for HPLIP nor proprietary drivers with other manufacturers.

Most Multi-function scanners and now some stand alone scanners are Airscan/eSCL compatible, which includes most HP multifunctions. Also Kyocera, Cannon, Epson and more support eSCL/Airprint.

See this WONDERFUL new driver and support the developer. I has been far too long for it to come!

https://github.com/alexpevzner/sane-airscan

Revision history for this message
Mick (miin) wrote :

Scanner works with hplip-3.20.3 and updates enabled.

Revision history for this message
Alain Brondeau (alain-brondeau) wrote :

I have the exact same problem on Ubuntu 3.18.04 with hplip 3.19.12 installed. It worked fine for a few months but things went wrong a few days ago (scanner now only works in gray mode and up to 200 dpi). So maybe an update caused a regression ?

I updated to hplip 3.20.3 and 3.20.3 plugin but to no avail. I also tried the solution described in #61 but it didn't help (simple scan simply freezes completely).

Revision history for this message
yann42 (yann42) wrote :

Hi,
I don't know if I can ask help here, so if not please just tell me.

I get a m28w printer and found this topic, so I tried to install latest hplib version:

sudo apt-get install --install-recommends build-essential libjpeg-turbo8-dev avahi-utils cups libcups2 libcups2-dev cups-bsd cups-client libcupsimage2 libcupsimage2-dev libdbus-1-dev g++ ghostscript cups-filters ghostscript-x libssl-dev libsnmp-dev snmp libc6 libtool libtool-bin libusb-1.0-0-dev make wget policykit-1 policykit-1-gnome python3-dbus python3-gi python3-dev python3-notify2 python3-pil python3-pyqt4 gtk2-engines-pixbuf python3-dbus.mainloop.qt python3-reportlab python3-lxml sane libsane-dev sane-utils xsane python-dev python-qt4 python-qt4-dev python-pyqt5 python-dbus
tar xf hplip-3.20.3.tar.gz
cd hplip-3.20.3/
./configure --prefix=/usr --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib/x86_64-linux-gnu --enable-qt4 --enable-hpcups-install --enable-cups-drv-install --disable-cups-ppd-install --disable-hpijs-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-foomatic-rip-hplip-install --enable-fax-build --enable-dbus-build --enable-network-build --enable-scan-build --disable-policykit --disable-libusb01_build --disable-udev_sysfs_rules --enable-doc-build
make
sudo make install
hp-setup
hp-plugin

But after that I get same problems: printer works fine, scanner give I/O errors if using sane.
The only way to scan that worked is:
scanimage –mode Gray –resolution 200 > image.pnm

But the strangest,
apt version hplip
returns:
3.16.3+repack0-1

What did I wrong?

Revision history for this message
pi4630 (p-imbemba) wrote :

I installed the LJ M28A with Ubuntu 18.04.3 provided HPLIP. When I tried scanning, it asked me for additional plugins and I did install them. Everything went fine, printing and scanning. I unfortunately decided to remove the hplip from Ubuntu and use the latest HP one. Now I can only scan Text, no color.

pi4630 (p-imbemba)
summary: - scan with Laserjet MFP-M28 fails
+ Scan with HP Laserjet Pro M28 fails
affects: ubuntu → hplip (Ubuntu)
pi4630 (p-imbemba)
summary: - Scan with HP Laserjet Pro M28 fails
+ Scan with HP LaserJet Pro MFP M28a fails
Revision history for this message
Alain Brondeau (alain-brondeau) wrote :

Edit for #63 : I tested again today and I was able to scan both in gray and colour (and up to dpi), although I didn't change anything in my hplip configuration (3.20.3) since that comment! So problem mysteriously solved for me... for now.

Revision history for this message
Kirill Okhotnikov (kirill-okhotnikov) wrote :

I was also affected by this problem. The MFP support AirScan, therefore it is possible to scan with such interface. Very recent version of SANE support this, but for old SANE versions you can find an driver here. https://github.com/alexpevzner/sane-airscan I've install it from the repository and it works!!! I can scan any modes with hi resolution (600 dpi).

Revision history for this message
Miky (miky2020) wrote :

Hi, I'm an absolute newbie and may be asking something trivial. I've installed the sane-airscan package,so now what? Should I use the same applications that didn't work before such as skanlite or xsane and expect them to work now? This is not the case, is there any other thing that I'm missing?
Thanks a lot,

Revision history for this message
Miky (miky2020) wrote :

OK, it was actually a trivial thing, just needed to refresh the search for scanners, it works!! Thanks very much for posting the different solutions

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

While there are workarounds for this, I don't see any indication that this is fixed in Ubuntu.

Changed in hplip (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Kirill Okhotnikov (kirill-okhotnikov) wrote :

From my point of view the bug should be closed somehow. As I understand MFP M28 uses closed source protocols from Apple (AirScan) and Microsoft (WP-scan) for scanning, therefore the scanning plugin form HP is closed source and Ubuntu developers can do little with it, otherwise MFP M28 linux users, who can push HP directly to fix the problem. The workaround solution (sane-airscan/current SANE) are open source and based on reverse engineering specification of the protocol. My opinion that the proper way of fixing the issue is not to do something in the plugin, but asap include a new version of SANE to next Ubuntu release and/or backported SANE airscan to current Ubuntu if possible.
P.S. As many other users of HP, I absolutely disappointed of such "good quality" drivers from the vendor. I hope it will change in the future.

Revision history for this message
on the road again (swissiswiss) wrote :

This worked for me:

Delete ippusbxd
sudo apt purge ippusbxd
Install driver hplib
Install libusb-0.1-4 , if not already installed
sudo apt install libusb-0.1-4
Make sure that the scan resolution doesn't exceed 300 dpi.

Many thanks to Kellerkind_2009 from the German Ubuntu forum for this suggestion.

https://forum.ubuntuusers.de/topic/hp-laserjet-mfp-m28a-drucken-funktioniert-sann/

Revision history for this message
Matti Viljanen (direc85) wrote :

Thank you, markosjal, your recommendation of sane-airscan (with ipp-usb actually)! I can finally scan color pages with my M28a - and print, too! You are correct; sane-airscan should get more attention!

Revision history for this message
Alexander Larkin (avlarkin) wrote :

> Mick (miin) wrote on 2020-03-27: Re: scan with Laserjet MFP-M28 fails #62
> Scanner works with hplip-3.20.3 and updates enabled.

Yes, this is right. Both it works with hplip-3.21.2.

This page is one of the google targets when searching why 3.18.4 not working (doesn't allow to scan with Laserjet MFP-M28 failing after "Warming up..." when "Scanning...").

Maybe please keep for other people (if they use similar environment like I do, but I think that for Ubuntu this info could be useful too in someway). For rhel I used these commands to reinstall 3.21.2 above default 3.18.4:

1. Download from HP 3.21.2:
https://developers.hp.com/hp-linux-imaging-and-printing/gethplip

2. Reinstall default version:
sudo dnf reinstall hplip hplip-common hplip-gui hplip-libs libsane-hpaio

3. Install 3.21.2 above default version with dependency check skipping (since non possible to remove default one):
sudo rpm --nodeps --force --install ~/install/hplip-3.21.2-RHEL8-x86_64.rpm

4. Fix python to be both /usr/bin/python and 3.6 one (that is default one for my system):
sudo ln /usr/bin/python3.6 /usr/bin/python

5. Download required hp-plugins for 3.21.2:
sudo hp-plugin

6. Now scanning works Ok:
hp-scan -g -r200

Revision history for this message
Alexander Larkin (avlarkin) wrote :

Continuing previous comment.
(Something specific for rhel).
For Python, I removed /usr/bin/python and changed "#!/usr/bin/python" inside /usr/bin/hp-scan to "#!/usr/libexec/platform-python" (then it still works). And both similar change inside /usr/bin/hp-setup, /usr/bin/hp-plugin, /usr/bin/hp-sendfax, /usr/bin/hp-systray too.
The reason is https://developers.redhat.com/blog/2019/05/07/what-no-python-in-red-hat-enterprise-linux-8/

Also looks like 3.20.9 (or similar) is going to be the default in next releases for diff Linux distros and then this problem of 3.18.4 should go away.

Revision history for this message
Colin (colin-duport) wrote :

It doesn't work under version 3.22.4 :(

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.