HAL and scanners

abel deuring adeuring at gmx.net
Fri Dec 29 10:06:30 PST 2006


Étienne Bersac wrote:
> Hi,
> 
> I also started to write a script that generate some fdi, but obviously,
> a hal addon is also needed in order to add real support to hal.

Étienne,

Right, some hal addon is a "must" for a larger set of functions.

> HAL scanner support must include button handling and more device
> properties like device type (handheld, business card reader, flatbed,
> all-in-one printer, etc.), area size, etc. Martin Owens know more about
> that.

IMHO, a button handler is something for a desktop environment or a
dedicated scan program; there are too many policy related questions
than to place it into HAL or make the handler a Sane "core
function". Moreover, I think that it is not the job of the HAL
daemon to poll the button status of an attched scanner one or twice
a second (but keep in mind that I am not very familiar with HAL).

Regarding the properties: I have doubts, it if is really necessary
or reasonable to figure out too many details about a scanner in HAL,
but anyway: a call of "scanimage --help --device=..." (or something
similar done by a dedicated HAL callout: to read out all option
descriptors of a Sane backend) lists all available options,
including -- for most but not all scanners -- the scan area size.
Though the fine details can be a bit tricky: For a flatbed scanner
with an ADF or transparency unit, the max scan size can change, when
the ADF or TPU are enabled/disabled. Other potentially interesting
Sane options can change too, depending on the state of the scanner.
In short: This is nothing to start with, and I would leave the job
to figure out and deal with most if not all options provided by Sane
backends to a Sane frontend. HAL would become quite bloated, if it
tried to figure out too many features of a scanner.

If you or Martin want to give these advanced (to avoid the word
"bloat" ;) things a try nevertheless in the HAL context -- fine, but
let's focus on the core topics that we can implement today with
today's version of Sane and all its quirks:

Specification of a minimal scanner namespace for HAL, collecting
things that really must be added to Sane's scanner description
files, like SCSI vendor/model strings etc. The main thing we can do
wrong here and now is to get distracted by too many feature wishes.

> and happy knew year ! :)

To you and all list subscribers too a happy new year!

Abel


More information about the hal mailing list