Active Topics

 


Reply
Thread Tools
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#1
I use the N900 only as a computer. I have a sim card in it that only does data. Thus when I have wifi access there is no reason for the cellular subsystem to be on and drain battery. On the other hand when I am out, I want to be able to connect to 3G data.

I have cell-modem-ui installed and I switch to tablet mode when I am home but I am looking for a more automatic solution.

Short version: I want cellular to turn off every time wifi is connected.

Any pointers to where should I begin?
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob

Last edited by qwazix; 2012-04-12 at 14:25.
 
peter2p's Avatar
Posts: 254 | Thanked: 146 times | Joined on Dec 2010 @ Antwerp Belgium
#2
Originally Posted by qwazix View Post
Any pointers to where should I begin?
Maybe ConnectNow Maemo5 widget by nicolai can help you...
Latest version has an extra option for changing radio mode
by OnConnect / OnDisconnect with the internet connection.
__________________
.................................................. ...........
..........................
................................N900 is a way of life....................
surfing the web, navigate, chat, ttweet, email, scan, hack, share, tweak...
.....................and you can also use him to make a call
 

The Following User Says Thank You to peter2p For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#3
dbus-scripts ftw!

I installed dbus-scripts, created a control file /etc/dbus-scripts.d/onWifiConnect with this contents

Code:
/home/user/onWifiConnect.sh * * com.nokia.icd status_changed * WLAN_INFRA CONNECTED
/home/user/onWifiDisconnect.sh * * com.nokia.icd status_changed * WLAN_INFRA IDLE
and two scripts in /home/user

onWifiConnnect.sh

Code:
#!/bin/sh
dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false
onWifiDisconnect.sh
Code:
#!/bin/sh
dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 

The Following 4 Users Say Thank You to qwazix For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 15:02.