FORUMS
Remove All Ads from XDA

Auto connect ActiveSync via BT (when in range), auto A2DP & more

20 posts
Thanks Meter: 0
 
By dmkpoznan, Junior Member on 26th June 2009, 10:48 AM
Post Reply Email Thread
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.



Attached Files
File Type: cab AutoActiveSync_v1.0.cab - [Click for QR Code] (148.4 KB, 471 views)
File Type: zip AutoActiveSync_v1.0.zip - [Click for QR Code] (149.8 KB, 237 views)
File Type: cab AutoActiveSync_2.0.cab - [Click for QR Code] (451.1 KB, 1798 views)
File Type: cab AutoActiveSync_v2.5.cab - [Click for QR Code] (172.0 KB, 1850 views)
File Type: zip AutoActiveSync_v2.5.1.zip - [Click for QR Code] (177.6 KB, 334 views)
File Type: zip AutoActiveSync_v2.5.2.zip - [Click for QR Code] (177.3 KB, 3391 views)
 
 
3rd July 2009, 09:55 PM |#2  
Junior Member
Thanks Meter: 0
 
More
Hello this is a great job, do you have an idea how can make it start as a service, I mean I know how to make it start with WM6 but how can I give AutoSync the good arguments to make it start with in backgroup with the right device and time interval ?

Best regards.
5th July 2009, 10:44 AM |#3  
OP Junior Member
Flag Poznan
Thanks Meter: 0
 
More
Quote:
Originally Posted by htc-alb-1

Hello this is a great job, do you have an idea how can make it start as a service, I mean I know how to make it start with WM6 but how can I give AutoSync the good arguments to make it start with in backgroup with the right device and time interval ?

Best regards.

Settings are saved in registry, so there is no need to run it with arguments. For now I am testing rewritten version as service with many improvments, and features added (like AutoA2DP connect or "disconnect wifi" when in range of AS). I will publish new version this week (there is no more problem with running application in background etc. - now this is service + configuration app + helper for running in suspend mode).
14th July 2009, 12:03 AM |#4  
Junior Member
Thanks Meter: 0
 
More
good to heard ! waiting for this new release so ;)
16th July 2009, 04:43 AM |#5  
Junior Member
Thanks Meter: 0
 
More
Question But not for long
Quote:
Originally Posted by dmkpoznan

Settings are saved in registry, so there is no need to run it with arguments.

This app shows great promise and works OK except the registry entries do not stay set. Each time I exit and restart AutoActiveSync the registry entries go to default. They are OK after exit, but are defaulted when I start AutoActiveSync. Is there any way to make the registry entries stay?

[Touch HD - WM6]
16th July 2009, 09:32 PM |#6  
OP Junior Member
Flag Poznan
Thanks Meter: 0
 
More
Exclamation
Ok, this weekend I will post service (tested - I believe, that everything is working and writed in good way). Sorry for late, but last week my disk in notebook decided to die (aghr... 6 mounths old Hitachi with ThinkPad active protection system... grrr).

Best regards!
19th July 2009, 10:03 AM |#7  
OP Junior Member
Flag Poznan
Thanks Meter: 0
 
More
First post updated. Service published.
23rd July 2009, 02:53 PM |#8  
Junior Member
Thanks Meter: 0
 
More
Service works well. Have used for days now and it connects and disconnects as it should. Restarts on power up too. Well done!
23rd July 2009, 11:33 PM |#9  
Junior Member
Thanks Meter: 0
 
More
Thumbs up
Working great for me too, i added the service.exe to the startup on the WM to get sure it is always runing after a reboot.

Nice job !
GuestX00823
24th July 2009, 08:30 AM |#10  
Guest
Thanks Meter: 0
 
More
doesn't work...

Is it because of toshiba stack?
24th July 2009, 08:53 AM |#11  
Member
Thanks Meter: 0
 
More
Thanks the very beneficial prog.

Is it possible to limit the running period? I mean allow to start the prog. 8h00 AM and not allowd after 22h00 (10h00 PM). During the sleeping time there is not need to sync (My laptop is switched off in the night).

Thanks
Post Reply Subscribe to Thread

Tags
active, activesync, activesync .net c#, auto, sync

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes