[sane-devel] HAL and scanners.

Étienne Bersac bersace03 at gmail.com
Mon Mar 17 17:18:03 UTC 2008


Hi,

The fdi just need to tell "this is a scanner", at least. We may add
extra info like device type, backend, etc. See Abel Deuring fdi
generator.

> what does a UDI look like?

This is the one of a QScan scanner :
/org/freedesktop/Hal/devices/usb_device_a53_1000_noserial_if0


> >       * HAL device has a scanner.sane.name string property
> 
> each backend does its own thing regarding device naming, so this would
> require hal to call out to the backend to get the name.

So this need to provide a function sane_hal_get_device_name(backend,
halctx, udi) ?


> >       * SANE handle device name like "hal:<udi>".
> 
> then sane would have to query hal to get some device name, then ask
> every backend on the system for a list of active scanners, and then
> see if one of them matched up with the device name from hal.

I guess this is suboptimal. Maybe having "hal:<backend>:<udi>" should
help.

In the end, it seems that having backend and udi info is the good couple
of info needed in order to compute properly the device id.


So, we have two possible solutions :

     1. implement sane_hal_device_get_name(haltcx, udi, backend_name)
     2. handle "hal:<backend>:<udi>" which internally call the above
        function.

Which do we choose ?

> how is hal going to deal with network connected scanners?

Network discovery is another problem solved by e.g. avahi
(mdns/zeroconf).

Regards,
Étienne.




More information about the sane-devel mailing list