One of the most significant enhancements to the Device Emulator 2.0 is not actually part of the Device Emulator 2.0. It is instead a separate emulator, the Cellular Emulator, which cooperates with the Device Emulator 2.0 to provide cellular-based features to the Device Emulator 2.0. The Cellular Emulator, shown in Figure 22, emulates a cellular radio and provides the Device Emulator 2.0 with the ability to send and receive calls, send and receive Short Message System (SMS) messages, and establish a General Packet Radio Service (GPRS) connection to the network. As part of the GPRS connection features, the Cellular Emulator can emulate switching between 2G and 3G networks, and can emulate dropping the GPRS connection.
Figure 22. The Cellular Emulator
To use the features provided by the Cellular Emulator you must create an association between the Device Emulator 2.0 and the Cellular Emulator. To create this association, follow these steps.
-
Take note of the COM port number displayed in the lower-left corner of the Cellular Emulator; COM4 in Figure 22.
-
Open the Emulator Properties dialog box. To open the Emulator Properties dialog box, select File on the Device Emulator menu, and then click Configure…
-
In the Emulator Properties dialog box, click the Peripherals tab.
-
Enter the COM port number from the Cellular Emulator into Serial Port 0 as shown in Figure 23. If you do not see the COM port number in the drop-down list, you can enter it yourself.
-
Close the Emulator Properties dialog box. To close the Emulator Properties dialog box, click OK.
-
Perform a soft reset of the Device Emulator 2.0. To perform a soft reset, on the File menu, click Reset, and then click Soft.
Figure 23. Entering the Cellular Emulator COM port number to enable cellular service emulation for the Device Emulator
With the Device Emulator 2.0 and the Cellular Emulator connected, you can now make and receive phone calls. To make a phone call, you simply dial the phone on the Device Emulator 2.0. The other phone emulator features are available on the Cellular Emulator Call Manager tab shown in Figure 22. Table 4 describes each of these features.
Table 4. Cellular Emulator Call Manager tab features
|
Feature
|
Description
|
| Active Calls | Shows the list of calls being made from or to the Device Emulator 2.0. |
| Drop Call | Clicking the Drop Call button immediately terminates the selected call in the Active Calls list. |
| Call Device | Initiates a call to the Device Emulator 2.0. The value entered in the Phone Number field will appear to the Device Emulator 2.0 as the phone number of the caller. Clicking the Dial button initiates the call. |
| Preset Number | A reference list of special phone numbers. Calling the numbers in the Preset Number list from the Device Emulator 2.0 will initiate a call that behaves as described for that number. |
The Cellular Emulator Network tab, shown in Figure 24, allows you to control certain behaviors of the Device Emulator 2.0 GPRS connection. Table 5 describes each of these features.
Figure 24. The Cellular Emulator Network tab
Table 5. Cellular Emulator Network tab features
|
Feature
|
Description
|
| Network Selection | Clicking the Switch to 2G button sends an event to the cellular radio indicating that the radio is registered to a GSM network that supports GPRS. Clicking the Switch to 3G button sends an event to the cellular radio indicating that the radio is registered to a Universal Mobile Telecommunications System (UMTS) cell. |
| GPRS Control | Clicking the Disconnect GPRS button immediately disconnects the active GPRS connection if one exists. |
| Data Channel | Shows the details of information exchanged over the active connection. The Active Time is displayed in seconds. |
With the Cellular Emulator connected, the Device Emulator 2.0 can send SMS messages. The SMS tab, shown in Figure 25, allows you to see the messages that the Device Emulator 2.0 sends; the SMS tab also provides a facility to send SMS messages to the Device Emulator 2.0. Table 6 describes the SMS tab.
Figure 25. The Cellular Emulator SMS tab
Table 6. Cellular Emulator SMS tab features
|
Feature
|
Description
|
| Send To Device | Entering text in the text field and clicking the Send button sends the SMS message to the Device Emulator 2.0. Selecting the Repeatly check box sends the message to the Device Emulator the number of times specified in the Max count field. The Cellular Emulator will pause between sending each message for the number of milliseconds specified in the Interval(ms) field. |
| Receive From Device | Displays SMS messages sent by the Device Emulator 2.0. Each message shows the destination phone number and the time the message was sent. |
Note: |
|---|
|
At the time of this writing, the SMS tab misspells the Repeatedly check box. The Network tab currently displays the check box label as Repeatly.
|
The Cellular Emulator Injection tab, shown in Figure 26, allows you to modify the state of the Cellular Emulator. This tab exposes features intended for developers who need to emulate modifying the state of a cellular radio; most application developers do not need to use the features provided by this tab. For those developers who do need to modify the state of the Cellular Emulator, you can enter your own AT commands on this tab. For the most part, the AT commands conform to the 3GPP standards. Table 7 describes the Injection tab.
Figure 26. The Cellular Emulator Injection tab
Table 7. Cellular Emulator Injection tab features
|
Feature
|
Description
|
| Execute AT Commands | Entering a command in the AT Input field and clicking the Execute button modifies the state of the Cellular Emulator and shows the command result in the Result field. The Cellular Emulator does not send the responses or events to applications running on the Device Emulator 2.0. |
| Send Event to Device | Selecting one of the predefined events in the Predefined Event field and clicking the Send button modifies the Cellular Emulator state. To send a custom event, select Customer Event in the Predefined Events field, type the command in the Event field, and click the Send button. The command modifies the Cellular Emulator state. Whether you enter a predefined or custom event, the Cellular Emulator sends the corresponding events to applications running on the Device Emulator 2.0. |
Note: |
|---|
|
At the time of this writing, the Injection tab’s Predefined Events field misspells the Custom Event value. The field currently displays the value as Customer Event.
|
The Configuration tab, shown in Figure 27, allows you to modify the SIM/USIM configuration of the Cellular Emulator. The features provided by this tab are intended for developers familiar with SIM/USIM file systems; most application developers do not need to use the features provided by this tab. Table 8 describes the Configuration tab.
Figure 27. The Cellular Emulator Configuration tab
Table 8. Cellular Emulator Network tab features
|
Feature
|
Description
|
| SIM File | Shows the path of the current configuration file. Clicking the Import button allows you to select a different configuration file. For more information on the SIM configuration file, see Cellular Emulator Configuration in the Windows Mobile 6 SDK documentation. |
| Connection | Clicking the Reset button reinitializes the Cellular Emulator using the information contained in the configuration file. |
The AT log tab, shown in Figure 28, displays a history of the AT commands sent between the applications running on the Device Emulator 2.0 and the Cellular Emulator. All commands that begin with >> are commands sent from the Device Emulator 2.0 to the Cellular Emulator. All commands that begin with << are commands sent from the Cellular Emulator to the Device Emulator 2.0.
Figure 28. The Cellular Emulator AT Log tab