Scanner button add-on

Donald Straney burntfuse at gmail.com
Fri Apr 13 06:36:57 PDT 2007


Hi,

>From the discussion on the SANE mailing list, I had thought that
someone else was working on the scanner button add-on, but about a
week ago, since there was no sign of it in 0.5.9, I realized that
maybe I had misinterpreted, and decided to give it a shot myself.
Anyways, a problem has come up.  To open the scanner through SANE, it
needs to have the SANE device name, but I can't find any reliable way
to get that from its HAL entry.  Since the device naming is completely
up to the backend, it can't be done directly with USB or SCSI IDs.
With it all being so backend-dependent, it seems like the only way is
to have a single add-on that calls sane_get_devices and does the
button polling for all scanners, then refreshes the list when a device
with the "scanner" capability is added or removed.  It's sort of
hack-ish, but until SANE changes I can't see any better way to do it.
So can a single HAL add-on handle multiple devices this way, instead
of having a separate process launched for each device?

Donald Straney


More information about the hal mailing list