Launcher Release 0.39
Ed Kapitein
ed at kapitein.org
Tue Oct 20 19:12:02 CEST 2009
c_c wrote:
> ><SNIP><
>
> Help needed
>
> 1. sample code for a service using c + dbus / e-dbus
> 2. How do I set an alarm that can wake up the phone from suspend?
>
Hi c_c,
I wrote a script a while ago that does just that:
Wake my freerunner in the morning from suspend and play some music to
wake me up.
To wake the device at 21:00 on october 20 you could use something like this:
X=1
DATE[X]=2009-10-20
TIME[X]="21:00"
PLAN_DATE_SEC=`date --date="${DATE[$X]} ${TIME[$X]} +0000" +%s`
PLAN_DATE_SEC=$(( ${PLAN_DATE_SEC} - 10 )) # wake the device 10 sec
before the event
dbus-send --system --dest=org.freesmartphone.odeviced --print-reply
/org/freesmartphone/Device/RealTimeClock/rtc0
org.freesmartphone.Device.RealTimeClock.SetWakeupTime
int32:"${PLAN_DATE_SEC}"
Feel free to leave out the array [X] part, i use it, because i have
multiple wakup times.
kind regards,
Ed
More information about the community
mailing list