22 May
Posted by dfield in Windows Mobile
Here is the follow-up installment #2 on device emulator configuration. You may want to read installment #1 first.
I often need to test our code across various versions and SKUs of Windows Mobile. For instance, I need to test one feature across WM 5.0 Smartphone, WM 5.0 Pocket PC Phone Edition, WM 6.0 Standard, WM 6.0 Professional and, of course, the newer WM 6.1 SKUs.
When testing, you often want to use a hard/cold booted device for the most reproducible results. Cold booting and then reconfiguring a bunch of devices is super time consuming. Even if using the device emulator, configuration can be time consuming.
Another important issue is network availability. Much of my testing requires a network connection for client/server applications. I used to connect my emulators using Desktop Passthrough via Desktop ActiveSync or Windows Mobile Device Center on Vista. This setup invariably led to the following problems:
These issues can be solved by utilizing the built-in NE2000 NDIS network adapter that comes with the device emulator. Here is a set of steps that I use for setup. After you finish setup, you can save the device emulator state and when attempting a new test case, you simply close and re-open the emulator for full cold boot with configuration intact.
Here is how I go about configuring the emulator to meet my testing requirements.
First, if you’ve ever saved state on the device emulator image before, right-click the image in the Device Emulator Manager and choose “clear save state”. This provides a true default, factory-reset image as your starting point. There is an option in the emulator’s file menu for cold reset, but it does not take the device back to a truly “clean” state.
Next, in the Device Emulator window, open the File menu and select “configure”.
In the “General” tab, you can configure a “Shared Folder”. I like to share a folder located on my desktop to the device emulator by configuring the “shared folder” setting. Once configured, you can open desktop files in the emulator by browsing the “storage card” volume in file explorer on the device emulator. If using multiple emulators, you can set them to all use the same shared folder. This allows you to copy files into the desktop folder and then open the identical file on all emulators. For instance, you could copy CAB Provisioning Files (.CPF) to the desktop shared folder and execute them from the device emulator’s file explorer to easily configure the device.
In the “Network” tab, you can setup your emulated NE2000 adapter. Just select the checkbox for “Enable NE2000 PCMCIA network adapter and bind to:” and select “Connected Network Card”. The NE2000 will bind to the first network adapter it finds on the desktop computer after you click OK on the “Emulator Properties” checkbox.
You may find that you still can’t connect to known servers using the device emulator’s Mobile IE browser. That is likely due to work/internet settings. Here is what you do:
At this point, you may want to configure some of the following:
After you’ve finished creating your base image configuration, click the “File” menu in the device emulator windows and select “Save State and Exit”. After the save process is finished, reopen the same emulator image and you’ll find that its configured and ready for your first test case! After you’ve completed a test case, close the emulator, but do NOT save the emulator image or it will overwrite your carefully created image. Re-open the image and you’ll find that you are right back to your base image configuration and ready for your next test case.
If you are using multiple device emulator instances to test a client/server application, you can have them all open and connected at once to run the test case simultaneously.
If you choose to use activesync, then use it after you’ve created and saved your base image, if possible.
Hope this helps!
Dave Field, CISSP, MCP
Device Management and Security Architect
Enterprise Mobile, Inc.
10 Responses
Santosh
28|May|2008 1Can you please tell us, how to install/deploy apps to standalone windows device emulator (PocketPC), without the intervention of Visual studio IDE in other words to deploy java based apps?
dfield
09|Jun|2008 2Hello Santosh,
Here at Enterprise Mobile, we’re .NET developers. However, I did find a good set of blogs that may address your questions at http://puthli.blogspot.com/. Unfortunately, the VS IDE does not directly support java dev with a connected emulator in the same way that .NET CF is supported. There may be an add-in out there somewhere that enables this scenario, but I don’t know of it offhand.
Thanks,
Dave Field
Lenny Li
28|May|2009 3we wish to run multiple instances of the windows mobile emulator to simulate multiple network connected PDA, but it seems that we cannot get the network connection connected after the first windows mobile is connected. can someone elaborate how we can make it work?
thanks!
Windows Mobile 6.5 Device Emulators and more 6.5 Information - Marco Nielsen at myITforum.com
04|Jun|2009 4[...] get network connectivity you can follow the same steps as with previous emulators. Please see this blog posting for additional [...]
Adit
11|Dec|2009 5I am working with WM5 emulator. I remember configuring the shared folder and using it as storage card. BUt now i am not able to view it. If i check the File -> Configure -> General -> Shared Folder, still the path is there, but im not able to see the Storage card. Also if i check the Settings -> System -> Memory -> Storage Card, it shows storage card not installed. I tried so many times reconfiguring the shared folder without success. What could be the problem?
dfield
29|Dec|2009 6It may be an issue with folder sharing on your PC. You may need to change settings that allow folder sharing in “Network & Sharing Center”
Souhail
11|Jan|2010 7Hi
I have an nk.bin file, that i need to add to the list of my emulators. not sure how to do this, are there any scripts that could generate a emulator configuration files?
Thanks
dfield
11|Jan|2010 8Hello,
The raw binary emulator image is stored as a .bin. And, the supported way to create an emulator image is using a Windows Mobile variation (the OEM Adaptaation Kit) of the Windows CE Platform Builder tool. Problem is that you must be Microsoft OEM partner and registered as an “in-ROM IHV” to get it. So, I suspect that you may be able to find a tool for conversion of the .nk to .bin and then register it with the device emulator manager. A quick search seemed to indicate this. See xda-developers.
Souhail
11|Jan|2010 9Hi
But my file is already in a .bin format: nk.bin
which i compiled with my platform builder.
i tried creating a .decfg xml file and put it in the My Documents/My Device Emulators folder and i have it show up in my device emulator list but i think i have some of the fields in the xml file inccorectly set as i cant connect to the device. i think it has to do with some of the constant that i have no idea about. here the xml content:
My Plaform
1033
true
true
Left-Alt
270
{B89C49AD-197F-4CB4-A525-D81D0944EEAF}
Sirius Custom Emulator
<!–c:\1.dess–>
true
true
193
C:\Documents and Settings\Souhail\My Documents\My Device Emulators\NK.BIN
c:\Flashfile
256
ARMv5
TDI
true
c:\
00001A1A190B
00001A1A190B
true
COM3
none
none
kamal
15|Jul|2010 10Hi,
I want to explore Exhcnage 2010 mobility features and for that we installed Exchange 2010.
For mobile, we install Windows Mobile Device emulator 6.5 professional and device emulator manager on windows 7 machine.
but when we configure the email it is not sending and receiving the emails.
Could you please help me on the above issue? how to configure without using any mobile device
Kamal
Leave a reply
Search
Archives
Categories
Device Info
Mobile Blogs
Copyright © 2008 - Enterprise Mobile
Proudly powered by WordPress - InSense 1.0 Theme by Design Disease.