scanimage does not find scanner unless sudo'ed, but shows up with sane-find-scanner (Raspbian)

I have an Epson multifunction device connected to a Raspberry Pi running the latest Raspbian. As you can see in the output below, scanimage will only find my scanner if I sudo it, but sane-find scanner finds it just fine without sudo. I’ve checked that the device permissions are properly set… saned is a memeber of the lp group, which is the group of the USB device. What gives?

richard@raspberrypi ~ $ scanimage > image.pnm
scanimage: no SANE devices found

richard@raspberrypi ~ $ sane-find-scanner


found USB scanner (vendor=0x04b8, product=0x0839) at libusb:001:004
found USB scanner (vendor=0x0424, product=0xec00) at libusb:001:003


richard@raspberrypi ~ $ sudo scanimage > image.pnm

richard@raspberrypi ~ $ sudo su -s /bin/bash - saned
X11 connection rejected because of wrong authentication.
No directory, logging in with HOME=/

saned@raspberrypi:/$ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 04b8:0839 Seiko Epson Corp. CX8300/CX8400/DX8400

saned@raspberrypi:/$ ls -l /dev/bus/usb/001
total 0
crw-rw-r-T  1 root root 189, 0 Feb 12 02:23 001
crw-rw-r-T  1 root root 189, 1 Jan  1  1970 002
crw-rw-r-T  1 root root 189, 2 Jan  1  1970 003
crw-rw-r--+ 1 root lp   189, 3 Feb 12 02:24 004

saned@raspberrypi:/$ groups
saned lp scanner
Asked By: user278411


Solved my problem, thanks to the tutorial found here:

I had to create /etc/udev/rules.d/55-libsane.rules to say:

SYSFS{idVendor}=="04b8", MODE="0666", GROUP="scanner", ENV{libsane_matched}="yes"

and /etc/saned/epson2.conf to reflect the vendor and product ID:

usb <0x04b8> <0x0839>
Answered By: user278411

In case of the Canon TS3150 , the above solution was not enough.

  1. Removing all previous installations.
  2. Fresh download from Canon and installation from the given
  3. Adding that line in a rule.d/55-whatever.rules
  4. Adding usb 0x04a9 0x1782 on /etc/sane.d/canon.conf
  5. Restarting udev service with udevadm control --reload-rules;udevadm trigger.

Still, sane-find-scanner reports the scanner, but scanimage -L not

Then, in a french forum for ubuntu, I read that they do not use the normal programs, but a special one that comes with the Canon driver.

The scangearmp2 was installed and ran. Amazing but Canon prefers their own simplistic program than any SANE-based one.

Answered By: MiGrieves
Categories: Answers Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.