Search my blog articles

Saturday, March 06, 2010

Using desktop VPN connectivity with Windows Mobile Emulators.

At my day job, I develop Windows Mobile apps based on Symbol MC70 devices and windows Mobile 5.0.

We use the device’s Barcode scanner extensively for our inventory management. So naturally I started using the Symbol EMDK APIs to do it.

The problem came up when I started developing remotely ( at home) I realized in a hard way, none of the Symbol APIs would instantiate or startup on a device emulator. So I extracted the Barcode APIs to an interface and implemented a mock api for Emulator usage. I load the Mock or the actual APIs based on Device info parameter by calling the

SystemParametersInfo method from [DllImport("coredll.dll")].

This all works great so far. I was excited once I had this going, hoping to do a bulk of my development while I watching Netflix.

So, at home, I fired up my VPN and I started my debugging the Mobile app with my slick Mock implementation of the Barcode reader. That’s when I realized desktop pass through cannot use the VPN connectivity to talk to my VPN accessible connectivity.

  1. Here is what I did. 
    In Visual Studio, used the Device Emulator Manger.
  2. Selected the active device I was debugging on.
  3. Right click and chose "Cradle”.
  4. This brought up my “Windows Mobile Device Center”
  5. I chose “Connect without setting up” option.
  6. Within the device emulator I used the Internet explorer to navigate to a resource at work. Desktop pass through use the VPN to talk to my resource at work.

Now I can debug my Mobile app and make use of the DB/ WCF Services via my desktop VPN.

No comments: