Sunday, September 27, 2009

Installing a Brother MFC-7340 Multifunction Printer in Ubuntu 9.04

Brother provides a webpage to guide the process of setting up an Ubuntu 9.04 installation with certain Brother brand printers. This post describes the steps I took to set up my Brother MFC-7340 Multifunction device. I decided to work through one function at a time, starting with the MFC-7340's printer. First, I downloaded the printer drivers. It looked like I was supposed to get both the LPR driver and the cupswrapper driver, so I did. I chose the Debian rather than RedHat (.rpm) format for these and other downloads. The LPR driver installation instructions recommended using the CUPS driver rather than LPR, if CUPS was working. On my system, it wasn't. I took that as a cue that I should begin by trying to use the LPR driver instead, though possibly it should have told me that I should try again with CUPS, to see if I could get it to work. The LPR driver instructions told me to begin by attending to certain pre-installation requirements. On my 64-bit Ubuntu installation, this involved going into System > Administration > Synaptic Package Manager, where did a quick search for the ia32-libs package. It was already installed on my machine. If it hadn't been, I would have checked it and clicked on Apply. In Ubuntu's Applications > Accessories > Terminal, I navigated to the folder where I had put the LPR driver download. The easy way to navigate there was to find it in Nautilus (i.e., Places > Computer, what Ubuntu calls "File Browser"), copy its address from the Nautilus address bar, and paste it into a CD command (e.g., CD "/downloadlocation/folder/downloadedfile.deb"). In that folder, I entered the following command in Terminal:

sudo dpkg -i --force-all brmfc7340lpr-2.0.2-1.i386.deb
where everything after "force-all" was the name of the downloaded LPR driver. Note: this won't work if Synaptic or some other program updater is still running. Then, to test whether it worked, I typed this:
dpkg -l | grep Brother
which gave me something resembling a positive reply. Next, I edited the configuration file:
sudo gedit /etc/printcap
where the instructions told me to verify that, under the MFC7340 heading, the line beginning with ":lp" would say :lp=/dev/usb/lp0. Mine actually said :lp=/dev/usb/lp0:\ with an ending backslash, but I doubted this was crucial, so other than that it looked good. Now I needed to restart the print system by typing this:
/etc/init.d/lpr restart
But that appeared to be mistaken; I got "No such file or directory," and if I prepended "sudo" to it, I got "command not found." At this point, I plugged in the USB cable to the printer, realizing that there was probably no Ubuntu counterpart to the problem of screwing everything up by plugging in the USB cable before you've installed the drivers. And when I did that, something interesting happened. Ubuntu started looking for drivers, and wound up at a New Printer dialog that said, "Choose Driver." I chose the (default) "Select printer from database" option, and it defaulted to the Brother MFC-7225N BR-Script3, which it seemed to think was close enough to my MFC-7340. But it wouldn't proceed because it believed I was entering the wrong password for my local system, which I definitely wasn't. I couldn't get past that, so that was the end of the automated process. The "Printer configuration - localhost" dialog was showing a green circle with a check mark on an icon representing another, working printer that I had previously installed on this Ubuntu system, but there was no mention of this Brother printer. When I entered the command to print this page on which I am typing these words, I got a Print dialog showing options for that other printer, as well as a Print to File option and the nonworking CUPS PDF option, but this Brother printer did not appear there either. I decided to try the CUPS option. Its instructions seemed to continue on from where the LPR installation left off, so I had essentially completed the first several required steps to install CUPS. My next step, then, was to type this:
sudo dpkg -i --force-all cupswrapperMFC7340-2.0.2-1.i386.deb
where everything after "force-all" was the name of the CUPS driver I had downloaded. (Terminal was still parked in that same folder that I had navigated to earlier.) This gave me some error messages, including "Directory nonexistent." So then I ran this:
dpkg -l | grep Brother
and it gave me a list that mentioned both the LPR and the CUPS wrapper drivers. So it did look like they were installed. Next, in Firefox I went to http://localhost:631/printers." This gave me a cool HTML information webpage about my installed printers. Under the MFC-7340 entry, I went into Modify Printer and changed Device to "LPD/LPR Host or Printer" (an alternative would have been "AppSocket/HP JetDirect"). I left Device URI at "lpd" because this was a local printer, directly connected via USB. But it wouldn't let me go beyond that. The instructions said I needed to type this:
lpd://(Your printer's IP address)/binary_p1
So, OK, what was my printer's IP address? Someone suggested using nmap, so I installed that in Synaptic and typed "man nmap" at the Terminal prompt to view its manual. On the basis of what I read there, I concluded that I had no idea whatsoever how to use nmap. I probably spent an hour screwing around and ultimately tried this:
lpd://localhost/binary_p1
and that didn't work. My printer didn't seem to offer an option of printing a test page, or at least I couldn't find any reference to it in the manual. Only then did I realize that the cool HTML page (above) had already told me what the URI was: usb://Brother/MFC-7340. I don't know why the cool HTML page didn't just default to that, instead of giving me "lpd" on a line by itself. Now I was supposed to specify its model, but their list of options didn't include my model, so I chose the MFC-7225N BR-Script3 (see above). Then it was asking for a username and password, so I entered my ordinary Ubuntu username and password. But this was not what it wanted. So I tried again, entering nothing, and this gave me a completely blank page. I tried to print from the menu in Firefox in Ubuntu, and this gave me a dozen completely white pages. I tried with a different webpage and got 19 blank pages before I yanked out the paper tray - the Stop button on the printer wasn't stopping anything. I tried printing one page of a PDF and got the same thing. At this point, I had run out of time. I concluded that the Brother MFC-7340 was not, in practical terms, compatible with Ubuntu 9.04. Not to deny that people couldn't make it work. No doubt some could. But even with the devotion of a considerable amount of time, at present I could not.

1 comments:

raywood

OK, well, I spoke too soon. It doesn't look like the MFC-7340 is going to do well in Ubuntu per se. But I happen to be running Windows XP in VMware Workstation 6.5 on that same computer. This morning, in WinXP, I got the Found New Hardware wizard. I couldn't imagine what new hardware it had found - I forgot that I had left the USB cable connected after I was done screwing around with Ubuntu and the MFC-7340 - so I said yeah, sure, whatever, knock yourself out. So the Found New Hardware wizard began installing stuff. Eventually I realized it was the MFC-7340, and I knew that you're not supposed to plug in the USB cable until you've finished installing the drivers in Windows. So I yanked out the cable, inserted the driver CD, and installed the Brother MFC-7340 software. And it worked. I can't print to the printer from within Ubuntu 9.04, but I can print to the printer from within a WinXP virtual machine in VMware running on Ubuntu 9.04. Haven't tried scanning or faxing yet.