1

I'm trying to install a Canon MF4570dw in CUPS on a Raspberry Pi 3, but I can't make it work.
This is what I've tried so far:

1. Install the printer from PPD files

I've extracted the latest Canon driver for my printer linux-UFRII-drv-v520-usen-05.tar.gz
I've extracted \linux-UFRII-drv-v520-usen\Sources\cnrdrvcups-lb-5.20-1.tar.gz and took this 2 PPD files: CNRCUPSMF4500WZS.ppd and CNRCUPSMF4500ZS.ppd In CUPS admin page I see the printer enter image description here
, but on the next screen the printer is not in the list of supported printers so I need to provide a PPD file.
I've tried both of the above files, but when I try to print a test page, nothing is printing.
The printer status seems to be always idle in CUPS.

2. Install the printer drivers

Extracting the same driver from above I got this \linux-UFRII-drv-v520-usen\32-bit_Driver\Debian\cnrdrvcups-ufr2-us_5.20-1_i386.deb Debian 32 bit driver.
I've tried to install it, but it's companying about libcups2 and libcupsys2

sudo apt install ./cnrdrvcups-ufr2-us_5.20-1_i386.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'cnrdrvcups-ufr2-us:i386' instead of './cnrdrvcups-ufr2-us_5.20-1_i386.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 cnrdrvcups-ufr2-us:i386 : Depends: libcups2:i386 but it is not installable or
                                    libcupsys2:i386 (>= 1.2.7) but it is not installable
E: Unable to correct problems, you have held broken packages.

I've tried this answer to enable the i386 packages installation, but I still get has no installation candidate

sudo apt install libcups2:i386 libcupsys2:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libcups2:i386 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libcups2:i386' has no installation candidate
E: Unable to locate package libcupsys2:i386

Installing the dev version of this packages, libcups2-dev and libcupsys2-dev still dont allow me to install the above driver and I still get the same reason.

3. Installing cups-bjnp-2.0.tar.gz

I've followed this answer and extracted cups-bjnp-2.0.tar.gz, than run the config and make commands, but they don't seem to work under the current Raspbian OS

    $ ./configure –prefix=/usr
    configure: error: invalid variable name: `–prefix'
    $ make
    make: *** No targets specified and no makefile found.  Stop.
    $ sudo make install
    make: *** No rule to make target 'install'.  Stop.

3.1. LATER EDIT

As suggested by @tttapa the correct configure command is ./configure --prefix=/usr
After this I got a make error

bjnp-commands.c: In function ‘bjnp_set_command_header’:
bjnp-commands.c:40:5: error: ‘strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Werror=stringop-truncation]
     strncpy(cmd->header.BJNP_id, BJNP_STRING, sizeof(cmd->header.BJNP_id));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I've solved this, by editing the bjnp-commands.c file and replacing the strncpy by memcpy at line 40 as described in this solution
Then all went well and I was able to add the printer in CUPS admin page with bjnp://:9100, but I'm still asked to chose the printer from the list, and I can't find any MF4500 or MF4570 printer enter image description here

4. Open Printing database
Searching the open printing database shows this printer is not yet supported.

5. Use the new Linux ARM driver

5.1 Raspberry Pi OS 32 bit March 4th 2021 release

When I run the ./install.sh it fails with this error

Errors were encountered while processing:
 ./MIPS64/Debian/cnrdrvcups-ufr2-us_5.30-1_mips64el.deb
 ./ARM64/Debian/cnrdrvcups-ufr2-us_5.30-1_arm64.deb
 ./x64/Debian/cnrdrvcups-ufr2-us_5.30-1_amd64.deb
 ./x86/Debian/cnrdrvcups-ufr2-us_5.30-1_i386.deb

Using the Pi OS Printer Settings, I can't find this printer.
From the above message, I conclude it would only work on an 64 bit OS and not on 32 bit.
If I try to install cnrdrvcups-ufr2-us_5.30-1_arm64.deb I get architecture does not match

pi@raspberrypi:~/linux-UFRII-drv-v530-usen/ARM64/Debian $ sudo dpkg -i cnrdrvcups-ufr2-us_5.30-1_arm64.deb 
dpkg: error processing archive cnrdrvcups-ufr2-us_5.30-1_arm64.deb (--install):
 package architecture (arm64) does not match system (armhf)
Errors were encountered while processing:
 cnrdrvcups-ufr2-us_5.30-1_arm64.deb

5.2 Raspberry Pi OS 64 bit beta April 9th 2021 release (WORKING)

Install cnrdrvcups-ufr2-us_5.30-1_arm64.deb

pi@raspberrypi:~/linux-UFRII-drv-v530-usen/ARM64/Debian $ sudo dpkg -i cnrdrvcups-ufr2-us_5.30-1_arm64.deb 
Selecting previously unselected package cnrdrvcups-ufr2-us.
(Reading database ... 89335 files and directories currently installed.)
Preparing to unpack cnrdrvcups-ufr2-us_5.30-1_arm64.deb ...
Unpacking cnrdrvcups-ufr2-us (5.30-1) ...
Setting up cnrdrvcups-ufr2-us (5.30-1) ...
Processing triggers for gnome-menus (3.31.4-3) ...
Processing triggers for desktop-file-utils (0.23-4) ...
Processing triggers for mime-support (3.62) ...

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Printing the test page takes about 6 seconds from when I press print until the page is printed.
Printing a 2 page google search result takes about 20 seconds.

11
  • 1
    i386 is the 32-bit x86 architecture (Intel), you cannot use these binaries on an ARM system like the RPi (at least not without emulation). The error in the command in your third section is –prefix, it should be two short dashes, not a single hyphen: --prefix (As a side note, manually installing stuff in /usr is usually a bad idea, it's for software installed by the package manager, manually installed software goes in /usr/local or elsewhere.)
    – tttapa
    Commented Jan 27, 2021 at 21:28
  • 1
    @Ionut As you have a RPI3, have you tried to install the RPiOS ARM64 variant and then try dpkg -i cnrdrvcups-ufr2-uk_5.30-1_arm64.deb ? I'm keen to know the results Commented May 11, 2021 at 22:34
  • 1
    @user424174 just noticed Canon has added 2 more Linux drivers, Linux ARM and Linux MIPS I've installed the rpiOS 64bit beta on rpi3 and executed the install.sh from the the canon ARM driver than I opened the OS Printer Settings and was able to add MF4500 wireless and able to print a test page
    – Ionut
    Commented May 13, 2021 at 19:45
  • 1
    @Ionut excellent news! Does it render quick? How long does it take for you from the moment you press print (for example a Google results page), for the Canon printer to start? I'm running a RPI2, which means I got it running using i386 emulation, but it takes 2 minutes to render before print begins. So pleased to hear you got it working! Commented May 14, 2021 at 11:20
  • 1
    Just FYI, you can most likely improve printing speed by switching to Poppler (pdftops) from GhostScript: lpadmin -p PRINTER_NAME -o pdftops-renderer-default=pdftops
    – ValdikSS
    Commented Feb 12 at 9:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.