Brother networked printer/fr

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Brother networked printer and the translation is 33% complete.
Outdated translations are marked like this.

Ce document traite de l'installation d'une imprimante réseau Brother. Il ne couvre que l'installation en réseau en prenant comme exemple le modèle DCP-750CW. Il s'applique néanmoins à d'autres modèles.

Important
Bien que cette page soit autosuffisante pour l'installation d'une imprimante, il est conseillé de lire, outre cette page, la page Impression dans son intégralité avant de commencer cette installation.

Retour d'expérience des utilisateurs

Après avoir appliqué ce guide, merci de mettre le tableau suivant à jour de manière à ce que les autres utilisateurs puissent facilement savoir si une installation réussie a déjà eu lieu avec le modèle de leur choix.

Modèle de l'imprimante Arch. Configuration Gentoo Imprimante? Scanner? Remarques
DCP-750CW X86_64 gnome3.8 systemd & gnome OpenRC Marche! Marche! Pas de remarque
DCP-7055W X86_64 3.15.9-gentoo, KDE 4.14.3 Marche! Marche! Pas de remarque
DCP-J140W X86_64 3.14.14-gentoo & genkernel Marche! Marche! Le scanner ne fonctionne qu'après installation du paquet dev-libs/libusb-compat. Merci à i92guboj pour cette découverte et pour l'avoir posté sur Gentoo forums.
DCP-J925DW x86_64 Xfce OpenRC Marche! Marche! Paquets net-print/brother-dcpj925dw et media-gfx/brscan4 dans dev/ulm overlay
HL-L2340DW amd64 OpenRC Marche! n/a Utilisez net-print/brother-genml1-bin depuis brother-overlay
MFC-J4410DW x86_64 KDE SC 4.11.5 OpenRC Marche! Marche! Le filtre à copier est /opt/brother/Printers/mfcj4410dw/lpd/filtermfcj4410dw mais le scanner n'est pas détecté par xsane bien que l'installation soit OK.
MFC-J870DW x86_64 Xfce OpenRC Marche! Marche! Paquets net-print/brother-mfcj870dw et media-gfx/brscan4 dans dev/ulm overlay
MFC-J5910DW x86_64 Gnome 3.12 Systemd Marche! Marche! Le filtre à copier est /usr/lib64/cups/filter/brother_lpdwrapper_mfcj5910dw. Le paquet dev-libs/libusb-compat est nécessaire pour la détection du scanner (voir section Problèmes fréquents')
MFC-J6920DW x86_64 XFce Marche! Marche! download page, filtre /usr/lib64/cups/filter/brother_lpdwrapper_mfcj6920dw, commande de configuration du scanner brsaneconfig4
MFC-9320CW x86_64 Gnome 3.10 Marche! Marche! arbre alternatif
HL-4570CDW x86_64 Gnome 3.10 Marche! n/a arbre alternatif
MFC-7460DN x86_64,x86 Marche! inconnu arbre alternatif
DCP-7060D, DCP-7065DN, DCP-8080DN, DCP-L2520DW, DCP-L2540DW, HL-2230, HL-2240, HL-2240D, HL-2270DW, HL-2280DW, HL-5370DW/HL-5370DWT, HL-5440D, HL-5450DN, HL-5470DW, HL-6180DW, HL-L2320D, HL-L2360DW, HL-L2380DW, MFC-7360N, MFC-7460DN, MFC-7860DW, MFC-8480DN, MFC-8510DN, MFC-8710DW, MFC-8890DW, MFC-8910DW, MFC-8950DW, MFC-L2700DW, MFC-L2720DW, MFC-L2740DW x86_64,x86 Marche! inconnu arbre alternatif
MFC-8950DW x86_64 KDE 4.12.5 Marche! Marche! Le filtre à copier est : /opt/brother/Printers/MFC8950DW/lpd/filter_MFC8950DW
MFC-5890CN x86_64 Pas de dépendance Marche! Marche! commande de configuration du scanner brsaneconfig3
MFC-9970CDW x86_64 n/a Marche! inconnu

Prérequis

cups

Assurez-vous que net-print/cups est installé:

root #emerge --ask net-print/cups

Le service cups service doit être démarré avant d'installer l'imprimante.

OpenRC

Si vous utilisez OpenRC, la commande suivante vous permet de démarrer le service cups.

root #/etc/init.d/cupsd start

Pour que le démarrage du servie ait lieu automatiquement au démarrage, utilisez rc-update:

root #rc-update add cupsd default
Systemd

Si vous utilisez systemd, vous pouvez démarrer le service cups avec la commande suivante:

root #systemctl start cups.service

Pour que le service soit lancé au démarrage:

root #systemctl enable cups.service

Installer les pilotes

driverless

CUPS printer drivers and backends are deprecated and will no longer be supported in a future feature release of CUPS.
For how to go without printer drivers see driverless printing

net-print/gutenprint

A third-party driver with a number of Brother printers supported and several other brands as well.

root #emerge --ask net-print/gutenprint[ppds]

Proceed with Installing the printer.

net-print/brlaser

A third-party printer driver supporting a wide range of Brother printers is net-print/brlaser.

root #emerge --ask net-print/brlaser

Proceed with Installing the printer.

Solution préférée : utilisation d'un arbre alternatif pour les pilotes

Si l'imprimante est prise en charge par un ebuild dans brother-overlay ou quelque autre arbre alternatif, alors utilisez le, car il inclut les prérequis mentionnés ici. Il devrait vous permettre de sauter la section "Alternative : installation par rpm".

Pour activer cet arbre alternatif, créez le fichier repos.conf adéquat :

root #eselect repository enable brother-overlay
root #emaint sync -r brother-overlay && eix-update

Le paquet dev-vcs/git doit être installé pour utiliser cet arbre alternatif. Une alternative consiste à utiliser layman pour ajouter cet arbre alternatif.

From the ebuild repository, install the driver as shown here for Brother's Generic LPR and CUPSwrapper printer driver from the brother-overlay ebuild repository.

root #emerge --ask net-print/brother-genml1-bin

L'ebuild net-print/brother-genml1-bin de l'arbre alternatif brother contient les pilotes d'impression génériques tels qui mis à disposition sur support.brother.com pour une large plage de modèles compatibles (cliquez le lien Compatible Model sur BrGenML1 Compatible Models):

  • Generic LPR printer driver (rpm package)
  • Generic CUPSwrapper printer driver (rpm package)

Dans cups le pilote apparaît comme Brother BrGenML1 for CUPS.

user $/usr/sbin/lpinfo -m | grep -i brother
brother-BrGenML1-cups-en.ppd Brother BrGenML1 for CUPS

Alternative: installation par rpm

Comme les pilotes sont disponibles depuis le site de Brother sous la forme d'archives rpm le paquet app-arch/rpm doit être installé.

root #emerge --ask app-arch/rpm

Répertoires manquants

Veuillez créer ces répertoires; cela vous évitera pas mal de tracas par la suite.

root # mkdir -p /var/spool/lpd
root # mkdir -p /usr/lib64/cups/filter

Téléchargez les pilotes depuis le site de Brother

Les pilotes pour les imprimantes Brother sont disponibles sur la page Brother solutions'.

Suivez les instructions de pages pour trouver votre modèle. Choisissez les pilotes rpm pour linux.

Après avoir sélectionné votre modèle, quatre pilotes vous sont présentés pour téléchargement. Choisissez les pilotes dont le nom se termine par .rpm pour LPR driver et cupswrapper driver.

Installer les pilotes

L'installation des pilotes peut se faire en plusieurs étapes ou en une seule selon que les repertoires nécessaires existent ou pas.

Pour installer les pilotes rendez-vous dans le repertoire où se trouvent les fichiers .rpm.

Utilisez la commande suivante pour voir le nom exact de vos pilotes:

root #ls -a
.  ..  dcp750cwcupswrapper-1.0.1-1.i386.rpm  dcp750cwlpr-1.0.1-1.i386.rpm

Bien entendu, les noms des pilotes varient selon le modèle de votre imprimante. La sortie de la commande précédente est utile pour copier/coller les noms de fichiers et éviter les fautes de frappe.

Commencez par installer le pilote LPR.

root #rpm -i --nodeps dcp750cwlpr-1.0.1-1.i386.rpm

L'installation peut donner des avertissements, vous disant que certains repertoires manquent. Dans ce cas, ajoutez les repertoires manquants et ré-installez le pilote avec la commande suivante :

root #rpm -i --nodeps --replacepkgs dcp750cwlpr-1.0.1-1.i386.rpm

Installez ensuite le pilote cupswrapper de la même manière :

root #rpm -i --nodeps dcp750cwcupswrapper-1.0.1-1.i386.rpm

De la même manière l'installation peut se plaindre de repertoires manquants. Ajoutez les et ré-installez le pilote avec la commande suivante :

root #rpm -i --nodeps --replacepkgs dcp750cwcupswrapper-1.0.1-1.i386.rpm
Remarque
Pensez à ajouter l'option --replacepkgs pour forcer la ré-installation de tous les fichiers requis.

Copier le filtre à la bonne place

Copiez le filtre à la bonne place avec la commande suivante :

Remarque
Have a look at the feedback table at the top of this page to know more about the filter's name.
root #cp /usr/lib64/cups/filter/brlpdwrapperdcp750cw /usr/libexec/cups/filter/

Note that for some printers (such as MFC-L3650CDW), it is important to copy this as a symlink, otherwise printing will not work. This can be done by adding --preserve to the cp command.

Installer l'imprimante

Connectez l'imprimante au réseau

Connectez l'imprimante au réseau selon les instructions données par la section réseau du Online guide utilisateur de votre modèle. À partir de là, vous pouvez récupérer l'adresse ip de l'imprimante (sur l'interface). Celle-ci est nécessaire pour cups dans l'étape suivante. En pointant votre navigateur sur l'adresse ip de l'imprimante, vous accédez à son interface utilisateur.

Networked printer detection

CUPS is capable of automatically detecting networked printers. In case it does not work it might be blocked by a firewall. As a workaround, temporarily connect the printer to the computer.

Use CUPS' web interface to install the printer

Using CUPS' web interface http://localhost:631/admin is quite self-explanatory. The Add Printer button will list the networked printer(s) starting at the Discovered Network Printers line.

Use command line to install the printer

The lpinfo command can be used in order to list all connected printers:

root #lpinfo -v
network ipp
network http
network socket
network https
network ipps
network lpd
network lpd://BRW67890ABCDEF/BINARY_P1

Running lpinfo -l -v will give a more verbose output.


Add the printer with lpadmin using device uri and ppd file:

root #lpadmin -p Brother_HL-L2340DW -E -v lpd://BRW67890ABCDEF/BINARY_P1 -m brother-BrGenML1-cups-en.ppd

In case of net-print/brlaser, the ppd files can be found in /usr/share/cups/drv/brlaser.drv.

user $lpinfo -m
lsb/usr/cupsfilters/Fuji_Xerox-DocuPrint_CM305_df-PDF.ppd Fuji Xerox
drv:///brlaser.drv/br1510.ppd Brother DCP-1510 series, using brlaser v6
drv:///brlaser.drv/br1600.ppd Brother DCP-1600 series, using brlaser v6
drv:///brlaser.drv/br7030.ppd Brother DCP-7030, using brlaser v6
drv:///brlaser.drv/br7040.ppd Brother DCP-7040, using brlaser v6
drv:///brlaser.drv/br7055.ppd Brother DCP-7055, using brlaser v6
drv:///brlaser.drv/br7055w.ppd Brother DCP-7055W, using brlaser v6
drv:///brlaser.drv/br7060d.ppd Brother DCP-7060D, using brlaser v6
drv:///brlaser.drv/br7065dn.ppd Brother DCP-7065DN, using brlaser v6
drv:///brlaser.drv/br7080.ppd Brother DCP-7080, using brlaser v6
drv:///brlaser.drv/br7080d.ppd Brother DCP-7080D, using brlaser v6
drv:///brlaser.drv/brl2500d.ppd Brother DCP-L2500D series, using brlaser v6
drv:///brlaser.drv/brl2520d.ppd Brother DCP-L2520D series, using brlaser v6
drv:///brlaser.drv/brl2540.ppd Brother DCP-L2540DW series, using brlaser v6
drv:///brlaser.drv/br1110.ppd Brother HL-1110 series, using brlaser v6
drv:///brlaser.drv/br1200.ppd Brother HL-1200 series, using brlaser v6
drv:///brlaser.drv/br2030.ppd Brother HL-2030 series, using brlaser v6
drv:///brlaser.drv/br2140.ppd Brother HL-2140 series, using brlaser v6
drv:///brlaser.drv/br2220.ppd Brother HL-2220 series, using brlaser v6
drv:///brlaser.drv/br2270dw.ppd Brother HL-2270DW series, using brlaser v6
drv:///brlaser.drv/br5030.ppd Brother HL-5030 series, using brlaser v6
drv:///brlaser.drv/brl2300d.ppd Brother HL-L2300D series, using brlaser v6
drv:///brlaser.drv/brl2320d.ppd Brother HL-L2320D series, using brlaser v6
drv:///brlaser.drv/brl2340d.ppd Brother HL-L2340D series, using brlaser v6
drv:///brlaser.drv/brl2360d.ppd Brother HL-L2360D series, using brlaser v6
drv:///brlaser.drv/br1910w.ppd Brother MFC-1910W, using brlaser v6
drv:///brlaser.drv/br7240.ppd Brother MFC-7240, using brlaser v6
drv:///brlaser.drv/br7360n.ppd Brother MFC-7360N, using brlaser v6
drv:///brlaser.drv/br7365dn.ppd Brother MFC-7365DN, using brlaser v6
drv:///brlaser.drv/brl2710.ppd Brother MFC-L2710DW series, using brlaser v6
drv:///sample.drv/dymo.ppd Dymo Label Printer
drv:///sample.drv/epson9.ppd Epson 9-Pin Series
drv:///sample.drv/epson24.ppd Epson 24-Pin Series
drv:///generic-brf.drv/gen-brf.ppd Generic Braille embosser, 1.0
drv:///cupsfilters.drv/pwgrast.ppd Generic IPP Everywhere Printer
drv:///sample.drv/generpcl.ppd Generic PCL Laser Printer
lsb/usr/cupsfilters/Generic-PDF_Printer-PDF.ppd Generic PDF Printer

In this case the -m option to lpadmin should use the drv:///brlaser.drv/... entry as shown below as an example for Brother HL-L2340DW:

root #lpadmin -p Brother_HL-L2340DW -E -v lpd://BRW67890ABCDEF/BINARY_P1 -m drv:///brlaser.drv/brl2340d.ppd

For further options see man 8 lpadmin.

Check the setup with lpstat:

user $lpstat -d -l -t
no system default destination
scheduler is running
no system default destination
device for Brother_HL-L2340DW: lpd://BRW1008B1372DF2/BINARY_P1
Brother_HL-L2340DW accepting requests since Fri 30 Oct 2015 05:36:25 PM CET
printer Brother_HL-L2340DW is idle.  enabled since Fri 30 Oct 2015 05:36:25 PM CET
        Form mounted:
        Content types: any
        Printer types: unknown
        Description: Brother_HL-L2340DW
        Alerts: none
        Location: 
        Connection: direct
        Interface: /etc/cups/ppd/Brother_HL-L2340DW.ppd
        On fault: no alert
        After fault: continue
        Users allowed:
                (all)
        Forms allowed:
                (none)
        Banner required
        Charset sets:
                (none)
        Default pitch:
        Default page size:
        Default port settings:

Don't forget to set the user's default printer

user $lpstat -a
Brother_HL-L2340D_series accepting requests since Fri 29 May 2015 09:11:30 AM CEST
user $lpoptions -d Brother_HL-L2340D_series
copies=1 device-uri=http://192.168.178.27:631/ipp/port1 finishings=3 job-cancel-after=10800 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=1432883490 marker-colors=#000000,none marker-high-levels=100 marker-levels=-1,95 marker-low-levels=16 marker-names='Black\ Toner\ Cartridge,Drum\ Unit' marker-types=toner number-up=1 printer-commands=AutoConfigure,Clean,PrintSelfTestPage printer-info='Brother HL-L2340D series' printer-is-accepting-jobs=true printer-is-shared=false printer-location='Local Printer' printer-make-and-model='Brother BrGenML1 for CUPS ' printer-state=3 printer-state-change-time=1432883490 printer-state-reasons=none printer-type=10522644 printer-uri-supported=ipp://localhost/printers/Brother_HL-L2340D_series

Installing the scanner

Prerequisites

Make sure the media-gfx/sane-backends package is installed in order to install the driver for the scanner. As most users will use xsane to scan a document, just emerge it. The media-gfx/sane-backends package will be pulled in as a dependency.

root #emerge --ask media-gfx/xsane

Installing the driver

Some of Brother scanners are supported by media-gfx/sane-airscan package. This is an open source "universal vendor-neutral" driver and allows accessing IPP scanners via either of eSCL or WSD protocol. See the homepage of the package for list of scanners which were reported to work. Scope of feature support (e.g. resolution) depends on set of IPP attributes published by the scanner.

Some of Brother scanners are supported by media-gfx/sane-backends package, by selecting the "escl" backend. This open source driver is also using eSCL protocol, like "sane-airscan". Therefore it seems to show comparable limitations (e.g. maximum resolution). From code, it look as if it supports also PDF format in addition to JPEG format (both mandatory for eSCL/2.0 scanners). See sane issue discussion thread for an ongoing discussion of differences between "builtin escl" and "sane-airscan": https://gitlab.com/sane-project/backends/-/issues/202

Some of Brother scanners are supported by media-gfx/brscan4 package. This contains the proprietary binary Brother scanner driver. That can also be installed manually as rpm (see below). This driver does not seem to use eSCL, but accesses e.g. printer TCP port 54921 with some simple proprietary protocol for selecting configuration. Therefore, it is often able to allow higher resolutions.

Brother also seems to offer a newer proprietary brscan5 driver (no Gentoo package known yet, bug #833603). At least for some scanners, brscan5 seems to provide additional specific options (e.g. "auto deskew"). Obviously, brscan5 optionally uses more advanced protocol, still on same TCP port 54921, at least for scanners supporting this. However, details (e.g. differences in feature set, device backward compatibility) are unknown.

Finally, there are/were also ongoing efforts (e.g. github repositories) for open source driver using the proprietary port 54921 protocol. As those are unfinished and may have legal problem that the license of at least some proprietary driver versions may disallow traffic reverse engineering, it is not worth to try those out as of now.

Alternative: rpm installation

Download the driver from the Brother Solutions's download page for the scanner.

Important
Pay attention to the family the printer belongs to. Depending on the family, the right brscan will need to be selected (brscan, brscan2, brscan3) as well as the right architecture (32 bits or 64 bits depending on the system installation).

Change to the directory where the downloaded drivers are, and run the following command:

root #ls -a

This will show the file names of the downloaded files, allowing for easy copy/paste for the next commands.

Install the drivers using rpm:

root #rpm -i --nodeps brscan2-0.2.5-1.x86_64.rpm
Remarque
If xsane was not installed yet, install it, then add --replacepkgs as an option to the previous command to reinstall the driver.

Configuring the scanner for network access

Remarque
This step can be skipped if only local scanning via USB is needed. The necessary drivers are already installed through the brscan RPM package.

Once the driver is correctly installed, use the following command:

root #brsaneconfig2 -a name=monScanner model=DCP-750CW ip=192.168.1.13
Remarque
brsaneconfig2 should be replaced with the command corresponding to the printer's family (see above), monScanner with any name of personal choice, and DCP-750CW with the printer's model name.

Now check everything is correctly installed:

root #brsaneconfig2 -q | grep monScanner
  0 monScanner          "DCP-750CW"         I:192.168.1.13
Remarque
Replace monScanner with the name chosen above.

Congratulation! The scanner is now ready for use!

Troubleshooting

Generic LPR printer driver on amd64 no-multilib

The printer driver uses statically compiled x86 32-bit binaries. To be able to execute them the kernel needs to have the following configuration enabled: IA32_EMULATION.

Further, the binaries from Brother (rawtobr3 and brprintconflsr3) require two 32-bit glibc library files in order to be executed on a 64-bit system. These can be compiled by the user, or — even easier — obtain a pre-compiled version (glibc i686) from rpmfind.net or similar site.

To accomplish the latter, first install the rpm utilities:

root #emerge rpm

Next, create a /usr/local/lib32 directory if it doesn't exist:

root #mkdir /usr/local/lib32

Move the downloaded rpm file into a temporary directory and convert to a simpler tar file:

root #rpm2tar glibc-2.25-12.fc26.i686.rpm

Extract the tar file in the temporary directory:

root #tar -xvf glibc-2.25-12.fc26.i686.tar

A lib/ subdirectory should be created containing the libraries. Copy them to the /usr/local/lib32 directory on the system.

root #cp lib/* /usr/local/lib32

Under /usr/local/lib32, only the libc.so.6 file is needed, but since there may be symlinks, it's easier to copy them all. Run the 'file' command on libc.so.6 to ensure it is an ELF 32-bit format. If not, install the correct version:

root #file /usr/local/lib32/libc.so.6

Finally, copy ld-linux.so.2 into the main /usr/local/lib directory.

root #cp /usr/local/lib32/ld-linux.so.2 /usr/local/lib

Two perl wrapper/filter scripts that are provided with the Brother drivers need to be changed as well to instruct these binaries to load the 32-bit libraries, not the default 64-bit ones. First, locate and edit the two files (replace YOURPRINTER with the printer name provided during the Brother installation script execution):

root #nano filter_YOURPRINTER
root #nano brother_lpdwrapper_YOURPRINTER

For instance, for the MFCL2680W printer:

root #nano /opt/brother/Printers/MFCL2680W/lpd/filter_MFCL2680W
root #nano /opt/brother/Printers/MFCL2680W/cupswrapper/brother_lpdwrapper_MFCL2680W

At the top of each file, below the comment header, add the following line:

CODE Use 32-bit libraries in filter and wrapper scripts
$ENV{LD_LIBRARY_PATH} = "/usr/local/lib32";

This sets the default library path before the scripts execute the binaries. rawtobr3 processes the print data and brprintconflsr3 processes the page formatting data. Once all of these instructions have been successfully performed, the printer should work as intended!

Text shifted up

Sometimes it happens that the text is shifted up toward the upper border of the page.

To correct this, enter the following command:

root # brprintconf_dcp750cw -pt A4

Scanner not detected

It may happen that, when xsane is launched, the scanner is not detected. This is probably due to a too recent version of libusb. In order to solve this, it might be necessary to install dev-libs/libusb-compat.

root #emerge --ask dev-libs/libusb-compat

Contrary to what the name suggests, this may even be required if the scanner is used over the network. It is known to be required for these models even when they are used over the network instead of through a direct USB connection:

  • DCP-1610WE
  • MFC-9120CN
  • MFC-9142CDN

External resources