Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-12-2012, 01:55 PM   #1
atordo
Connoisseur
atordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to behold
 
Posts: 89
Karma: 19669
Join Date: Apr 2012
Device: Kindle Touch
Kindle Touch: execute script when wifi connection is established

I'm trying to trigger a script when wifi connection goes up, so I placed it in /etc/network/if-up.d (a symbolic link to it to be specific, but I guess that doesn't matter). The script has the correct permissions, but is not executed automatically.

Anyone knows if it's possible to trigger a script when network connection is established?

TIA.
atordo is offline   Reply With Quote
Old 07-12-2012, 01:57 PM   #2
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by atordo View Post
I'm trying to trigger a script when wifi connection goes up, so I placed it in /etc/network/if-up.d (a symbolic link to it to be specific, but I guess that doesn't matter). The script has the correct permissions, but is not executed automatically.

Anyone knows if it's possible to trigger a script when network connection is established?

TIA.
You can make an upstart script that triggers on whatever combination of conditions you want. Just model it after scripts in /etc/upstart. Be VERY careful, because ANY script that fails can make the rest of them NOT run, bricking your kindle.
geekmaster is offline   Reply With Quote
Advert
Old 07-12-2012, 02:21 PM   #3
atordo
Connoisseur
atordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to behold
 
Posts: 89
Karma: 19669
Join Date: Apr 2012
Device: Kindle Touch
Wow, that sounds scary. Thanks for the hint (and the warning), I'll have a look at /etc/upstart, and not write anything for the time being, there's much (almost all) of KT internals I don't know.
atordo is offline   Reply With Quote
Old 07-12-2012, 02:22 PM   #4
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by atordo View Post
Wow, that sounds scary. Thanks for the hint (and the warning), I'll have a look at /etc/upstart, and not write anything for the time being, there's much (almost all) of KT internals I don't know.
It was a LOT more scary when you had to solder serial port wires inside your kindle to debrick it. Not so bad now that we have USB "simple debricking" methods (even for the K3 now).

You will need this to get started: http://upstart.ubuntu.com/cookbook/upstart_cookbook.pdf

Last edited by geekmaster; 07-12-2012 at 02:26 PM.
geekmaster is offline   Reply With Quote
Old 07-12-2012, 03:13 PM   #5
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Quote:
Originally Posted by geekmaster View Post
Be VERY careful, because ANY script that fails can make the rest of them NOT run, bricking your kindle.
Agreed!
That's exactly how I bricked mine!
silver18 is offline   Reply With Quote
Advert
Old 07-13-2012, 05:06 AM   #6
atordo
Connoisseur
atordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to beholdatordo is a splendid one to behold
 
Posts: 89
Karma: 19669
Join Date: Apr 2012
Device: Kindle Touch
Quote:
Originally Posted by geekmaster View Post
Thanks for the link. Obviously I have a lot to learn before adventuring in tweaking the KT
atordo is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle Touch 5.1.0, How to turn on/off wifi in a script? wisecrick Kindle Developer's Corner 3 12-08-2013 05:31 AM
PRS-T1 Factory reset - possible to execute via script? bookler Sony Reader Dev Corner 1 07-04-2012 12:48 PM
Touch Nook Touch WiFi won't connect after "forgetting" connection config el34han Nook Developer's Corner 0 07-16-2011 02:35 PM
Kindle 3: run script when turning wifi on? theblop Kindle Developer's Corner 1 11-09-2010 10:25 AM
Is it possible to execute a bash script from the SD card? godel10 iRex 25 06-25-2009 03:55 PM


All times are GMT -4. The time now is 08:31 PM.


MobileRead.com is a privately owned, operated and funded community.