Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LBP3000 support broken #15

Open
KP1533TM2 opened this issue Feb 19, 2017 · 8 comments
Open

LBP3000 support broken #15

KP1533TM2 opened this issue Feb 19, 2017 · 8 comments

Comments

@KP1533TM2
Copy link
Contributor

I recently updated CUPS on my printserver, and my LBP3000 stopped working. I grabbed a fresh copy of the source, compiled and installed it to find out that my printer still won't work - according to CUPS debug logs, it just goes into some kind of neverending status poll loop right from the start. It seems that LBP3010 support broke my LBP3000 support.
I then tried to recompile my own 'known good' version of this driver from my repository, and it worked just like when I commited it here almost a year ago.
LBP3000 uses most functions that make LBP2900 tick, and some of them have changed since the inclusion of LBP3010 support. I'm not even sure if LBP2900 still works.

I'll use my own version of this driver for myself now. Since those Canons all use the same protocol, sharing functions between the models is natural, I guess. But the problem, obviously, is that their protocols differ in minor details here and there. So, I think, we need a way to organize different models into different sources (if there isn't one already), so expanding on already implemented protocol won't break support of other models.

In the meantime I'll just try to investigate what changed since then, and maybe try to figure out how to make, say, independent prn_lbp3000.c so it won't clash with everyone else's efforts...

@agalakhov
Copy link
Owner

Hi,

thank you for your help. It seems that many printers are just identical in their protocol, i.e. 3000 seems to be the same as 2900, while 3010 differs. Different families of the printers are already in different sources, but it is not yet known which printer belongs to which family, except for 2900-3000.

Regards,
Alexey

@mounaiban
Copy link
Contributor

mounaiban commented Mar 18, 2020

I have managed to get an LBP 3000 to work on 94b2bf2 on Ubuntu 18.04.1, specifically Xubuntu.
The printer was not connected before the driver was compiled and installed. My CUPS version was 2.2.7.

Here is a summary of what I did; those who have wandered here from Google might find this helpful, assuming you are reading this not too long after I have posted this...

UPDATE: this part has changed since the original comment, here is what I do now instead:

aclocal
autoconf
automake --add-missing
./configure
make
sudo make install
cp -p /usr/local/bin/rastertocapt $(cups-config --serverbin)/filter
cp -p $(cups-config --datadir)/usb/org.cups.usb-quirks ~/org.cups.usb-quirks-backup

Then add the following lines to the file at $(cups-config --datadir)/usb/org.cups.usb-quirks:

# Canon Inc, LBP 3000
0x04a9 0x1337 no-reattach

NOTE: please change the 0x1337 above to match the product ID of your device. Run lsusb to reveal the product id.

Next, I set up the printer in Xfce's Printers control panel (Xfce Menu->System->Printers). At this point I plugged in the printer, and did the usual:

  1. Clicked on Add
  2. Waited for the printer to show up, selected it when it appeared
  3. Picked Provide PPD File on the Choose Driver screen, and selected the Canon-LBP-2900.PPD file when prompted.
  4. After clicking through the remaining steps, the printer could begin accepting jobs 😎

The LBP 3000 generally works, and multi-page documents from LibreOffice and PDFs opened up in Firefox (pdf.js) could print, and they look accurate enough for me.

@mounaiban
Copy link
Contributor

mounaiban commented Mar 19, 2020

Today I tried building and installing 94b2bf2 on Fedora 32 Beta (CUPS 2.3.1), Ubuntu Desktop 19.10 (CUPS 2.2.12) and Debian 10.3 (CUPS 2.2.10). The compilation was successful, but with the LBP 3000 the driver hangs at the Rendering Completed stage and doesn't print. 😕

Update: CentOS 8.1.1911 (CUPS 2.2.6) has been tested too, with the same result: the build and installation succeeds, but the printer doesn't respond.

I am suspecting a regression somewhere causing rastertocapt to stop working with later versions of CUPS.

@agalakhov
Copy link
Owner

It may be also regression while trying to support other printers. Please test with older Git versions.
What we observed multiple times is, trying to support new printer breaks the old one.

@mounaiban
Copy link
Contributor

mounaiban commented Mar 21, 2020

Actually both of you @agalakhov and @KP1533TM2 were right, reverting to 216fddb got the LBP3000 printing again on CUPS 2.2.6. Printing was broken on the next buildable commit f205f77 and the jobs wouldn't start.

I looked through the diff for prn_lbp2900.c and my mind was blown.

It seems there were big changes to send_job_start(), maybe to implement LBP3010 support. I'm trying to understand the changes, especially in the buffer header array head and I hope it would be possible to get the LBP3000 running again without breaking the other printer.

On the other hand, it looks like LBP2900 support was not affected, if I am reading #17 right. The issue was filed almost two years after f205f77, where @ansingh reported being able to use an LBP2900 in Linux.

Wait, I hope it wasn't Ubuntu 18.04 beta with CUPS 2.2.7, the only version of CUPS I believe that isn't affected by the changes!

@mounaiban
Copy link
Contributor

mounaiban commented Mar 26, 2020

Hello again, I think I have fixed support for the LBP3000. I have filed my pull request, but if you want to test the updates in the meantime, you are welcome to clone from my repo at https://github.com/mounaiban/captdriver. If anyone else can verify that these changes get the LBP3000 working again, we can have this issue closed. 😊

I have personally tested the update and printed literally hundreds of pages, across CUPS 2.2.6, 2.2.10 and 2.3.1 without any problems (well, besides a dirty drum).

The changes I made are in 1106978. Long story short, when @missla added supported for the LBP3010 in 75f78a8, the job prologue format among other things were changed to accommodate support for the new printer. The LBP2900 job prologue was updated to keep up with the changes and the device is assumed to have still worked, but the LBP3000 job prologue was left alone, thus breaking support.

Also, thanks @agalakhov, @KP1533TM2, @missla and the others who made this driver possible, you all have done a great job!

@sujinjoshi
Copy link

On the other hand, it looks like LBP2900 support was not affected, if I am reading #17 right. The issue was filed almost two years after f205f77, where @ansingh reported being able to use an LBP2900 in Linux.

I am trying to install this driver on my Raspberry Pi running Raspbian Buster (4.19.97-v7+ #1294 SMP armv7l GNU/Linux, CUPS v2.2.10) for Canon LBP2900.
The commit 216fddb
worked but it only prints 1 job. I also added the no-reattach on $(cups-config --datadir)/usb/org.cups.usb-quirks but no luck.

All the new commits after that didn't work at all.

I appreciate if you could provide any help. I am available for any tests that you might need to run on Canon LBP2900.

@mounaiban
Copy link
Contributor

@sujinjoshi this appears to be a Raspbian-specific issue, and is under investigation. Please see mounaiban@18797c4#r38560725

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants