Difference between revisions of "Brother DCP-7020"

From ArchWiki
Jump to: navigation, search
(31 intermediate revisions by 9 users not shown)
Line 1: Line 1:
[[Category:Printers_(English)]]
+
[[Category:Printers]]
[[Category:Tutorials (English)]]
+
[[Category:Imaging]]
  
 
=Introduction=
 
=Introduction=
  
This is a brief tutorial to make the printer Brother DCP-7020 work on Arch.  It is largely a duplicate of the tutorial for the Brother HL-2030, with changes specific to the Brother DCP-7020.
+
This is a brief tutorial to make the Brother DCP-7020 printer/scanner work on Arch.  It is largely a duplicate of the tutorial for the Brother HL-2030, with changes specific to the Brother DCP-7020.
 +
 
 +
NOTE: This printer works with the Foomatic driver for the [http://openprinting.org/show_driver.cgi?driver=hl1250 HL-1250].
 +
 
 +
=Printer=
 +
==Download Printer drivers==
 
If you previously tried to install the printer in CUPS, remove it.
 
If you previously tried to install the printer in CUPS, remove it.
  
=Download Brother drivers=
 
  
 
First create a temporary directory.
 
First create a temporary directory.
Then you must download the official LPR drivers from the Brother website in that directory. Click [http://www.brother.com/cgi-bin/agreement/agreement.cgi?dlfile=http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/lpr_others/brdcp7020lpr-2.0.1-1.i386.rpm&lang=English_lpr here] (and agree to their terms). This is a RPM archive.
+
Then you must download the official LPR drivers from the Brother website into that directory. Click [http://www.brother.com/cgi-bin/agreement/agreement.cgi?dlfile=http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/lpr_others/brdcp7020lpr-2.0.1-1.i386.rpm&lang=English_lpr here] (and agree to their terms). This is an RPM archive.
 
You have to download the cupswrapper file [http://www.brother.com/cgi-bin/agreement/agreement.cgi?dlfile=http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/cups_wrapper/cupswrapperDCP7020-2.0.1-1.i386.rpm&lang=English_gpl here] (and agree to their terms). This script creates the filters and PPD file for CUPS automatically. It's an RPM archive too.
 
You have to download the cupswrapper file [http://www.brother.com/cgi-bin/agreement/agreement.cgi?dlfile=http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/cups_wrapper/cupswrapperDCP7020-2.0.1-1.i386.rpm&lang=English_gpl here] (and agree to their terms). This script creates the filters and PPD file for CUPS automatically. It's an RPM archive too.
  
  
=Extracting the RPM files=
+
==Extracting the RPM files==
 
Now you need a small script called rpmextract which allows you to get the files included in the RPM you've just downloaded.
 
Now you need a small script called rpmextract which allows you to get the files included in the RPM you've just downloaded.
 
Log in as root and execute :
 
Log in as root and execute :
 
  # pacman -S rpmextract
 
  # pacman -S rpmextract
 
Extract both RPM files :
 
Extract both RPM files :
  $ rpmextract.sh brhl2030lpr-2.0.1-1.i386.rpm
+
  $ rpmextract.sh brdcp7020lpr-2.0.1-1.i386.rpm
  $ rpmextract.sh cupswrapperHL2030-2.0.1-1.i386.rpm
+
  $ rpmextract.sh cupswrapperDCP7020-2.0.1-1.i386.rpm
 
It should give you two directories : usr and var.
 
It should give you two directories : usr and var.
  
  
=Editing files to make it work with Arch=
+
==Editing files to make it work with Arch==
ArchLinux uses its own file system organisation, so you have to edit some files.
+
Arch Linux uses its own file system organization, so you have to edit some files.
Use your text editor (i.e. vi) to open the file named cupswrapperHL2030-2.0.1
+
Use your text editor (i.e. vi) to open the file named cupswrapperDCP7020-2.0.1
If you created the temporary directory "tmp" in your home, this file will be in /home/(your user)/tmp/usr/local/Brother/ .
+
If you created the temporary directory "tmp" in your home, this file will be in /home/(your user)/tmp/usr/local/Brother/cupswrapper/cupswrapperDCP7020-2.0.1
In this file, you must replace all the <i>/etc/init.d/</i> occurences by <i>/etc/rc.d/</i>.
+
 
 +
'''In this file, you must replace all the <i>/etc/init.d/</i> occurrences by <i>/etc/rc.d/</i> and <i>/etc/init.d/cups</i> by <i>/etc/rc.d/cupsd</i>.'''
 +
 
 
Once you've finished this step, copy all of the files to their corresponding directories in your file system :
 
Once you've finished this step, copy all of the files to their corresponding directories in your file system :
 
  # cp -r /home/user/tmp/usr/* /usr
 
  # cp -r /home/user/tmp/usr/* /usr
 
  # cp -r /home/user/tmp/var/* /var
 
  # cp -r /home/user/tmp/var/* /var
  
 +
==Installing the driver and printer==
 +
Last step!
  
=Installing the driver and printer=
 
Last step !
 
 
Go into /usr/local/Brother/cupswrapper/ and run the cupswrapper file :
 
Go into /usr/local/Brother/cupswrapper/ and run the cupswrapper file :
 
  # cd /usr/local/Brother/cupswrapper/
 
  # cd /usr/local/Brother/cupswrapper/
 
  # ./cupswrapperDCP7020-2.0.1
 
  # ./cupswrapperDCP7020-2.0.1
It will stop the cups daemon if it's running, and restart it.
+
It will stop the cups daemon if it's running, and restart it.<br/><br/>
Now go to the CUPS page : http://localhost:631/
+
Now go to the CUPS page : http://localhost:631/ <br/><br/>
Under the Printers tab you should see a DCP7020 printer <b>automatically</b> installed and configured.
+
Under the Printers tab you should see a DCP7020 printer <b>automatically</b> installed and configured. You'll want to modify the printer options to suite your situation.
This default installation seems to be optimized for a USB connected printer, which in the case of the DCP-7020 is incorrect.  Click <i>Delete Printer</i>.  Now you can add a new printer using the CUPS browser interface and select your Brother DCP-7020.  To do this :
+
1. Click on the Administration tab
+
2. Add Printer
+
3. Name it, Continue
+
4. Select LPT #1 (unless you have more than one LPT port, in which case trial and error should serve you)
+
5. Select Brother, Continue
+
6. And there's your "Brother DCP7020 for CUPS (en)" - select it and Add Printer
+
Click to print the test page, and  you can hear the sweet sound of your printer.
+
 
+
  
 
Thanks to the creator of the HL-2030 page for making this much easier than I expected it would be!
 
Thanks to the creator of the HL-2030 page for making this much easier than I expected it would be!
 +
 +
=Scanner=
 +
First, make sure you [http://wiki.archlinux.org/index.php/Scanner_setup_%26_configure set up SANE].
 +
 +
 +
This scanner works with Brother's [http://solutions.brother.com/linux/sol/printer/linux/sane_drivers.html brscan2] driver.  ([http://www.brother.com/cgi-bin/agreement/agreement.cgi?dlfile=http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/sane_others/brscan2-0.2.4-0.i386.rpm&lang=English_sane 32 bit] | [http://www.brother.com/cgi-bin/agreement/agreement.cgi?dlfile=http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/sane_others/64bit/brscan2-0.2.4-0.x86_64.rpm&lang=English_sane 64 bit])
 +
 +
You can install this manually, using the following instructions, or else there's now a package in the AUR too, [https://aur.archlinux.org/packages.php?ID=19856 here].
 +
 +
You'll need to extract the files to a temp path:
 +
$ rpmextract brscan2-0.2.4-0.i386.rpm
 +
or, for 64 bit:
 +
$ rpmextract brscan2-0.2.4-0.x86_64.rpm
 +
 +
Now copy the files to their corresponding directories in your file system:
 +
# cp -r /path/to/brscan/usr/* /usr
 +
 +
Now you'll need to add "brother2" to the end of /etc/sane.d/dll.conf<br />
 +
Brother felt it necessary to include a script to do that, so you can also run:
 +
# /usr/local/Brother/sane/setupSaneScan2 -i
 +
 +
==Troubleshooting==
 +
===I can scan as root, but not as a normal user===
 +
Make sure your user is in the scanner group:
 +
# gpasswd -a username scanner
 +
then log out and back in.
 +
 +
If you still can't scan as a normal user, check that /usr/lib/sane (or /usr/lib64/sane for 64 bit) are readable and executable for your user/group.
 +
 +
===64 bit caveat===
 +
The 64 bit RPM has two files in /usr/lib64/, along with two symlinks to each file. However, the Arch64 Sane package will probably look in  /usr/lib/ rather than /usr/lib64/, so we'll need to create some more symlinks.  And since the symlinks reference the absolute path, not the relative path, ie:
 +
linkedfile -> /usr/lib64/originalfile
 +
rather than
 +
linkedfile -> ./originalfile
 +
a simple cp -r /path/to/brscan/usr/lib64/* /usr/lib/ won't do.
 +
 +
# ln -s /usr/lib64/libbrcolm2.so.1.0.1 /usr/lib/
 +
# ln -s /usr/lib64/libbrscandec2.so.1.0.0 /usr/lib/
 +
# ln -s /usr/lib64/sane/libsane-brother2.so.1.0.7 /usr/lib/sane/
 +
# cd /usr/lib
 +
# ln -s libbrcolm2.so.1.0.1 libbrcolm2.so.1
 +
# ln -s libbrcolm2.so.1 libbrcolm2.so
 +
# ln -s libbrscandec2.so.1.0.0 libbrscandec2.so.1
 +
# ln -s libbrscandec2.so.1 libbrscandec2.so
 +
# cd sane
 +
# ln -s libsane-brother2.so.1.0.7 libsane-brother2.so.1
 +
# ln -s libsane-brother2.so.1 libsane-brother2.so
 +
 +
Here's all of that in a nice bash friendly string:
 +
ln -s /usr/lib64/libbrcolm2.so.1.0.1 /usr/lib/; ln -s /usr/lib64/libbrscandec2.so.1.0.0 /usr/lib/; ln -s /usr/lib64/sane/libsane-brother2.so.1.0.7 /usr/lib/sane/; cd /usr/lib; ln -s libbrcolm2.so.1.0.1 libbrcolm2.so.1; ln -s libbrcolm2.so.1 libbrcolm2.so; ln -s libbrscandec2.so.1.0.0 libbrscandec2.so.1; ln -s libbrscandec2.so.1 libbrscandec2.so; cd sane; ln -s libsane-brother2.so.1.0.7 libsane-brother2.so.1; ln -s libsane-brother2.so.1 libsane-brother2.so

Revision as of 13:24, 23 April 2012


Introduction

This is a brief tutorial to make the Brother DCP-7020 printer/scanner work on Arch. It is largely a duplicate of the tutorial for the Brother HL-2030, with changes specific to the Brother DCP-7020.

NOTE: This printer works with the Foomatic driver for the HL-1250.

Printer

Download Printer drivers

If you previously tried to install the printer in CUPS, remove it.


First create a temporary directory. Then you must download the official LPR drivers from the Brother website into that directory. Click here (and agree to their terms). This is an RPM archive. You have to download the cupswrapper file here (and agree to their terms). This script creates the filters and PPD file for CUPS automatically. It's an RPM archive too.


Extracting the RPM files

Now you need a small script called rpmextract which allows you to get the files included in the RPM you've just downloaded. Log in as root and execute :

# pacman -S rpmextract

Extract both RPM files :

$ rpmextract.sh brdcp7020lpr-2.0.1-1.i386.rpm
$ rpmextract.sh cupswrapperDCP7020-2.0.1-1.i386.rpm

It should give you two directories : usr and var.


Editing files to make it work with Arch

Arch Linux uses its own file system organization, so you have to edit some files. Use your text editor (i.e. vi) to open the file named cupswrapperDCP7020-2.0.1 If you created the temporary directory "tmp" in your home, this file will be in /home/(your user)/tmp/usr/local/Brother/cupswrapper/cupswrapperDCP7020-2.0.1

In this file, you must replace all the /etc/init.d/ occurrences by /etc/rc.d/ and /etc/init.d/cups by /etc/rc.d/cupsd.

Once you've finished this step, copy all of the files to their corresponding directories in your file system :

# cp -r /home/user/tmp/usr/* /usr
# cp -r /home/user/tmp/var/* /var

Installing the driver and printer

Last step!

Go into /usr/local/Brother/cupswrapper/ and run the cupswrapper file :

# cd /usr/local/Brother/cupswrapper/
# ./cupswrapperDCP7020-2.0.1

It will stop the cups daemon if it's running, and restart it.

Now go to the CUPS page : http://localhost:631/

Under the Printers tab you should see a DCP7020 printer automatically installed and configured. You'll want to modify the printer options to suite your situation.

Thanks to the creator of the HL-2030 page for making this much easier than I expected it would be!

Scanner

First, make sure you set up SANE.


This scanner works with Brother's brscan2 driver. (32 bit | 64 bit)

You can install this manually, using the following instructions, or else there's now a package in the AUR too, here.

You'll need to extract the files to a temp path:

$ rpmextract brscan2-0.2.4-0.i386.rpm

or, for 64 bit:

$ rpmextract brscan2-0.2.4-0.x86_64.rpm

Now copy the files to their corresponding directories in your file system:

# cp -r /path/to/brscan/usr/* /usr

Now you'll need to add "brother2" to the end of /etc/sane.d/dll.conf
Brother felt it necessary to include a script to do that, so you can also run:

# /usr/local/Brother/sane/setupSaneScan2 -i

Troubleshooting

I can scan as root, but not as a normal user

Make sure your user is in the scanner group:

# gpasswd -a username scanner

then log out and back in.

If you still can't scan as a normal user, check that /usr/lib/sane (or /usr/lib64/sane for 64 bit) are readable and executable for your user/group.

64 bit caveat

The 64 bit RPM has two files in /usr/lib64/, along with two symlinks to each file. However, the Arch64 Sane package will probably look in /usr/lib/ rather than /usr/lib64/, so we'll need to create some more symlinks. And since the symlinks reference the absolute path, not the relative path, ie:

linkedfile -> /usr/lib64/originalfile

rather than

linkedfile -> ./originalfile

a simple cp -r /path/to/brscan/usr/lib64/* /usr/lib/ won't do.

# ln -s /usr/lib64/libbrcolm2.so.1.0.1 /usr/lib/
# ln -s /usr/lib64/libbrscandec2.so.1.0.0 /usr/lib/
# ln -s /usr/lib64/sane/libsane-brother2.so.1.0.7 /usr/lib/sane/
# cd /usr/lib
# ln -s libbrcolm2.so.1.0.1 libbrcolm2.so.1
# ln -s libbrcolm2.so.1 libbrcolm2.so
# ln -s libbrscandec2.so.1.0.0 libbrscandec2.so.1
# ln -s libbrscandec2.so.1 libbrscandec2.so
# cd sane
# ln -s libsane-brother2.so.1.0.7 libsane-brother2.so.1
# ln -s libsane-brother2.so.1 libsane-brother2.so

Here's all of that in a nice bash friendly string:

ln -s /usr/lib64/libbrcolm2.so.1.0.1 /usr/lib/; ln -s /usr/lib64/libbrscandec2.so.1.0.0 /usr/lib/; ln -s /usr/lib64/sane/libsane-brother2.so.1.0.7 /usr/lib/sane/; cd /usr/lib; ln -s libbrcolm2.so.1.0.1 libbrcolm2.so.1; ln -s libbrcolm2.so.1 libbrcolm2.so; ln -s libbrscandec2.so.1.0.0 libbrscandec2.so.1; ln -s libbrscandec2.so.1 libbrscandec2.so; cd sane; ln -s libsane-brother2.so.1.0.7 libsane-brother2.so.1; ln -s libsane-brother2.so.1 libsane-brother2.so