Enabling network connectivity on a Windows Mobile device emulator
I’ve been experimenting with writing programs for Windows Mobile. I write the code in Visual Studio and use it to run the program in a Windows Mobile device emulator. The app I’m working on needs an internet connection but it is not obvious on how to configure the emulator to make that happen. I came across the following instructions on how the emulator can access the same network connection as the host (dev) machine and though I’d share.
Note: see the end of this post for info on prerequisites and even how to write a managed Windows Mobile application.
Enabling Network Connectivity on the Device Emulator
When Device Emulator is started, it starts like a device that is not cradled. In this state, it has no connectivity to the Internet. There is no data plan provided by a mobile operator. Therefore, the Device Emulator also lacks over-the-air connectivity. There are two ways to enable network connectivity by using Device Emulator:
- By cradling it by using Windows Mobile Device Center (or ActiveSync in Windows XP)
- By enabling virtual networking by using the virtual machine network services driver
Note If the emulator is running inside a virtual PC, see To enable network connectivity on an emulator running inside a Virtual PC.
The following steps describe how to connect the emulator to the Internet by cradling it. This method connects to the Internet by using an ActiveSync pass-through.
To cradle the emulator by using Windows Mobile Device Center (or ActiveSync) |
- or - Select Setup your device. After it is connected, the emulator will have Internet connectivity. |
The following steps describe how to connect the emulator to the Internet by using the virtual machine network services driver.
To connect to the Internet by using the virtual machine network services driver |
|
If the emulator is running inside a virtual PC, you must perform additional steps to enable network connectivity. We will refer to the physical machine as the host machine and to the operating system running inside Virtual PC as the virtual machine. These instructions assume that the virtual machine is installed and ready to run on the host machine.
To enable network connectivity on an emulator running inside a Virtual PC |
Make sure that the host and virtual machines are now connected through the Microsoft Loopback adaptor. You can now to connect the emulator to the Internet by using the virtual machine network services driver. |
For reference, writing a managed Windows Mobile application can be done as follows:
- Install required software (these or the latest versions)
- Visual Studio 2008 Professional with Service Pack 1, or a later version of Visual Studio Professional
- Windows Mobile 6 Professional SDK
- Windows Mobile Device Center 6.1
- Windows Mobile 6.1.4 Emulator Images
- Enable network connectivity
- Follow walkthrough on creating a simple app in managed code at https://msdn.microsoft.com/en-us/library/bb158524.aspx
Comments
- Anonymous
August 01, 2010
Hi Alex, I know it was a year ago when you posed the above, but can you please fix the link to "To enable network connectivity on an emulator running inside a Virtual PC." As i am really struggling to get this to work.Many thanksChris - Anonymous
October 14, 2010
thanks a lot for such a useful article. thank you - Anonymous
October 14, 2010
thanks a lot for such a useful article. thank you - Anonymous
September 20, 2011
Thanks a ton for the info. Bt i also need the details about how to enable network connectivity on a Windows Phone 7 emulator. - Anonymous
September 13, 2012
Ok,.This all works excellent on Windows 7. How about Windows 8? It says that you can't install Visrtual PC on windows 8. So is there a way to enable connectivity of the windows mobile device emulator on windows 8?