SANE driver returns empty list of valid scan resolutions for LaserJet M1522nf MFP

Bug #1000299 reported by Jiri Popelka
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

After updating to hplip-3.12.2 running hp-scan results in
Using device hpaio:/net/HP_LaserJet_M1522nf_MFP?ip=192.168.1.104
Opening connection to device...
warning: Invalid resolution. Using closest valid resolution of 300 dpi
warning: Valid resolutions are dpi.
Traceback (most recent call last):
  File "/usr/bin/hp-scan", line 636, in <module>
    res = valid_res[0]
IndexError: list index out of range

For full traceback see
https://bugzilla.redhat.com/attachment.cgi?id=584645

Seems that the SANE driver returns empty list of valid resolutions for the
printer. If I compare 3.12.2 with 3.11.12 I see that
previously there were some resolutions hard-wired in the code.

diff -r hplip-3.11.12/scan/sane/soapht.c hplip-3.12.2/scan/sane/soapht.c
516,525c517
< i=1;
< session->resolutionList[i++] = 75;
< session->resolutionList[i++] = 100;
< session->resolutionList[i++] = 150;
< session->resolutionList[i++] = 200;
< session->resolutionList[i++] = 300;
< session->resolutionList[i++] = 600;
< //session->resolutionList[i++] = 1200;
< session->resolutionList[0] = i-1; /* length of word_list */
< soapht_control_option(session, SOAP_OPTION_SCAN_RESOLUTION,
SANE_ACTION_SET_AUTO, NULL, NULL); /* set default option */
---
> soapht_control_option(session, SOAP_OPTION_SCAN_RESOLUTION,
 SANE_ACTION_SET_AUTO, NULL, NULL); /* set default option */

It's possible that the problem (SANE returning empty list of scan resolutions for the printer)
had always been there but the above mentioned change uncovered it.

For the original report from Sam Tuke see
https://bugzilla.redhat.com/show_bug.cgi?id=821707

Revision history for this message
Sarbeswar Meher (sarbeswar-meher) wrote :

Hi,

  Go to your hplip extracted folder (e.g. ~/Downloads/hplip-3.12.2). Please replace this file in your extracted folder ~/Downloads/hplip-3.12.2/scan/sane.

 Run the followings :

  $ cd ~/Downloads/hplip-3.12.2
  $ make
  $ sudo make install

  Close hp-systray if running. Then run 'hp-scan' or 'xsane' to do scanning. Let me know if you are facing any issue.

Revision history for this message
Jiri Popelka (jpopelka) wrote :

Thank you for the quick response !
I'll build a new package for the original reporter and let you know.

Revision history for this message
Jiri Popelka (jpopelka) wrote :

The problem remains with 'hplip-3.12.4' and 'hplip-3.12.4 with your soapht.c'.
See https://bugzilla.redhat.com/show_bug.cgi?id=821707#c7

Revision history for this message
Jiri Popelka (jpopelka) wrote :
Revision history for this message
Igor Goldenberg (igold) wrote :

So to scan from my network HP M1522n I must downgrade hplip to 3.11.7-1ubuntu3.1. In this version simple scan doesn't work too but I can scan from command line with hp-scan.

Revision history for this message
Tim Waugh (twaugh) wrote :

Are you able to visit the IP address for the printer using a web browser? If so, could you attach what this page says?:

http://my-printer-ip-addr/Scan/ScanCaps

(you might have to "Save Page As..." to save the XML file)

Revision history for this message
Igor Goldenberg (igold) wrote :

It says:
404 Not Found

Revision history for this message
Tim Waugh (twaugh) wrote :

OK. Try on port 8080, like this:

http://my-printer-ip-addr:8080/Scan/ScanCaps

Revision history for this message
Igor Goldenberg (igold) wrote :

My device doesn't listen on port 8080: Connection refused.
But I have web GUI on default 80 port, but there is no page at url /Scan/ScanCaps, internal web server returns 404 when I try to open it at 80 port.
I even can't find firmware version to note it for you.

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

Other bug subscribers

Bug attachments

Remote bug watches

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