Thursday, April 3, 2014

Adding New Scanner to Raspberry Pi

More notes on getting scan working on Raspberry Pi running NOOBs (Debian).

A"permission denied" problem is usually the first stumbling block using libusb to directly talk to scanner.  SANE will automatically configure the scanner to be read/writeable by the user.

SANE (http://www.sane-project.org/) is awesome sauce. But it doesn't support the weird scanners I get to handle.

To add a new scanner, add the vid/pid to /lib/udev/rules.d/60-libsane.rules after LABEL="libsane_usb_rules_begin" (towards start of file) and before LABEL="libsane_rules_end".

SANE's udev rules finish by calling /bin/setfacl to set permissions on the USB devnode. Just adding the scanner's vid/pid to the sane udev rules used to be enough (Ubuntu 12.04). Not so anymore.

The Raspberry Pi Debian has a "scanner" group. The scanner dev node is created rw on that group. So I needed to add the user 'pi' to the scanner group with usermod.

I don't know if the scanner group is a new feature of SANE or something in the newer Debians. (I'm running an older Ubuntu on my laptop). But I can now talk to my scanner without being root.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.