[Windows Mobile Apps and Games] dmkpoznan:
AutoActiveSync via BT

I’m using Windows Mobile devices for years. And I like this OS and devices, but I found one big mistake (comparing to Nokia for example). There is no way to auto-connect ActiveSync via BT. For example Nokia e50 connect to synchronization software when is in range! I now, that this could be because of architecture of WM devices (for example deep suspend and problem with waking device up and checking… blah blah).

Ok, I decided to create small software to auto-connect via BT when in range of Bluetooth cradle (your device could be on or suspended).

There is two settings:

• first: select device from list (device must be paired – this device is computer with ActiveSync profile)

• second: select interval of searching (in suspend and in powered on mode) – this settings are in milliseconds. Please don’t set less then 15000 (15 sec)! Remember that less value cause your device to more often wake up from suspend to unattended mode and check for device if is in range (this could drain battery). My setting is 120 sec (120000 ms) - now I’m testing this value.

How does it work? It is looking for some system states before looking for specified by user BT cradle and allowing to connect:

• device can’t be connected to cradle (any other connection by USB or manual via BT will be detected)

• device can’t be connected to BT A2DP or BT Hands Free (this is to prevent of audio interruptions)

• device must be charged over “VeryLow” state (I think this is around 20%) or being connected to charger

How to use it? After first run (if You use cab please run it again to show settings window) You must select your ActiveSync BT destination device and set interval. Then click “Save” and “Hide Window”. If you like to exit application – just click “Exit”. The device will look for cradle every _your_interval_ of time (in sleep also). The application window must run in background for now (for people who use for example HTC Task Manager – you can add this window to special applications). And when device detected in suspend mode possibilities to connect the program will wake up device, connect and in maximum 10 second put device back to sleep (unattended mode).

Warning! Remember, that not only searching for device via BT could drain your battery. When ActiveSync is connected via BT and device is in suspend mode in real it is unattended mode. It mean, that for example CPU is working normally (not in deep suspend) and draining battery.

Registry. This software store settings in registry, right here: HKCU\Software\AutoActiveSync

Questions & Sugestions Write here, but please remember, that I have limited free time – I will try to answer, but sometimes this could be difficult (to find this free time). And sorry for my bad english ;)

What you need? You need only .NET framework 3.5 & Windows Mobile 6+ (because I use 6 SDK).

Update 19.07.2009:

Ok, version 2.0 published.

What's new? Application has been rewirted. Now it is working as managed service (in background - no more running window!). I tested cpu usage and minimized ram usage - now it's getting less ten 0.5% of CPU and only 450KB of ram (can't get lowwer - .NET :-). There is also two new features:

• disable wifi (after connecting by bluetooth to cradle - personaly I don't need two connections...)

• autoconnect to a2dp profile (if bluetooth headset is present - I used for many days AutoA2DP from this froum (thanks for author), but I decided to create for me "all in one")

Usage. After installing please run AutoActiveSync from start menu (this is only configurator - you must configure it before first usage). Then just run the service (on first tab). After restarting device service will autostart (via startup folder in Windows directory). Please note, that application can crash before accepting usage of unsigned dll's! For me the best solution is to disable checking it.

If you have problem... let me know ;)

Update 03.10.2009:

Version 2.5 is out :)

What's new? There is a lot of small improvements, some code has been optimized and rewritten. I added scheduling (for now for daily cycle, but I am thinking about week cycle), some tweeks to ActiveSync module, some to A2DP module (please run and check, what is new – for this version in my opinion there is no need to write manual).

What you need? Still .NET framework 3.5 & Windows Mobile 6+ (because I use 6 SDK). There will be no support for 5.0/2003SE because I have no time

to rewrite part of this software without SDK for WM6.

In next release could be… I’m thinking about adding AutoWifi – auto connect to open wifi networks, and test if there is internet access (but integrating with windows mobile WiFi manager!). I used for 15 minutes WeFI but for me this Was bad written program (slow & ugly & crashing..). Maybe someday I will add possibility to create some “scripts” for automating some tasks based on conditions, but this is long term plan… (not for next release).

Please try and let me know is this working :)

2.5.1 released!

There is bug fix for scheduling and new feature - auto disable GPRS/EDGE/HSDPA connections in roaming.

2.5.2 released!

Please install 2.5 and then unzip 2.5.2 and copy to program files folder (before that stop service and exit configurator!).

There is bug fix for scheduling (now tested) and new feature - allow enable wifi using Comm Manager when autodisabled after connecting to A2DP or ActiveSync.