[sane-devel] Help needed diagnosing strange failure to scan with Samsung SCX-4500W

Mike Cloaked mike.cloaked at gmail.com
Fri May 10 08:20:53 UTC 2013

On Fri, May 10, 2013 at 1:58 AM, Theodore Kilgore <
kilgota at banach.math.auburn.edu> wrote:

> This is weird. The "configuration and setup of the printer allegedly
> fails, but it works?

Indeed!  However I am now wondering if this is due to a udev conflict - I
will add details further down.

> Anyhow, here is what I get from all this:
> 1. It is a device permissions problem pretty much like what I was
> envisioning.
> 2. You say it is not recent, but has happened to others before, and is not
> distro-specific. This would be very much in line with (1).
> 3. As far as testing is concerned, there is a big difference between the
> laptops and the desktop system. The desktop system is hooked to the
> printer by way of the USB, and the laptops are not configured to see an
> attached USB printer, only a networked printer using CUPS (presumably
> accessing the printer through the desktop system, in that case). So there
> is not any conflict for the laptops.
> Do I have all of this right?

> Thus, my version of libusb probably does contain some bells and whistles
> which yours does not. In particular, the stuff about disabling the kernel
> moduld.
I am wondering now about udev more than libusb -

In /lib/udev/rules.d/53-sane.rules

there is a rule for the scanner:

# Samsung SCX-4500W
ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="342b", MODE="0664",
GROUP="scanner", ENV{libsane_matched}="yes"

and I amended the rule that I have in /etc/udev/rules.d/70-printers.rules

# Samsung SCX-4500W
#ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="342b", MODE="0664",
GROUP="scanner", ENV{libsane_matched}="yes"

What I don;t know is whether the scanner rule that will apply first since
the file name starts with 53, will then be overruled by the printer rule
since that will take precedence since it comes later (as the filename
starts with 70)?

I guess that this means that the printer becomes defined in udev since the
printers rule occurs last.  I am guessing that this removes the scanner
definition which is then no longer defined (but in the laptops the scanner
remains defined since there is no printer udev rule?

I have also been looking at the udev rule writing definitions - and I am
not sure whether changing the "=" on some or all of these two rules to ":="
would make a difference - as I understand it the simple "=" means that
definitions can be overruled but ":=" makes them "stick".

Also I don't know if changing the ATTR to ATTRS matters and vice versa - it
seems that the udev rule writing is quite subtle and may matter.  Also I
don't know if udev can cope with defining a device with the same
attributes, and whether other attributes can be found so that the device
definition for the printer and scanner can be properly different in udev?

This may well be the same kind of issue that you have with the cameras as
you point out - and it would be nice to get to the bottom of it!

mike c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130510/4945e1b4/attachment.html>

More information about the sane-devel mailing list