This is the BJNP protocol backend for CUPS
It works with cups 1.2 - 1.7 (verified)
CUPS-BJNP can be compiled standalone (when the cups-devel package or your OS
equivalent is installed, e.g. for Fedora install cups-devel).
Cups-bjnp is included in a number of distributions so in most cases it is not
necessary to compile it yourself.
Compiling CUPS-BJNP is as simple as:
In most cases configure will find the backend directory where cups stores its
backends without help. If it does not, add the --with-cupsbackenddir=xxx
option to the configure comand line to point configure in the right direction.
Cups-bjnp works over IPv4 and IPv6 (since version 1.1)
For a first test type: ./bjnp
This should return the printers uri assuming that you are on the same subnet,
the printer is on, and there is no firewall blocking tcp/udp port 8611
See notes on firewall setup below.
For my MP970 bjnp returns:
[louis@travel backend]$ ./bjnp
network bjnp://printer-1.pheasant:0 "Canon MP970 series" "bjnp printer-1.pheasant"
PRINTER;DES:Canon MP970 series;VER:1.110;STA:10;FSI:03;HRI:OTH;MSI:DAT,E3;"
if this works, install the binary, as root type: make install.
if you want to do this manually: copy (as root) bjnp into your cups backend
configure cups through the web frontend (https://localhost:631), e.g. try
tab <administration> <find new printers>
Ink level reporting
Cups-bjnp reports ink levels to CUPS during printing. Many GUI tools like the Gnome
printer settings tools can show the current ink-levels and report warnings whwn ink
levels get low.
If you have problems, you may want to set the debugging level.
To debug printer detection you can set the environment variable BJNP_DEBUG
export BJNP_DEBUG_LEVEL=DEBUG2 (for sh or bash) or
setenv BJNP_DEBUG_LEVEL DEBUG2 (for csh or tcsh)
The filename can be set by setting BJNP_DEBUG_FILE in similar way.
To debug printing, you can add the debug level as part of the printer URI:
DeviceURI bjnp://printer-1.pheasant:8611/?debuglevel=DEBUG2 or
bnp:///printer-1.pheasant:8611/?debuglevel=DEBUG2+debugfile=./log to log to
the file ./log. Normally this is not required as a logfile in the cups
log directory is used when no name is defined.
In both cases the debuglevel is set to one of the cups debuglevels (see cups
Debug information will be sent to the bjnp_log in your cups logging directory
(e.g. /var/log/cups). Debug files will become big, so the file is truncated
at the start of each printjob.
If for whatever reason, opening of the logfile causes problems, you can force
all debug output to be sent to the cups error_log by adding _toCups to the
Cups-bjnp communicates with port 8611 on the printer. So you will have to allow
traffic TO port 8611 for printing.
Printer detection is slightly more complicated. (cups-bjnp sends a broadcast on
all subnets it can find. The broadast is sent FROM port 8611 to port 8611. The
outgoing packets will be allowed by the rule above. Responses from the printer
are sent back to the computer TO port 8611. Connection tracking however does not
see a match. You will therefore have to allow packets received TO port 8611 as well.