[cups.general] printer feedback in raw mode

Johannes Meixner jsmeix at suse.de
Wed Nov 24 01:39:28 PST 2004


Hello,

On Nov 23 06:41 th.breyer at web.de wrote (shortened):
> I am using cups-1.1.20 on a embedded system (PPC) in raw mode on a serial printer.
> Now I have some special esc/pos commands which return a byte sequence
> or a status byte on the serial line (e.g. sending a $17 returns two bytes
> one can read the version of the printer firmware).
> How can I transfer these answers of the printer to the application or the shell?

The CUPS backend is responsible to send the data to the printer.
I.e. it is the backend (and only the backend) which "talks" directly
to the printer.
Provided you could establish a bidirectional communication with your
printer, you could make your own backend which sends query commands
to the printer and receives the printer's response.
When your backend outputs messages to stderr which have appropriate
prefixes (e.g. "INFO:" or "ERROR:") then such messages are shown
for example by the "lpstat -p" command or in the CUPS web-frontend.
See the "CUPS Software Programmers Manual"
sections "Writing Filters", "Sending Messages to the User"
and "Writing Backends".


Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5      Mail: jsmeix at suse.de
90409 Nuernberg, Germany                    WWW: http://www.suse.de/





More information about the cups mailing list