maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Mere question. Force 3.5G over 2G only when is needed. Is it doable? (https://talk.maemo.org/showthread.php?t=69501)

gorgezilla 2011-02-08 12:32

Mere question. Force 3.5G over 2G only when is needed. Is it doable?
 
I got a question - willing to donate to the solution holder..
This was also asked here...

2G vs 3G (3.5g). Well, we all know that 3G/3.5G brings down the battery quite fast and, though the network selection applet is making good job on it I would ask/propose to the coding guys the following scenario (please, forgive for me not being to clear when speaking about this issues - not knowing much about it)

When we need a 3G/3.5G network connection (either on SIP calls, web browsing, attachment downloading/uploading, etc) the present 2G connection should "call" for the 3.5G and allow it to do the job. I believe it is common knowledge that the switch from 2G to 3G is quite fast in contrast to the vice-versa from 3.5G to 2G which it takes quite longer. Then, after the job is done, and the screen is black (standby) the network connection should revert to the 2G mode.
The network Dual mode is not working, as I monitored several times.

So, is this doable?

droll 2011-02-08 12:42

Re: Mere question. Force 3.5G over 2G only when is needed. Is it doable?
 
http://talk.maemo.org/showthread.php?t=45053

that might help..

gorgezilla 2011-02-08 12:53

Re: Mere question. Force 3.5G over 2G only when is needed. Is it doable?
 
Quote:

Originally Posted by droll (Post 938903)

tried that. it doesn't do what I am asking for:

1. Always use 2G data network connection

2. When needed (examples)
2.0 When web surfing change the data connection (from 2G to 3.5G)
2.1. When using/starting or receiving a SIP call change the connection (from 2G to 3.5G)
2.2. When downloading or uploading email attachments also change the default 2G connection

3.0 After the above examples/actions end (2.0, 2.1, 2.2, etc) the data network connection reverts to the default 2G when in standby

Copernicus 2011-02-08 13:44

Re: Mere question. Force 3.5G over 2G only when is needed. Is it doable?
 
Quote:

Originally Posted by gorgezilla (Post 938917)
tried that. it doesn't do what I am asking for

Hmm. Depending on what you are asking for, it might be modified to do that... The question is, do you

(a) want the device to recognize that packets are being transferred heavily, and whenever that happens, step up to 3G mode, or

(b) want the device to recognize when you run one of a select group of processes, and when doing so, shift up to 3G.

For (a), the core code of "AutoDisconnect" appears to be a script that polls the system's packet counter, and acts whenever the number of packets drops to a low enough amount per unit time. In theory, it wouldn't be hard to do the reverse -- check for a significant enough spike in the number of packets being passed, and shift up if that happens. Of course, this has the significant drawbacks that (1) the polling system will take a while to recognize that you've started a large data transfer, and (2) when it makes the shift, you'll be stuck waiting for a fairly significant amount of time (possibly triggering timeouts in some pieces of software).

For (b), things are a bit tougher. You can't tell which programs are actively using the network just by looking at some packet statistics. Honestly, it'd be easier to modify the programs themselves to ask for a shift up to 3G before they initiate a significant data transfer. I guess you could wrap the program in a shell script when you run it, something like:

Code:

#!/usr/bin/sh
dbus-send command-to-shift-up-to-3G
run_heavy_data_transfer_program
dbus-send command-to-shift-back-to-2G

Of course, you have to be careful when fiddling with this stuff, as it would probably hang up the phone if you run it while you're connected to someone else...

In any case, I'm a newbie to the n900; I suspect others here have probably looked into stuff like this before. :)

gorgezilla 2011-02-08 13:49

Re: Mere question. Force 3.5G over 2G only when is needed. Is it doable?
 
Hi there, Copernicus,

I am as newbie as you are. I believe, from your description, that any of your two plans could work but my field of interest was set way back the linux and the maemo (n900) came to life, hence I cant code.
I am a fan of n900, I love it and want to contribute with some ideas of improving the n900.
So, any one interested in this issues?

Copernicus 2011-02-08 14:06

Re: Mere question. Force 3.5G over 2G only when is needed. Is it doable?
 
Quick question: it sounds like you've already got the 2G/3G mode selection applet (I use that myself). Isn't that already the best solution to this problem? The human being using the n900 would seem to be in a much better position to determine when to switch to 3G than a utility running on the device could be...

gorgezilla 2011-02-08 14:11

Re: Mere question. Force 3.5G over 2G only when is needed. Is it doable?
 
Yes and Yes, but No. When you receive an email with an attachment and u wanna open it, it should change to 3g automatically. Same with the SIP calls, when received or dialed, the change from 2g to 3g is fast, bias the fact that sip calls dont work under 2g data connection network....And the revert to 2g when n900 stands-by, sounds well to me...

krakinou 2011-02-08 14:47

Re: Mere question. Force 3.5G over 2G only when is needed. Is it doable?
 
Hi there,
IMHO, if you switch from 2g to 3g when a SIP call is received, you will be off-line the time the switch is done (even if it's fast) and so you may miss the call...
Moreover, if you are in an area where no 3g is available, you have a pop-up asking if you want to abort connection... and this time it's sure you'll miss the call


All times are GMT. The time now is 23:12.

vBulletin® Version 3.8.8