Sep 19 2006

Syncing your mobile with Vista RC1 via WMDC

Category: .mobileAmit Bahree @ 4:33 pm

Update: Microsoft has now publicly released the Beta 3 version of WMDC which you can get from here and you do not need to use the hack detailed below in this post. This beta 3 also supports Windows Mobile 2003!

WMDC (Windows Mobile Device Centre), is the new software in Vista that replaces ActiveSync and you cannot even install ActiveSync on Vista.

If you installed Vista RC1 and plugged in your Windows Mobile Phone (either Pocket PC or Smart Phone) and expected Outlook to start syncing you would be in for a rude shock. All Vista does is open the device in Explorer so you can browse it and get to explore files – but nothing to sync up. This is because the WMDC bits are not publicly released yet but are being dogfood’ed internally.

If you are like me and cannot wait then below are the steps you need to do to get your mobile sync between the device and Outlook / Exchange using WMDC (make sure you also read warning before you do anything):

  1. Add a new key called “WHOS” (without the quotes of course) in HKLM\Software\Microsoft. (See the image below on how this should look like with the blue circle around the key)
  2. Plug in your mobile to the machine (either via USB or your Cradle).
  3. Run Windows Update.

Windows Update should detect that you have a new update and download and install the WMDC bits. After which you can setup a new partnership to get this running with Outlook.

Warnings:

  1. This is not supported – so you are really on your own. If something breaks and/or you lose data please don’t come crying to me or Microsoft. At the end of the day, there is a good reason why MS has not released this yet.
  2. Delete any existing partnership from your mobile and make sure there is nothing associating it with another computer. I had issues setting this up as a Guest or even as another one and had to restart all over (including installing Vista), so to be on the safe side, delete the partnership!
  3. Back up your data – both on the machine and the device.
  4. If you are not sure where to find WMDC – it should create a shortcut on your desktop. Also you can get to it via Mobile PC in the Control Panel (Control Panel\Mobile PC).

Below are some screen shots of this working on my machine. I also show the Control Panel and the Sync Centre.

 

Currently this is exposed via a MSI which essentially adds this key. Best of Luck!

Share

Tags:


Sep 17 2006

Mobile 5.0 SDK on Vista

Category: .mobileAmit Bahree @ 11:33 pm

If you have been trying to use Mobile 5.0 SDK on Vista and have been having some issues, then check out Fernando’s tips on how to get around these issues on Vista.

Share

Tags:


Aug 30 2006

Call A Contact

Category: .mobileAmit Bahree @ 1:44 am

[Update 1: Added the link for the Smartphone bits that you can download]

[Update 2: Added a Bug and Troubleshooting section at the end of this post]

[Update 3: Fixed a few small typos]

One of the things that has bugged me for a bit is the lack of integration between the phone numbers in Outlook contacts and a smart device (such as a Pocket PC or a Smartphone) connected to the computer when it comes to making phone calls.

In Outlook when you right-click on a Contact, it recognizes the context and the fact that there are phone numbers associated with that contact and it gives you an option to call them. Note, I am of course assuming that the said contact has phone numbers – either stored locally or retrieved from the GAL.

If you are running Office 2007 Beta 2, then the menu you see should be something along the lines of the image on the right hand side of this paragraph. (Sorry I have had to block out the actual phone numbers). Now, one would thing that when you click on one of those phone numbers, Outlook will dial that number for you. Well, note quite. Unfortunately, selecting any number, if you have Live Messenger installed, then you get Windows Live Call (which in turn asks me to sign up with some Verizon VOIP service – no thank you). I looked high and low and asked around but could not find anything that will let me send this phone number to my mobile and then use that to dial out. After ranting about it for a while and asking a few colleagues if there was a way, I thought I would write this myself.

So, here is the fruit of last weekends puntering about. There are two aspects to this solution – one that runs on your mobile device and the other is a Windows application that runs on your computer. You would need to install both these to get this working and it will work on both Pocket PC and Smartphone 5.0 (or higher). You will also need to have the .NET Framework 2.0 runtime on your computer and the .NET Compact Framework 2.0 SP1 runtime on your Mobile device. More details on how to install these a little later, but before that briefly explain how this works.

Well, simply you start a Windows application, called "Call A Contact" (yes, it is a Windows app and not a Outlook add-in – more on that in a bit) which "talks" to the other application on your device and instructs it to dial the provided phone number – fairly simple.

So, why a Windows app and not a Outlook add-in. Well basically it is because of time and patience (lack thereof). I only have Office 2007 Beta 2 running, and to get the VSTO CTP bits for Office 2007, the pre-requisite is the WinFX February CTP. For me this is not an option as I need to be on the latest version of the WinFX bits, for the WCF book that I am writing. Being, on the latest CTP, due to time constraints going back to an older version is not an option. Also, assuming I did go back to the Feb CTP of WinFX, the current VSTO bits are not very functional yet and we would still end up struggling. What about Office 2003 then? Well, almost the same similar story there as well. I don't have Office 2003 installed, and I will need to setup a VM with all the right dev bits – which again will take a long time – something I don't have at this point. As a result, the interim solution was to write a simple Win app, and that can be deprecated, with the Outlook add-in – that is when I can get all the bits along with the sun, moon and stars aligned. Smile

How do I use it?

Once you have installed both the desktop and mobile pieces, below are some screen shots showing how to use it from your computer. Make sure your device is connected via ActiveSync and cradled, and then start the app on your desktop (via Start => All Programs => Call A Contact).

You will see the Windows application as shown below. Click on Connect Device; if the connection between the desktop and the device is established then all the other controls will be enabled. The default paths for the apps (depending on the device) are pre-loaded, these can be changed if you installed the apps in some other location. Enter the phone number you want to call and click Run Program – simple as that.


(Before Connection)                             (After Connection)

The "Check Phone Status", when enabled, will check that the phone is free and only dial out if it is, otherwise you will see a dialog saving the phone is busy. If you don't care about this (which most likely you won't, because if the phone is busy the odds are you are already talking on it and know it is busy Wink. The three things I check for are:

  • Incoming Call
  • Current Call
  • On-Hold Call

Also, on your device if you use File Explorer and browse to where you installed the application (by default this should be in \Program Files\CallAContact and launch the application you will see a simple form where you can enter the phone number and get the same result. The Check Phone Status performs the same function. For example one a number is dialed out and the phone is busy if you try and dial another number with the check phone status option enabled you see an message saying the phone is in use, and to try later.

Note, if the CallAContact application is running on your device (as shown above) and you try to run it form the Desktop application – then nothing will happen. This is simply because since the application is already running on your device, I don't know what to do – should I quit that or not? (Remember we can only have one instance of the application on the device). So as best practice if you are using this on the mobile (though I can't imagine why), then make sure you exit the app when you are finished.

What about the Smartphone?

I have the code for that and have tested it in an emulator, but I need to get a device to test it, to ensure everything is working. You should be able to use this for that without any issues and I will be adding the links using which you can download the setup for Smartphone as well shortly.

What do I need to install it?

Well its not a long list of things, but depending on your current setup it might get a little tricky. Below are the things that are needed on your desktop and device. Please read this carefully as you will need to have all of these up and running.

  1. Mobile 5.0 device – This can be either a Pocket PC based mobile (like the HTC TyTn) or a Smartphone (like the QTEK 8500), but it has to be a Mobile 5.0 device.
  2. ActiveSync 4.2 – If you have an older version then please upgrade to version 4.2 from here. (which is the latest at the time of this writing).
  3. On your computer you will need the .NET 2.0 runtime. If you don't have this already then please get this from here (and it is a hefty download at 24 mb). If you are not sure if you have this already installed or not then skip on further and when you try and install the applications, that will fail (without causing any issues to your machine so you can relax), and will tell you that you are missing this.
  4. On your Mobile device you will need the .NET Compact Framework 2.0 with SP1. If you don't already have this installed then download it from here (at a heftier 37.1 mb). A couple of things that you need to read through. This is different from the .NET 2.0 bits in the above step. Also if you already have .NET Compact Framework 2.0 installed you will still need to get this as this is with SP1. Also, I would recommend installing this on your storage card – and not using up your main memory on the device.

If for some reason you don't have the .NET Compact Framework 2.0 SP1 installed (or you have an older version installed), when you try and run the application on the device you will see an error something like this:

Here are some screen shots showing you how to install the .NET Compact Framework mentioned earlier:

Steps for Installing

  1. Assuming you have all the bits mentioned above installed and working correctly then download the two required zip files below.
  2. Extract each of the files in a separate folder.
  3. Make sure your device is connected and powered on.
  4. In each of the folders double-click on Setup.exe and follow the prompts.

Files to Download:

Before you get to the link I should highlight the fact that you should backup all your data and don't come to me crying if something is screwed up because of this.

  1. Windows Application – WinCallAContactSetup.zip (495 kb)
  2. Pocket PC Device – CallAContactPocketPCSetup.zip (384 kb)
  3. Smartphone Device – CallAContactSmartphoneSetup.zip (378 kb)

If you want to change the default path for the program on the device and the type of device to be selected by default, then modify the WinCallAContact.exe.config file in any xml editor (or even notepad). This file can be found in the directory where you installed the application (default path is: C:\Program Files\Amit Bahree\CallAContact\). Change the PocketPCProgram key or the SmartPhoneProgramKey for updating the paths for either of those. Also if you prefer to default the app to Smartphone instead of Pocket PC, then change the WhichDevice from a "0" to a "1". Similarly if you don't want the Check Phone Status to be enabled then change that value to a "false". Note, all the values are case-sensitive.

Here is what the default config file looks like when you install this:

<?xml version="1.0" encoding="utf-8" ?><configuration> <appSettings> <add key="PocketPCProgam" value="\Program Files\CallAContact\CallAContact.exe"/> <add key="SmartPhoneProgram" value="\Program Files\smartphonecallacontact\SmartPhoneCallAContact.exe"/> <add key="CheckPhoneStatus" value="true"/> <add key="WhichDevice" value="0"/> </appSettings></configuration>

I have not done a lot of extensive testing, and I would like to heard your feedback and any issues you have. Also, please let me know if you would like me to extend this.

Lastly, when I get the Outlook add-in I will be posting it here (will get the VM up and running soon) – so keep an eye out - till then copy from Outlook and paste into this. If you are interested in the source code then let me know as well and I can post it up here.

Bugs Found:

  1. The Windows application had a bug where if the phone number had more than one whitespaces then it will not work correctly. This has been fixed. Please uninstall the old Windows Application, download and install the updated one (using the same links as above). Note, you do not need to update the application on your Mobile device as this was only on the windows application.

Troubleshooting Tips:

  1. When you try and call the phone number if you see a error similar to the one shown below then this can mean a couple of things. One your device is not connected any more, please reconnect and try again. Or two you did not install the application in the default location, but somewhere else. For example, if you installed the application on a storage card (which is recommended), then for your Pocket PC device change the path to "\Storage Card\Program Files\Call A Contact\CallAContact.exe" (without the quotes of course). If you want to find out the path on your device then use file explorer to see the location as shown in the screen shot below.



Share

Tags:


Aug 21 2006

How to change the Screen orientation on a Phone / Pocket PC?

Category: .mobileAmit Bahree @ 2:58 pm

If you have a Windows Mobile 5.0 device like the one I recently got and were wondering how do I change the screen orientation, well its fairly easy. It is cool that the screen orientation changes between landscape and portrait when I slide out the keyboard. But, on rare occasions I want to change the orientation without sliding out the keyboard and it is a pity that there is no hardware button to do this.

Programmatically this is a simple task. If you are using C++, all you need to do us use the ChangeDisplaySettingsEx class and change the DM_DISPLAYORIENTATION value for the lpDevMode member type. The supported screen settings are returned via lpDevMode.dmDisplayOrientation, with a DMO_0 meaning that screen rotation is not supported by the device. Also, when the display mode is changed a WM_SETTINGCHANGE message is send to all apps.

If you are more of a managed code kind of a person and rather use that, then it is even simpler. When you create a new Windows Mobile 5.0 Pocket PC device application project, your solution should automatically have a reference to the Microsoft.WindowsCE.Forms assembly. If for some reason you don’t have then then add the reference to this assembly. It usually resides in the same location where you installed the CF SDK (e.g. in my case this is C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\Microsoft.WindowsCE.Forms.dll).

In the SystemsSettings class, use the ScreenOrientation property to change the screen orientation (these are static). The possible values are 0, 90, 180, 270 (depicting angles), with the default being 0. To change the screen orientation between Landscape and Portrait you change the angle between 0 and 90 degrees as shown in the c# code snippet below.

Note, this only supported in .NET CF 2.0.

1 if (SystemSettings.ScreenOrientation == ScreenOrientation.Angle0) 2 //change to landscape 3 SystemSettings.ScreenOrientation = ScreenOrientation.Angle90; 4 else 5 //change to portrait 6 SystemSettings.ScreenOrientation = ScreenOrientation.Angle0;

 

[I'm rocking out to Veronicas - Everything I'm Not [Jason Nevins Remix]

Share

Tags:


Aug 17 2006

Utility to tweak HTC Hermes

Category: .mobileAmit Bahree @ 1:03 pm

Thanks to my colleague, Steve Butcher for this one.

Instead of messing around with the registry, there a utility available that will allow you to make tweaks to the HTC TyTn (the phone I got). This was also called the HTC Hermes, among a host of other names by different vendors. As the site article says, the utility itself free, but you need to register and download it and the site is in German only.

If you are either too lazy, or don’t know German, or just can’t be bothered and still want this utility then let me know. Since I have already downloaded this I can send you the cab file directly (its 745 kb).

[I'm rocking out to A Bad Dream by Keane from the album Under the Iron Sea]

Share

Tags:


Aug 15 2006

More phone pictures

Category: .mobileAmit Bahree @ 11:48 am

Some of you have asked me what I think of the phone and how does it feel – msmobiles has lots of pictures of the phone I got (HTC TyTn) (via Nino’s blog). I just think I am not brave enough now to run Linux on this phone quite yet; although I am sure Karan would beg to differ. Wink

Share

Tags:


Aug 14 2006

Push Email working

Category: .mobileAmit Bahree @ 3:09 pm

After struggling thru the weekend, with a hit and a miss to get push email working it seems at the end of it, the problem was between the user and the keyb. Smile.

I had active sync setup correctly, with the right Exchange settings. And when I was connected to my wireless (at home), using the mobile it was working. It took the effort of my colleague, Rick Pollak, to point out the obvious that I did not have a data account setup on the phone. (duh!). After having set that up all is well now. So, from now (until I get fed up and switch if off), if you send me an email to my office address at Avanade, I will get that email on my phone, ala blackberry style.

If you want to setup the data account on your mobile for for Orange (in the UK), the steps to do that on a Windows Pocket PC are:

   1. On the PDA, tap on Start and then Settings.
   2. Tap on the Connections tab.
   3. Tap on the Connections icon.
   4. Tap on the Advanced tab.
   5. Tap on Select Networks.
   6. Under the first drop down box, tap on New…
   7. In the Enter a name for these settings: field, enter Orange GPRS WAP
   8. Tap on the Modem tab.
   9. Tap on New…
  10. In the Enter a name for the connection: field, enter Orange GPRS WAP
  11. Tap on the Select a modem drop-down list and select Cellular Line (GPRS, 3G).
  12. Tap on Next.
  13. In the Access point name: field, enter orangewap
  14. Tap on Next.
  15. Tap on Finish.
  16. Tap on the Proxy Settings tab.
  17. Select the This network connects to the Internet option.
  18. Select the This network uses a proxy sever to connect to the Internet option.
  19. Tap on Advanced… Tap on WAP.
  20. In the Server field, enter 192.168.071.035
  21. In the Port field, enter 8080
  22. Tap on ok five times
  23. Tap on x to close the Settings screen.

The next steps are optional, and you should do this if you want to go to Orange’s site as opposed to something like BBC Mobile.

  24. Tap on Start, Programs and then Internet Explorer.
  25. Tap on Menu.
  26. Tap on Favorites…
  27. Tap on the Add / Delete tab.
  28. Tap on Add…
  29. In the Name field, enter Orange GPRS WAP
  30. In the Address field, enter http://wap.orange.co.uk
  31. Tap on Add.
  32. Tap on ok.
  33. Tap on x.

If you are using a Smartphone device (such as the one that Meenakshi got) as opposed to a Pocket PC device then you check out this link, where you can download a cab file and it sets it up for the network of your phone company. There are details for 02, Orange, TMobile and Vodafone – both Pay as you go and contract.

Share

Tags:


« Previous Page
Get Adobe Flash player