Script-based on-demand wifi a possibility?


TheGrandPubaa

Member
Joined
Sep 3, 2006
Messages
131
Age
38
Location
Arkansas
Website
www.vgtheory.com
Is it possible to set up Pandora so that an application that requests wireless access(such as Midori or Panorama) can automatically turn on the wifi and then turn it off again when you close the application? Maybe a drop-in like the clock speed scripts one can put in a specific application's appdata folder?
 
On Maemo this is caught somewhere in the network stack IIRC.. and used to switch on networking if off when needed. But it's been a long time since I was up to date on this. This was possibly done (again, IIRC) simply by intercepting the socket() call. Something similar may be possible on Pandora, but it could also be possible to hook something into netfilter or iptables somewhere.. it would be strange if it isn't possible somehow to do that, somewhere.

Maybe a daemon which would check running processes every couple of seconds and turn wifi on/off?
Sounds like a recipe for battery drain..
 
Doesn't pnd_run support pre-and-post scripts? For a starting point, would it be possible to have the pre-script automatically launch the wifi toggle script and then the post-script launch it again, effectively shutting down the wifi? Ideally, it would be great if any application that wanted wifi would only activate it when it actually tries to connect to the internet, but this could be a useful start if it's possible.
 
god you people are lazy, are the 2 pokes of a stylus really that difficult?
 
Back in the days of modems and PPP, it was easy to have a Linux machine only dial out when necessary (i.e. when a packet for an external network was sent or a socket opened, rather than anything that would be handled by "localhost"). Dial-on-demand was standard fare in internet connection settings for PPP modem users on Linux. Did we lose all trace of that with modern networking or is something like that still available?
 
Back
Top