View Single Post
Old 02-10-2019, 12:43 PM   #1
c0c01
Junior Member
c0c01 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2019
Device: K4NT
K4NT - Help with Picture Frame

K4NT
4.1.1 (1813030025)

Firstly sincere apologies for my complete lack of knowledge (i.e zero) regarding writing scripts! I have searched the forum and open source for some help and i have seem similar threads and have tried to cobble something together for several weeks already!

PROJECT
----------------------------------------------------------------------------------------------------------------------------------------------------
I am looking to use a K4NT to display a random black & white line drawn comic strip which will change one or twice daily (and work on battery alone).

I currently have a jailbroken K4NT with the screensavers hack and basically I am trying to write a script that will just do the same as a human pressing the power button twice at a set time during the day (thus changing the screensaver to another random image before going to sleep again).
----------------------------------------------------------------------------------------------------------------------------------------------------

I have been trying to use/adapt parts of other contributors scripts such as those by peterson and _nico

https://www.mobileread.com/forums/sh...=235821&page=3

where _nico is managing to get the following results with his Kindle KT3 on a single charge "57 eips updates a day, 30-35 days".

I have also poured over the onlinescreensavers hack and the kindle weather display and

https://www.linux.com/learn/wake-lin...alarm-clock%20

As a test I have been trying to set the K4NT to wake using the RTC (RTC1 as there is no wakealarm in RTC0) to wakeup after 100 seconds have lapsed using the code below which I start via the CLI when connected to the K4NT via SSH.

Code:
#!/bin/bash 

lipc-set-prop com.lab126.cmd wirelessEnable 0

echo Current Time : `date` `date +%s`
ENDWAIT=$(( `date +%s` + 100 ))
echo Wake Up Time : $ENDWAIT 

echo 0 > /sys/class/rtc/rtc1/wakealarm 
echo Readback time: `cat /sys/class/rtc/rtc1/wakealarm`
echo $ENDWAIT > /sys/class/rtc/rtc1/wakealarm

lipc-wait-event -mt com.lab126.powerd '*'
This produces these results but doesn't seem to wake the Kindle back up. I also found that following command will carry out a simulated press of the power button on the K4NT.

Code:
lipc-send-event com.lab126.powerd.debug dbg_power_button_pressed

Any help/advice greatly appreciated.
Thanks.
c0c01 is offline   Reply With Quote