Gestures is one of the applications that runs on the Openmoko Phones. For a list of all applications, visit Applications
Openmoko Neo FreeRunner does Accelerometer-based Gestures, and Screen Orientation
Remark: Please watch the video, so that you'd know what to expect out of the Alpha 2 Release.
SSH Neo FreeRunner:
wget http://accelges.googlecode.com/files/accelges_0.1.0-svnr204-r2_armv4t.ipk opkg install accelges_0.1.0-svnr204-r2_armv4t.ipk
On The Neo FreeRunner
/etc/init.d/gesl start
Over SSH you must use
DISPLAY=:0 /etc/init.d/gesl start
(otherwise screen orientation won't work):
You're ready: make a gesture, make Neo change its screen orientation (if you did watch the video, you'll know what to do).
OPTIONAL: Stop the gesture recognizer, and listener:
/etc/init.d/gesd-neo2 stop /etc/init.d/gesl stop
Run
Home > Gestures
Select a gesture, press Train, and follow instructions.
REQUIRED: Start/restart the gesture recognizer, and listener:
/etc/init.d/gesd-neo2 start (from SSH, or from Neo) /etc/init.d/gesl start (only from Neo)
dbus, dbus-glib, libxrandr, libnotify, notification-daemon, libcurl, and gtk+
libnotify, notification-daemon, libsexy2, libwnck-1-18, libstartup-notification-1-0, and libglade-2
opkg install libnotify notification-daemon libsexy2 libwnck-1-18 libstartup-notification-1-0 libglade-2.0-0
Remark: On the 2008.8, your missing dependencies will be downloaded automatically by the installer.
Home > Settings > Suspend > off
echo "nameserver xxx.xxx.xxx.xxx" > /etc/resolv.conf
Home > Installer > Development > openmoko-terminal2
echo "exec /etc/init.d/gesl start" > /usr/bin/gesl-begin chmod +x /usr/bin/gesl-begin
echo "nameserver xxx.xxx.xxx.xxx" > /etc/resolv.conf wget http://accelges.googlecode.com/files/accelges_0.1.0-svnr204-r2_armv4t.ipk
opkg install accelges_0.1.0-svnr204-r2_armv4t.ipk
Home > Gestures
/etc/init.d/gesd-neo2 restart
Remark: You have to restart the Gesture Recognizer, so that it will re-read the newly trained gestures. Every time you train one or more gestures, restart the recognizer!
gesl-begin
Remark: If you don't start the Gesture Listener from the Neo, screen orientation won't work
Gesture Recognizer (gesd) sends signals on:
org.openmoko.accelges /org/openmoko/accelges/Recognizer org.openmoko.accelges.Recognizer.Recognized
Try (on FSO distribution)
mdbus -s -l
and make a gesture for more information on DBUS.
The configuration file for Neo is:
/etc/accelges/neo2/neo2.cfg
# Paul-Valentin Borza <paul@borza.ro> # gestures configuration file for Neo/Wii # classes and probabilities for classifier # sclass\tFILE static acceleration class # dclass\tFILE dynamic acceleration class # sclassp\tVALUE probability for static acceleration class # dclassp\tVALUE probability for dynamic acceleration class sclass s.class dclass d.class sclassp 0.4 dclassp 0.6 # classes for recognizer (add more than one) # class\tid\tFILE static acceleration class class screen_zzp screen_zzp.class class screen_zzn screen_zzn.class class screen_zpz screen_zpz.class class screen_znz screen_znz.class class screen_pzz screen_pzz.class class screen_nzz screen_nzz.class class screen_npp screen_npp.class class screen_nnp screen_nnp.class class screen_pnp screen_pnp.class class screen_ppp screen_ppp.class # models for recognizer (add more than one) # model\tid\tFILE dynamic acceleration model model left left.model model left, and return left-and-right.model model right right.model model right, and return right-and-left.model model up up.model model up, and return up-and-down.model model down down.model model down, and return down-and-up.model model shake, shake shake-shake.model model horizontal circle horizontal-circle.model model forward, backward forward-backward.model model z z.model
Again, if you modify the configuration file, you'll have to restart the gesture recognizer (gesd).
Gesture Recognizer that uses the top accelerometer (/dev/input/event2):
/etc/init.d/gesd-neo2 start|stop|restart
Gesture Listener that switches screen orientation, and notifies the user of recognized gestures on the screen:
/etc/init.d/gesl start|stop|restart
Remark: Start the recognizer first, and after that the listener (obvious, but important)
Try playing with:
gesd (gesture recognizer) gesl (gesture listener) gesm (gesture manager)
hexdump /dev/input/event2 (for top accelerometer) hexdump /dev/input/event3 (for bottom accelerometer)
Remark: The Alpha 2 Release uses the TOP accelerometer
Restart your Neo!
Restart your Neo!