Signaling printer status from a filter

Josh Mathis josh.m at swecoinus.com
Wed Aug 16 08:47:20 PDT 2006


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?

I am on Kubuntu 6.06.1 LTS, kernel 2.6.15-26 and CUPS 1.2.2

Thank you!

Josh Mathis
josh.m at swecoinus.com

Michael Sweet wrote:
> Josh Mathis wrote:
>> Ok, that helps. Now the million-dollar question - for new development, 
>> would it make sense to use simple backchannel read/write in the main 
>> rendering filter (rastertoxxx), or would it be more forward-thinking 
>> to move all status stuff into the port monitor right now, anticipating 
>> a periodic update module for status monitoring?
> 
> That's really your call - if the logic can be easily separated (i.e.
> no need to query the printer for capabilities from your driver), or
> if you need to do things differently for different types of
> connections, I'd go the port monitor route.
> 




More information about the cups-devel mailing list