📜 ⬆️ ⬇️

Canon Laser Shot LBP-1120 printer and Raspberry Pi-based print server

I got an old Canon Laser Shot LBP-1120 printer for free. They gave it to me with the explanation “something cannot be connected, probably the drivers are buggy”. I tried to connect it to my Windows 7 x64 computer - Windows Update was unable to pull up the drivers. I went to the printer manufacturer's website - there are drivers for this model starting from Windows XP, but only for 32-bit versions. I tried many drivers from other Canon printers, universal drivers from the “Generic Drivers” section, HP LaserJet 2200, 2300 drivers - in all cases the printer does not respond to computer commands.

Studying the manuals and scraps of information on the forums gave the following: this is a GDI printer or winprinter, where all printing calculations are performed by the driver itself on the computer’s processor, thereby making a brainless printer cheaper in production (no processor and large memory) . Model LBP-1120 is a clone of Hewlett-Packard (HP) LaserJet 1100 (only it does not have brains, unlike the source code), and the rest of the models of the Canon Laser Shot family, which was positioned by the manufacturer as “home printers application ”. Why Canon decided that at home there can only be a 32-bit version of Windows - I don’t know. Personally, I have 3 Windows computers at home and all have a 64-bit version and at least 4GB of RAM.

To fence a virtual machine from a 32-bit Windows or even to do a separate print server under it, I considered it inappropriate, although on the Internet all discussions of this issue that I found end with just one of these two options. “Tales” about the fact that some driver from another manufacturer may be rejected immediately, the search for an “alternative” 64-bit driver leads to pages located in “dark doorways”. One such downloaded for the sake of interest, or, more precisely, to confirm the well-known truth about free cheese - it turned out to be a “worm”.

So we will build a print server based on the existing and used for other purposes Raspberry Pi ver 1 rev B, running under the control of Raspbian (Debian 7 Wheezy clone). Fortunately, a driver for Linux 32/64 bits is available on the printer manufacturer’s website, even though it’s sneezed in the English-speaking segment of the Internet for its slowness and the consumption of resources. Having installed the printer driver and CUPS (Common UNIX Printing System) on Raspberry Pi, I will get a full-featured print server running Linux, to which other clients will be able to connect as a network printer using some kind of “universal” driver.
')
There are 5 driver versions available for download (1.6, 1.8, 2.0, 2.2, 2.7 - all updated in the second half of July 2015, the differences between them are not known). The downloaded archive contains compiled deb and rpm packages for i386 architecture in 32-bit and 64-bit versions and source files. Compiled packages are not suitable for Raspberry, running on the architecture of ARMv6L. I also failed to compile the source files of versions 1.6 and 2.7 for two reasons: the driver is “sharpened” for Intel commands and requires the presence of a graphical shell (by default GTK2.0), and on my Raspberry they are not essential. But there is an alternative freeware driver, written in 2004 by an enthusiast using reverse engineering of a driver data exchange protocol for Windows with a printer. You can download it from the author’s page here www.boichat.ch/nicolas/capt . Currently, there is no longer any driver support from the author. He also wrote a driver for the Canon LBP-660 / LBP-460 printers.

Moving from “a lot of text” directly to installing the printer driver and CUPS:

  1. We install CUPS according to recommendations from the page wiki.debian.org/ru/SystemPrinting up to the stage “Adding a Printer” - the driver is not yet worth it :)


  2. To ease the difficulty of administering CUPS, we add a user to the group of print administrators who will be the administrator:

    # usermod -a -G lpadmin MY_USER 

  3. Compile and install the driver: unpack the archive with the driver files in the / usr / src / folder and execute the commands:

     $ cd /usr/src/capt-0.1 # make # make install # modprobe usblp # chmod a+rw /dev/usb/lp0 

    Overloading CUPS:

     # /etc/init.d/cups restart 

  4. We return to the instruction from item 1 and add the printer; It is necessary to add the printer driver “Canon Laser Shot LBP-810”; Yes, yes - they are almost like twins, differing only in the presence of duplex in the LBP-810; Naturally, the whole procedure in this material is applicable for LBP-810;



  5. DeviceURI, which is assigned to the default printer, does not suit us - the output should be anywhere, preferably “into the void”, but not in USB; Therefore, you need to go to the CUPS printer configuration file (/etc/cups/printers.conf) and make the following changes:

    Replace line:

     DeviceURI usb://Canon/LASER%20SHOT%20LBP-1120?serial=0158030E 

    On line:

     DeviceURI serial:/dev/null 

    Now print jobs will be output to the missing COM port;

  6. Overloading CUPS:

     # /etc/init.d/cups restart 

    In the properties of the printer, the "Connection" parameter should look like in the picture:


  7. Be sure in the printer settings reset the status before each job; Otherwise, it will print the first job, and subsequent ones will go only after the printer is turned off / on;


  8. Go to the CUPS printer control panel and in the installed printer send the CUPS test page to print; Do not worry: it will be printed for a surprisingly long time - 3 ... 6 minutes pass before the start of the withdrawal; The printer test page (4th Maintenance menu item) is useless to print - the printer still doesn’t have “brains” and the driver’s developer hasn’t provided it (as was done in the original Windows driver), so the task will immediately go to the “Done” status and all :)


  9. On Windows, go to the printer control panel and add a network printer. The connection string can be taken from the address bar of the browser in section 7, replacing the protocol from https to http; The printer driver can choose almost any of the supported PS (PostScript); I got a great driver from HP LaserJet 2300; PCL5 / 6 printer drivers will not work.


About the speed of this solution: on a “heated” printer, a print job for a 2-page document containing only text and a table from MS Word 2010 takes about 5 ... 10 seconds. The devices are interconnected via a Wi-Fi router (laptop “over the air” and Raspberry via Ethernet).

Naturally, with this “technology” this printer can also be used in MacOs (there are no drivers for it from the manufacturer at all), and in any other OS that supports printing over the network.
Posted 08/06/2017: From Android devices it is fashionable to use this print server using a free program from the play market CUPS Printing

It was not possible “to the forehead” to print a text file from the console - “printer or class is not registered”. The reasons and ways to eliminate this problem have not yet understood. Yes, and I do not need to print from the console.

 $ lp -d printers.conf lp: The printer or class does not exist. 

Here is the way how to install the native driver on the i386 platform running Ubuntu (in Ukrainian).

On the support site Arclinux met the statement that you can work with the Canon Laser Shot LBP-1120 through the Xerox Phaser 6000B printer driver. The Xerox site has drivers for it for 64-bit Windows, but has not tested the validity of this statement.

Ps. I was surprised to learn that Apple is developing CUPS :)

Source: https://habr.com/ru/post/314962/


All Articles