Brother MFC-9560CDW Linux Support
March 26, 2012 Leave a comment
Linux support for the Brother MFC-9560CDW multifunction color laser printer is present for printing, faxing and scanning via the network, but it is not delivered with nearly the same quality software or ease of use that is provided for Windows and Mac users. This is a common circumstance for Linux users, but it still makes me Codgerly.
Sufficient digging around on the Brother website does locate the Linux drivers in both 32 bit and 64 bit architectures in Deb and RPM formats. Installation is command line based and is straight forward for anyone who has done command line based package manager installations on Linux before. Brother also has some decent installation instructions on their website along with the drivers.
In the Net Codger’s case, the installation was on openSUSE 11.4 32 bit.The printer drivers were installed first with:
sudo rpm -ivh mfc9560cdwlpr-1.1.1-5.i386.rpm
sudo rpm -ivh mfc9560cdwcupswrapper-1.1.1-5.i386.rpm
This is then followed up by verifying the presence or adding the printer in CUPS.
Next up is the scanner driver. It’s installed with the following commands.
sudo rpm -ivh brscan4-0.3.0-2.i386.rpm
brsaneconfig4 -a name=SCANNER model=MFC-9560CDW ip=yourprintersIP
At this point, your preferred scanning utility can access and scan from the printer/scanner over the network. Nice! But, what about initiating the scan from the scanner itself? To use the Scan button on the printer/scanner you need another utility to listen for and receive the scan. This final utility is installed and configured with these commands.
sudo rpm -ivh brscan-skey-0.2.1-3.i386.rpm
sudo brskey
brscan-skey
You can now choose your Linux username as a scan recipient directly from the front panel of the MFC-9560CDW and upon scanning the page, the scanned image appears on the Linux PC’s screen. In this case inside Gimp. Unfortunately, what the instructions don’t tell you is that the brscan-key utility must be run each time a user logs in, nor do they tell you how to accomplish this.While this omission is not a big deal for the more seasoned Linux user, it might elude the newcomer.
In the case of openSuSE 11.4 and others, I feel that the best way to get the brscan-key utility running on each login is to place a .desktop file in the /etc/xdg/autostart folder, as follows.
/etc/xdg/autostart/brscan-skey.desktop
[Desktop Entry]
X-SuSE-translate=true
Type=Application
Name=BrScan Scan Key Tool
Comment=PC target for scanner.
Icon=hwinfo
Exec=/usr/bin/brscan-skey
Terminal=false
Type=Application
Categories=
OnlyShowIn=GNOME;XFCE;KDE;
But wait! We’re still not really done. At this point scanning from the MFC-9560CDW to a file results in an “oddly formatted” .ppm image file with a random six character extension being deposited in the ~/brscan directory. While Gwenview does readily display this image, this is not a very portable format so sharing and emailing become an issue. What’s worse is that if you want to scan multiple pages with your shiny new automatic document feeder(ADF) you’ll have even less luck. To fix this we need to add some more software and a script to handle the scanner output.
First, you’ll want to grab the sane-frontends package so that you can use its scanadf utility. It’s also very handy to have the unpaper utility for straitening and image cleanup, so get that too. Next you’ll want to edit the provided Brother scan to file script to properly receive and convert the scanned image(s) into something useful like a PDF. I’ve adapted their example to suit my needs using the ImageMagick convert utility to output the desired PDF format on a KDE desktop.
/usr/local/Brother/sane/script/scantofile-0.2.1-3.sh
#! /bin/sh
set +o noclobber
#
# $1 = scanner device
# $2 = friendly name
#
#
# 100,200,300,400,600
#
resolution=200
letter=279
legal=356
device=$1
BASE=$HOME/brscan
mkdir -pv $BASE
cd $BASE
if [ "`which usleep`" != ' ' ];then
usleep 10000
else
sleep 0.01
fi
output_tmp=$(date +%m%d%y).tmp
output_final=Scan$(date +%k%M%m%d%y)
echo "scan from $2($device)"
# Change -y $letter to $legal if that size is being scanned.
#Duplex command below
#scanadf --device-name "$device" --source "Automatic Document Feeder(centrally aligned,Duplex)" --resolution $resolution -y $letter -o"$output_tmp"_%04d
#Simplex Command below
scanadf --device-name "$device" --resolution $resolution -y $letter -o"$output_tmp"_%04d
# Popup notification on error
#
if [ $? = 1 ];then
kdialog --title "Scanner error" --msgbox "$err1"
else
echo Straighten images.
for i in $(ls "$output_tmp"*); do
/usr/bin/unpaper "$i" 1"$i"
done
rm -f $(ls "$output_tmp"*)
echo convert "$output_tmp" "$output_final".pdf
#
convert -density $resolution -sharpen 0x1 -compress jpeg $(ls 1"$output_tmp"*) "$output_final".pdf
rm -f $(ls 1"$output_tmp"*)
# Open the PDF in your preferred viewer
okular "$output_final".pdf
fi
exit
As you can see in the script there is still a slight inconvenience that I have not figured out how to address automatically. That is, the selection between letter sized and legal sized scans requires altering the script manually prior to scanning. The same is also true for the selection of duplex scanning. But, despite this inconvenience, printing and scanning between the Brother MFC-9560CDW multifunction color laser printer and Linux works great!