CANON LBP-800 Linux driver

By Massimo Del Fedele

Summary

Canon CAPT printers are GDI printers (or winprinters), using a proprietary and undocumented protocol, that I reverse engineered (see Tools and Techniques).

You can download here a driver for Linux.

The driver works (for the moment) ONLY for parallel port printers. It may work also for other CAPT printers. It is NOT for USB printers.

This driver should support both A4 and Letter sized paper, but I only tested it with A4 sized paper.

Download

Version

Date

File

Notes

0.1.1

September 2007

lbp800-0.1.1.tar.gz


0.1.2

January 2008

lbp800-0.1.2.tar.gz

Small update on ubuntu gutsy

Install notes

Follow the instructions presented on the README file in the package.

Supported printers and kernel versions

This driver has been reported to work with these kernel versions and distributions:

This driver works with these printers:

It should work with other CAPT printers with parallel interface, but it needs to be confirmed.

Unsupported kernel versions

Tools and Techniques

Here is the way I followed to write this driver:



Source Code

The source code is GPL'ed and quite extensively commented; the coding style will maybe shock Linux programmers, but I'm used to do it like that since years. Feel free to reformat it with Astyle !

Comments in source code are in Italian language (sorry, too lazy to translate !)

Makefile is quite simple, no autoconf-automake stuffs, I don't know (yet) how to do; it should work on many distro's, but is tested only on Ubuntu Feisty. If somebody has knowledge of packaging (RPM, DEB) and like to provide them, I'll be glad to add them to downloads.

In source folder are also 2 codeblocks projects, one for filter and another for backend. Codeblocks is a really promising cross platform IDE; if you prefere you can build the driver with it.

See TODO list for missing features; the most important is maybe detection of hardware failures (paper jam, paper out, ...), but I couldn't manage to have communication from Backend to Filter in cups... nor to have some sort of error messages in the printer panel. Again, if somebody knows how to do it (I lost 2 nights on it....), I'll be glad to update the sourcecode.

SPECS file contains some details of protocol; basically are the same of LBP-810, with some discovery added.
Parallel port encoding is an interesting "how to embed cheaply a clock on an already poor protocol" thing; basically is a double XOR between current data, previous data and a fixed value (0x43). That took me one week to decode.... And showed me how NOT to do a printer protocol. I think that sending some 30 KByte chunks of data on a parallel cable with no handshaking at all, and no checksum/parity at all, is simply the best way to loose data. If you don't believe it, try with a 3 meters long parallel cable.... Maybe your printout will win some abstract-art-image contest.
As a side effect, the protocol (as is) DON'T allow a 0x43 byte to be sent, as it would result on 2 identical bytes output to printer, loosing the clock. I guess Canon has some code seqence to send 0x43 bytes in some crazy fashion, but I (being again too lazy) simply changed ALL 0x43 bytes in 0x63 before sending to printer. That is, an extra pixel, but it shouldn't be noticeable.

Thanks


© Massimo Del Fedele, Verona, September 2007