[General Topics] Menneisyys:
In Part I of this series, I’ve elaborated on how quickly switching the 3G and GSM modes to prolong battery life. In this article, I discuss an equally important question: forcing the connection to be closed after a predefined time.

Note that the two situations (and solutions_ are radically different:

Switching between 3G and GSM bands is highly recommended even if you don’t use data connections, “only” phone calls. This is because the radio module of the phone needs a lot more power to maintain a connection with the higher-frequency 3G towers. Again, this has nothing to do with data connections being used or not.

Switching back to GSM, of course, can’t be utilized on non-3G-capable handsets like all TI OMAP-based Windows Mobile phones. The reason for this is that phones of the latter type don’t have access to 3G networks at all and are all operating in GSM networks.

Terminating data connections, on the other hand, are absolutely independent of the band you use and can (should), therefore, be used in both 3G and GSM (pre-3G) modes. This also means terminating a data connection is usable on non-3G-capable handsets too. Remember that switching back to the GSM band don’t work on these handsets as they can’t even use 3G bands.

1.1 Why no auto-disconnect when I exit the program using the connection?

First, some theory, which will be of extreme importance to people coming from other operating systems. Windows Mobile uses the following approach: “when you establish a data connection, it’ll stay on unless you manually disconnect it”. (Fortunately, it also offers a built-in and, by default, inactive timer that does allow for disconnecting and, therefore, preserving battery life. More on this later.)

This approach is diametrically opposed to that of Symbian - the operating system of, for example, Nokia and Sony-Ericsson handsets. Symbian, as opposed to Windows Mobile, doesn’t (generally) use system-level connections. That is, you can’t just start a “global” connection and make all your programs requiring an Internet connection use it. Instead, a program wanting to pass to the Net displays you a list of “hotspots”, which includes your data accounts (and already-used Wi-Fi access points if the handset is Wi-Fi capable). When you exit the application that has opened the connection, it will also be closed, unlike in Windows Mobile (WM). That is, if you, say, connect to the Net by starting Internet Explorer Mobile (IEM) on your WM phone, after you shut down IEM, it’ll still stay on. (Note that Symbian, per se, doesn't offer auto-timeout at all.)

As active data connections consume a lot of additional battery, you will want to make sure you close them. This is particularly true when operating in 3G mode.

2. Manual disconnection

On Pocket PC’s, there’re three ways of doing this manually; one of them (the second) is also usable on MS Smartphones.

First, you can long-press the Red phone button. It’ll result in terminating the connection on most models and ROM versions.

Second, if you go to the pre-installed Connection Manager, you can just click the (active) “Data connection” icon as can be seen in THIS screenshot (the same on another Pocket PC model – the Wizard running mfrazzz’s XDA Mobile 6 Release 3 – is HERE, showing it being active (blue)).

As has already been mentioned, this is the only way to disconnect a Smartphone (a WM6 QVGA screenshot HERE). The Smartphone has no clickable Connectivity bubble and long-pressing the Red phone button results in the locking of the phone, not hanging up the connection.

Third, if you do apply the registry hacks below (see Chapter 3), you can also click the “Disconnect” button in the Connectivity bubble. This, however, requires a registry hack.

In addition, if you prefer an icon / link-based connection termination, you may also want to check out Vijay555's excellent VJVolubilis utility – more precisely, the –gprsoff command-line parameter.

3. Automatic disconnection

In a past article, I’ve already elaborated on GB-SOFT Tweak, a Pocket PC-only (incompatble with MS Smartphones) tool that lets for configuring the system to disconnect the data connection after a freely settable idling period. Check out the linked article for a mini-tutorial.

phoneAlarm, of which the band switching capabilities I’ve thoroughly explained in the previous part of this series, also has some other, data connection-related goodies in the (FULL version only!) Data Connection Settings dialog on the Addon tab. It’s also in there that the system-level auto disconnection can be configured:

Note that you MUST reset / recycle your device for it to start working (but not in the opposite direction). It works in exactly the same way as GB-SOFT Tweak: it sets the value of HKLM\Comm\ ConnMgr\ Planner\Settings \ CacheTime in the Registry and lets the operating system disconnect when there’s no Internet activity in the pre-set time.

(Also see THIS post (in THIS XDA-Devs thread) for more info on this Registry entry.)

Also note that both these apps (phoneAlarm and GB-SOFT Tweak) can also be configured to enable the “Disconnect” button and the timer in the Connectivity bubble (as was the case in WM2003(SE)) as can be seen in THIS screenshot. This, as with the above-shown auto-timeout setting, is just a widely-known Registry hack. (If you’re interested, it’s HKLM\ControlPanel\ Phone\ Flags2 with values 8 (Disconnect button), 16 (both the Disconnect button and the timer) and 0 (neither of them); also see THIS MoDaCo Wiki page).

3.1 Registry hacks

As all these hacks are “plain” Registry hacks, you don’t necessarily need (the commercial) phoneAlarm Pro / GB-SOFT Tweak for enabling / changing them. If you aren’t afraid of directly editing the Registry, you can do it yourself, without relying on these third-party apps.

3.2 The MS Smartphone platform

So far, there have been no tutorials for MS Smartphone users on this subject (see the comments for example HERE). Therefore, I hope this section turns out to be highly useful for everyone.

The same Registry hack (HKLM\Comm\ ConnMgr\ Planner\Settings \ CacheTime) works as with Pocket PC’s. However, GB-SOFT Tweak doesn’t as it's not MS Smartphone-compliant.

Configuring the MS Smartphone version of phoneAlarm to set a pre-defined timeout is pretty easy (as of version v1.11.1): inside Config, go to Advanced Settings and look for “GPRS Auto-disconnect”:

and set it to your favorite value; for example, 1 (minutes). The result:

Note that an XDA-Devs forum member has written a .NET CF-based front-end to set these values in THIS XDA-Devs thread. He, so far, hasn’t made it available for download. I’ve just e-mailed him about this – hope he’ll do this.