[sane-standard] SANE 2 driver suggestion

abel deuring adeuring at gmx.net
Thu Feb 22 23:18:39 CET 2007


Donald Straney wrote:
>> The "hardware registration" suggested by Donald can easily be done
>> via hald -- we only need to transform Sane's *desc files into *fdi
>> files for hald. I have already tested this -- I mainly need to
>> replace my prototype Python script that creates the fdi files with a
>> patch/new output mode for sane-desc.c . I also played a bit with a
>> hald callout for scanners; this callout can give some additional
>> information.
> 
> Do you mean that to get a device list, sane_get_device_list would then
> go through HAL?

I doubt, if it makes much sense to call HAL from sane_get_devices.
While it might save a few processor cycles, because not all known
backends need to be tried, it might lead to difficult
interdependency problems: A HAL callout, invoked when a scanner is
connected to the machine, might actually call sane_get_devices, in
order to get additional information about the device.

But applications can easily ask hald about recognized scanners, and
a HAL callout might start a scan application, when a scanner is
detected.

> That would work too, if you don't mind having the
> Linux version rely on HAL (I was thinking of integrating it at a lower
> level, but if this would work just as well and make it simpler then it
> sounds good to me).

If you means the functions send_usb_command, recv_usb_command etc
from an older mail: I do not understand, what advantages these
functions would have, in comparision with Sane's current approach as
implemented in sanei_scsi and sanei_usb.

> The problem with using only HAL rules to identify the scanners is that
> parallel port and networked scanners won't show up.  I guess
> sane_get_device_list could probe manually for parallel port scanners

...what is done right now...

> and use Avahi or something similar to get remote computers running
> saned on each call, but it would probably be better to get them into
> the HAL device list somehow.  I'm guessing that automatically
> detecting networked scanners with Avahi wouldn't be too hard, but
> there's still the problem of parallel port devices.  Is there any way
> around this, like running a quick SANE probe program at boot which
> would test for non-hotpluggable devices and add them to HAL's device
> list? 

We already have such a "probe program": scanimage -L ;)
Or any other program that calls sane_get_devices.

> (It would break if someone decides to hotplug their parallel
> port scanner all the time, but does that really matter?)

If you are thinking about the famous "aunt Tillie", it really does
matter ;) Why should users switch on their parport scanner together
with the computer? But I think that Sane's current version handles
this case just fine, provided that the right backend is enabled in
dll.conf (disclaimer: I don't have any first-hand experience with
parport scanners, but I assume that parport scanners do not behave
that much different than parport printers).

Abel



More information about the sane-standard mailing list