Accelerometer

The accelerometer appears to be a "KXSD9 SERIES Tri-Axis, 2g, 4g, 6g, 8g, User Selectable, Ultra Low Power Digital" http://www.kionix.com/accelerometers/accelerometer-KXSD9.html

more info:

and at the very least you could adjust the low pass filter used, or the threshold for waking up:

More accelerometer info

There's a library called libhidaccelerometer.so -- so it's treated as an HID class of devices. There is no dbus activity when you move the device, so this probably a much lower level service. Makes sense: you don't want zillions of dbus messages firing off whenever someone moves.

Looking in running processes, I notice /usr/bin/hidd, which references a configuration file /etc/hidd/HidPlugins.xml

In this file, two sockets are mentioned: /var/tmp/hidd/AccelerometerCmdSocket /var/tmp/hidd/AccelerometerEventSocket

These are UNIX DGRAM sockets, which are open on the device.

Read Accelerometer from hidd

 * 1) Implement the sample code in hidd
 * 2) Change the main function to below

Sample code
Taken from boydell's Magic 8 Ball app:

In his first-assistant.js (... = code skips)

To increase the resolution to 30Hz, use this snippet (requires WebOS 1.3.5 or above):

Note: After hours of trying to get the accelerometer working in my app, I figured out that if you are using createStageWithCallback to create your stages (such as in handleLaunch in the App Assistant), in the stage arguments, the "lightweight" property MUST be set to false. If it is set to true, the accelerometer will never return data (free window orientation will still work, however).