Scanners in HAL

Marcus Meissner meissner at suse.de
Mon Aug 28 08:43:02 PDT 2006


On Mon, Aug 28, 2006 at 05:35:35PM +0200, Étienne Bersac wrote:
> 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 ?

Correct.

For libgphoto2 we have an extractor which loads our camera libraries and
dumps a FDI file to have them marked up.
 
> > 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.

This is the current way, but as I understand Kay it will move
to be responsibility of hal.

> > 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).

This would be the best.

> > - 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 ?

I guess you should suggest this to the SANE developers first.

> > - 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" ?

Perhaps someone else can, it was just a wild idea.

Ciao, Marcus


More information about the hal mailing list