devxlogo

Using the Cellular Emulator in the Windows Mobile 6 SDK

Using the Cellular Emulator in the Windows Mobile 6 SDK

ne of the coolest things Microsoft has shipped with the Windows Mobile 6 SDK is the Cellular Emulator. The Cellular Emulator is a software-based emulator that emulates a real cellular network so that developers can test their phone and SMS applications without using a real device.

This article will walk you through the detailed steps for setting up your Windows Mobile 6 Professional and Standard emulators to work with the Cellular Emulator. You’ll also learn about some of the pitfalls and what workarounds you can use to leverage the Cellular Emulator successfully.

Figure 1. Launching the Emulator: This shows the COM port number to which the Cellular Emulator is listening.

Launching the Cellular Emulator

To find the Cellular Emulator, go to Start?>Programs?>Windows Mobile 6 SDK?>Tools?>Cellular Emulator. After launching (see Figure 1), you can see the COM port number located at the bottom left of the screen. Most computers should display either COM3 or COM4.

Configuring a Windows Mobile Emulator to Connect to the Cellular Emulator

To launch a Windows Mobile emulator, launch Visual Studio 2008 and go to Tools?>Device Emulator Manager….

Select the emulator you want to use. As an example, choose a Professional emulator; right-click on Windows Mobile 6 Professional Emulator and select Connect (see Figure 2).

Author’s Note: Remember that only Windows Mobile 6 Professional and Standard emulators can connect to the Cellular Emulator; Classic emulators cannot be used as they do not have phone radios.

Now, configure the Windows Mobile emulator by selecting File?>Configure…. In the emulator’s Properties page, select the Peripherals tab. Under “Serial Port 0,” enter the COM port that you see in your Cellular Emulator (see Figure 3). Click OK.


Figure 2. Selecting a Windows Mobile Emulator: For this example, choose a Professional emulator.
 
Figure 3. The COM Port: Configure the Windows Mobile emulator to connect to the same COM port used by the Cellular Emulator.

You need to perform a soft reset on the Windows Mobile Emulator (File?>Reset?>Soft). This is important because the emulator will not recognize the Cellular Emulator if you do not reset it. After the reset, the Windows Mobile emulator should have a full-signal indicator (see Figure 4).


Figure 4. Connected: The Windows Mobile emulator is now connected to the Cellular Emulator.
 
Figure 5. Signal Status: This shows the signal indicator on a Windows Mobile Standard emulator.

For a Windows Mobile Standard device, the signal will look like Figure 5.

Configuring Data Connections

One of the uses of the Cellular Emulator is to emulate 2G and 3G network connections for your Windows Mobile emulator. Doing so will provide your applications with Internet access without needing to use the ActiveSync or network card mapping technique.

Configuring data connections using GPRS (via the Cellular Emulator) is straightforward for a Windows Mobile Professional emulator. Follow these steps to set up an Internet connection using the Cellular Emulator:

  • Go to Start?>Settings.
  • Select the Connections tab.
  • Select Connections.
  • Under the My ISP item, select “Add a new modem connection.”
  • Enter a name for the connection and select Cellular Line (GPRS). Click Next (see Figure 6).
  • For access point name and login credential information, leave them empty.

Using Internet Explorer, you can now determine whether the connection is successful. Figure 7 shows that, if the connection is successful, you’ll see the G icon shown at the top of the Windows Mobile emulator. On the Cellular Emulator’s end, you’ll see the number of bytes transferred across the data channels, as well as the indicator showing that GPRS is connected.


Figure 6. The GPRS Connection: Configuring a GPRS connection for the Windows Mobile Professional emulator.
 
Figure 7. Success! Connecting successfully to the Cellular Emulator.

To emulate a faster network connection, click on the Switch to 3G button on the Cellular Emulator. You’ll see the 3G icon on the Windows Mobile emulator (see Figure 8).

If you cannot connect to the Internet, or you cannot see the G symbol, go to the Settings?>Advanced tab and click on the Select Networks button. Ensure that you have the configuration shown in Figure 9.


Figure 8. 3G: The screen emulates a 3G connection.
 
Figure 9. Correct Configuration: Be sure to set the profile correctly.

For Windows Mobile Standard devices, the process is a little more involved:

  • Go to Start?>Settings.
  • Select Connections.
  • Select GPRS.
  • Select New….
  • In the “Description:” field, give the new connection a name, say PPP.
  • In the “Connects to:” dropdown list, select Internet.
  • In the “Access point:” name, enter some text. Click Done.
  • Back in the Connections screen, select Menu?>Advanced.
  • In the “Internet connection:” dropdown list, select PPP. Click Done.

You can now try to make a connection to the Internet to see if the setup works.

Making Phone Calls

You can make a phone call from the Cellular Emulator and the Windows Mobile emulator will receive an incoming call (see Figure 10).

Likewise, the Windows Mobile emulator can also make an outgoing call and the call will be displayed in the Cellular Emulator (see Figure 11). The Cellular Emulator also shows a list of numbers (7272024, 7272020, etc) that you can use to simulate different phone conditions (such as busy line, call reject, and so on).


Figure 10. Incoming Phone Calls: You’re making phone calls to the Windows Mobile emulator.
 
Figure 11. Incoming Phone Calls: You’re making phone calls to the Cellular Emulator.

Sending and Receiving SMS Messages

You can also use the Cellular Emulator to send SMS messages to the Windows Mobile emulator (see Figure 12). You can send a chain of messages by checking the “Repeatedly” checkbox and specifying the interval between messages.

You can also send SMS messages from the Windows Mobile emulator and the messages will be displayed in the Cellular Emulator (see Figure 13).


Figure 12. Incoming SMS Messages: You’re sending SMS messages to the Windows Mobile emulator.
 
Figure 13. Incoming SMS Messages: You’re sending SMS messages from the Windows Mobile emulator.

Some Common Problems

In my experience, you are likely to encounter problems with the Cellular Emulator if you install the Windows Mobile 6 SDK on a notebook. You are likely to see an error that says “COM17 is used, please verify” (or something similar). There is no official way to resolve this, but some folks have been able to work around this by first uninstalling the Windows Mobile 6 SDK, disabling the Bluetooth services, and then installing the Windows Mobile 6 SDK again.

If you find that the Windows Mobile emulator is not receiving SMS messages/phone calls made from the Cellular Emulator, the first place to check is the COM port settings in the Emulator Properties page. If you shut down the Windows Mobile emulator and do not save its current state, restarting it will cause it to lose the COM port number you have set previously. Hence, in general, it is always a good idea to save an emulator’s state when exiting it.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist