Get-Output-Device-Attributes is not returning printer-state & printer-state-reasons value.
Describe the bug The Get-Output-Device-Attributes IPP operation fails to return printer-state and printer-state-reasons attributes even when they are present on the output device, causing clients to receive incomplete printer status information.
To Reproduce Steps to reproduce the behavior:
- Launch the IPP server instance
- Register the printer through the Update-Output-Device-Attributes operation
- Use ipptool to retrieve the Output-Device capabilities
- Verify that the response does not include printer-state or printer-state-reasons
{ NAME "Get Output Device Attributes" VERSION 2.0 OPERATION Get-Output-Device-Attributes GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 ATTR naturalLanguage attributes-natural-language en ATTR uri printer-uri $uri ATTR uri output-device-uuid urn:uuid:ae4d22d1-79b7-4e0e-b697-986e0d91b053 ATTR keyword requested-attributes printer-state,printer-state-reasons # printer-description # all,printer-state,printer-state-reasons
STATUS successful-ok
}
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Version of the software Provide the version of ippsample you are testing (f4344173fa97acaf010288c5a3103eac3979e8aa)
System Information:
- OS: [Linux]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here. Added printer-state,printer-state-reasons to below code in ipp_update_output_device_attributes() and it worked. Not sure if it is the right place to add.
"if (strncmp(attrname, "copies", 6) && strncmp(attrname, "document-format", 15) && strncmp(attrname, "finishings", 10) && strncmp(attrname, "media", 5) && strncmp(attrname, "print-", 6) && strncmp(attrname, "sides", 5) && strncmp(attrname, "printer-alert", 13) && strncmp(attrname, "printer-input", 13) && strncmp(attrname, "printer-output", 14) && strncmp(attrname, "printer-resolution", 18) && strncmp(attrname, "printer-state", 13) && strncmp(attrname, "pwg-raster", 10) && strncmp(attrname, "urf-", 4))"
system.conf
System Configuration File
MakeAndModel "HP" "HP Color LaserJet Pro MFP" Listen *:8631 SpoolDir /work/git/ippsample/installhere/automation/output DataDir /work/git/ippsample/installhere/automation/output KeepFiles No LogLevel Debug
conf/print/infra.conf
Infra Configuration File
AuthProxyGroup @system MaxOutputDevices 2 WebForms No MAKE "HP" MODEL "HP Color LaserJet Pro MFP" DeviceURI "ipp://10.224.1.1:8631/ipp/print/infra"
Please attach applicable configuration, log, or print files as well. Github may require you to rename your text files with a ".txt" extension.
So how are you running a proxy to ippserver? Are you including the "printer-state" and "printer-state-reasons" attributes when you send an Update-Output-Device-Attributes request to the infra printer?
FWIW, I added default printer-state/-reasons values (stopped/5 and 'printer-stopped') in case the proxy doesn't include values:
[master bf2907a] Add initial printer device state (Issue #304)
@michaelrsweet Yes printer proxy sends printer-state and printer-state-reason in Update-Output-Device-Attributes. Here is the Wireshark trace. Ippserver is also not returning 'printer-is-accepting-jobs' please have a look at it.
printer-proxy-to-ippserver.zip
After sending couple of job IppServer is hung and does not respond to neither proxy nor to the client. Here are logs.
When I enabled below log it started failing from the first case itself.
CUPS_DEBUG_LEVEL=9 CUPS_DEBUG_FILTER='^(http|_http|ipp|_ipp|cupsDNSSD|cupsDo|cupsGet|cupsSend)' CUPS_DEBUG_LOG = '-'
Without enabling the log, it fails after 3-4 print job. Used both PWG raster and PDF to send the jobs. Please let me know if additional log is needed for this issue.