LeoKlaus / OpenAirScan

A simple GUI example of how SwiftESCL could be used.
https://wehrfritz.me/openairscan/
MIT License
6 stars 0 forks source link

HP m130 can not work #3

Closed laipochen closed 1 year ago

laipochen commented 1 year ago

I can see the device in the search list, but when I click on it, I can't adjust all the settings. I think maybe the APP didn't ask eSCL URI 'ScannerCapabilities'?

LeoKlaus commented 1 year ago

Hey laipochen, thank you for creating an issue for this!

The ScannerCapabilities URI is checked to determine available features, so you missing some of them is odd. It would be great if you could provide me with some more information:

laipochen commented 1 year ago

Hi LeoKlaus, thank you for your reply. When I use WireShark to capture packet in MACOS (use "Printer and Scanner" to open Scanner), I can see MACOS to query the URI 'ScannerCapabilities' and 'ScannerStatus'. But I can't capture packet in my iPhone so I'm not sure which ones are not given. My device not enable "https" so I just try "http". I can get the XML response through the browser. Below is the XML response from my device.

`

2.5 HP LaserJet MFP M130fw ******** 576 2550 576 3508 1 RGB24 Grayscale8 Photo Text TextAndPhoto image/jpeg application/pdf image/jpeg application/pdf 75 75 200 200 300 300 600 600 1200 1200 sRGB Document Photo Preview TextAndGraphic 1200 1200 576 2550 576 4500 1 RGB24 Grayscale8 Photo Text TextAndPhoto image/jpeg application/pdf image/jpeg application/pdf 75 75 200 200 300 300 sRGB Document Photo Preview TextAndGraphic 300 300 50 DetectPaperLoaded SelectSinglePage -127 127 0 1 `
LeoKlaus commented 1 year ago

Thank you for the quick response. The XML looks fine and I don't see why the app would fail to parse it.

My device not enable "https" so I just try "http".

That is curious. I always assumed eSCL works via https only. Based on that assumption, OpenAirScan always uses https for requests.

Are you able to perform scans at all?

I'll try to fix this later today and report back to you.

laipochen commented 1 year ago

After I enable the "https", OpenAirScan APP can work find! I have do some research and I found the Mopria Scan is used same eSCL in Android. And I found a specification in which the description of MDNS has instructions for encrypted connections. https://mopria.org/mopria-escl-specification
PTR record _uscan._tcp.local is for http , PTR record _uscans._tcp.local is for https I suggest that you can use this to make a judgment whether to use https or http.

LeoKlaus commented 1 year ago

Hi, sorry for the late response, I've got my hands full with another project right now and didn't find time to continue work on this yet.

Thank you for all the information, it's really helpful and gave me a much better insight in how eSCL works. I hope to implement a better handling for connections in the near future.

LeoKlaus commented 1 year ago

I've implemented a solution to this and will submit it to Apple right now. I expect the update to release in the coming 1-4 days.

laipochen commented 1 year ago

OK, I got it, thanks a lot!

LeoKlaus commented 1 year ago

Thank you again for the bug report and all the information.