[sane-devel] HAL scanner addon

Étienne Bersac bersace03 at gmail.com
Mon Mar 17 19:53:55 UTC 2008


Hi,

You're right, i though that SANE people were a bit aware of HAL since it
has already been discussed in this list years ago.

> sell us on the IDEA first, then lets look at the implementation.

Let me explain that for SANE people. Please remember i'm primarily GNOME
Scan developer and thus have the frontend point of view. Don't hesitate
to read a bit of HAL specs at
http://people.freedesktop.org/~david/hal-spec/hal-spec.html and Havoc
Pennington preliminary talk http://www.ometer.com/hardware.html


HAL means Hardware Abstraction Layer. It is a piece of code that
provides a view of hardware attached to a system. HAL is dynamic and
allow system and desktop-level software to interact with hardware along
their "life" in the system : plug, events, use, unplug.

Each piece of hardware has a Device object with a unique identifier and
which expose a set of key/value set known as device properties. The
devices properties comes from a lot of sources varying from the device
it self, the system, the driver, some device information file, etc.

HAL use DBus as IPC framework for exposing those features accros the
system.

The most important goal of HAL is to provide plug-and-play facilities
for UNIX (currently linux, freebsd and solaris) on desktop system.

HAL does not handle access to hardware, it is up to third party library
like e.g. SANE, CUPS, etc. See
http://people.freedesktop.org/~david/hal-spec/hal-spec.html#ov_halarch
for more details on HAL architecture.

HAL is shiped by a lot of distribution since 2004.



HALd addons are daemon attached to a device, launched on plug and killed
on unplug. They extends feature for device. A good example is
hald-addon-storage which allow to unmount device through DBus in a
system-independent and desktop-independant manner.


hal-scanner provide a addon (named hald-addon-scanner) adding scanner
event propagation using SANE to poll registers and DBus to propagate the
signal thru the system (See the pdf in the tarball).

hald-addon-scanner also provide "scanner.sane.name" device name allowing
frontend to directly open scanner on plug. (See HAL and scanners
discussion).

I primarily announced HAL scanner 0.1 for comments. hal-scanner 0.1 is
rather a proof of concept and i wish it will not be a standalone project
for long. All the fdi generation part must be merged in SANE (either by
extending sane-desc or by including sane-fdi) and hald-addon-scanner
must be merged in HAL itself.


See also scanbuttonsd
https://alioth.debian.org/plugins/scmcvs/cvsweb.php/experimental/button-daemon/?cvsroot=sane and KScannerButtons http://jice.free.fr/KScannerButtons/ as existing solution for the same problem.


Please comment.


Regards,
Étienne.





More information about the sane-devel mailing list