alexpevzner / sane-airscan

Scanner Access Now Easy - universal driver for eSCL (Apple AirScan) and WSD
Other
289 stars 44 forks source link

No support for HP LaserJet MFP M139-M142 #247

Closed ghost closed 2 years ago

ghost commented 2 years ago

Is support planned for the mono laser jet scanner in the title? Running scanimage:

$ 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

$ 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

::Debug outuput::

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)
ghost commented 2 years ago

OK, I've got scanning working but the limit is 300 dpi. I don't know if that is the true printer limit or xsane limit. 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.