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
It is not advisable that you use wine to install drivers for any hardware, as they won't be properly integrated into ubuntu.
However here is a step by step guide to get the drivers working (if you're on an 64-bit system):
First unplug your printer.
Open a terminal and copy&paste the following commands
(removes any existing drivers that could cause conflict)
(reinstalling dependencies)
(make directories for the drivers)
(make download location)
(download drivers)
(install and configure driver packages)
(link driver files)
plug in your printer now and proceed with the installation process from 'System Settings' -> 'Printers'
To enable scanning:
Download Scanner drivers from brother home page (64-bit): http://www.brother.com/cgi-bin/agreement/agreement.cgi?dlfile=http://www.brother.com/pub/bsc/linux/dlf/brscan3-0.2.11-4.amd64.deb&lang=English_gpl
(32-bit) http://www.brother.com/cgi-bin/agreement/agreement.cgi?dlfile=http://www.brother.com/pub/bsc/linux/dlf/brscan3-0.2.11-4.i386.deb&lang=English_gpl
plug in and turn on your scanner open a terminal and type
(for 64-bit)
(for 32-bit)
check if it installed correctly
output should look something like this:
Finally type
and at the following text right before this line (pretty far down at the bottom)
'# The following rule will disable USB autosuspend for the device'
Text to add:
Restart the computer now and it should work.