Signaling printer status from a filter

Josh Mathis josh.m at swecoinus.com
Wed Aug 16 11:21:59 PDT 2006


Ok, I re-ran my filter and monitored the error_log. I was incorrect 
before... the fputs("ERROR:... statement does work. "Paper jam!" does 
show up in the error_log, but the printer state does not change. After 
running the filter, I ran the ipptest. The full output is attached.

-Josh

Michael Sweet wrote:
> Josh Mathis wrote:
>> I have returned to my CUPS development and am trying to get printer 
>> status working. My printer state settings do not seem to be working. 
>> My filter is receiving backchannel data correctly, but when I attempt 
>> to signal printer-state-reasons, nothing happens.
>>
>> In my filter code, I check for a given status. For testing purposes, 
>> regardless of the status, I am trying to signal a paper jam event:
>>
>> fputs("*** Paper jam ***\n", stderr);
>> fputs("STATE: +media-jam-error\n", stderr);
>> fputs("ERROR: Paper jam!\n", stderr);
>>
>> In my error_log, the first line shows up correctly, so I know that 
>> this portion of the code has been reached. But nothing appears in 
>> error_log for the next two statements, nor does the printer-state 
>> change either in the web interface or in printers.conf. It just shows 
>> idle for the state.
>>
>> Are there any other steps other than the STATE message to signal a 
>> paper jam or other status?
> 
> Nope, that's it and your code should work.
> 
> What happens if you use the ipptest program in the CUPS sources:
> 
>     cd test
>     ./ipptest -v ipp://localhost/printers/printername 
> get-printer-attributes.test
> 

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: printer-attributes.dump.txt
URL: <https://lists.cups.org/pipermail/cups/attachments/20060816/253cc1ed/attachment.txt>


More information about the cups mailing list