Scanner support : probing

Étienne Bersac bersace03 at gmail.com
Wed Apr 2 10:20:34 PDT 2008


Hi,

After working on hal-scanner project, discussing people on HAL and SANE
list, i come with another design for adding scanner support in HAL. I
split the problem is two : first probing/hotplug and second sensors
polling.

For probing and hotplug, we need one fdi to mark device as scanner. SANE
already ship such file. However, we need to open the device using SANE
API. SANE uses device name string for opening a device. A device name is
the form <backend>:<device>. Several backends can support same device.

The idea is to have a callout computing the SANE device name from device
properties. It can be done without linking to SANE. We need to know
backends supporting the device and then we can compute names. We can do
this by improving the fdi (thanks Abel Deuring for the good work), see
attached sane-fdi (from Abel Deuring, improved since).

Attached is a patch againts hal.git that add a hal-sane callout to hal
project. It is run only with sane-fdi generated fdi. What about freebsd
and solaris for SCSI dev_file and usb device number ???

With such callout, a scanner app can match scanner added message and
directly sane_open() the device and use it.

Regards,
Étienne.
-- 
E Ultreïa !
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sane-fdi
Type: text/x-python
Size: 13252 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20080402/a14a0e46/attachment.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-sane.diff
Type: text/x-patch
Size: 5806 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20080402/a14a0e46/attachment.bin 


More information about the hal mailing list