Scanners in HAL
Marcus Meissner
meissner at suse.de
Mon Aug 28 06:20:42 PDT 2006
> Hello all.
>
> Since march 2006, I'm designing and building a Gnome solution for scan.
> I wrote most of the code for the Google Summer of Code 2006 which is now
> closed.
>
> As a first step. I create two libraries. libgnomescan which provide a
> sane GLib wrap and more. And libgnomescanui which is a bunch of widget
> ready for use in app and plugins. I also wrote a tiny app and a Gimp
> plugin that use the libraries.
>
> The homepage of the project is http://home.gna.org/gnomescan/index .
> I've just uploaded this webpage this morning. You'll see there links,
> screenshots or app and Gimp plugin, and documentations of libraries.
>
> Currently, GnomeScan is just like other scan app on Linux : it use
> directly SANE and probe devices at each run. No buttons are handle and
> sharing scanner need editing /etc files.
>
>
> What we all want in the desktop is a daemon that handle the list of
> devices, emit buttons events and share scanner. I want to get ride of
> that probe dialog at each UI run.
>
> I think that HAL can at least list devices. Maybe handle buttons event.
> I search HAL for scanner support and obviously there is a huge lake.
> Scanning had always lake attention. I heard that SuSE had a "HAL patch
> for sane" or similar. But i can't reach to install SuSE from network :(.
> (And don't want to burn 5 CD at all).
What is needed is the ability to mark up devices as scanners, so
that HAL can classify them accordingly.
This would require for instance a USB device list from SANE, which
is not easily retrievable.
Once you have this you can hand-out permissions for libusb access
from userspace. SUSE does this with "resmgr".
> There is a sanebuttonsd deamon which just execute scripts when a button
> is pressed. saned is responsible to publish devices. I mean that each of
> these piece of software use libsane to probe themselve devices. Each
> have to "maintain" the list of devices.
Yes, you would need to change sane to be able to export the list.
The largest problem is that some drivers do not even have lists of such IDs,
but just take any USB id you throw at them (so HP , xxxx ... just try as scanner).
This does not make it easy. ;)
> I want a daemon that handle at least device probe and publish them to
> application. A daemon that handle buttons event and emit a dbus signal
> would be nice. Patching saned to publish share with avahi would rock.
>
> I would be glad to implement all of this features.
Once you can export the list, you can have easy listener daemons.
> However, i don't have a clue of what is needed. As far as i understand,
> a good solution would be to have a service that handle the list of
> devices, tell hald for each devices and fill scanner namespace fields.
> (Maybe a sane namespace would be nice to include sane device name and
> other sane specific infos). This dbus service monitor devices for button
> press. Once a button is pressed, a signal is emitted. I don't know how
> g-v-m handle device signal, is that all hal signals ? Does the dbus
> service have to trigger hal signals or trigger its own signals ?
> I have many questions about the design and the implementation. That
> would be nice to be mentored.
>
>
> So, do you want this feature ? Do you want me to implement this ? Do you
> want to help me to implement this ? Do you want to make me a HAL
> contributor ? Is HAL able to trigger buttons-pressed signals ?
- Extract list of usb ids, possible automatically from sane build.
=> Find out scanner
- sane based listener that injects DBUS events (there are some related
projects already).
Ciao, Marcus
More information about the hal
mailing list