HP LaserJet MFP m139-m142 scanning

Asked by James Drabb Jr

I just purchased an HP LaserJet MFP m139-m142. Print setup worked well and printing is great. I've only bought HP printers for years BECAUSE for the excellent Linux support.

However, I tried to scan for the first time with this printer and I received a message box about needing a driver (something I've never had before with HP printers). The install through the dialog didn't work, so I installed HP-drivers through my OS (Arch) and received an error message.

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

I uninstalled, ran hp-scan as root and the install worked. However I still get the error:
    error: SANE: Error during device I/O (code=9)

Scanning is very important to me but I am outside of my return window. Is there anyway to get scanning with this printer to work?

Versions:
    cups 2.4.2
    hplip 3.22.6
    sane 1.1.1
    xsane 0.999

Any other info needed? Thanks for any help.

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
James Drabb Jr
Solved:
Last query:
Last reply:
Revision history for this message
brian_p (claremont102) said :
#1

USB or network. I am happier with network.

Revision history for this message
James Drabb Jr (astrodrabb) said :
#2

I use it over my home network.

Revision history for this message
brian_p (claremont102) said :
#3

I am unfamiliar with Arch Linux but imagine it will have a
sane-airscan package. Install it (avahi is needed) and give

  scanimage -L
  airscan-discover

Revision history for this message
James Drabb Jr (astrodrabb) said :
#4

Output:

$scanimage -L
device 'hpaio:/net/HP_LaserJet_MFP_M139-M142?ip=192.168.1.118' is a Hewlett-Packard HP_LaserJet_MFP_M139-M142 all-in-one

$ airscan-discover
[devices]
  HP LaserJet MFP M139w = http://192.168.1.118:53048/, WSD

# airscan debug output
$ airscan-discover -d
MDNS: AVAHI_CLIENT_S_RUNNING
WSDD: netif addresses update:
WSDD: + 192.168.1.5
WSDD: 192.168.1.5: started discovery, UDP port=54607
zeroconf: zeroconf_device_list_get: requested
zeroconf: device_list wait: requested
zeroconf: device_list wait: DNS-SD not finished...
MDNS: browse-ipv6("_ipp._tcp"): AVAHI_BROWSER_CACHE_EXHAUSTED
MDNS: browse-ipv6("_ipp._tcp"): AVAHI_BROWSER_ALL_FOR_NOW
MDNS: browse-ipv6("_ipps._tcp"): AVAHI_BROWSER_CACHE_EXHAUSTED
MDNS: browse-ipv6("_ipps._tcp"): AVAHI_BROWSER_ALL_FOR_NOW
MDNS: browse-ipv6("_uscan._tcp"): AVAHI_BROWSER_CACHE_EXHAUSTED
MDNS: browse-ipv6("_uscan._tcp"): AVAHI_BROWSER_ALL_FOR_NOW
zeroconf: ZEROCONF_USCAN_TCP: initial scan finished
MDNS: browse-ipv6("_uscans._tcp"): AVAHI_BROWSER_CACHE_EXHAUSTED
zeroconf: device_list wait: DNS-SD not finished...
MDNS: browse-ipv6("_uscans._tcp"): AVAHI_BROWSER_ALL_FOR_NOW
zeroconf: ZEROCONF_USCANS_TCP: initial scan finished
MDNS: browse-ipv6("_scanner._tcp"): AVAHI_BROWSER_CACHE_EXHAUSTED
zeroconf: device_list wait: DNS-SD not finished...
MDNS: browse-ipv6("_scanner._tcp"): AVAHI_BROWSER_ALL_FOR_NOW
zeroconf: ZEROCONF_MDNS_HINT: initial scan finished
zeroconf: device_list wait: WSDD not finished...
WSDD: HTTP POST http://192.168.1.118:3911/
WSDD: HTTP resolving 192.168.1.118 3911
WSDD: HTTP trying 192.168.1.118:3911
WSDD: HTTP fdpoll: {--} -> {-w}
WSDD: HTTP 671 bytes sent
WSDD: HTTP done request sending
WSDD: HTTP fdpoll: {-w} -> {rw}
WSDD: HTTP fdpoll: {rw} -> {r-}
WSDD: HTTP 1448 bytes received
WSDD: HTTP POST http://192.168.1.118:3911/: got response headers (200)
WSDD: HTTP 1448 bytes received
WSDD: HTTP 1448 bytes received
WSDD: HTTP 497 bytes received
WSDD: HTTP done response reception
WSDD: HTTP POST http://192.168.1.118:3911/: 200 OK
WSDD: HTTP POST http://192.168.1.118:3911/: OK
zeroconf: found urn:uuid:f73b42d4-95a7-4cdd-83f0-ea86ef580cd8
zeroconf: method: ZEROCONF_WSD
zeroconf: interface: 2 (enp5s0)
zeroconf: name: -
zeroconf: model: HP LaserJet MFP M139w
zeroconf: addresses:
zeroconf: 192.168.1.118
zeroconf: protocol: WSD
zeroconf: endpoints:
zeroconf: http://192.168.1.118:53048/
zeroconf: device: 0000 (created)
zeroconf: device_list wait: WSDD not finished...
WSDD: 192.168.1.5: done discovery
zeroconf: ZEROCONF_WSD: initial scan finished
zeroconf: device_list wait: OK
zeroconf: zeroconf_device_list_get: building list of devices
zeroconf: HP LaserJet MFP M139w (0): can: WSD, use: WSD
zeroconf: zeroconf_device_list_get: resulting list:
zeroconf: WSD "w0:HP LaserJet MFP M139w"
[devices]
zeroconf: device_list wait: requested
zeroconf: device_list wait: OK
  HP LaserJet MFP M139w = http://192.168.1.118:53048/, WSD
zeroconf: device gone urn:uuid:f73b42d4-95a7-4cdd-83f0-ea86ef580cd8
zeroconf: method: ZEROCONF_WSD
zeroconf: interface: 2 (enp5s0)

Revision history for this message
brian_p (claremont102) said :
#5

I would have expected 'scanimage -L' to have shown a device airscan:e0:..
or airscan:w0:.. . Does xsane give it as a choice? Please provide

  avahi-browse -rt _ipp._tcp
  avahi-browse -rt _uscan._tcp

On Debian avahi-browse is in the avahi-utils package.

'airscan debug' looks OK to me but offers only WSD. The device is recent
one I think, so should also offer escl as a protocol.

Revision history for this message
brian_p (claremont102) said :
#6

Even with the lack of response for further information, the
'airscan-discover -d' output is sufficient to raise an issue at

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

because the device appears to be a very recent one on the
market.

Revision history for this message
James Drabb Jr (astrodrabb) said :
#7

When I run scanimage --help I get:

$ scanimage --help
Usage: scanimage [OPTION]...
    [...] removed help options
Output format is not set, using pnm as a default.
scanimage: open of device hpaio:/net/HP_LaserJet_MFP_M139-M142?ip=192.168.1.118 failed: Error during device I/O
Type ``scanimage --help -d DEVICE'' to get list of all options for DEVICE.

List of available devices:
    airscan:w0:HP LaserJet MFP M139w
    hpaio:/net/HP_LaserJet_MFP_M139-M142?ip=192.168.1.118

Running scanimage -L I get:
$ scanimage -L
device `hpaio:/net/HP_LaserJet_MFP_M139-M142?ip=192.168.1.118' is a Hewlett-Packard HP_LaserJet_MFP_M139-M142 all-in-one

 avahi-browse -rt _ipp._tcp
 avahi-browse -rt _uscan._tcp
Both of these return nothing, they just return immediately.

$ avahi-browse -rvt _ipp._tcp
Server version: avahi 0.8; Host name: yoda.local
E Ifce Prot Name Type Domain
: Cache exhausted
: All for now

$ avahi-browse -rvt _uscan._tcp
Server version: avahi 0.8; Host name: yoda.local
E Ifce Prot Name Type Domain
: Cache exhausted
: All for now

Revision history for this message
James Drabb Jr (astrodrabb) said :
#8

I just installed the latest sane-airscan from git and I edited the config and now it detected my printer. I will try to do some scan testing and update the status.

Revision history for this message
James Drabb Jr (astrodrabb) said :
#9

OK, I've got scanning working but the limit is 300 dpi. I don't know if that is the true printer limit or not. After I compiled the sane-airscan latest git pull I just added this to /etc/sane.d/airscan.conf

[devices]
"HP LaserJet MFP M139w" = http://192.168.1.118:53048/, WSD

[options]
discovery = enable
model = network
protocol = auto
ws-discovery = full

The above got everything working with latest git. For other users with this printer just change the IP address above. Also, changing/uncommenting ws-discovery option and changing from fast to full may help other users.

Revision history for this message
brian_p (claremont102) said :
#10

The only way I can get empty outputs from the avahi-browse
commands is by turning off AirPrint/Bonjour from the Embedded
Web Server (EWS). Yours is at http://192.168.1.118. (I do not
use a firewall).

 > OK, I've got scanning working but the limit is 300 dpi

The WSD protocol is being used. It has been observed that, for
some reason or other, vendors limit what is available to a max
such as 300dpi. There isn't anything sane-airscan can do about
it. It can only work with what the device says it is capable of.

However, the m139-m142 is only a couple of years old and should
be capable of using the eSCL protocol via AirPrint.

Revision history for this message
James Drabb Jr (astrodrabb) said :
#11

When I setup the printer I followed HP guide lines and disabled services I don't use. Seeing AirPrint I thought it was only for Apple and turned it off.

I will play around and see if eSCL protocol via AirPrint works.

Thanks for the help.

Revision history for this message
brian_p (claremont102) said :
#12

AirPrint is a crucial cog in the wheel for printing (present
and future):

  https://wiki.debian.org/CUPSDriverlessPrinting

> I will play around and see if eSCL protocol via AirPrint works.

I would be devastated if it did not :).