Charteris Community Server

Welcome to the Charteris plc Community
Welcome to Charteris Community Server Sign in | Join | Help
in Search

Roger Whitehead's blog.

Reflections on architecting and implementing Microsoft mobile and web technologies.

February 2009 - Posts

  • Nxt Gen User Group Talk - Location Based Programming - The "Demo Gods" Were Frowning

    A few weeks ago (Tuesday 13th January) I gave a presentation to the  Oxford Branch of the NxtGen User Group on Location Based Programming with Windows Mobile. If you are interested, you can find the slides in PDF form for the talk here.

    This presentation was one of those occasions however,  where things just don't go as planned. The problems occurred during my final demo, which hoped to show how to use Windows Mobile to call Virtual Earth Web Services 1.0.  The  other previous demos were running entirely locally on my laptop and generally the "demo gods" were with me - so these went OK.

    Demos and Demons - Connectivity Woes

    However this final demo with Virtual Earth, required stable internet access for the web service connection and this was the root of my problems.   Due to network authentication issues when connecting to the event location WiFi, prior to the start of the talk (I tried many times to access this), and the requirement of Virtual Earth Services for https access,  this wasn't going to be straight forward. In the end I had the nervy and surreal experience of using a Windows Mobile 6.x software Emulator, virtually "cradled" via Windows Mobile Device Center on my laptop and connected to the internet via a real Windows Mobile 3G device connection of only 2 bars signal strength! Not a time for the faint hearted. 

    As ever,  everything was working perfectly before the session, during the break, and before the demo itself. None of that mattered however as nobody saw it and the demo failed to work when required! Every call to the Virtual Earth Service kept throwing WebExceptions when the Virtual Earth token was requested via the first service call. It soon became obvious that the networking setup was failing to access the internet or resolve the required address. It appeared to think I was looking for a local web resource on my host machine. Internet Explorer Mobile in the emulator was also failing to connect to public web sites. In the heat of the demo, I appeared to be doing nothing different compared to previous successful attempts. The emulator was "cradled" and my host laptop could see the web but the emulator couldn't.

    Apologies

    Time was running out, so in the end I had to skip the demo. I felt this took the edge off the presentation,  so my sincere apologies to all who were there and missed out on the final demo.

    Investigations & Repercussions

    When I got home this was still bugging me,  so I did some further intense investigation. It appears there was a difference in the behaviour of the Windows Mobile 6.1 emulators depending on the sequence of the setup and the type of network connection in use although my results weren't always consistent. The issues0 appear to relate to two areas:

    • Whether following the "cradle" action the device is set up with a sync profile on your host machine. If not you should use the "Connect without setting up the device" option. This appears to finally enable the network option even though the emulator thinks it is cradled and the network connection property in the State Notification broker shows it as enabled.
    • The connections setting in the emulator itself and whether the connection is set to "My Work" or "MyISP" in the Network / Advanced settings. Depending on your network proxy or firewall settings this may cause issue. In my case I suspect this changed when I switched from WiFi to mobile based connectivity.

    The Road To Connection Success

    The correct sequence to get internet connectivity for a mobile development application from Visual Studio appears to be:

    • Ensure that your Windows Mobile Device Center (Vista) or Active Sync (XP) is set to accept connections on "DMA". Otherwise emulators appear to fail to be detected and cradled.
    • Using the Device Emulator Manager ( Tools / Device Emulator Manager in Visual Studio) "Connect" to the chosen Emulator e.g. "USA Windows Mobile 6.1.4 Professional VGA Emulator" . This emulator should start if not already running.
    • Ensure the Emulator network configuration is set to emulate a Network card via the relevant checkbox. In my case this was an NE200 PCMCIA Adaptor.
    • "Cradle" the emulator via the Device Emulator Manager. This should start the Windows Mobile Device Center or ActiveSync. Ensure that the connection is finalised via the "Connect Without Setting Up My Device" option.
    • Check the Network connections are set correct via the Windows Start / Settings / Networks / Advanced options. Ensure the drop downs are set correctly. In my case this is to "My Work Network".
    • Check the internet connection on the emulator by browsing to a known web site URL.
    • Deploy the application which requires internet connectivity.

    Another Chance To See....

    Anyway, weather and traffic conditions permitting,  I am hoping to do a reprise of  the last 15 minutes of my talk as a "nugget"  at the next NxtGen Oxford Branch talk on Wednesday 4th February 2009. It will be at the RM offices in Didcot from 7PM. Further details of location and timing are here at the NxtGenUG site.

This Blog

Syndication

News

Powered by Community Server (Commercial Edition), by Telligent Systems