Go Back   xda-developers > Windows Mobile Development and Hacking > Windows Mobile Apps and Games


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 26th June 2009, 11:48 AM
dmkpoznan dmkpoznan is offline
Junior Member
 
Join Date: Aug 2008
Location: Poznan
Posts: 17
Arrow Auto connect ActiveSync via BT (when in range), auto A2DP & more

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 (148.4 KB, 283 views)
File Type: zip AutoActiveSync_v1.0.zip (149.8 KB, 137 views)
File Type: cab AutoActiveSync_2.0.cab (451.1 KB, 1444 views)
File Type: cab AutoActiveSync_v2.5.cab (172.0 KB, 704 views)
File Type: zip AutoActiveSync_v2.5.1.zip (177.6 KB, 165 views)
File Type: zip AutoActiveSync_v2.5.2.zip (177.3 KB, 971 views)

Last edited by dmkpoznan; 20th October 2009 at 11:54 PM..
Reply With Quote
Sponsored Links

  #2  
Old 3rd July 2009, 10:55 PM
htc-alb-1 htc-alb-1 is offline
Junior Member
 
Join Date: Jan 2009
Posts: 3
Default

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.
Reply With Quote

  #3  
Old 5th July 2009, 11:44 AM
dmkpoznan dmkpoznan is offline
Junior Member
 
Join Date: Aug 2008
Location: Poznan
Posts: 17
Default

Quote:
Originally Posted by htc-alb-1 View Post
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).
Reply With Quote

  #4  
Old 14th July 2009, 01:03 AM
htc-alb-1 htc-alb-1 is offline
Junior Member
 
Join Date: Jan 2009
Posts: 3
Default

good to heard ! waiting for this new release so ;-)
Reply With Quote

  #5  
Old 16th July 2009, 05:43 AM
Zom Zom is offline
Junior Member
 
Join Date: Jun 2006
Posts: 9
Question But not for long

Quote:
Originally Posted by dmkpoznan View Post
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]
Reply With Quote

  #6  
Old 16th July 2009, 10:32 PM
dmkpoznan dmkpoznan is offline
Junior Member
 
Join Date: Aug 2008
Location: Poznan
Posts: 17
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!
Reply With Quote

  #7  
Old 19th July 2009, 11:03 AM
dmkpoznan dmkpoznan is offline
Junior Member
 
Join Date: Aug 2008
Location: Poznan
Posts: 17
Default

First post updated. Service published.
Reply With Quote

  #8  
Old 23rd July 2009, 03:53 PM
Zom Zom is offline
Junior Member
 
Join Date: Jun 2006
Posts: 9
Default

Service works well. Have used for days now and it connects and disconnects as it should. Restarts on power up too. Well done!
Reply With Quote

  #9  
Old 24th July 2009, 12:33 AM
htc-alb-1 htc-alb-1 is offline
Junior Member
 
Join Date: Jan 2009
Posts: 3
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 !
Reply With Quote

  #10  
Old 24th July 2009, 09:30 AM
sabertooth sabertooth is offline
Senior Member
 
Join Date: Sep 2007
Posts: 101
Default

doesn't work...

Is it because of toshiba stack?
Reply With Quote

Reply

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:02 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.