LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Installing Brother MFC-J220 in Salix OS /Slackware 13.37 32bit Linux Kernel 2.6.37.6- (https://www.linuxquestions.org/questions/slackware-14/installing-brother-mfc-j220-in-salix-os-slackware-13-37-32bit-linux-kernel-2-6-37-6-a-4175423095/)

malekmustaq 08-20-2012 01:43 PM

Installing Brother MFC-J220 in Salix OS /Slackware 13.37 32bit Linux Kernel 2.6.37.6-
 
Installing Brother MFC-J220 in Salix OS /Slackware 13.37 32bit Linux Kernel 2.6.37.6-smp

Distribution: Salix OS /Slackware 13.37 Kernel 2.6.37.6-smp
Architecture: 32bit
Print Drivers: mfcj220lpr-1.1.3-1.i386.rpm, mfcj220cupswrapper-1.1.3-1.i386.rpm
Scan Drivers: brscan3-0.2.11-4.i386.rpm, brscan-skey-0.2.3-0.i386.rpm
CUPS version: cups-1.4.6 SANE version: Sane-1.0.22

The result of this effort satisfactorily allowed Brother MFC-J220 device to Print, Scan and Copy as regular $USER. I have not yet tried the Faxing function.

ACKNOWLEDGMENT: Concerning Brother MFC-J220 on a Slackware I have made use much from the Post made by trillobyte here.

There is one peculiar and baffling issue though, it is NOT an obstacle to the practical solution sought for investing on the device -but probably a technical point that may interest the more informed: the udevd cannot create the proper node for the scanner @ /dev/usb/scanner which results
Code:

--$ sane-find-scanner
to fail making the report. The current kernel loads the essential 'libusb' but it appears udev needs further rules to get pre-defined. Yet, as a matter of procedure udev always knew how to manage event from the hardware level and register it in its own way at /dev/.udev/db. In fact
Code:

--# lsusb -v | grep Brother
and the command
Code:

--# scanimage -L
identify Brother MFCJ220 in the right bus. (I am not certain if I have the right diagnosis. I leave this to them who have the knowledge.) This issue have been tackled on the initial help-thread here.

How To Install and Use as Printer
1. Download, Convert and Install the Drivers.
a) Download the drivers from Brother Industries here.
b) Be sure you have installed 'rpm2tgz' if not 'alien', if none go use Gslapt and install it.
c) Become root (by sudo) and get into a c-shell by issuing
Code:

--# csh
c) Convert the rpm packages to tgz:
Code:

--% rpm2tgz mfcj220lpr-1.1.3-1.i386.rpm
and
Code:

--% rmp2tgz mfcj220cupswrapper-1.1.3-1.i386.rpm
d) Install the lpr first:
Code:

--% installpkg ./mfcj220lpr*tgz
then
Code:

--% installpkg ./mfc*cupsw*tgz
be sure that you are inside the directory where the tgz's are located and be sure too that you are working in a c-shell.
e) Create necessary link:
Code:

--% ln -s /etc/rc.d/rc.cups /etc/rc.d/init.d/cups
f) Run a script:
Code:

--% /opt/brother/Printers/mfcj220/cupswrapper/cupswrappermfcj220
g) Launch Firefox enter URL '127.0.0.1:631. You only need to go to the Printers, the installation has already managed the cups to specify MFCJ220, click it and print a Test Page.
h) Be sure to specify on the Allowed Users list the $USERS you wanted to allow and use the printer; you can publish the printer to the network.

How To Install and Use as Scanner

1. Download, Convert and Install the Scanner Driver
a) Download the scanner driver here.
b) Convert the rpm to tgz format as you have done with the printer drivers above.
c) Become root and work in a c-shell, install the converted package.
d) Run a script:
Code:

--% /usr/local/Brother/sane/setupSaneScan3
Be sure you are running this script in a c-shell (note the --% prompt of c-shell).
e) Check if install has properly registered to saned:
Code:

--% cat /etc/sane.d/dll.conf | grep bro
that should return
Code:

'brother3'
else you will need to re-do the installation of scanner driver.
f) To allow normal $USER to use the scanner add this line to /lib/udev/rules.d/80-libsane.rules
# Brother MFC-J220
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="0259", MODE="0664", OWNER='lp', GROUP="scanner", ENV{libsane_matched}="yes"

Be sure you have entered it in a straight uninterrupted line, observe the commas and spaces each entry. The best way is to copy and paste nearby lines and modify them accordingly, as Brother Industries bear the ID of 04f9 and the unit model is 0259. “Allend” in his response in the initial help-thread (link supra) suggested to add “OWNER='lp'” which I adopted without hesitance since despite failure of udev to create expected node at /dev/usb/scanner I only see a line print (lp) node in it and I was eager to allow $USERS to use the scanner by any means. Anyway udev might have only thought that this time, the same device ID in the same bus is doing the same printing signals. It pays probably since I really have had no problem in allowing $USERS to the scanner, save that 'Logout/ Log-in' and running the script /etc/rc.d/rc.udev force-restart did not immediately allow the groups “lp” & “scanner” but at reboot scanning became a matter of right to the member users.
Setup the Brscan Key Before Testing the Scanner
1. Download, Convert and Install the Scankey Driver
a) Download the scankey driver here.
b) Convert the rpm to tgz format as you have done with the printer drivers above.
c) Become root and work in a c-shell, install the converted package.
d) Run a script:
Code:

--% /opt/brother/scanner/brscan-skey/brscan-skey-0.2.3-0.sh
Be sure you are running this script in a c-shell (note the --% prompt of c-shell).
e) Test scan as root:
Code:

--# /usr/bin/simple-scan
(this brings up scanning app and do as you would; but be sure you have placed something to scan into the scanning glass first.)
f) Test scan as $USER:
Code:

--$ /usr/bin/simple-scan
(but this one you should do after seeing to it that the $USER you are running is already a member of 'lp' and 'scanner' groups; also, be sure you have logged out and logged in as $USER, but in my case I have rebooted the machine first.
Create and Use a Button on Task Bar to Launch Simple-Scan

Many users will find the Sane front end too complicated while the 'simple-scan' provides no link in the Menu-Graphics. There is a simple way to launch the simple-scan application.
1. Right click the task bar, then click 'Add New Items...', then double-click 'Launcher'.
2. Write for the Name: Scanner. For the Description: write anything you like. For the Command: put the entry: '/usr/bin/simple-scan'. Click the temporary icon and choose any icon you like. Click OK. You can use it now if you desire to launch the simple-scan application.
Scanning From the Machine

Using the SCAN button at the Brother MFC-J220 dashboard the LCD offers choices; one useful is ScanToFile option, clicking OK and then Start the scanner communicates with the computer. However by this manner the scanned file goes automatically to /home/$USER/brscan folder. There is a way to put the scanned files into a public folder (especially when scanning multitude of docs it is convenient to do this from the machine buttons) and make the scanned files available to many other users at all times. This requires root password. Here is the procedure:
1. Back up first: cp /opt/brother/scanner/brscan-skey/script/scantofile-0.2.3-0.sh /opt/brother/scanner/brscan-skey/script/scantofile-0.2.3-0.sh~back
2. Press Alt + F2 and enter 'gksu thunar' click Run.
3. Go to /opt/brother/scanner/brscan-skey/script. Right click 'scantofile-0.2.3-0.sh' and Open With... Mousepad (or Geany, whatever editor you have).
4. Edit following lines in the script:

mkdir -p ~/brscan' change this to: mkdir -p /publicfolder/you/like

And the line:

output_file=~/brscan/brscan_"`date +%Y-%m-%d-%H-%M-%S`"".pnm"

Changed to--

output_file=/publicfolder/you/like"`date +%Y-%m-%d-%H-%M-%S`"".pnm"

[Where “/publicfolder/you/like” is the public folder you like to use for everyone. Never add or take away anything from the script, and where it has no quotation mark do not add one.]

5. Save the file. Test scan from the machine and check the public folder.

Good luck and enjoy.

m.m.

trillobyte 08-20-2012 11:09 PM

I have updated my blog with a notice that Brother Solutions is now installing brscan-skey to /opt/Brother/scanner instead of /usr/local/Brother/sane. Thanks for the information.

As far as brscan-skey is concerned, what is the outcome of brscan-skey -H?

malekmustaq 08-22-2012 06:49 PM

Hi, trillobyte,

First thank you for your helpful post.

The outcome of 'brscan-skey -H' offers some configuration help.

However, still, the sane-find-scanner triggered by 'brscan-skey --diagnosis' cannot see any scanner in the usb port.

Yet the MFC-J220 prints, scans and copies, I am satisfied.

Thanks again.


Malekmustaq

trillobyte 08-22-2012 09:06 PM

Your very welcome Malekmustaq.

Best regards


All times are GMT -5. The time now is 06:50 PM.