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?

<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="06746f656e6774624674677576646374747f766f">[email protected]</a> ~ $ scanimage > image.pnm
scanimage: no SANE devices found

<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="56243f353e3724321624372526343324242f263f">[email protected]</a> ~ $ 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

...

<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="087a616b60697a6c487a697b786a6d7a7a717861">[email protected]</a> ~ $ sudo scanimage > image.pnm

<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cbb9a2a8a3aab9af8bb9aab8bba9aeb9b9b2bba2">[email protected]</a> ~ $ sudo su -s /bin/bash - saned
X11 connection rejected because of wrong authentication.
No directory, logging in with HOME=/

<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="dcafbdb2b9b89caebdafacbeb9aeaea5acb5">[email protected]</a>:/$ 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

<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4635272823220634273536242334343f362f">[email protected]</a>:/$ 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

<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f78496999293b785968487959285858e879e">[email protected]</a>:/$ groups
saned lp scanner

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Solved my problem, thanks to the tutorial found here:

http://www.johndstech.com/2016/linux/raspberry-pi/geek-friday-setting-up-epson-scanning-on-raspberry-pi/

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>

Method 2

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 install.sh
  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.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x