maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [Question] Disconnect Internet during nights (https://talk.maemo.org/showthread.php?t=52361)

Jkill 2010-05-11 01:45

[Question] Disconnect Internet during nights
 
Hi,

I am looking for some dbus-send commands (or equivalent) to completely disconnect the N900 from the Internet during nights.

because I cannot set a off-peak time for IMAP sync in the Modest email client, I'd like to disconnect the phone from the internet completely so sync would fail.

So far I have found this dbus-send command which works great for a temporary disconnection:

Code:

dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true
however, the phone will reconnect when any process requires an internet conenctivity (facebook widget, IMAP sync)

I thought about disabling the wlan0 interface, however the phone will then use the gprs0 interface to perform Internet connection so no good...
The other way that would definately work is to put the phone on offline mode but I wish to keep the telephone available during nights so it is not good either.

how could I do this then?
Cheers
Jkill

matts76 2010-05-11 02:18

Re: [Question] Disconnect Internet during nights
 
I use a queen beecon widget widget set for hard sleep mode to turn off internet at night, (i think its off all night as it is still off in the morning) you could try using the comands that uses, im not sure which one u need, im totaly new to linux but here is the command in full,
run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true ; rmmod wl12xx ; run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1 ; run-standalone.sh dbus-send --print-reply --system --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:locked

marktold 2010-05-11 09:04

Re: [Question] Disconnect Internet during nights
 
Cant you just go into offline mode by pressing the powerbutton once and choose "Offline mode" or is your goal a time automatic offline mode by time?

Markus

Jkill 2010-05-11 09:06

Re: [Question] Disconnect Internet during nights
 
I need to keep the phone with GSM radio ON as I need to receive phone calls just in case ...
I'd like an "Internet offline" mode if that make sence ..

Cheers

Venemo 2010-05-11 09:16

Re: [Question] Disconnect Internet during nights
 
Have you heard about the AutoDisconnect app?

Jkill 2010-05-11 09:20

Re: [Question] Disconnect Internet during nights
 
I sure have, however it does not suit my need.
Unless I have missed something, there is no way to distinguish the "Day" from "Night", there is no scheduling capacity with AutoDisconnect and it is not its purpose, which is to save battery life

liedekef 2010-05-11 09:22

Re: [Question] Disconnect Internet during nights
 
Use Wifi Switcher to enable/disable wifi at will, and use the 3G/2G applet to disable 3G when needed:

http://maemo.org/downloads/product/M...wifi-switcher/
http://maemo.org/downloads/product/M...ection-applet/

Joorin 2010-05-11 09:23

Re: [Question] Disconnect Internet during nights
 
Out of curiosity: Why do you want to do this?

The rmmod based solution is ... hardcore but removing the functionality from the kernel like that will really stop the network from functioning. Just remember that you will have to hope that the insmod call will work when you want the network functionality back.

And, to me, using libiw to disable WiFi on driver level seems like a better solution.

afaq 2010-05-11 09:26

Re: [Question] Disconnect Internet during nights
 
Just a thought - what if you go to settings and under Internet Connections change "Connect Automatically" to ""Always Ask".
Would that stop the sync until confirmation from the user?

Jkill 2010-05-11 09:29

Re: [Question] Disconnect Internet during nights
 
Quote:

Originally Posted by Joorin (Post 653016)
Out of curiosity: Why do you want to do this?

The rmmod based solution is ... hardcore but removing the functionality from the kernel like that will really stop the network from functioning. Just remember that you will have to hope that the insmod call will work when you want the network functionality back.

IMAP sync does not offer peak/off time sync so I dont want to be woken up by an email coming in. I can schedule a disable of wlan0 but it will then switch to gprs0 so no go ..


All times are GMT. The time now is 05:01.

vBulletin® Version 3.8.8