02-28-2013, 06:04 AM | #1 |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
KT - Schedule wifi downloads with cron?
Maybe the mighty developers can help (I posted in the regular Kindle forum and got no help?)
https://www.mobileread.com/forums/sho...d.php?t=206889 I hope this is not against the rules to cross-post? Sorry? I want to write a simple cron script to connect daily to Amazon to see if I have any documents in my cue. I have a Touch wifi only, and it does not wake and sync with Amazon unless I wake it and press the buttons to connect and sync. I'm just trying to automate it. What I can do: Code:
lipc-set-prop com.lab126.powerd wakeUp 1 I can turn on wireless with Code:
lipc.set.prop com.lab126.cmd wirelessEnable 1 How do I make it ask Amazon if there are any items to download? With com.lab126.ota ?? This is the part I'm ignorant? There is a /usr/bin/todo program? What's that for? Any help or ideas would be wonderful! this will put it back to sleep after: Code:
lipc-send-event com.lab126.powerd.debug dbg_power_button_pressed |
02-28-2013, 06:13 AM | #2 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
AFAIK the moment you connect to wifi and are "unlocked to the world" then the docs will be pushed down.
So perhaps... Sleep 120 would be enough And yes cross-posting is bad mmmmkay Last edited by twobob; 02-28-2013 at 06:16 AM. |
02-28-2013, 07:30 AM | #3 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Now that is going to be a very good trick if you can pull it off. cron is a software program, not access to a hardware timer. software requires a processor to run it with, and when asleep linux is actually frozen in RAM with the processor shut down. Install my dmesg -> document KUAL button and study the messages of what is happening during "going to sleep" and "waking up". |
|
03-01-2013, 01:06 AM | #4 | |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
Quote:
|
|
03-01-2013, 09:13 AM | #5 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Ah right... well... since mine almost never drops to a low power state that never occurred.
|
03-01-2013, 09:30 AM | #6 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
USBnetworking ON - cable in - ssh session established with Kindle. Prevent Screensavers - Enabled (home page showing). Firewall with BBB filter enabled. Airplane mode - Disabled - Wifi connection established. Now that is my "Normal" (workday) setup for the Kpw - and since it is plugged into a "high power" (200ma) USB port - it can run like that approximately forever. The charger cycles on and off, but the 200ma USB port can run it and keep the battery topped off at the same time. Since I don't do any graphics with it - I have a tendency to ignore it. It just sits over there in its corner, doing whatever - - - - I glanced over one day last week and the screen saver image was showing. WTF !!! SSH session over USB was still up and working - Wifi connection was still up and working - But the processor has shifted to the "power saver" state (1/2 normal clock speed on a Kpw) and displayed the screensaver. Even though "prevent screensaver" was still enabled. Looked the same-same as if it had gone into suspend-to-ram mode, but it was still very much alive and running under the screensaver. Thinking it was broke - I kicked it out of that mode without taking the time to figure out how to transition to that mode intentionally. Might be useful someday to learn how that state happened to be entered. Last edited by knc1; 03-01-2013 at 09:33 AM. |
|
03-01-2013, 10:44 AM | #7 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
You know it's funny.. I kind of recall it being mentioned that this was the case on some (older?) devices. I also kind of recall (someone?) testing this before and it not working (I.E ssh dies when low power is entered)
So, yes that would be cool I have to now resort to rebooting my stupid router once a day... for some reason it keeps killing the networking... ping kt PING kt (192.168.x.x) 56(84) bytes of data. From dev.home (192.168.x.x) icmp_seq=1 Destination Host Unreachable : ) *thinks about hammers and splinters of plastic* lol |
03-01-2013, 11:06 AM | #8 |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
|
03-01-2013, 12:38 PM | #9 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
heh...
you have no idea.. |
03-02-2013, 02:05 PM | #10 |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
I can't seem to find the link right now, but somewhere on the net I found some info that implied that if the kindle was plugged in either to a computer or to a wall charger, or if debug mode was turned on then the kindle wireless would stay active and be able to sync or even wireless ssh into. I've not done more experimentation on this, maybe I will just to know what the deal is. The way I wanted it to work is impossible, but there might be another way to accomplish what I want. I'd rather not have to plug it in everyday (if I wanted that, I'd have gotten an Android .
|
03-02-2013, 02:09 PM | #11 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
At least on the Kpw v-5.3.3 firmware, having it plugged in does not prevent it from doing suspend-to-ram (a.k.a: going to sleep).
There is a KUAL DevHelper button that will copy the kernel's message buffer to a document where you can read what is happening/happened. In that, you will see that it shuts down the Wifi chip on suspend-to-ram. |
03-02-2013, 02:46 PM | #12 |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
I haven't used your extension, yet, but is there any reason not to change the cron entry that runs the log rotation every hour? Maybe I'll try once a day instead and try to track more messages for a while.
|
03-02-2013, 02:50 PM | #13 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
__Before__ the system logger gets ahold of them. The script is setup to copy to a time-stamped, titled, document. So you will have a series of time-stamped documents to view, merge, delete as you wish without messing with the system logger cron scheduling. |
|
03-02-2013, 02:56 PM | #14 |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
OK installed and tried your extension - works great, thanks! Another question, how does the clock keep track of the time if the processor is suspended? Is the clock a special case, just a timer?
Oh, tinyrot runs every 15 minutes. Sure seems excessive? You just left it alone? |
03-02-2013, 03:18 PM | #15 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
My set DateTime button will set both the kernel system's date time and update the hardware clock from the International network of public time servers. The time servers used are in an end-user config file, but the defaults should work anywhere in the world. The report generated includes a list of the time server networks queried. I leave the Amazon Image files strictly alone. That is one of the design goals of the KUAL launcher project - do nothing invasive of the Amazon Image files. That principle is intended to eleminate the "My kindle updates fail" and "I did something long ago, don't remember what, and now my Kindle is broke" types of trouble reports. You will find a few buttons that break the "do not disturb" rule. But only a very few. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
KT - Schedule wifi downloads with cron? | brianinmaine | Amazon Kindle | 0 | 02-26-2013 04:10 PM |
When/how often to schedule downloads? | guspasho | Recipes | 1 | 06-23-2012 10:20 PM |
Touch Wifi downloads of public library books? | bmbriefs | Barnes & Noble NOOK | 3 | 03-04-2012 02:45 PM |
Automate Trook Downloads (cron-like)? | spedinfargo | Nook Developer's Corner | 5 | 06-01-2011 02:40 PM |
calibre & cron problem | Deputy-Dawg | Calibre | 4 | 06-19-2008 09:56 PM |