View Single Post
Old 06-23-2019, 12:40 PM   #14
nick-tech
Enthusiast
nick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned off
 
Posts: 46
Karma: 97694
Join Date: Feb 2012
Device: kindle touch
Hi all,

i tried several ways to get the rtc to wake up the kindle:

1. writing directly to /sys/class/rtc/rtc0/power/wakeup (there is no /wakealarm for rtc0)
Code:
echo "1561370760" > /sys/class/rtc/rtc0/power/wakeup
cat /sys/class/rtc/rtc0/power/wakeup
no matter what I do, I can't write to this file, it stays empty.
there is also a 2nd rtc (rtc1), but I can't write to /sys/class/rtc/rtc1/wakealarm either (but at least that exists..)


1. via com.lab126 powerd rtcWakeup after kindle has gone to the "Ready to suspend mode
Code:
 #!/bin/sh -xe
sleeptime=100

sleepfor() {
	lipc-set-prop -i com.lab126.powerd rtcWakeup $1
}

wait_for_ready_suspend() {
	return `powerd_test -s | grep Ready | wc -l`
}

while wait_for_ready_suspend; do sleep 1; done
sleepfor $sleeptime
cat /proc/driver/rtc
cat /sys/class/rtc/rtc0/power/wakeup
that seems to do what it should but doesn't work either:
Code:
+ sleep 1
+ wait_for_ready_suspend
+ powerd_test -s
+ grep Ready
+ wc -l
+ return 1
+ sleepfor 100
+ lipc-set-prop -i com.lab126.powerd rtcWakeup 100
+ cat /proc/driver/rtc
rtc_time        : 16:30:49
rtc_date        : 2019-06-23
alrm_time       : 00:00:00
alrm_date       : 1970-01-01
alarm_IRQ       : no
alrm_pending    : no
24hr            : yes
alarm_IRQ       : no
+ cat /sys/class/rtc/rtc0/power/wakeup
and the kindle doesn't wake up. Any ideas?
nick-tech is offline   Reply With Quote