Quote:
Originally Posted by silver18
Good evening to all!!
I'm diving into the events send/receive system of our Kindle.
Is it possible to set a new event (let's call it "test"), bind to this event an action (run a custom script) and then send this event?
I know lipc-send-event works when sending an existing event, but how to set a new event?
Thanks to all!!
|
On the k3-v3.2.1 firmware, see: /etc/lipc-daemon-events.conf
Code:
## This file defines what evetns are handled by lipc-daemon
## The format of the file is
##<event name> <event publisher> <command to execute when event is received>
##
## NOTE: By default the event name and any parameters are passed to the script as arguments. If you want to ignore the arguments,
## you must add a semi-colon (;) to the end of the script command.
##
usbConfigured com.lab126.hal echo "lock">/dev/null; echo "lock">/dev/null; echo "lock">/proc/accelerometer;
usbUnconfigured com.lab126.hal echo "unlock">/dev/null; echo "unlock">/dev/null; echo "unlock">/proc/accelerometer;
FrameworkStarted com.lab126.framework rm -f /var/local/system/.framework_retries /var/local/system/.framework_reboots
tzRequested com.lab126.framework settz
interfaceChange com.lab126.cmd /usr/sbin/updatetime & true
triggerTimeChange com.lab126.cmd /usr/sbin/updatetime & true
## Uncomment the following line if you want to see when lipc-daemon received
## outOfScreenSaver event. Useful for debugging out of suspend performance
#outOfScreenSaver com.lab126.powerd . /etc/rc.d/functions; msg "lipc-daemon got outOfScreenSaver at `date +%s`s" I; true;
And the file etc/lipc-daemon-props.conf
Code:
# This file defines what properties are exposed by lipc-daemon.
orientation r cat /proc/accelerometer | xargs echo -n
usid r cat /proc/usid | xargs echo -n
boardid r cat /proc/boardid | xargs echo -n
version r cat /etc/version.txt | xargs echo -n
waveformversion r cat /proc/eink_fb/waveform_version | xargs echo -n
date w /usr/sbin/setdate
sendEvent w lipc-send-event com.lab126.system.event
Plus the supplied utilities:
Code:
/usr/bin/lipc-daemon
/usr/bin/lipc-get-prop
/usr/bin/lipc-hash-prop
/usr/bin/lipc-probe
/usr/bin/lipc-send-event
/usr/bin/lipc-set-prop
/usr/bin/lipc-wait-event
Which have usage screens.