ESCL: Canon DR-S250N rejects every scan after the first, possibly a missing job DELETE #868
b-o-r-i-s975
started this conversation in
Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
With the ESCL driver and a Canon DR-S250N, only the first scan works. Every scan after that fails with an error about no paper in the feeder, even though paper is loaded. Power cycling the scanner makes exactly one more scan possible, then the same thing happens again.
in ESCL the ADF is allways empty, and the job is there, when I delete the job the ADF scanner works. So I have now a script in background that deletes the jobs. But shouldn't that do your driver? Or is it a Canon bug?
AI helped for this dirty fix for me:
[CmdletBinding()]
param(
[string]$Ip = "SCANNER IP",
[int]$IntervalSec = 2,
[switch]$Quiet
)
$base = "http://$Ip/eSCL"
$dummy = "$base/ScanJobs/00000000-0000-0000-0000-000000000000"
$resets = 0
$lastAdf = ""
function Say { param($m,$c="Gray") if (-not $Quiet) { Write-Host ("{0} {1}" -f (Get-Date -Format "HH:mm:ss"), $m) -ForegroundColor $c } }
Write-Host "ADF Watchdog laeuft gegen $Ip, Intervall $IntervalSec s. Beenden mit Strg C." -ForegroundColor Cyan
Write-Host ""
while ($true) {
try {
[xml]$s = (Invoke-WebRequest -UseBasicParsing -Uri "$base/ScannerStatus" -TimeoutSec 10).Content
}
Digging into the protocol, it looks like NAPS2 never sends DELETE on the job URI after a scan job completes, and this device reacts badly to that.
Environment
NAPS2 8.3.2+70662a3160986975fb3abb3cd67a0caaa6f63290 (Windows installer)
Windows 11
Driver: ESCL
Device: Canon DR-S250N, pwg:Version 2.9, mopria-certified-scan 1.4
Connection: plain HTTP on port 80, no TLS
Steps to reproduce
Power cycle the scanner and load paper into the ADF.
Scan once with NAPS2 using the ESCL driver. This succeeds.
Leave paper in the feeder and scan again.
The second scan fails.
What the device reports
After step 2, with paper physically loaded in the feeder:
xml
scan:ScannerStatus
pwg:Version2.0</pwg:Version>
pwg:StateIdle</pwg:State>
scan:AdfStateScannerAdfEmpty</scan:AdfState>
scan:Jobs
scan:JobInfo
pwg:JobUri/eSCL/ScanJobs/f7a95821-717a-4ac9-bf2c-26b6e076f015</pwg:JobUri>
pwg:JobUuidf7a95821-717a-4ac9-bf2c-26b6e076f015</pwg:JobUuid>
scan:Age3</scan:Age>
pwg:ImagesCompleted1</pwg:ImagesCompleted>
pwg:ImagesToTransfer0</pwg:ImagesToTransfer>
pwg:JobStateComplete</pwg:JobState>
pwg:JobStateReasons
pwg:JobStateReasonJobCompletedSuccessfully</pwg:JobStateReason>
</pwg:JobStateReasons>
</scan:JobInfo>
</scan:Jobs>
</scan:ScannerStatus>
AdfState is stuck at ScannerAdfEmpty regardless of what is in the feeder, and the completed job from the previous scan is still listed.
In this state, POST /eSCL/ScanJobs returns HTTP 503 Service Unavailable, using settings that are valid according to the device's own ScannerCapabilities (InputSource Feeder, Grayscale8, 300 dpi, image/jpeg).
What I tested
Repeated GET does not help. Ten consecutive GET /eSCL/ScannerStatus requests all returned ScannerAdfEmpty:
Query 1 : ScannerAdfEmpty
Query 2 : ScannerAdfEmpty
Query 3 : ScannerAdfEmpty
Query 4 : ScannerAdfEmpty
Query 5 : ScannerAdfEmpty
A single DELETE fixes it immediately, even when it returns 404.
AdfState before : ScannerAdfEmpty
DELETE /eSCL/ScanJobs/2dd60009-b203-48c0-9a34-1b19847f545c -> 404 Not Found
AdfState after : ScannerAdfLoaded
About one second passed between the two status queries, so this is not a timing or debounce effect. A DELETE on a nonexistent UUID such as 00000000-0000-0000-0000-000000000000 has the same effect.
All reactions