![]() |
#1 |
Junior Member
![]() 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 '*' Code:
lipc-send-event com.lab126.powerd.debug dbg_power_button_pressed Any help/advice greatly appreciated. Thanks. |
![]() |
![]() |
![]() |
#2 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
|
the K4NT has a different command for rtc, found after much trail and error.
Code:
lipc-set-prop -i com.lab126.powerd rtcWakeup 100 this can be trigger by writing a backround script to detect a kindle in readyToSuspend and optionaly wakeup state to have it run a script and reset th wakeup clock. for example: backround script Code:
#!/bin/sh # location of your program PROGRAM=/mnt/us/program.sh export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 do_program() { if [[ -f "$PROGRAM" ]]; then # run program function to set picture $PROGRAM do fi } run_program() { if [[ -f "$PROGRAM" ]]; then # run program function to reset wakup rtc $PROGRAM run fi } lipc-wait-event -m com.lab126.powerd goingToScreenSaver,readyToSuspend | while read event; do case "$event" in goingToScreenSaver*) do_program;; readyToSuspend*) run_program; esac done; Code:
#!/bin/sh do() { # set picture using fbink or eips } run() { do # set to your delay between picture changes DELTA=$(( `date +%s` + 300 )) lipc-set-prop -i com.lab126.powerd rtcWakeup $DELTA } # Main case "${1}" in "run" ) ${1} ;; "do" ) ${1} ;; * ) run ;; esac return 0 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 127
Karma: 30302
Join Date: Oct 2015
Device: KV; PW3 ; PW2 ; k5; KT2
|
I noticed someone put together a project that reminded me of yours.
https://www.instructables.com/id/Lit...From-E-reader/ |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jan 2019
Device: K4NT
|
yparitcher thanks so much for taking the time to explain and write both of those scripts!!!
I will try to get this working at the weekend when i have more time (as i will no doubt hit other problems). If i can get this working i owe you at least a beer. Sol Arkite that Instructable was what had originally inspired me |
![]() |
![]() |
![]() |
#5 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 127
Karma: 30302
Join Date: Oct 2015
Device: KV; PW3 ; PW2 ; k5; KT2
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jan 2019
Device: K4NT
|
I'm afraid i will have to give up and admit defeat on this one!!!
Thanks for the help anyway. |
![]() |
![]() |
![]() |
Tags |
k4nt, picture frame, power button, rtc, screensaver hack |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aura Frame covering the screen | Jellby | Kobo Reader | 16 | 06-23-2014 09:55 PM |
Cheap ereader to use as picture frame | gonzule | Which one should I buy? | 6 | 11-03-2012 06:57 PM |
Hacking an LCD picture Frame? Appeal | esecallum | Which one should I buy? | 44 | 10-30-2009 06:16 AM |
10.2 Inch Picture Frame and eBook Reader $79.99 | Brainphart | Deals and Resources (No Self-Promotion or Affiliate Links) | 0 | 07-16-2009 11:10 AM |
RJ Tech Digital Picture Frame w/ Ebook Reader | simonp | Alternative Devices | 7 | 12-16-2008 03:05 PM |