[sane-devel] Hotplug and udev files created automatically now, please test!

m. allan noah anoah at pfeiffer.edu
Tue May 2 17:45:34 UTC 2006


try this:

SANE_DEBUG_SANEI_USB=255 scanimage -L

then look thru that output. do you see a line like this:

[sanei_usb] sanei_usb_init: Looking for kernel scanner devices

what comes immediately after that?

allan

On Tue, 2 May 2006, Peter Christy wrote:

> On Tuesday 02 May 2006 17:40, m. allan noah wrote:
>> i am confused by this- first you say that you need sane to look under
>> /sys or /dev for devices, then you say that you have to alter permissions
>> to get it working. which is it?
>
> udev mounts the usbscanner under /sys In my case, under /sys/bus/usb/ and then
> a randomly variable point. However, given the relevant vendor and product
> IDs, it will automatically create a symlink in /dev and set all the relevant
> permissions.
>
> So for example, I can make it produce a /dev/usbscanner symlink that will
> always point to the scanner, wherever it may have appeared on
> the /sys/bus/usb/ directory, and have the right permissions.
>
> However, sane appears to be looking for the scanner
> under /proc/bus/usb/whatever, which udev cannot easily (as far as I can see)
> set the permissions. As in the /sys file system, it seems to be somewhat
> random where it pops up, from one reboot to the next, although the location
> does correspond to the location under /sys.
>
> Even hotplug was incapable of setting the permissions automatically, because
> although my scanner always appeared as /proc/bus/usb/002/002, hotplug
> *always* tried to set the permissions for /proc/bus /usb/001/002! This was a
> bug in hotplug that never got fixed! I bypassed it by adding
>
> chown root:users /proc/bus/usb/002/002
> chmod 0660 /proc/bus/usb/002/002
>
> to my rc.local file. However, this only works if the scanner always appears
> on /proc/bus/usb/002/002 Under udev alone, it doesn't. As often as not it
> appears as  /proc/bus/usb/001/003 or even something else!
>
> I need to find some way of making sane use /dev/usbscanner to access the
> scanner rather than /proc/bus/usb/whatever. My understanding is that this is
> a very old way of doing things that only works with kernel scanner modules.
> Certainly my initial attempts in this area have met with total failure!
>
>

-- 
"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera



More information about the sane-devel mailing list