Difference between revisions of "Accelerometer"

From WebOS Internals
Jump to navigation Jump to search
(Initial creation)
 
m (added to category Hardware)
Line 57: Line 57:
  
 
These are UNIX DGRAM sockets, which are open on the device.
 
These are UNIX DGRAM sockets, which are open on the device.
 +
[[Category:Hardware]]

Revision as of 02:08, 19 July 2009

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

<source lang="text"> root@castle:/sys/class/input/input5# cat name kxsd9_accelerometer </source>

more info: <source lang="text"> root@castle:/sys/class/input/input5# cat uevent PHYSDEVPATH=/class/i2c-adapter/i2c-3/3-0018 PHYSDEVBUS=i2c PHYSDEVDRIVER=kxsd9_accelerometer PRODUCT=18/1/1/100 NAME="kxsd9_accelerometer" EV==9 ABS==7 MODALIAS=input:b0018v0001p0001e0100-e0,3,kra0,1,2,mlsfw </source>

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

<source lang="text"> root@castle:/sys/class/input/input5# ls -al drwxr-xr-x 6 root root 0 Jun 11 17:47 . drwxr-xr-x 8 root root 0 Jun 11 17:47 .. -rw-r--r-- 1 root root 4096 Jun 11 23:58 accelerometer_filter_frequency -rw-r--r-- 1 root root 4096 Jun 11 23:58 accelerometer_motion_wake_up_threshold drwxr-xr-x 2 root root 0 Jun 11 23:58 capabilities lrwxrwxrwx 1 root root 0 Jun 11 23:58 device -> ../../../class/i2c-adapter/i2c-3/3-0018 drwxr-xr-x 3 root root 0 Jun 11 23:49 event5 drwxr-xr-x 2 root root 0 Jun 11 23:58 id lrwxrwxrwx 1 root root 0 Jun 11 23:58 input:event5 -> ../../../class/input/input5/event5 -r--r--r-- 1 root root 4096 Jun 11 23:58 modalias -rw-r--r-- 1 root root 0 Jun 11 23:50 mode -r--r--r-- 1 root root 4096 Jun 11 23:53 name -r--r--r-- 1 root root 4096 Jun 11 23:58 phys -rw-r--r-- 1 root root 4096 Jun 11 23:58 poll_interval drwxr-xr-x 2 root root 0 Jun 11 23:58 power lrwxrwxrwx 1 root root 0 Jun 11 23:58 subsystem -> ../../../class/input -rw-r--r-- 1 root root 4096 Jun 11 23:58 uevent -r--r--r-- 1 root root 4096 Jun 11 23:58 uniq </source>


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.