4

I am having difficulties getting my scanner to operate. I am using Raspbian Buster on a raspberry pi 3b+. My scanner is a USB Canon LIDE 110, which is connected to the pi through a powered USB hub.

The issue I am having is that I can't seem to use the scanner without root. If I try

scanimage -L 

it doesn't detect it, but

sudo scanimage -L 

returns

device `genesys:libusb:001:008' is a Canon LiDE 110 flatbed scanner

Likewise if I run xsane, it doesn't detect the scanner, but running it with sudo brings up the GUI and everything proceeds as normal. However the images I save are only accessible to root.

I have added myself to the scanner group, which doesn't seem to have changed anything, and I'm out of ideas.

Dmitry Grigoryev
  • 27,928
  • 6
  • 53
  • 144
Shaker
  • 41
  • 1
  • How did you add yourself to the group? Did you log out and in after it? – jake Aug 04 '19 at 19:07
  • The following thread might help. The OP has a mirror problem: his program runs OK non sudo, but does not run sudo: https://raspberrypi.stackexchange.com/questions/101315/no-module-named-adafruit-circuitpython-servokit – tlfong01 Aug 05 '19 at 02:48
  • jake - i added myself to the scanner group by the following command "sudo usermod -a -G scanner pi" have logged out and in several times, as well as rebooted the pi numerous times. Is there another way to do it? – Shaker Aug 10 '19 at 03:03

1 Answers1

4

Check your scanner's "idVendor" and "idProduct" values with a lsusb command. Add a udev rule

ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1908", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

Reload udev with sudo udevadm control --reload-rules.

Add your userid (I'm assuming you're logging in as pi) to the scanner group sudo groupadd scanner and sudo usermod -a -G scanner pi and you should be able to access the scanner without needing sudo.

Plug your scanner in and it should work. Note: I've not tested this.

Dougie
  • 5,301
  • 10
  • 19
  • 28
  • if you could clarify a few things for me, I would appreciate it; I am a beginner at using linux.How do I add a udev rule? Did I do it properly?

    this is what I did. I cd to /etc/udev/rules.d/, and then I created a file with the following: , ATTRS[idProduct}=="04a9", ATTRS{idProduct}=="1909", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

    which i saved as canoscan.rules Then I followed the other steps. Following these steps exactly does not seem to have solved the problem; xsane still cannot find the scanner unless I run it as root. Did I do something incorrectly?

    – Shaker Aug 10 '19 at 02:53
  • https://linuxconfig.org/tutorial-on-how-to-write-basic-udev-rules-in-linux has more detail than I can fit in a StackOverflow comment – Dougie Aug 10 '19 at 08:51