Unfortunately none of the solutions above worked for my Brother DCP-7045N, but just the normal standard installation:
Download packages from http://solutions.brother.com/
Install doing
sudo dpkg -i --force-all brscan3-0.2.5-2.i386.deb
sudo dpkg -i --force-all brscan-skey-0.2.1-1.i386.deb
Check with dpkg -l | grep Brother
brsaneconfig3 -a name=SCANNER model=DCP-7045N ip=192.168.1.101
Check with brsaneconfig3 -q | grep DCP-7045N
I hope it does it for you too!
After I update to 13.10 I got the same error when scanning. There are two problems here.
- The error Invalid argument is not a argument problem, but is a write access problem.
- The other problem is that the bus and dev number are wrong from the scanimage error.
How to find and fix the problem?
Install the brscan4 drivers from the brother website
sudo dpkg -i brscan4-0.4.2-1.amd64.deb
Check to see if it works
sudo brsaneconfig4 -d
Test to see if the scanner is installed (scanner need to be powered on). And run as a user NOT root
$ scanimage -L
device `brother4:bus5;dev1' is a Brother ADS-2000 USB scanner
$ scanimage --test
scanimage: open of device brother4:bus5;dev1 failed:
Invalid argument
or
$ scanimage
scanimage: open of device brother4:bus5;dev1 failed:
Invalid argument
You can use the following script to update the permissions for the scanner.
lsusb | grep -i brother | sed 's/://' | awk '{printf "/dev/bus/usb/%s/%s", $2,$4}' | xargs -i -t sudo chmod 666 "{}"
lsusb
lists usb devices
grep -i brother
will find the brother device (assumption I made is you have only one brother device connected to the USBs at a time)
sed 's/://' | awk '{printf "/dev/bus/usb/%s/%s", $2,$4}'
will find the bus & device numbers
xargs -i -t sudo chmod 666 "{}"
will add write permission to scanner
Here is more detailed information on why we did what we did above
To find out where the brother scanner is on the bus use lsusb
. This is one of the problems in the scanimage. The bus is 003 and the device is 002 and not bus 5, dev 1 as per scanimage
$ lsusb
Bus 003 Device 002: ID 04f9:60a0 Brother Industries, Ltd**
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
...
To fix the problem, you will need to use the path based on the location of the brother scanner in the lsusb
command. In my case it was bus 003
and device 002
. Note that if you unplug the USB cable to the scanner and plug it back in the device, you will get a new number and/or bus. (The number return back to 2 when you reboot the PC)
Examples:
sudo cd /dev/bus/usb/003
sudo chmod 666 002
or just:
sudo chmod 666 /dev/bus/usb/003/002
Scanimage
need to fix the message when it can not access the scanner to have the right bus and dev number and also tell the user that the problem is a write access problem.
Brother
needs to update the driver code so that global user can write to the scanner i.e. chmod 666
to the scanner driver location
Best Answer
Visit the page linked below:
Printer Driver | Downloads | DCP-7065DN | United States | Brother - linux-brprinter-installer-2.2.1-1.gz
Select Linux and .deb then click search
Download the Driver Install tool.
Open with file roller(aka archive manager) and extract to your home directory.
Open Files, Click on Home
right click on linux-brprinter-installer-2.1.1-1 go to properties, permissions and check the box allow executing as program or after opening the terminal as described below issue the command
chmod +x ./linux-brprinter-installer-2.1.1-1
Open a terminal with CtrlAltt
issue the commands:
at Input Model Name enter DCP-7065DN
You will be presented with:
Agree to this.
You will then be asked to agree to their terms several times. Respond in the affirmative. After a short delay it will ask if you will specify the device URI specify yes – prompted with a number of choices I chose the IP option (12 or 10 in my case)
Enter IP address of printer. (You can set this via the front panel of the printer see note below)
Press Enter when prompted
Note: The leading zeros required on the printer setup will break the sane configuration if you include them so strip them out. example (printer ip 192.168.015.024 = script input 192.168.15.24) otherwise you get this:
If this happens to you, use brsaneconfig4 to fix it by removing the faulty configuration with
brsaneconfig4 -r DCP7065DN
and then re-adding it with for example (your IP will likely be different)
brsaneconfig4 -a name=DCP7065DN model=DCP7065DN ip=192.168.15.24
Note: I'm leaving the hyphen out of the model number, for some reason i had issues when I left them in.
Printing and scanning via SimpleScan or Xsane now functions
Tested on Ubuntu 14.04 32-bit and 64-bit as well as 16.04 64-bit and 18.04 64 bit. Note: for 18.04 if you want to use xsane rather than Simple Scan you'll have to install it first with
sudo apt install xsane