EM-X270: WinCE: Demo Image
CompuLab WinCE demo image for EM-X270 is based on standard WinCE 6.0 R3 distribution with addition of Control Panel applets for EM-X270 features control and Freeware applications.
- 1 Supported Features
- 2 Demo Image Contents
- 3 Get Connected with ActiveSync
- 4 Demo Image Components
- 4.1 Demo Image Versioning Support
- 4.2 RAM
- 4.3 NAND Flash
- 4.4 Persistent Registry
- 4.5 Networking
- 4.6 USB
- 4.7 SD card
- 4.8 Touch Screen
- 4.9 Keypad
- 4.10 Display Subsystem
- 4.11 Suspend / Resume
- 4.12 Battery and Charging
- 4.13 Serial Ports
- 4.14 GPRS/GSM Cellular Modem
- 4.15 GPS
- 4.16 Bluetooth
- 4.17 Reboot
- 5 Sample Applications
- 6 Running custom applications on startup
- 7 Customizing Demo Image
- 8 Helpful Utilities
- 9 See Also
The EM-X270 demo image supports the following features:
- NAND Flash Disk (Microsoft FAL/FMD Flash Driver model)
- TFT LCD (pre configured for Toppoly TD035STEE1 TFT 480x640)
- Touch screen
- SD/SDHC/MMC card
- Wi-Fi 801.11b/g
- Battery and charger
- Suspend / resume
- Ethernet (via EB-X270 extender board)
- VGA (via EB-X270 extender board)
- USB OTG
- USB Host
- GPRS/GSM modem
- Serial Port
- RIL Driver
Demo Image Contents
The following standard WinCE 6.0 components are included in this demo image:
- .NET CF 2.0
- Adobe Flash Light
- File system Explorer
- AYGShell that allows execution of certain Windows Mobile applications
- Internet Explorer
- Windows Messenger
- Media Player (recommended for sound playback)
- TCPMP Player (recommended for divx/mpg4 video playback)
- ItaskMgr (a PC-like task manager)
- Telnet Server
- All Microsoft Bluetooth profiles, not including DUN profile
- Location framework
- GPSView (GPS configuration utility)
The following custom EM-X270 components are included in the demo image:
- Backlight Control Panel Applet
- Display Rotation Control Panel Applet
- Wireless Communication Control Panel Applet
- Keypad Configure Control Panel Applet
- A2dpMgr (Bluetooth A2DP sample)
- DemoDialer (GSM cellular demo dialer)
- Wpower.exe (command line utility that controls the power state of wireless devices)
|The detailed list of standard WinCE6.0 R3 components included in demo image is specified in EM-X270: WinCE: Demo Image Components List|
Get Connected with ActiveSync
ActiveSync enables data synchronization between a host PC and the EM-X270 evaluation platform. You must install ActiveSync on your PC before connecting it to the EM-X270.
On the Host PC
Host running Windows XP
- Download and Install ActiveSync from Microsoft website.
- ActiveSync may experience connection problems caused by Windows desktop firewall applications. Read the ActiveSync Troubleshooting Guide for host PC configuration instructions.
- Ensure that ActiveSync synchronization via USB is enabled in the Connection Settings dialog box
Host running Windows 7
Download and install the latest version of Windows Mobile Device Center (WMDC) for Windows 7 from Microsoft website.
On the Target (EM-X270)
- Connect “USB A plug to mini-USB B plug” (ActiveSync) cable to the EM-X270 USB OTG port (connector P1).
- The ActiveSync connection will start automatically and you will see the connection status on your EM-X270 desktop.
Demo Image Components
The demo image is packed into the raw NK.bin file that is stored in the EM-X270 NAND flash during the installation.
Demo Image Versioning Support
The Demo Image versioning information is accessible by clicking Start->Settings->Control Panel->System->Copyrights . It includes the image revision number, commit date and actual demo image build date. The revision number is using the [major.minor.svn release] convention.
|The demo image versioning information is essential for technical support requests.|
The EM-X270 supplied with the evaluation kit is equipped with 128 MB of RAM. The demo image requires approximately 55MB of RAM and leaves 70MB for application use.
The EM-X270 supplied with the evaluation kit is equipped with 512MB NAND flash. Practically, a slightly less amount of the NAND Flash is available for the demo image storage, due to the NAND Flash bad blocks.
During the demo image installation the NAND Flash is automatically partitioned and formatted according to the following layout:
- BINFS partition to store nk.bin (plus 20% to allow future growth), approximately 48 Mb
- TFAT data partition for fail-safe data storage.
Approximately 460 MB of free space is available for data storage on the NAND. Data can be stored in the root directory ("\My device").
The demo image uses the Microsoft FAL/FMD driver model to access the NAND Flash. This allows to use the TFAT (Transaction Safe FAT) as root partition file system, which can guarantee data consistency during asynchronous power off events.
The demo image is built with a "Hive-Based Registry" option. This means that the system registry is stored in the NAND flash data partition, making registry entries persistent when the device is powered off. The demo image is configured according to a "Lazy Flush" registry policy. The registry settings are stored in RAM and are flushed into the NAND flash every 30 seconds. After changing registry settings, allow 30 seconds before turning off the power or performing a hardware reset. This will ensure that the changes are saved into the NAND flash.
The following network interfaces are supported in the demo image:
- EB-X270 Ethernet - Full-featured 10/100 Ethernet interface. Implemented with the Davicom DM9000 Ethernet controller on the EB-X270 extender board (optional).
- Wireless LAN - incorporates full-featured 802.11 b/g capabilities. Implemented with the Wi2Wi W2SW0001 WLAN controller on the EM-X270 module.
The demo image is configured to use DHCP to get network settings for Ethernet and Wi-Fi adapters. The network settings can be changed in Control Panel by clicking Start->Settings->Network Connections .
Static IP address Configuration
It is possible to configure a static IP address by modifying the registry. Please refer to Drivers Customization article for further details.
- Connector P1 provides USB 1.1 OTG port.
- Connector P10 provides USB 1.1 host port.
- Connector P5 on EB-X270 provides optional USB 1.1 host port.
- When an USB flash drive is inserted into USB host port it is mounted automatically as “Hard Disk” under “My Device”.
- The demo image has been tested successfully with the following types of USB flash drives: Kingston 2Gb, SanDisk Cruzer 1Gb, and Dane Elec 2 Gb.
- The EM-X270 evaluation board features SD socket (connector P5).
- The EM-X270 SD driver supports SD High Capacity (SDHC) cards.
- When an SD card is inserted it is mounted automatically as “Storage Card” under “My Device”.
- The demo image has been tested successfully with the following types of SD cards: SanDisk Ultra III 2Gb, Kingston 2Gb, SanDisk 1Gb, and Kingston Micro SDHC 4Gb.
The demo image is calibrated for the Toppoly TD035STEE1 LCD touch screen. To fine-tune the calibration, run the touch screen calibrator by tapping Start->Settings->Control Panel->Stylus->Calibration . For further details about touch screen calibrator registry settings refer to the Touch Screen (Stylus) Registry Settings MSDN article.
Please refer to Touch Screen Customization Guide for the advanced touch screen driver configuration options.
The EM-X270 demo image is configured to support the 3x3 keypad provided with the EM-X270 Eval Kit. The following default mappings of keypad buttons are currently supported:
- “Left”, ”Right”, ”Up”, ”Down” buttons control cursor movement
- “SW5” button acts as “Enter” key
- “SW1” (Func1) button launches Internet Explorer
- “SW2 (Func2) button launches Media Player
- “SW8” (Func3) button launches ItaskMgr
- “SW9” (Func4) button launches Windows Explorer
You can redefine the “Func1”,” Func2,” Func3”,” Func4” buttons by tapping Start-> Settings->Control Panel->Keypad Configure .
Please refer to Keypad Customization Guide for the advanced keypad driver configuration options.
The demo image is configured for the Toppoly TD035STEE1 TFT LCD shipped with the evaluation kit. The default resolution is 480x640 with 16-bit color depth and portrait display orientation.
The demo image supports the screen rotation (GDI rotation) for 90, 180 and 270 degrees. You can set the rotation angle by tapping Start->Settings->Control Panel->Display Rotation .
The EM-X270 supports 7 levels of backlight brightness. You can modify the backlight level by tapping Start-> Settings->Control Panel->Backlight Level .
LCD Driver Customization
CompuLab provides verification and adaptation service for the custom panels. If you want to configure the demo image for the custom LCD, read the CompuLab LCD panel support page.
Please refer to LCD Customization Guide for the advanced LCD driver configuration options.
Splash screen Customization
You can customize the splash screen supplied with demo image. The 8-bit ".bmp" image should be located in \LiveDisk\splashscreen.bmp during the installation process.
|Only the 8-bit .bmp images are supported|
Suspend / Resume
Suspend is the most power efficient state supported by EM-X270. The system goes to suspend almost instantaneously. The entire system state is saved to the SDRAM, the peripherals are either put into idle mode or disabled. On the system wakeup, the peripherals will undergo initialization and state restoration. You can enter suspend by pressing SW2 button on the EM-X270 card. Pressing it again will start the resume process. Resume takes approximately three seconds to complete for the demo image; depending on which external devices are connected and how long it takes to initialize each one.
During Suspend all external devices are powered off.
You can also enter suspend by invoking the SetPowerState suspend command or by using RTCResume utility.
Please refer to System Power States Customization Guide for the advanced system power management.
Battery and Charging
The EM-X270 is equipped with a 3000mAh Li battery. You can monitor the battery power by tapping Start->Settings->Control Panel->Power .
There are two charging options supported on EM-X270:
- Charge using the supplied "DC plug to mini-USB" adapter and DC supply.
This is the fastest charging option with a charge current of 1000mA (3 hours to fully charge the battery).
- Charge using the PC sync cable (ActiveSync cable).
This option is limited to a 500mA charge current (6 hours to fully charge the battery) due to the USB PC port current limitation. During charging you will see the "charging in process" icon on the taskbar.
To maximize the battery life:
- Turn off the backlight, when the device is not in use. You can set the backlight policy by tapping
Start-> Settings->Control Panel-> Display->Backlight
- Suspend frequently. Press the sleep/resume (SW2) button to enter Suspend Mode, when EM-X270 is not in use, even for a short time.
- Turn off wireless interfaces when not in use.You can control the power consumption of wireless devices by tapping
Start-> Settings->Control Panel-> Wireless Config .
Please refer to Battery Customization Guide for the driver configuration options.
The demo image supports three serial ports. One serial port is available for application use and two serial ports are dedicated for on-board functions.
|BTUART||COM1||GSM/GPRS||opertates at 38400 baud|
|STUART||COM2||GPS||opertates at 9600 baud|
|FFUART||COM3||Application serial port||available on connector P2 on EM-X270|
|When demo image is running with diagnostics messages the COM3 is not available for application use. Please refer Customizing Demo Image below for more details.|
GPRS/GSM Cellular Modem
- Ensure that you have connected the GSM/GPRS antenna and have inserted the SIM card before cellular modem evaluation.
- Ensure that cellular modem power is turned on via Start->Settings->Control Panel->Wireless Config applet.
- During Telit GPRS/GSM evaluation you can monitor cellular network service availability according to the DS4 LED status as summarized below:
- Permanently off - GSM module is off.
- Fast blinking (period 1s, Ton 0,5s) - Net search / Not registered / turning off.
- Slow blinking (period 3s, Ton 0,3s) - Registered full service.
- Permanently on - a call is active.
The EM-X270 Windows CE demo image includes the "Demo Dialer" application located in Start->Programs->Demo Dialer . This application allows placing and receiving voice calls through a GSM cellular network.
- The dialer application is implemented on top of the RIL driver that is loaded automatically and turns on the cellular modem on startup. Initialization takes 2-3 seconds.
- The phone number specified in the "Enter Phone Number" field is passed to the GSM modem without any prefix additions.
- For US frequency band (GSM-850 GSM-1900), add the following registry key with Remote Registry Editor:
- The source code of the demo application can be found in \x270-em-wince6-img\Demo Applications\Demo Dialer
You can evaluate the GPRS data connection via Windows CE TAPI interface.
- Ensure that the cellular network service is available according to the DS4 LED status (Slow blinking with 3s period).
- Use the Start->Settings->Network and Dialup connection->GPRS shortcut in order to establish the Windows CE TAPI based connection.
- The GPRS shortcut is preconfigured with Israel Orange operator GPRS dial-up settings:
- Dial to local number *99***1#
- Add +CGDCONT=1,"IP","INTERNET" under "Extra Setting" of Call Options tab.
- For US frequency band (GSM-850 GSM-1900) add the "#BND=3" under "Extra Settings" of GPRS connection Call Options tab.
|If you want to customize the GPRS connection settings please refer to Making GPRS connections in Windows CE 6.0 article that describes in detail the Windows CE TAPI GPRS connection setup|
Direct Access to Cellular Modem
The Telit cellular modem can be accessed directly by sending AT commands to COM1. The CompuLab terminal application can be used to facilitate the AT commands evaluation. It is located in Start->Programs->Tools->CLTerm .
In order to send an AT command perform the following actions:
- In the CLTerm application open COM1. Use the Config button to select the COM port and the baud rate (use 56,700 as default).
- Send the AT command via Xmit field. The response will be printed in the main window automatically upon receiving data from the COM port.
Perform the following simple test to validate the proper connection with the GSM/GPRS modem:
- Write ATZ in the terminal window (use the virtual keyboard for typing)
- Wait for the OK response on the modem reset command.
You may assume that you have a valid connection with the GPRS modem after passing the above test.
For further GPRS/GPS modem evaluation refer to the Telit AT command set
|The CLTerm application cannot coexist with the DemoDialer and GPRS Tapi connection.|
The demo image includes a closed source freeware GPSViewer application located at Start->Programs->GPS Viewer that can be used for EM-X270 GPS evaluation. In order to evaluate GPS perform the following actions:
- Ensure that you have connected the GPS antenna before the evaluation.
- In GPS Viewer, select COM2 and 9600 baud rate
- Click “Open GPS” to open a connection to the device.
- You can see the satellite positions on the GPS status tab.
The demo image includes Location Framework that allows you to write GPS aware applications.
For more details refer to Location Framework Application Development MSDN article.
The demo image includes the following Microsoft Bluetooth profiles:
- Object Push Profile (OBEX)
- File Transfer Profile
- Human Interface Device Profile
- LAN Access Profile
- Personal Area Network Profile
- Hands-free and headset Profiles
|Ensure that Bluetooth power is turned on via Start->Settings->Control Panel-> Wireless Config applet|
Bluetooth Manager located at Start->Settings->Control Panel->Bluetooth Device Properties allows to scan for remote Bluetooth devices and pair with them.
In order to evaluate the profile functionality, a Bluetooth Profile aware application is required. Microsoft Bluetooth samples maybe found at WinCE 6.0 shared source code that comes with the Platform Builder installation (C:\WINCE600\PUBLIC\COMMON\OAK\DRIVERS\BLUETOOTH\SAMPLE).
EM-X270 Bluetooth connectivity has been verified with the following devices:
- EM-X270 with demo image
- PC with BlueSoleil USB dongle
- Motorola HT820 Bluetooth Stereo Headphones
The following Bluetooth usage scenarios were tested with demo image on EM-X270:
- OBEX object exchange between a PC and EM-X270
- File exchange between a PC and EM-X270 via FTP Profile
- Audio streaming from EM-X270 to Bluetooth headphones
- Bluetooth A2DP Audio connection, tested with AdpMgr Sample located at Start->Programs->A2dpMgr
|Do not enable Bluetooth DUN profile in the Catalog. The Bluetooth DUN service reserves COM1, thus disabling COM1 usage for GPRS/GSM modem|
Use the “Software Reboot” shortcut on the desktop to reboot. Before reboot the system is gracefully shut down including a flush of the registry.
Alternatively you can manually invoke the following command: SetPowerState reboot
This WinCE demo image package includes MFC demo applications developed using VS2005, which are located in the “\x270-em-wince6-img\Demo Applications\” directory of image archive. The applications are:
This application demonstrates how to use the GPIO driver in order to control the state of GPIO pins. For further details, please refer to GPIOs Programming.
The SPI Sample application (SPI_Thermometer) demonstrates how to use the SPI driver API. The target device is Maxim DS1722 thermometer. For further details, please refer to SPI Sample for EM-X270.
The I2C Sample application demonstrates how to use the I2C driver API. The target device is GPIO extender(U5) on EB-X270. For further details, please refer to I2C Sample for EM-X270
This RTCResume application demonstrates suspend/resume functionality using the RTC alarm event
This DemoDialer application demonstrates the GSM voice ability of EM-X270. It allows you to place and receive voice calls through a GSM cellular network
|For native(MFC) application development you must install CompuLab SDK for demo image. The SDK installer EM_X270_SDK.msi is located in \x270-em-wince6-img\EM_X270_SDK directory of your image archive. See WinCE Application Development Guide for the details of the application development/debug/deploy process.|
Running custom applications on startup
You can run a custom application on system startup with the AutoLaunch utility integrated into the demo image.
The AutoLaunch utility extends the functionality of the HKEY_LOCAL_MACHINE\Init registry key allowing configurable launch delay for each application. AutoLaunch monitors the following registry keys:
[HKEY_LOCAL_MACHINE\Startup] “Process0” =”Application.exe param1 param2” “Process0Delay”=dword:delay ;in milliseconds [HKEY_LOCAL_MACHINE\Startup\ApplicationName] “Process0” =”Application.exe param1 param2” “Process0Delay”=dword:delay ;in milliseconds
[HKEY_LOCAL_MACHINE\Startup\ceplayer] "Process0” =”ceplayer.exe \windows\sound2.wav” “Process0Delay”= dword:1388 ;5000 in decimal
The above example launches CEPlayer five seconds after the boot completion. The additional windows\Sound2.wav parameter is used by CEPlayer to play the specified file.
Customizing Demo Image
It is possible to perform advanced demo image customization with command line parameters from EM-X270 bootloader (U-Boot).
U-boot Access Setup
- Ensure that you have a serial terminal connected to the EM-X270 evaluation platform as described in Console setup.
- Power up the EM-X270. Check the activity of the green LED (DS1) on the EM-X270 - it should light up and then start blinking
- Check the reports on the terminal screen. It should print a welcome greeting and some hardware initialization info.
- Hit any key to stop the U-boot auto boot and enter the command prompt. Act quickly, as the predefined auto boot process can start within 1 sec.
Demo image customization is performed via the cmdline U-boot environment variable. You can define the cmdline variable in U-Boot by typing:
- setenv cmdline “param1 param2 param3 .." (parameters are not case sensitive)
The following parameters are supported currently:
|DEBUG||Activate debug output on EB-X270 COM port (automatically disables COM3 serial driver)|
|HIVECLEAN||Clean registry hive on boot|
|FORMATUSER||Format user partition on boot|
|NO[driver alias]||Disables the driver by its alias name. |
Example: NOSERIAL, NOSDCARD, ...
|ADD[driver alias]||Enables the driver by its alias name. |
The self-explanatory driver alias names are: SDCARD, SERIAL, TOUCH, GPIO, I2C, USBFN, WLAN, OHCIPXA, DM9000,AUTO
Example: ADDSERIAL, ADDSDCARD, ...
|In order to remove "cmdline" variable type: setenv cmdline; saveenv; reboot|
WinCE Demo Image Customization Example
If you want to enable the demo image diagnostic messages (automatically disables COM3 driver) type: setenv cmdline "debug"; saveenv; reboot
The image includes an embedded registry editor able to write/read/delete registry values.
Syntax: reg.exe <(-)Registry Key> (h) <Value>
("-" before Registry Key will remove the value, “h” for hex value).
There are some special aliases defined for the popular registry key:
- Display aliases. Each of the aliases below will be prefixed with HKLM\Drivers\Display\PXA27x\Config\ registry key.
LCCR0,LCCR1, LCCR2, LCCR3, LCCR4, CxScreen, CyScreen, Bpp.
- GDI display rotation aliases. Each of the aliases below will be prefixed with HKLM\System\GDI\Rotation\ registry key.
This is a command line utility, which can perform global system power state transitions.
Syntax: SetPowerState.exe <State> <HexStateFlags> <HexOptions>
where <State> is system power state defined in the registry, e.g. Reboot.
optional <StateFlags> specify state flags, in hex, e.g.200000 (POWER_STATE_SUSPEND).
optional <Options> specify options, in hex, e.g. 1000 (POWER_FORCE),
The most useful transitions are:
- SetPowerState reboot – reboots the EM-X270 with the help of a watchdog.
- SetPowerState suspend – enters PXA27X deep sleep mode.
|Before power state transition, the registry is flushed to NAND.|
This is a command line utility, which can perform instant GDI rotation: Syntax: GDIRotation.exe [angle], where angle can be 0,90,180 or 270
This is a command line utility that allows advanced system analysis and debugging. Read more about the Sysconf utility in Sysconf manual.
Wireless Power Utility
This is a command line utility controls a power state for a certain wireless device, such as Bluetooth, GPS or the GPRS/GSM modem. Running the utility in "auto" mode will set the power state of wireless devices according to the registry settings that can be configured with the help of the wpower.exe utility itself and the Wireless Config control panel applet.
Syntax: wpower.exe <device> [state].
<device> can be one of "GPRS","GPS", "BT" or "AUTO".
<state> can be one of "on" or "off".