Networking_: ping the emulator

This is more of an intermediate topic, which is especially useful if you're writing applications that requires networking. If you're just getting started on the .NET Compact Framework 2.0, you can read this to install the tools and this to write your first app.

Here's how you can ping your Windows Mobile 5.0 Pocket PC emulator:

  1. First, ensure that you do not "cradle" your emulator, which is already the case by default (so you don't have to do anything). If you want to know more on cradling emulators, see this.
  2. Next, in the window that contains the emulated Pocket PC, click File-> Configure. You should see the "Emulator Properties" dialog box. Under the Network tab, check the checkbox "Enable NE2000...". This will bind the emulator's network adapter to your host PC's network. (If you're familiar with using Virtual PC, this is exactly the same as binding the network adapter in a Virtual Machine to the host PC's network).
  3. Within the emulator, click Start-> Settings-> Connections (tab)-> Network Cards. Check that the card connects to "Work".
  4. Then click on the NE2000 driver and ensure that "Use server-assigned IP address" is selected (this is assuming that you have a DHCP server in your network; if not, you need to specify a valid IP address within the same subnet as your host PC, and also configure the Name Servers). Click OK a few times to close the dialog boxes.
  5. Still within the emulator, click Start-> Settings-> Connections (tab)-> Connections-> Advanced (tab), click "Select Networks" button, and change the first dropdown to "My Work Network". Click OK.
  6. Soft reset the emulator (in the window containing the emulator, click File-> Reset-> Soft).
  7. To find out the IP address assigned to the emulator, click Start-> Settings-> Connections (tab)-> Network Cards, and click on the NE2000 driver.
  8. You can now ping the emulator from your host PC.
We will explore writing networking applications some time soon. (In fact, you have already written a browser app, which actually depends on ActiveSync as a virtual router to connect to the Internet, but the problem is that by doing so, connection initiation can only be from emulator to the network, which means you can neither ping nor connect to the emulator from outside.)



Post a Comment

Related Posts with Thumbnails

Wallpapers And News Blog Copyright © 2010 Designed by Imran Yousaf, Sulman Yousaf