Description
Is your feature request related to a problem?
Currently, when the application is waiting for user interaction on the printer's physical panel (e.g., selecting a computer destination or confirming a "scan next page" prompt), it uses a hardcoded limit of 50 attempts (approx. 50 seconds).
Waiting for user input (attempt 1 of 50)
Waiting for user input (attempt 2 of 50)
...
This 50-second window is arbitrary. If a user takes longer than 50 seconds to walk to the printer and interact with the screen, the CLI times out and exits, even if the printer is still waiting.
Technical Context
HP printers using the WalkupScanToComp protocol actually communicate their internal timeout via the WalkupScanToCompCaps XML. The field wus:UserActionTimeout specifies the duration (in seconds) that the printer will keep the session active.
Example XML snippet from printer:
<wus:UserActionTimeout>
<dd:ValueFloat>60</dd:ValueFloat>
<dd:Unit>seconds</dd:Unit>
</wus:UserActionTimeout>
Proposed Changes
To make the implementation more robust and user-friendly, the following changes are proposed:
- Capability Detection: Update
WalkupScanToCompCaps to parse the wus:UserActionTimeout field.
- Interface Update: Add
userActionTimeout to the DeviceCapabilities interface so it's available throughout the scan lifecycle.
- Dynamic Wait Logic:
- Update
waitScanRequest (initial connection) to use the printer-specified timeout.
- Update
waitScanNewPageRequest (multi-page scans) to use the same timeout.
- Fallback Mechanism: Continue to use the 50-second default if the printer doesn't provide a specific timeout value.
Expected Outcome
The CLI will remain active as long as the printer is waiting, providing a more reliable experience for users who need more than 50 seconds to interact with their device.
Description
Is your feature request related to a problem?
Currently, when the application is waiting for user interaction on the printer's physical panel (e.g., selecting a computer destination or confirming a "scan next page" prompt), it uses a hardcoded limit of 50 attempts (approx. 50 seconds).
This 50-second window is arbitrary. If a user takes longer than 50 seconds to walk to the printer and interact with the screen, the CLI times out and exits, even if the printer is still waiting.
Technical Context
HP printers using the WalkupScanToComp protocol actually communicate their internal timeout via the
WalkupScanToCompCapsXML. The fieldwus:UserActionTimeoutspecifies the duration (in seconds) that the printer will keep the session active.Example XML snippet from printer:
Proposed Changes
To make the implementation more robust and user-friendly, the following changes are proposed:
WalkupScanToCompCapsto parse thewus:UserActionTimeoutfield.userActionTimeoutto theDeviceCapabilitiesinterface so it's available throughout the scan lifecycle.waitScanRequest(initial connection) to use the printer-specified timeout.waitScanNewPageRequest(multi-page scans) to use the same timeout.Expected Outcome
The CLI will remain active as long as the printer is waiting, providing a more reliable experience for users who need more than 50 seconds to interact with their device.