Limych / pi-capt

Canon LBP-* driver for Raspberry PI for CUPS
9 stars 3 forks source link

Canon LBP-6020 #4

Open frantimon opened 1 year ago

frantimon commented 1 year ago

Good day sir and may I say I highly admire the amount of dedication you put into making this project work.

I have a Canon LBP-6020 printer that I'm trying to make to work on Raspberry PI 3 A+. I've tried installing versions of 32- and 64-bit Raspbian, as well as 64-bit Ubuntu server and trying to get the printer running using Canon drivers available here, but without any luck.

In the meantime, I encountered your project and was wondering if we could maybe share knowledge and if you would help me adapt your project to add support for the aforementioned printer.

Best regards and keep up the good work!

ValdikSS commented 7 months ago

This exact model uses not only capt, but also a opvp GhostScript i386 driver. It's rather tricky to get it run with the official driver. You need:

  1. Setup cndrvcups-capt i386 package and all the needed dependencies, including qemu-i386-userspace or box86 for emulation
  2. Configure ccpd, configure printer to use ccp://localhost:59687 URI (see here for example)
  3. Recompile and/or repackage ghostscript i386 binary, renaming the binaries to unique name (it's not possible to just install i386 package version as both of them provide /usr/bin/gs and other binaries, you need to rename it to something like /usr/bin/gs-i386)
  4. Make a wrapper script for /usr/bin/gs to allow native and i386 version auto-detection. Something like this (I run it under box86, not qemu-i386, for performance reasons):
#!/bin/bash

echo "$@" | grep -q '=opvp'
ERR=$?

if [ $ERR -eq 0 ]; then
    BOX86_NOBANNER=1 BOX86_EMULATED_LIBS=liblcms2.so.2:libjpeg.so.62:libfreetype.so.6 exec box86 /usr/bin/gs-i386 -dNumRenderingThreads=2 -dMaxBitmap=70m "$@"
fi

exec /usr/bin/gs-orig -dNumRenderingThreads=2 -dMaxBitmap=70m "$@"

However the encoded output is very similar to LBP6018, which is supported by open-source https://github.com/mounaiban/captdriver. Try to use captdriver with LBP3010/LBP3018/LBP3050 PPD file, it might just work.

This printer is supported by UoWPrint by the way ;)