LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-03-2012, 02:48 PM   #1
walkerdr2911
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Rep: Reputation: Disabled
Installing the scanner function on a multifunction Brother dcp153 under U12.04


I have downloaded the drivers for the scanner from the Brother website. After that I am a bit lost. I have activated the dpkg -i commands but the scanner is still not recognised.
Any suggestions appreciated.
 
Old 08-03-2012, 03:59 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,209

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
Have you got Sane installed? What happens if you run the command 'sane-find-scanner' ( without the quotes )?
 
Old 08-04-2012, 03:18 AM   #3
walkerdr2911
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Installing the scanner function on a multifunction Brother dcp153 under U12.04

I ran the 'sane-find-scanner' command with the following result.

It detected the scanner as being on the USB port. The scanner is plugged in as it is part of the printer. Not sure where to go to now.


# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.

# No SCSI scanners found. If you expected something different, make sure that
# you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04f9, product=0x01e1) at libusb:004:002
# Your USB scanner was (probably) detected. It may or may not be supported by
# SANE. Try scanimage -L and read the backend's manpage.

# Not checking for parallel port scanners.

# Most Scanners connected to the parallel port or other proprietary ports
# can't be detected by this program.

# You may want to run this program as root to find all devices. Once you
# found the scanner devices, be sure to adjust access permissions as
# necessary.
david@david-System-Product-Name:~$ scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
david@david-System-Product-Name:~$
 
Old 08-04-2012, 10:25 AM   #4
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,209

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
Did you install the 32 bit drivers, or the 64 bit drivers? Did you follow the instructions on Brothers web site?

Did you update the udev rules via these instructions?

Quote:
Ubuntu 9.10, 10.04, 10.10, 11.4, 11.10, 12.04
1. Open "/lib/udev/rules.d/40-libsane.rules" file.
2. Add the following two lines to the end of the device list. (Before the line "# The following rule will disable ..."):


The lines to be added---------------------------


# Brother scanners
ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"


3. Restart the OS.
 
Old 08-05-2012, 10:41 AM   #5
walkerdr2911
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Installing the scanner function on a multifunction Brother dcp153 under U12.04

I installed the 64 bit drivers so that should be OK.

Then did the following:

david@david-System-Product-Name:~$ open /lib/udev/rules.d/40-libsane.rules
Couldn't get a file descriptor referring to the console
david@david-System-Product-Name:~$

This reflects my inexperience with Linux as I suspect I have not parsed something correctly.When I tried to do this as a bash shell, permission denied.

Hope we are nearly there, and thanks so far.

David Walker
 
Old 08-05-2012, 10:58 AM   #6
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,209

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
Quote:
permission denied
That file has to edited as root, use sudo on the front of the command.

Quote:
Couldn't get a file descriptor referring to the console
Don't understand what you mean, or why need something for console?
 
Old 08-05-2012, 12:31 PM   #7
walkerdr2911
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Tried this. Did not get the # sign anywhere.



david@david-System-Product-Name:~$ sudo open /lib/udev/rules.d/40-libsane.rules
[sudo] password for david:
david@david-System-Product-Name:~$ sudo open /lib/udev/rules.d/40-libsane.rules
david@david-System-Product-Name:~$ sudo open /lib/udev/rules.d/40-libsane.rules Brother scanners
david@david-System-Product-Name:~$ ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"
ATTRS{idVendor}==04f9,: command not found
david@david-System-Product-Name:~$
 
Old 08-05-2012, 12:49 PM   #8
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572

Rep: Reputation: 210Reputation: 210Reputation: 210
When my scanner is not recognized, I find that unplugging it and plugging it back in helps the system to find it. As Napoleon once said, "From the sublime to the ridiculous is but a step."
 
Old 08-05-2012, 01:09 PM   #9
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572

Rep: Reputation: 210Reputation: 210Reputation: 210
Another thought: perhaps you're not a member of the group "scanner". At the command line, enter "groups" to see. For me, I get the following:
Code:
vector:/~
mark:$ groups
mark disk lp floppy audio video cdrom games slocate plugdev power netdev scanner users
If "scanner" is not a group you belong to, then enter the following:
Code:
sudo addgroup user scanner
That should add your user to the group "scanner" (note: "user" is in italics, meaning that you need to enter the correct name of your user within this command). Another suggestion I'd make is to install the package "xsane". It's a good gui for working with scanners, and installing it will ensure that you've got other important sane (scanner access now easy) packages also installed.

PS, I got the addgroup command from an old Linux Cookbook, but they may have changed this command. So, it's likely best to just use the gui supplied under system tools for administering users and groups on your system.

Last edited by mark_alfred; 08-05-2012 at 01:24 PM. Reason: clarity
 
Old 08-05-2012, 01:52 PM   #10
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572

Rep: Reputation: 210Reputation: 210Reputation: 210
Quote:
Originally Posted by walkerdr2911 View Post
I installed the 64 bit drivers so that should be OK.

Then did the following:

david@david-System-Product-Name:~$ open /lib/udev/rules.d/40-libsane.rules
Couldn't get a file descriptor referring to the console
david@david-System-Product-Name:~$
"open" is not a command. Instead, try using an editor. "nano" is a command line editor that may work out. So, try the following in the terminal (aka console) to be able to edit and add whatever camorri was referring to, in her/his post, to the "40-libsane.rules" file:
Code:
sudo nano /lib/udev/rules.d/40-libsane.rules
Even easier for you might be to open it in a gui editor like gedit. So, try entering the following:
Code:
sudo gedit /lib/udev/rules.d/40-libsane.rules
You may get a message stating "sudo is not required for running the command 'gedit'" -- I just use good old root rather than sudo, so I'm not terribly familiar with distros like Ubuntu that disable root for sudo -- my apologies.


If the preceding doesn't work, then try pressing Alt-F2, type "gksu gedit" in the run application dialogue (this is to get the application running with the proper permissions -- you may need to install gksu first to do this -- find it with synaptic and install it), and then open the file "/lib/udev/rules.d/40-libsane.rules" to edit it.

Good luck!

Last edited by mark_alfred; 08-05-2012 at 01:53 PM.
 
Old 08-07-2012, 09:55 AM   #11
walkerdr2911
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Installing the scanner function on a multifunction Brother dcp153 under U12.04

Following on, I edited the libsane rules file and added the statements proposed by cammori, however I note that there is no ID product to be entered, and all the other devices in the libsane rules seem to have one. Also restarted the OS, and plugged/unplugged the scanner to no avail. The Brother entries are at the bottom of the USB entries.I stripped out a whole chunk as it was way too long.
Saved the libsane rules as below.






# This file was automatically created based on description files (*.desc)
# by sane-desc 3.5 from sane-backends 1.0.22
#
# udev rules file for supported USB and SCSI devices
#
# The SCSI device support is very basic and includes only
# scanners that mark themselves as type "scanner" or
# SCSI-scanners from HP and other vendors that are entitled "processor"
# but are treated accordingly.
#
# To add a USB device, add a rule to the list below between the
# LABEL="libsane_usb_rules_begin" and LABEL="libsane_usb_rules_end" lines.
#
# To run a script when your device is plugged in, add RUN+="/path/to/script"
# to the appropriate rule.
#
# If your scanner isn't listed below, you can add it as explained above.
#
# If your scanner is supported by some external backend (brother, epkowa,
# hpaio, etc) please ask the author of the backend to provide proper
# device detection support for your OS
#
# If the scanner is supported by sane-backends, please mail the entry to
# the sane-devel mailing list (sane-devel@lists.alioth.debian.org).
#
ACTION!="add", GOTO="libsane_rules_end"
ENV{DEVTYPE}=="usb_device", GOTO="libsane_create_usb_dev"
SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
SUBSYSTEM=="usb_device", GOTO="libsane_usb_rules_begin"
SUBSYSTEM!="usb_device", GOTO="libsane_usb_rules_end"

# Kernel >= 2.6.22 jumps here
LABEL="libsane_create_usb_dev"

# For Linux >= 2.6.22 without CONFIG_USB_DEVICE_CLASS=y
# If the following rule does not exist on your system yet, uncomment it
# ENV{DEVTYPE}=="usb_device", MODE="0664", OWNER="root", GROUP="root"

# Kernel < 2.6.22 jumps here
LABEL="libsane_usb_rules_begin"

# Brother scanners
ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"
# The following rule will disable USB autosuspend for the device
ENV{libsane_matched}=="yes", RUN+="/bin/sh -c 'if test -e /sys/$env{DEVPATH}/power/control; then echo on > /sys/$env{DEVPATH}/power/control; elif test -e /sys/$env{DEVPATH}/power/level; then echo on > /sys/$env{DEVPATH}/power/level; fi'"

LABEL="libsane_usb_rules_end"

SUBSYSTEMS!="scsi", GOTO="libsane_scsi_rules_end"

LABEL="libsane_scsi_rules_begin"
# Generic: SCSI device type 6 indicates a scanner
KERNEL=="sg[0-9]*", ATTRS{type}=="6", ENV{libsane_matched}="yes"
# Some scanners advertise themselves as SCSI device type 3
# Epson Perfection 2450 | Epson Perfection 2450 PHOTO
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9700", ENV{libsane_matched}="yes"
# Epson Perfection 3200 | Epson Perfection 3200 PHOTO
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9800", ENV{libsane_matched}="yes"
# Epson Perfection 636S | Epson Perfection 1200S
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection1200", ENV{libsane_matched}="yes"
# Epson Perfection 636
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection636", ENV{libsane_matched}="yes"
# Epson GT-7000
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="SCANNER GT-7000", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet 4p
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1130A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet IIc
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1750A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet IIp
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1790A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet IIcx
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2500A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet 4c
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2520A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet 5p
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C5110A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet 6200C
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C6270A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet 6300C
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C7670A", ENV{libsane_matched}="yes"
LABEL="libsane_scsi_rules_end"

ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"

LABEL="libsane_rules_end"
 
Old 08-07-2012, 11:57 AM   #12
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,209

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
Quote:
Following on, I edited the libsane rules file and added the statements proposed by cammori, however I note that there is no ID product to be entered
First of all, what I posted is a direct copy from Brothers web site on how to get your scanner working. The instructions on located with the How to Install the drivers info. It is a separate link.

The command lsusb will list the scanners idVendor and idProduct. So in a command prompt run lsusb, it will look something like this.

Quote:
Bus 001 Device 005: ID 03f0:4505 Hewlett-Packard ScanJet G4010
This is my scanner. Brother idVendor will be 04f9 there is a colon, and the idproduct follows. Edit the file as root, and add the info.
 
Old 08-11-2012, 08:38 AM   #13
walkerdr2911
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Installing the scanner function on a multifunction Brother dcp153 under U12.04

Hi, After some domestic engineering, I have restarted this mini project.
I tried to scan a document using simple scan- no scanner detected.
Then tried using xsane again could not detect the scanner.said "No devices available. The Help screen indicated that ?permissions do not allow its use.? The backend has not been loaded by SANE( man-sane-dll) or the backend is not configured correctly (man-sane-"backendname"). I believe the libsane is OK but am not sure what the next step is.

The libsane usb rules are as below, which seems to be K, though the idProduct of "01e1",concerns me slightly.;


# Kernel < 2.6.22 jumps here
LABEL="libsane_usb_rules_begin"
# Brother scanners
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="01e1"ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet 4100C
ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0101", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet 4200C | Hewlett-Packard ScanJet 4200Cxi | Hewlett-Packard ScanJet 4200Cse
ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0105", ENV{libsane_matched}="yes"
 
Old 08-11-2012, 09:04 AM   #14
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,209

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
Quote:
The libsane usb rules are as below, which seems to be K, though the idProduct of "01e1",concerns me slightly.
Can you post the output of the command 'lsusb' with the scanner turned on.
 
Old 08-16-2012, 10:56 AM   #15
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572

Rep: Reputation: 210Reputation: 210Reputation: 210
permissions

Quote:
Originally Posted by walkerdr2911 View Post
Then tried using xsane again could not detect the scanner.said "No devices available. The Help screen indicated that ?permissions do not allow its use.?
There's another suggestion for dealing with permission issues at this Ubuntu site. They state that running the following code may help:
Code:
sudo adduser saned scanner
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problems installing dcp-7030 brother scanner zenbo Linux - Newbie 1 02-15-2012 04:53 PM
Installing Brother DCP-7040 printer/scanner under CUPS wufo Slackware 4 11-27-2011 08:55 PM
Slow printing from CUPS on Debian to Brother Multifunction Device jimbo1954 Linux - Hardware 2 03-18-2008 08:26 AM
Tell me what printer/scanner multifunction to get! RoaCh Of DisCor Linux - Hardware 10 02-16-2006 08:34 PM
brother multifunction printer mfcc6800 sonic Fedora 1 10-15-2004 12:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration