Backend for Canon network protocol

Louis Lagendijk louis_lagendijk at
Mon May 5 01:25:40 PDT 2008

I have made the code I developed so far available on 
Modifications can be found in runloop.c and bjnp.c which is for now a
copy of socket.c with small modifications. This code is just a
See all the udp command stuff in bjnp-io.c for all the canon specific
I will loop at the port monitor stuff later, I had no idea on what that
is  (this was my first encouter with cups programming , so please
forgive me my ignorance).

kind regards, Louis

On Sat, 2008-05-03 at 17:02 -0700, Michael Sweet wrote:
> Louis Lagendijk wrote:
> > A month ago I bought a Canon multi functional with network
> > capabilities. This happens to use a proprietary protocol (BJNP), for
> > which I could not find any documentation or drivers. I have now
> > reverse engineered the protocol and written a first draft of a Cups
> > backend. This is piggy backed on the existing socket backend. The
> > changes are pretty small. Would there be interest in including this
> > backend in CUPS?
> Possibly, just depends on how extensive the changes are.
>  > If so, I can cleanup the code and add missing bits
> > and pieces. If not, would it be ok to package my code with the
> > relevant parts of Cups (mainly a copy of socket.c and small
> > modifications to runloop.c) and release it under GPL?
> Sure, that's in line with both the spirit and "the law" of the
> GPL.
> > For those interested: I have made some changes to runloop.c that
> > allow me to use my own write functions that do the Canon bjnp magic.
> > I have for now copied socket.c, but could easily make it double as
> > both socket and bjnp driver. best regards, Louis
> If it is just a matter of providing some encoding on top of a
> regular socket connection, it might make sense to write a port
> monitor instead - then any Canon driver PPD can use:
>      *cupsPortMonitor socket/BJNP: "bjnp"
> to tell CUPS to use the port monitor with the socket backend.

More information about the cups mailing list