Internet Connectivity from WM5.0 Emulator *without* ActiveSync


Published Posted Friday, January 20, 2006 11:42 AM by Nino

I've been asked a few times recently about setting up Internet connectivity with the WM5.0 emulator;  I usually point people to this post: http://blogs.msdn.com/akhune/archive/2005/11/16/493329.aspx .  However, if you want to do it without ActiveSync..

Update: In reponse to a few comments, I have updated some of the steps, and added a disclaimer:

-This solution is neither recommended nor supported by Microsoft (although I got it to work and use it frequently)
-I take no responsibility for the state of your emulators before, during, or after you implement this configuration
-For best results, I suggest that you have only once instance of Visual Studio 2005 open and that you hard-reset your emulator (being certain to purge any saved state) after every configuration change.


1.Install the Virtual Machine Network Driver for Microsoft Device Emulator.

2. In Visual Studio 2005, open Tools>Options. Select Device Tools >
Devices. Then select the 'Windows Mobile 5.0 Pocket PC Emulator' and click the Properteies button

3. Change Transport in the Emulator properties to 'TCP Connect Transport'.  Then click the 'Configure' button. You can then set an IP address (one valid for your network); although I have found that the emulator retrieves one on its own from from DHCP, if that is available.  Additionally, I have found that if you leave the IP as 127.0.0.1, you may be unable to deploy.

4. Click the Emulator Options button. In the Emulator Properties dialog that opens, select the Network tab. Make certain that the 'Enable NE2000  PCMCIA network adapter and bind to:" box is checked and that you have selected the correct network adapter of your computer.

5. OK your way out of these dialogs

6. Start the emulator.  Start > Settings > Network Cards  

7. Tap NE2000 Compatible Ethernet Driver. Select either 'Connected network card" or one of the adapters listed [that has a valid network connection].  Tap OK (and tap OK on the dialog that comes up).

8. Make certain that the 'My network card connects to:" drop-down is set to 'The Internet'

9. Clear any saved state from the emulator and hard-reset it.

10. Open up Internet Explorer Mobile and enter your URL...

-Nino

Comments

. Thursday, February 09, 2006 5:01 AM

Thanks for taking the time to post this. Is it specific to Visual Studio 2003? I attempting this in Visual Studio 2005.

Well, I tried the above and I'm confused on a few points. First, in step 3, you say "You can then set an IP for the emulator." What can you set it to? I tried just a simple 192.168.0.1 address and others like it, but it doesn't seem to do anything helpful.

Then, under network cards, the option "NE2000 Compatible Ethernet Driver", I don't have or see an option to use "Use server-assigned..." but it does let me select from a specific adapter or "Cconneted network card", as I use several options I tried this, but also tried specific ones. But none seem to work.

Additionally, when do make this setup change I can no longer deploy code to the device emulator, is this a side effect the change? If so it would be good to let folks know that.

Thanks.

Kenny Goers
. Saturday, February 11, 2006 12:49 PM

Hi Kenny,

Thanks for your comment. In addition to addressing some of your point, I have updated the post.

1) This is specific to Visual Studio 2005 (after all you can only use the Windows Mobile 5.0 emulators in VS2005); I have not tried this with the Windows Mobile 2003 SE emulator in VS2005.
2) You can set the IP to one that would be valid for your network (although I have found that the emulator grabs an IP of it's own). Additionally, if the IP is left to be 127.0.0.1, I have found that I am unable to deploy.
3) Should be either "Connected network card", or the specific adapter itself (i.e. select a valid network adapter from the list)

After you set all of these, make certain to hard-reset your emulator. I have experienced not being able to deploy to the emulator, but only when I do not hard-reset it after I make a configuration change. Additionally, here is some code to check the IP of the device:

string name = Microsoft.Win32.Registry.GetValue(@"HKEY_LOCAL_MACHINE\Ident", "Name", "").ToString();
System.Net.IPAddress ip = System.Net.Dns.GetHostByName(name).AddressList[0];
MessageBox.Show(ip.ToString());

-Nino

Nino
. Monday, March 20, 2006 10:52 AM

Thanks for the tip!

Ken Otto
. Tuesday, March 21, 2006 5:30 AM

I'm working with Windows Mobile 2005. I tried from above way. But I coulnt connect to the Internet from the Pockect PC Emulator.

Thara
. Wednesday, April 12, 2006 6:35 AM

Gentelmans,

Finally I have been able to connect VS2005 Pocket PC 2003 SE Emulator to Internet!

I have followed the steps that Nino proposes in his blog "Internet Connectivity from WM5.0 Emulator *without* ActiveSync" with next diferences:

Step 2: I select "Pocket PC 2003 SE Emulator"

Step 3: I use a valid IP for may network. For instance "XXX.XXX.XXX.5".

Step 7: I select "NE2000 Compatible Ethernet Driver". In addition, I have configured other Ip address "XXX.XXX.XXX.6". (I don't now that is correct to generate new IP, but in my case its run fine...).

Now, I'm capable to debug a VS2005 Smart Device Aplication that makes a call to a web service.

Thank you very much, Nino.
Marc P.
mpvprot-ms@yahoo.es

Marc
. Monday, April 17, 2006 11:52 PM

Nino

This is awesome. Your page should be listed under the microsoft knowledge base.

sriram
. Wednesday, May 03, 2006 10:03 AM
Another .NET blog...