How to get info into HAL?

bsmith bsmith at linuxtoys.org
Fri Jul 14 12:50:35 PDT 2006


Richard Hughes wrote:
> On Mon, 2006-07-10 at 15:54 -0700, bsmith wrote:
>>    I'm writing a battery driver for an ARM system and
>>I'd like HAL to keep the battery info.  HAL sees the /sys
>>entry but it needs the current_charge info.
>>
>>- How do you get a property into HAL?
>>- Is is part of the configuration in one of the udi files?
>>- Does it need to be hard coded into a helper app?
>>- If the later, how does HAL tie to the helper app?
>>- Is there a programer's manual that describes all this?
> 
> 
> It's probably best to write a little addon, you should look at the
> addon-hid-ups addon for an example of how to extract the battery info
> from a custom source and expose it in HAL.
> 
> Tell us how you get on.

Richard
     Thanks for the reply.  I've given up on HAL as being too
undocumented to use.  Instead I've written a udev rule that
calls dbus-send to get the battery event to its final destination.

BTW: I work for PalmSource where we are building a highly memory
constrained desktop on dedicated hardware.  (PDAs have become
small desktops these days.)  HAL seems pretty tightly tied to the
PC (and ACPI) and might be a poor fit for a handheld system with
an ARM CPU, battery, low disk, and relatively low RAM.

Seems like HAL is the only game in town which kind of unfortunate
for those of us building PDAs, smartphones, and other embedded
devices.  Not that HAL isn't great; it's just that its assumptions
are all wrong for us.

thanks
Bob Smith


More information about the hal mailing list