Simulate Windows Mobile Platform

Source: Internet
Author: User
Tags microsoft website

Simulate Windows Mobile Platform

Overview

Before introducing how to simulate PPC and smart phone based on Windows MobileWhat is PPC, smart phone, and windows mobile OS?. Recognizing their advantages can better reflect the importance of simulating the Windows Mobile platform.

Windows MobileIs an operating system running on a mobile device (Pocket PC and smartphone), extending the familiar Windows desktop to a personal device. Functions that can be implemented in the Windows family can be basically implemented on Windows Mobile, and have similar user experience and interfaces. For example, Windows Mobile comes with office mobile (pocket outlook) and entertainment (Windows Media Player 10 and pocket IE.

For the development of Windows Mobile:

This article mainly discusses the Windows Mobile 5.0 operating system.

The difference between a Pocket PC and a smartphone.Smartphone is mainly designed for use as a telephone device. Windows Mobile 5.0 provides strong support for multimedia entertainment and daily office work. Pocket PC is mainly designed as a small PC, and currently a considerable number of Pocket PC devices also have the phone function. We also call this PPC with the phone function as the Pocket PC phone. In this way, you no longer need to bring laptops, mobile phones, digital cameras, MP3 players, and other devices on a business trip. You only need to bring a PPC, because of its built-in office software, slide presentations are available, and millions of pixel-level cameras are available to meet the needs of General photography. video presentations are also supported by a variety of expansion cards, playing videos, music, and even movies in various formats and capacities is no longer an impossible task ".

Windows Mobile Global Market Development
Currently, Windows Mobile has a 45% share of personal mobile devices worldwide, covering 68 carriers in 48 countries. This operating system is used by 41 mobile terminal manufacturers and 30 mobile phones. Nearly 80% of Mobile Enterprise Solutions around the world are implemented based on the Windows Mobile platform. Professional Developers of 7 million Visual Studio and 0.38 million Windows Mobile around the world develop various applications for them. More than 9000 Microsoft partners around the world provide a wide range of technical support.

The simulated Windows Mobile platform makes it easier to safely test various applications and functions. For common users, you can install and test the software on the simulator to check whether the software functions meet your needs. For developers, you can test the program written on the simulator to avoid damage to the real device. The following sections show you how to simulate and configure Windows Mobile on a PC.

1. Install the simulator and its substance 1.1. Obtain the Windows Mobile simulator 1.1.1 Visual Studio 2005.

The Visual Studio 2005 Development Environment contains the Windows Mobile simulator.

Visual Studio 2005 is a very convenient integrated development environment with powerful debugging tools. Using its integrated Windows Mobile simulator (Device Simulation Manager), we can simulate most Windows Mobile devices, such as Pocket PC and smart phone.

Start Visual Studio 2005, select Tools, and click Device Simulation manager ".

Through this manager, we can start and manage smart phone and PPC terminal devices based on Windows Mobile platform.

However, the installation of Visual Studio 2005 is very huge (the Basic installation requires about 2.5-3 GB space), and it is not free of charge, so for general software testing only, without development, installing Visual Studio 2005 is a luxury and unnecessary task. Because we can obtain the simulator for free in other ways without installing Visual Studio 2005.

1.1.2 obtain a separate device simulation Manager"

Selecting to obtain the device simulation manager separately Instead of Visual Studio 2005 is a very clever choice, because it occupies a smaller Resource Space and can be downloaded from the Microsoft website for free. As follows:

Http://www.microsoft.com/downloads/details.aspx? Familyid = C62D54A5-183A-4A1E-A7E2-CC500ED1F19A & displaylang = en

On this website, we can downloadSimulator (v1emulator.zip)AndWindows Mobile 5.0 msfp English version image (EFP. MSI)These two files. After downloading the SDK, double-click it to install it.

"Device emulator 1.0 )"Is an independent version that simulates ARM-based devices. It is identical to the simulator that comes with Visual Studio 2005. It is better than its predecessors (x86 simulator)Has more advantages:

  • Directly run the compilation code of the ARM processor instead of the x86 processor. In most casesYou can run the same binary code as the device on the simulator.
  • Supports "ActiveSync" synchronization.With full support for "ActiveSync" synchronization, You can debug the Software Synchronization function and implement real data on the PC and real-time synchronization of simulators.
  • Provides support for more development environments.It has been tested to better be used for software development and debugging under Visual Studio 2005, Visual Studio. NET 2003, and embedded Visual C ++ 4.0 (evc4) SP4. And supports actvesync without the need for serial port cable connection.
  • Provides support for gapis.You can write and debug Gapi games on the simulator.

Note: The device simulator does not contain an operating system. Therefore, you must install an operating system image file (EFP. MSI ).

Before installing the operating system image file, you must install"Simulator virtual nic". The software can be downloaded for free on Microsoft's website:

Http://www.microsoft.com/downloads/details.aspx? Familyid = DC8332D6-565F-4A57-BE8C-1D4718D3AF65 & displaylang = en

Download and double-click to install.

Simulator virtual NicIt is used to map the network card of the simulator to the PC physical network card, so that a physical network card can have two IP addresses, one assigned to the PC and the other assigned to the simulator. Its working principle is similar to that of Microsoft VPC virtual network services. They all register a Microsoft Virtual Network Service and bind it to a network adapter to build a virtual network through a network adapter.

Only when a virtual network card is installed and the simulator is set can you connect it to the Internet and exchange data with the PC through ActiveSync software.

1.2 essence of a device Simulator

In a sense, the principle of "device simulators" is the same as that of our frequently used virtual machines (VMWare, VPC. The hierarchical model of the device simulator.

Similar to the OSI network model diagram, the service is first transmitted from the lowest layer to the top layer as "virtual service" --> "device emulator manager" --> "device emulator" --> "device virtual image" --> "Virtual Windows Mobile ".

"Virtual services" provides services at the lowest layer, such as virtual networks. On the previous layer, the "device emulator manager" layer manages which images are enabled and which images are connected. The last layer is the "device emulator" program. It calls its previous "device virtual image" to simulate the actual device. The previous "virtual Windows Mobile" can run the virtual Windows Mobile System.

The biggest advantage of a virtual simulator is that it can manage multiple virtual machines at the same time, and the virtual machines also have recovery. When some programs run abnormally on the device, for example, they cannot exit normally. Through the restoration feature of virtual machines, we can re-"reste" to avoid some risks of running on actual devices.

2 Introduction to simulator programs 2.1 Device Simulation Manager

The device simulation manager is used to manage one or more virtual devices. Interface Diagram for device simulation Manager

2.2 device Simulator

As described in the previous chapter, the "device Simulator" works on the "device simulation manager" layer, and all the device images must be driven by the device simulator. The tool itself works in the command line mode, that is, a specific VM environment can be started by inputting parameters. The program file in the directory is named "deviceemulator.exe ". When you double-click this file, a dialog box about parameter help is displayed ,.

In fact, in the device simulation manager, the application "device Simulator" is run through some predefined parameters to call different virtual images, start different virtual machines.

2.3 virtual mobile device Image

If you have installed the Windows Mobile 5.0 image files as described in Chapter 1, you can find these files in the installation folder.

All files ending with ". nb0" are virtual device image files. The image file is like the virtual hard disk in the VPC and VMWare. Some earlier versions of image files end with ". bin. Microsoft provides download for different Windows Mobile System versions and different Windows Mobile language versions.

Each image file has four device appearance files related to it, three of which are drawing files and an XML file used to describe it. As shown in.

3. Configure and use the simulator

In addition to using the simulator manager to start the simulator, you can also use the deviceemulator.exe parameter to start your own simulator.

3.1 How to Use the command line parameters of the simulator

In the previous section, we have mentioned that all kinds of user-defined simulators can be called by executing the “deviceemulator.exe command and adding parameters. So how to use the CLI parameters of the simulator? The most common method is to use a batch file (*. BAT ).

First, create a file ending with. BAT and use NotePad to open it and edit it. It is a sample file named test. bat.

Double-click the batch file to start a device simulator with a virtual external memory card. The following describes how to use the "device simulator manager" and command line parameters to configure the simulator.

3.2 configure the simulator display appearance

After the device simulator is started, click the "file" option and select "configuration". The dialog box shown in appears. The "display" tab is displayed. In the "appearance" option, we can select an XML file that describes the appearance of the device simulator.

Command line parameters:"/Skin FILENAME" can specify skin files.

3.3 Add an external memory card to the simulator

The storage space of devices is limited. We usually put a considerable number of files on external memory cards in actual mobile device applications. The following describes how to virtualize an external memory card on the simulator.

After the device simulator is started, click the "file" option and select "Configure", as shown in, on the "General" tab, select an existing directory as a virtual external memory card on "shared folder.

Command line parameters:"/Sharedfolder directoryname" can be used to install a virtual external memory card for the simulator.

3.4 configure network connection for the simulator

After the device simulator is started, click the "file" option and select "configuration". In the displayed window, select the "network" tab, select "enable ne2000 PCMCIA network adapter and bind to:" And click "OK. As shown in

In this case, a notification is displayed for the device simulator. You can choose either of them ,.

In Nic settings, we can see that an IP address has been obtained through the DHCP server.

Now we can connect to the Internet. Open "Internet Explorer" and enter the URL you want to browse in the address bar ,.

Note: When your machine has two or more NICs, the simulator will automatically bind them to an Eni with data connections to ensure data connectivity.

The command line parameter specifies the network binding of the virtual device:

/P [macaddress]: bind the NIC to the ne2000 PCMCIA Nic of the virtual device.

/N [macaddress]: bind the network card to the CS8900 network card of the virtual device.(This Nic is not commonly used on Virtual Devices)

3.5 connect external devices

Because of the special needs of enterprises, mobile devices may need to connect to some external devices, such as external GPS devices, bar code scanners, and so on. Generally, simulators can connect to these devices through serial ports.

After the device simulator is started, click the "file" option and select "Configure". On the "peripherals" tab, select the serial port to be mapped to the specified computer port, click OK ". As shown in

Command line parameters:"/U0 SerialPort/U1 SerialPort/U2 SerialPort" can map the serial port of the simulator to the computed serial port.

3.6 organize numerous virtual images

The biggest advantage of "device simulator manager" is that it can manage multiple image files.

After you open a virtual image, if you do not specify a name for it, it will be assigned a vmid to identify the virtual device. As shown in.

However, when we enable multiple simulators at the same time, we cannot identify which one is the one we want, and only see a lot of vmid code. However, we can solve this problem by using command line parameters. Instead of using the vmid code, we can specify a special display name for them.

Command line parameters:"/Vmname" specifies the display name for the virtual device.

Of course, if you want to specify a special vmid, you can also use the following parameters: "/vmid {guid }"

3.7 example of command line parameters

Is an example of a command line parameter.

Running the batch file will start a Windows Mobile 5.0 msfp virtual PPC device. Its features are as follows:

  • Bin:Msfp_beta.nb0
  • Ram: 128 m
  • Skin: PPC
  • SD/MMC: ../storagecard
  • Name: Windows Mobile 5 msfp
  • Console: Open

 

3.8 connect a virtual device to a PC through ActiveSync

With ActiveSync, DMA can be used to connect a virtual device to a PC, which can exchange files between the PC and the virtual machine, and install software on the virtual machine. In addition, DMA can improve the efficiency of Virtual Device connection. Next let's take a step-by-step look at how the simulator connects to a PC through ActiveSync.

Start ActiveSync, click File, and select connection settings ",

In the displayed dialog box, select "allow connection to one of the following ports", select "DMA", and click "OK.

Now that you have completed the setup of ActiveSync, configure "Simulation Device Manager ".

Select the simulator to be synchronized with the computer, right-click it, and select the "Cradle" option.

In this case, ActiveSync automatically connects to and synchronizes with the device.

Reprinted from: http://www.supinfo-projects.com/cn/2006/winmobile_cn/3/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.