LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-16-2014, 07:10 AM   #1
bendigogas
LQ Newbie
 
Registered: Apr 2014
Location: Bendigo
Distribution: Ubuntu 13.10 Saucy
Posts: 4

Rep: Reputation: Disabled
Help with libusb permissions to run Brother MFC-J4510DW scanner on Ubuntu 13.10


Hello all. I've been using Ubuntu for some time now and gradually finding my way around. Still a little tenative with some things under the bonnet but gradually getting there. I'm really having issues getting a Brother MFC-J4510DW printer/scanner to work. I am using VueScan as my scanner software, which worked straight out of the box with my old Canon scanner which has recently died (at least the priner portion of it). The printer bit of the new multi-function works fine (after a couple of attempts).

As far as I can tell with self help and a bit of help from Ed Hammick my issue from the scanning side is one of libusb permissions, where I am really stuck is how to edit/change these.

The scanner works (via VueScan) when I run it as root.

When I run sane-find-scanner as root I get the following (with my normal user account nothing is found):
Code:
  # 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.

could not open USB device 0x046d/0xc52b at 002:005: Access denied (insufficient permissions)
could not open USB device 0x046d/0x0a12 at 002:008: Access denied (insufficient permissions)
could not open USB device 0x152d/0x2329 at 002:010: Access denied (insufficient permissions)
could not open USB device 0x05e3/0x0608 at 002:009: Access denied (insufficient permissions)
could not open USB device 0x05e3/0x0608 at 002:007: Access denied (insufficient permissions)
could not open USB device 0x046d/0x09a6 at 002:006: Access denied (insufficient permissions)
could not open USB device 0x05e3/0x0608 at 002:004: Access denied (insufficient permissions)
could not open USB device 0x04f9/0x02b3 at 002:011: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 002:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0003 at 008:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 007:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0003 at 006:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 005:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0003 at 004:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 003:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 001:001: Access denied (insufficient permissions)
  # No USB scanners found. If you expected something different, make sure that
  # you have loaded a kernel driver for your USB host controller and have setup
  # the USB system correctly. See man sane-usb for details.

  # 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.
and scanimage-L produces the following (as root and as a normal user):
Code:
device `brother4:bus7;dev1' is a Brother MFC-J4510DW USB scanner
I'm sure this is a quick easy fix, but the deeper workings of linux are still not all that familiar to me.

Many thanks,
J
 
Old 04-17-2014, 08:12 PM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 3,155

Rep: Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827
It's very strange that sane-find-scanner run as root is unable to open the device file. Is there a version mismatch, perhaps? Try reinstalling the software.
Also, see if there are relevant messages in the kernel buffer or /var/log/syslog.

On my system, a Raspberry Pi running Raspbian, which is based on Debian, I had problems because of the file permissions configuration.

scanimage -L reports
Code:
$ scanimage -L
device `canon630u:libusb:001:008' is a CANON Canoscan FB630U flatbed scanner
This means that the device file for my scanner is /dev/bus/usb/001/008:
Code:
$ ll /dev/bus/usb/001/008
crw-rw-r-T+ 1 root root 189, 7 Apr 18 09:38 /dev/bus/usb/001/008
$ getfacl /dev/bus/usb/001/008
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/001/008
# owner: root
# group: root
# flags: --t
user::rw-
group::rw-
group:scanner:rw-
mask::rw-
other::r--
For the scanner tools to work, write permissions to /dev/bus/usb/001/008 are needed. On my installation, the tools are supposed to run as members of the "scanner" group, and an ACL has been set up to permit members of this group to write to the device file.
This is documented in /usr/share/doc/libsane/README.Debian. You may want to check what it looks like on your system.
 
Old 04-17-2014, 10:03 PM   #3
bendigogas
LQ Newbie
 
Registered: Apr 2014
Location: Bendigo
Distribution: Ubuntu 13.10 Saucy
Posts: 4

Original Poster
Rep: Reputation: Disabled
My mistake, sane-find-scanner finds a SCSI processor as root, but no USB one. This is what is found when I run it as root:

Code:
  # 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.

found SCSI processor "Marvell 91xx Config 1.01" at /dev/sg3
  # Your SCSI scanner was detected. It may or may not be supported by SANE. Try
  # scanimage -L and read the backend's manpage.

  # No USB scanners found. If you expected something different, make sure that
  # you have loaded a kernel driver for your USB host controller and have setup
  # the USB system correctly. See man sane-usb for details.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.
Yet I can operte the scanner as root via VueScan. While this is a workaround, it's not one I wish to use permanently.

From your post am I correct in assuming that the device file for my scanner will be /dev/bus/usb/007/001 Do I chmod this file to 666 and see what happens?

J

Last edited by bendigogas; 04-17-2014 at 10:10 PM.
 
Old 04-17-2014, 10:33 PM   #4
bendigogas
LQ Newbie
 
Registered: Apr 2014
Location: Bendigo
Distribution: Ubuntu 13.10 Saucy
Posts: 4

Original Poster
Rep: Reputation: Disabled
Tried chmod on that file. logged out, logged in again, no joy. Does the file mentioned as a SCSI scaner /dev/sg3 offer me any hope?

Nothing in the syslog that gives any clue.

I also doubt any version mismatch or base software issues as the scanner works perfectly as root.

ANy offers of further help greatfully accepted.

J
 
Old 04-18-2014, 06:24 PM   #5
blip
LQ Newbie
 
Registered: Aug 2013
Posts: 17

Rep: Reputation: Disabled
I've had to add udev rules to solve this issue before. As root, create the file /etc/udev/rules.d/80-scanner.rules with the contents:
Code:
ACTION=="add", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="YYYY", MODE="0666", OWNER="root", GROUP="plugdev"
Replace XXXX and YYYY with the vendor:product ID from lsusb. For example,
Code:
Bus 002 Device 002: ID 046d:c00e Logitech, Inc. M-BJ58/M-BJ69 Optical Wheel Mouse
identifies vendor ID "046d" with product ID "c00e". (I haven't tested this but it looks right according to /lib/udev/rules.d/40-libsane.rules and others.)

Also, it might be time to upgrade your Ubuntu. I tend to stick with LTS releases every two years; 14.04 LTS was released yesterday.
 
Old 04-18-2014, 11:00 PM   #6
bendigogas
LQ Newbie
 
Registered: Apr 2014
Location: Bendigo
Distribution: Ubuntu 13.10 Saucy
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks for the tip, but unfortunately still no joy.

The upgrade to 14.04 was applied yesterday.

Still hoping

J
 
  


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
Brother MFC-J4510DW scanner problem FlyerDan69 Linux - Hardware 95 03-25-2016 03:32 AM
Installing a Brother MFC-6890CW (printer)/Scanner on Linux Lite 1.08 (Ubuntu 12.04)? n7tek Linux - Hardware 1 04-07-2014 04:59 AM
Brother scanner mfc j430w installation shakti.mickey Linux - Newbie 5 06-02-2013 11:55 PM
Brother MFC-9440CN scanner with Ubunutu 10.10 cigtoxdoc Linux - Hardware 2 03-04-2011 12:47 AM
Brother MFC-8670DN -- Scanner Not Working in Ubuntu 9.04 noobwifi Linux - Hardware 3 05-22-2009 12:26 PM

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

All times are GMT -5. The time now is 09:48 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration