Signaling printer status from a filter

Michael Sweet mike at easysw.com
Wed Aug 16 10:07:57 PDT 2006


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

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups-devel mailing list