Scanners in HAL

Étienne Bersac bersace03 at laposte.net
Mon Aug 28 08:35:35 PDT 2006


Hello,

Thanks for your answer.

I wonder how does hal know a device is a camera, a printer, etc. Is that
only a matter of .fdi files ? Do we have to maintain a vid/pid list like
udev libsane.rules ?

> Once you have this you can hand-out permissions for libusb access
> from userspace. SUSE does this with "resmgr".

Seems that ubuntu use udev rules to handle permissions.

> The largest problem is that some drivers do not even have lists of such IDs,
> but just take any USB id you throw at them (so HP , xxxx ... just try as scanner).
> 
> This does not make it easy. ;)

:|

> Once you can export the list, you can have easy listener daemons.

So the daemon won't use sane_get_devices but just sane_open on a device
id provided by HAL (e.g. id field in a sane namespace).

> - Extract list of usb ids, possible automatically from sane build.
>   
>   => Find out scanner

Does that mean i have to investigate SANE source code in order to write
a tool that extracts vid/pid to write rules for HAL ?

> - sane based listener that injects DBUS events (there are some related
>   projects already).

Does that mean a scannerd as dbus service ? Can you point me the
"related projects" ?

Thanks.

Étienne.
-- 
Verso l'Alto !



More information about the hal mailing list