Troubleshooting Connection Issues
The following information is designed to help you resolve situations that you might encounter when you try to connect the Device Emulator to the development computer.
Connecting to the Device Emulator
Use the DMA transport that Visual Studio provides for connecting to the Device Emulator. This transport eliminates almost all connection issues between the development computer and the emulator.
Use the TCP/IP transport only if you have some serious specific reason. To resolve issues that stem from the use of TCP/IP with the emulator, review the steps that follow. For more information, see the Mobile Developer Center.
Connecting to Device Emulator Without Network Connection
To connect your development computer to the Device Emulator over TCP/IP when you do not have a network connection, you must:
Install the Microsoft Loopback Adapter. For more information, see Installing the Microsoft Loopback Adapter.
Bind the loopback adapter to the NE2000 card. You can do this from the Network tab of the Emulator Properties dialog box. Opening this dialog box depends on your installation. For more information, see How to: Change Property Settings.
Connecting to Device Emulator Using ActiveSync
You can use Microsoft ActiveSync to connect to the Device Emulator by using the following steps:
Start the Device Emulator Manager.
For more information, see How to: Start the Device Emulator Manager.
Connect to the desired emulator.
Using the Device Emulator Manager, cradle the selected emulator.
In ActiveSync, open the Get Connected dialog box, and follow the instructions for setting up a partnership.
Whenever you target the Pocket PC Device from Visual Studio, you are targeting the emulator by way of ActiveSync. If you close the Device Emulator Manager or close the emulator, the ActiveSync connection also closes.
Generating a New MAC Address
You can establish a new MAC address for the emulator. This process is sometimes helpful in troubleshooting network issues.
In the Registry, delete the GUID key under HKEY_CURRENT_USER\Software\Microsoft\Device Emulator\MAC Addresses.
The emulator will generate a new MAC address for itself.
Identifying the IP Address of the Emulator
How you discover the IP address being used by the emulator depends on which version of the emulator you are using. For example, the steps for Pocket PC differ from those for Smartphone.
On the Pocket PC emulator Start menu, click Settings, click Connections, click Network Cards, and then click the appropriate adapter (for example, NE2000 Compatible Ethernet Driver).
On the Smartphone emulator, run a small application to display IP addresses. For more information, see How to: Display IP Addresses for Smartphone Emulators.
Failure to Open Virtual Switch Driver
If you are trying to connect the Device Emulator to a network by using the emulated NE2000 or CS8900 card, you need a Virtual Switch Driver. (You can download a driver from the Mobile Developer Center.)
An error opening the driver can occur for several reasons:
Lack of driver.
The network card on the development computer does not have the driver installed.
There were problems during the installation of the driver.
The driver is in a disabled state.
The development computer does not have a network card.
Use the following steps to diagnose the precise cause.
To diagnose the precise cause of the failure
Look on the Network tab of the Emulator Properties dialog box.
If the NE2000 and/or the CS8900 cards are enabled, verify that the network cards they are bound to are present and connected. (To open the Emulator Properties dialog box, click Configure on the emulator File menu.)
Look at the network properties of the adapter to verify that the item Virtual Machine Network Services is present, enabled, and of the correct version (2.6.465.224 or later versions).
If these steps do not fix the problem, reinstall the driver.
Connecting to a Network
By itself the Device Emulator has no network connectivity.
To connect the emulator to a network
Cradle the emulator.
For more information, see How to: Cradle and Uncradle the Device Emulator.
Install the Virtual Switch Driver.
You can download a driver from the Mobile Developer Center.