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

Henning Meier-Geinitz henning at meier-geinitz.de
Tue May 2 19:59:57 UTC 2006


Hi,

On 2006-05-02 14:17, Peter Christy wrote:
> I've built the latest cvs of sane and installed it, but it seems that it still 
> relies on hotplug to set permissions for USB devices. My system no longer has 
> hotplug (nor does Debian, I believe, and many others are in the process of 
> dropping hotplug and just using udev).

sane-backends provides scanner lists and scripts for hotplug,
hotplug-ng and udev. They can be found together with some
documentation in the tools directory. There were some changes in CVS
recently concerning the generation of the scanner lists, so there is
the chance that I broke something. But in pronciple, it works. The
udev script is also used by the Debian package, in fact it was written
by the Debian SANE maintainer :-)

In our poackage, the udev (and hotplug ...) scripts are NOT installed
automatically.

> When using udev without hotplug, the actual position of the usb device on 
> the /sys bus seems to be variable. However, it is quite easy to make a 
> symlink (/dev/usbscanner) that will always point to the scanner wherever it 
> is actually mounted. Unfortunately, this symlink - or rather the device it 
> ultimately links to - is under the /sys mount point rather than /proc.

/dev/usbscanner (and similar device files like /dev/usb/scanner0)
refer to the kernel scanner driver which does not exist on current
kernels. Don't used them.

SANE uses libusb which uses /proc/bus/usb/... or /dev/bus/usb,
whichever is available. For udev, /dev/bus/usb/... is used (see
README.linux).

> I think sane needs to offer an option as to whether it should seek /proc 
> or /dev devices for USB (and possibly others, which I don't have!)

SANE  doesn't know anything about device files at all. It just asks
libusb about the USB devices.

Bye,
  Henning



More information about the sane-devel mailing list