php - What is wrong with my eSCL / Airscan exchange?

I am working on making a bridge from Windows TWAIN (as a Server) to Android, Linux and MacOS clients (over the eSCL protocol), for scanning from Windows only document scanners. Since eSCL is web based this is PHP that runs on a php web server.
I have been working at this for some time and am working with the Mopria for Android client which has been the most difficult to get compatibility with.
I have a valid Bonjour / Avahi announcement
I have the following (listed below) that match the characteristics in the Bonjour/Avahi advertisement
I have the Mopria Spec which you can download here https://mopria.org/spec-download
Here is the successful part of the exchange so far
GET ScannerCapabilities
OK
GET ScannerStatus
OK
POST scansettings (example xml follows)
<?xml version="1.0" encoding="UTF-8"?>
<scan:ScanSettings xmlns:scan="http://schemas.hp.com/imaging/escl/2011/05/03" xmlns:pwg="http://www.pwg.org/schemas/2010/12/sm">
<pwg:Version>2.6</pwg:Version>
<pwg:ScanRegions>
<pwg:ScanRegion>
<pwg:Height>3300</pwg:Height>
<pwg:ContentRegionUnits>escl:ThreeHundredthsOfInches</pwg:ContentRegionUnits>
<pwg:Width>2550</pwg:Width>
<pwg:XOffset>0</pwg:XOffset>
<pwg:YOffset>0</pwg:YOffset>
</pwg:ScanRegion>
</pwg:ScanRegions>
<scan:DocumentFormatExt>image/jpeg</scan:DocumentFormatExt>
<pwg:InputSource>Platen</pwg:InputSource>
<scan:XResolution>75</scan:XResolution>
<scan:YResolution>75</scan:YResolution>
<scan:ColorMode>Grayscale8</scan:ColorMode>
<scan:Duplex>false</scan:Duplex>
</scan:ScanSettings>
(after silently receiving POST and generating completed scan on server)
This is where the problem potentially begins, between here and the end of this exchange.
I see the reply below in CURL which contains the correct URL as indicated by the eSCL Spec , without the /NextDocument at the end. The Mopria Android client never requests the document.
< HTTP/1.1 201 Created
< Host: 192.168.0.99:8000
< Date: Mon, 12 Jul 2021 01:27:19 GMT
< Connection: close
< X-Powered-By: PHP/8.0.8
< Location: http://DESKTOP-T3RKPPL.local:8000/eSCL/ScanJobs/5401b4a9-a22f-46c5-9b01-f3766a7f6f4e
< Expires: Sat, 26 Jul 1997 05:00:00 GMT
< Last-Modified: Mon, 12 Jul 2021 01:26:48 GMT
< Cache-Control: no-store, no-cache, must-revalidate
< Cache-Control: post-check=0, pre-check=0
< Pragma: no-cache
< Content-type: text/html; charset=UTF-8
<
* Closing connection 0
ScannerStatus is checked again and I am sending it something like this currently (although have tested many variations here):
<scan:ScannerStatus xmlns:scan="http://schemas.hp.com/imaging/escl/2011/05/03" xmlns:pwg="http://www.pwg.org/schemas/2010/12/sm">
<pwg:Version>2.5</pwg:Version>
<pwg:State>Processing</pwg:State>
<pwg:AdfState>ScannerAdfEmpty</pwg:AdfState>
<scan:Jobs>
<scan:JobInfo>
<pwg:JobUri>/eSCL/ScanJobs/5401b4a9-a22f-46c5-9b01-f3766a7f6f4e</pwg:JobUri>
<scan:Age>30</scan:Age>
<pwg:ImagesCompleted>1</pwg:ImagesCompleted>
<pwg:ImagesToTransfer>1</pwg:ImagesToTransfer>
<pwg:JobState>Processing</pwg:JobState>
<pwg:JobStateReasons>
<pwg:JobStateReason>JobScanning</pwg:JobStateReason>
</pwg:JobStateReasons>
</scan:JobInfo>
</scan:Jobs>
</scan:ScannerStatus>
AT some point towards the end of this exchange the Mopria Android client says "Scan Failed" although the scan is really on the server.
Does anyone know enough about this to help debug it?
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: installation failed, reverting ./composer.json and ./composer.lock to their original content.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.