naps2 icon indicating copy to clipboard operation
naps2 copied to clipboard

eSCL not working with HP LaserJet Color Pro MFP M570dn

Open kirk56k opened this issue 6 months ago • 7 comments

Describe the bug I have been using eSCL both in the SDK and on the official app to connect to a few different scanner devices that support it around here. One particular problem child, however, has been this particular HP MFP.

To Reproduce Steps to reproduce the behavior:

  1. Edit a scan profile
  2. Select choose device
  3. This HP does not appear
  4. Manually adding the IP produces an error

Expected behavior It should see the scanner and scan appropriatly.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 8.2.0

Additional context If you manually add the IP, you get the error listed below. In addition I have attached a few files to help out. The debuglog is the log from NAPS2 Desktop application. The HP479FDW-ESCP.txt is a curl output for the ScannerCapabilities endpoint for a scanner that works fine (its discovered and scanning works fine). The HP570DN-ESCP file is the curl output for the same endpoint on the non-functional HP 570 printer. Any help on getting this to work would be greatly appreciated. Thanks!

HP479FDW-ESCP.txt HP570DN-ESCP.txt debuglog.txt

System.InvalidOperationException: Unexpected root element: {http://schemas.hp.com/imaging/escl/2011/02/08}ScannerCapabilities
   at EsclCapabilities NAPS2.Escl.Client.CapabilitiesParser.Parse(XDocument doc)
   at async Task<EsclCapabilities> NAPS2.Escl.Client.EsclClient.GetCapabilities()
   at async bool NAPS2.EtoForms.Ui.ManualIpForm.Connect()+(?) => { }

kirk56k avatar Jun 30 '25 19:06 kirk56k

Any chance this might get fixed? If it's not high on your priority, I completely understand. If that's the case, I may ask my boss if I can put it on the docket to fix. Do you accept pull requests?

kirk56k avatar Aug 11 '25 19:08 kirk56k

I have a fix in the pipe, just been a bit too busy to get a new version out. Soon

cyanfish avatar Aug 11 '25 19:08 cyanfish

Awesome, thanks very much. My users will be elated! :)

kirk56k avatar Aug 11 '25 19:08 kirk56k

This should be fixed in 8.2.1.

cyanfish avatar Aug 31 '25 05:08 cyanfish

I can't re-open the issue however, it does not appear to be solved as of yet. Please reference #705 for details. Thanks!

kirk56k avatar Oct 14 '25 20:10 kirk56k

Can you attach debug logs for NAPS2?

cyanfish avatar Oct 14 '25 20:10 cyanfish

So here is the debug log. I didn't post it originally as it didn't look like it contained anything useful. This is a fresh debug log. The actions I took in the UI, were these: Select new scanner, allow it 30 seconds to scan for devices. Select Manual IP, entered the printers IP and Port 80 without HTTPS, hit connect (nothing happened), entered 443 with HTTPS selected, click connect (nothing happened), then entered 443 without HTTPS and click connect (connection refused, as expected). So in the debug log, the error at the end was from that attempt to connect to the HTTPS port without HTTPS selected. During each attempt to click connect (with no result in the UI), I noted that Wireshark captured outgoing and returning traffic. On the non-HTTPS call, I could clearly see the XML returned as expected from the printer. I did not include a new capture file as the results looked identical to the previous one I posted on #705. Please let me know if theirs anything else useful I can provide or any other diagnostics I can do that would help. Thanks!

debuglog.txt

kirk56k avatar Oct 16 '25 13:10 kirk56k