0% found this document useful (0 votes)
71 views

Qterm A7 Terminal Windows Embedded Ce Manual

Uploaded by

ouyangxin1991
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Qterm A7 Terminal Windows Embedded Ce Manual

Uploaded by

ouyangxin1991
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

QTERM®-A7 TERMINAL

WINDOWS® EMBEDDED CE MANUAL

BEIJER ELECTRONICS
2212 South West Temple #50
Salt Lake City, Utah 84115-2648
USA

Phone 801-466-8770
Fax 801-466-8792
Email [email protected]
M01-049-00 Rev 03 Web http://www.beijerelectronicsinc.com
Copyright © 2011 Beijer Electronics. Printed in the USA. All rights reserved. No part of this publication may be reproduced, in any form or by any means with-
out prior written permission from Beijer Electronics.

Qlarity and QTERM are registered trademarks of Beijer Electronics.


Microsoft, Windows, Windows NT, Windows 2000, Windows XP, Vista, ActiveSync and their respective logos are registered trademarks of Microsoft Corpora-
tion in the United States and other countries.
All other brand and product names used in this manual are trademarks or registered trademarks of their respective companies.

Manual updated 3 April 2011.


FCC Compliance Information

This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to part 15 of the FCC
Rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in
a commercial environment. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used
in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment
in a residential area is likely to cause harmful interference in which case the user will be required to correct the interference at his
own expense.

Any modification to the QTERM-A7 (including changes to the recommended antenna configuration) that are not expressly
approved by Beijer Electronics could void the user’s authority to operate the QTERM-A7.

Additionally, the QTERM-A7 may contain the following FCC module-certified components depending on product configuration:
QOQWT12 or Q72WLC300GRS.
Notes
CONTENTS

CHAPTER 1. INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1

CHAPTER 2. SOFTWARE AND DEVICE DRIVERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3


2.1 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
2.1.1 Bootloader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
2.1.2 Windows CE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
2.1.3 Beijer Electronics Specific Device Drivers. . . . . . . . . . . . . . . . . . . . . . . . . . . .4
2.1.4 System Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
2.1.5 Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5

CHAPTER 3. GETTING STARTED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7


3.1 Power On/Off/Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
3.1.1 Turn On the QTERM-A7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
3.1.2 Turn Off the QTERM-A7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
3.1.3 Software Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
3.2 Touch Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
3.2.1 Touch Screen Care . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
3.2.2 Touch Screen Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
3.3 System Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
3.4 Install Third-Party or Custom Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
3.5 Run Third-Party Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
3.6 Build Your Own Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10

CHAPTER 4. SYSTEM SETTINGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11


4.1 Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
4.1.1 Stylus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
4.1.1.1 Double-Tap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
4.1.1.2 Recalibrate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
4.1.2 PC Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
4.1.3 Keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
4.1.4 Date/Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
4.1.5 Volume and Sounds. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
4.1.6 Network and Dial-up Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
4.1.7 Storage Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
4.2 QTERM-A7 Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
4.2.1 Backlight Intensity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
4.2.2 Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
4.2.3 Touch Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
4.2.4 Power States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
4.3 Registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
4.4 File System Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
4.5 System Path. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
4.6 Boot-up Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
4.7 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23

QTERM A7/A12 Windows Embedded CE i


Contents

4.7.1 Microsoft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23


4.7.2 Beijer Electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24

CHAPTER 5. CONNECT TO A PC VIA ACTIVESYNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25


5.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
5.2 Connect the Serial Cable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
5.3 Enable PC Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26
5.4 Download/Install ActiveSync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
5.5 Set the QTERM-A7 Baud Rate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
5.6 Connect the PC and QTERM-A7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
5.6.1 Select the COM Port Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30

CHAPTER 6. APPLICATION DEVELOPMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31


6.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
6.1.1 Glossary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
6.1.2 Related Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
6.2 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
6.2.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
6.2.2 SDK Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
6.2.3 Target Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
6.2.3.1 ActiveSync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
6.2.3.2 Manual Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
6.2.4 Microsoft Visual Studio 2005/2008 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
6.2.4.1 Native . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
6.2.4.2 Managed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
6.2.5 Remote Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
6.3 Software Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
6.3.1 Backlight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
6.3.2 Power. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
6.3.3 Serial Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42
6.3.4 Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43

CHAPTER 7. OPTIONAL PERIPHERALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45


7.1 USB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45

CHAPTER 8. TECHNICAL SUPPORT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47


8.1 Software Upgrades . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
8.1.1 Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
8.1.2 Bootloader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50
8.2 System Backup and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51

ii QTERM A7/A12 Windows Embedded CE


CHAPTER 1
INTRODUCTION

The QTERM®-A7/A12 mobile data terminal is a rugged graphic human-machine interface


terminal for use in a wide range of commercial and industrial applications. It has been
designed to run the Windows® Embedded CE 6.0 operating system. It includes support for
application development with industry standard tools such as Microsoft® Visual Studio 2005
and 2008.

After installing the SDK created by Beijer Electronics, you can write your own applications
for the QTERM-A7/A12, which will be compiled for Windows CE 6.0 running on an ARM
platform.

For a list of the hardware specifications for the QTERM-A7/A12, refer to the QTERM-A7 Ter-
minal Hardware Manual and the QTERM-A12 Terminal Hardware Manual.

QTERM A7/A12 Windows Embedded CE 1


Introduction

Notes

2 QTERM A7/A12 Windows Embedded CE


CHAPTER 2
SOFTWARE AND DEVICE DRIVERS

2.1 Software

2.1.1 Bootloader

The QTERM-A7/A12 has a bootloader application that executes on boot-up, loads the Win-
dows CE kernel into memory and boots the kernel. There is no indication that the bootloader is
executing—the screen is black and the speaker is silent. The QTERM-A7/A12 has a typical
10- to 20-second boot time. Refer to section 8.1.2, “Bootloader” for information on upgrading
the bootloader.

2.1.2 Windows CE

The QTERM-A7/A12 runs the Windows Embedded CE 6.0 operating system. Windows CE is
a resource-constrained and scalable version of Microsoft Windows for embedded hardware
that offers broad support for third-party application development, software and hardware.

The QTERM-A7/A12 utilizes the Professional version of Windows CE that includes applica-
tion support libraries, graphical shell (Windows Explorer) and other items. The graphical shell
contains program management and control panel routines. Following are some of the compo-
nents that are included with the QTERM-A7/A12.

• Active Template Library


• Microsoft Foundation Classes
• .NET Compact Framework v3.5
• ActiveSync
• Local Area Networking
• Wide Area Networking
• Peer-to-Peer Networking
• Power Management
• Hive-based (persistent) Registry
• Direct Draw video graphics engine
• Command Shell
• Graphical Shell
• Soft Keyboard

QTERM A7/A12 Windows Embedded CE 3


Software Software and Device Drivers

To balance the size and performance, the standard releases of the Professional version may not
have all the components listed on Microsoft’s Windows Embedded website. If you need addi-
tional components, contact Beijer Electronics.

For a complete list of the components included in the Professional version, refer to the docu-
ment available from the following website:
http://www.microsoft.com/windowsembedded/en-us/products/windowsce/component-library.mspx

Windows CE on the QTERM-A7/A12 uses about 35 Mbytes in the form of an image file
named NK.BIN in the \HardDisk directory. This file contains all of the above components and
the code required to set up and operate QTERM-A7/A12 hardware (device drivers). The oper-
ating system may need to be upgraded for future releases. See Chapter 8, “Technical Support”
for details on how to upgrade the QTERM-A7/A12 system package.

2.1.3 Beijer Electronics Specific Device Drivers

The QTERM-A7/A12 contains Beijer Electronics designed hardware peripherals that require
additional support beyond that provided by Windows CE to set up and operate. Beijer Elec-
tronics provides software device drivers for these peripherals as part of the standard operating
system installation. Following is a list of some peripherals requiring Beijer Electronics-pro-
vided support.

• LCD display
• Display backlight
• Audio codec/controller
• Touch screen
• Serial ports
• Ethernet interface
• USB host ports
• Power management
• Real time clock

Device drivers are included in the operating system as dynamically linked libraries. They are
loaded and initialized at boot-up and provide run-time interfaces for application programming.

A standard driver application interface allows you to dynamically configure some of the hard-
ware without detailed knowledge about the components. For example, you can set the display
backlight intensity. See Chapter 6, “Application Development” for details on the device driver
program interfaces and how they can be used in user applications.

4 QTERM A7/A12 Windows Embedded CE


Software and Device Drivers Software

2.1.4 System Settings

Control panel applets provide a graphical user interface for controlling some of the
QTERM-A7/A12 hardware peripherals. These applets utilize the device driver interfaces
described in the previous section. Display the control panel in Windows CE by tapping [Start],
Settings and Control Panel (see Figure 1).

The QTERM-A7/A12 panel desktop shortcut provides a convenient central location to access
most of the commonly used hardware controls. Some of the hardware control settings do not
persist after removing power from the QTERM-A7/A12. Contact Beijer Electronics for avail-
able solutions on maintaining settings after a power cycle. Refer to Chapter 4, “System Set-
tings” for detailed information about the QTERM-A7/A12 panel and other control panel
applets for the QTERM-A7/A12 hardware.

Figure 1
Windows CE Control Panel

2.1.5 Applications

Windows CE comes with several user applications (see section 2.1.2, “Windows CE”) and a
variety of utility applications. These applications are located either in the \Windows directory
(reside in RAM) or the \HardDisk directory (reside in flash). Beijer Electronics provides appli-
cations to supplement the Windows CE applications, including RegEditCE.exe for editing the
registry. These applications are located in the \HardDisk\BIN directory. In addition, you can
write your own applications for the QTERM-A7/A12. These applications must be compiled

QTERM A7/A12 Windows Embedded CE 5


Software Software and Device Drivers

for Windows CE running on an ARM platform. See Chapter 6, “Application Development” for
application development setup instructions and code samples.

A special application called “QTERM Demo” is included (see Figure 2). You can access the
demo from a desktop shortcut, the Start menu, or in the \HardDisk\BIN directory.

QTERM Demo can be downloaded from http://www.beijerelectronicsinc.com and installed on


any QTERM-A7/A12. (There are different demo applications for the QTERM-A7 and the
QTERM-A12). This application highlights some of the hardware and software capabilities of
the QTERM-A7/A12 and illustrates the potential for user applications. QTERM Demo is a
.NET-based C# Smart Device application compiled with Microsoft Visual Studio 2008.

Figure 2
QTERM Demo Application

6 QTERM A7/A12 Windows Embedded CE


CHAPTER 3
GETTING STARTED

3.1 Power On/Off/Reset

3.1.1 Turn On the QTERM-A7/A12

To turn on the QTERM-A7/A12, apply 10 to 32 volts DC to the appropriate terminals on the


terminal strip. The QTERM-A7/A12 boots and loads the operating system. The figure below
shows the Windows CE desktop for the Professional version.

Figure 3
Windows CE Desktop

Icons for software your company has installed may be displayed next to those shown above.

To use the QTERM-A7/A12, tap the icons on the touch screen.

Refer to section 3.2, “Touch Screen” for information on using the touch screen.

3.1.2 Turn Off the QTERM-A7/A12

To turn off the QTERM-A7/A12, disconnect the terminal strip from the power source. Recon-
nect the terminal strip to the power source to power the unit back on.

QTERM A7/A12 Windows Embedded CE 7


Touch Screen Getting Started

When the QTERM-A7/A12 is powered off, information in the Windows CE registry and any
data stored on the internal flash hard-disk (\HardDisk) is retained. However, the Windows CE
file system root folder is RAM-based and will be lost. Consequently, any information that
must be retained must be stored under the \HardDisk or \USBHardDisk folders. To avoid los-
ing data, make sure you close any open applications and back up data to a persistent storage
location before powering off the QTERM-A7/A12. Corruption will occur if data is being
written to files located on \HardDisk or \USBHardDisk during a loss of power.

3.1.3 Software Reset

The QTERM-A7/A12 can also be reset from a user application using the available API. Refer
to section 6.3.2, “Power.”

3.2 Touch Screen

3.2.1 Touch Screen Care

Use only your fingertip or a stylus to tap the touch screen. Other objects (such as either end of
a pencil) will damage the transparent film or plastic backing. Use a light touch, just hard
enough for the screen to respond.

To clean the touch screen, moisten a soft cloth with water or a window cleaner such as Win-
dex®. Then gently wipe the screen clean with the cloth. Do not spray liquid directly on the
touch screen.

3.2.2 Touch Screen Use

When you tap or press on the QTERM-A7/A12 touch screen, it responds with a clicking
sound. Tap on an icon (e.g., “My Device”) to highlight and select the item. Tap twice (dou-
ble-tap) on an icon to open the item or start the program.

Tap [Start] to display the Windows Start menu, which gives you access to all system functions
and programs. Any of the menu options with right-pointing arrows will open a sub-menu. Tap
once on an option to display its sub-menu. For example, tap Programs, and a sub-menu of all
user programs loaded on your QTERM-A7/A12 is displayed.

Tap the screen background to close the Start menu, or tap [Start] again.

NOTE ☞ If you are having problems selecting functions on the touch screen, you may need to recali-
brate the touch screen. Refer to section 4.1.1.2, “Recalibrate” on page 12 for information.

8 QTERM A7/A12 Windows Embedded CE


Getting Started System Settings

3.3 System Settings

To access the system settings (i.e., calibration, double-click (double-tap), keyboard, PC con-
nection, date/time, volume and sounds and more) through the Windows CE control panel, tap
[Start], then select Settings and Control Panel as shown below.

Figure 4
Windows CE Start Menu

Refer to Chapter 4, “System Settings” for information on the control panel settings.

3.4 Install Third-Party or Custom Software

You can install any software application on the QTERM-A7/A12 that is compatible with Win-
dows CE, has been compiled for the ARM platform and does not exceed the system require-
ments of your QTERM-A7/A12. You can download it from a network or the Internet
(depending on your interface setup), use ActiveSync (refer to Chapter 5, “Connect to a PC Via
ActiveSync” for information) or copy the files from a USB flash drive.

Third-party software applications are typically packaged in a Microsoft CAB file format,
which are then packaged in a PC-side installer executable or Microsoft MSI file. The bare
CAB files can be copied to the QTERM-A7/A12 and installed manually, or the MSI file can be
executed on a PC and the included CAB file downloaded and installed via ActiveSync.

QTERM A7/A12 Windows Embedded CE 9


Run Third-Party Software Getting Started

For applications installed via ActiveSync, execute the downloaded installation file from Win-
dows Explorer on a PC. The application installer should automatically launch ActiveSync,
download a CAB file to the QTERM-A7/A12 and initiate installation of the CAB file on the
QTERM-A7/A12.

A CAB file can be downloaded directly to the QTERM-A7/A12 without ActiveSync. For this
type of installation, double-tap the CAB file from a Windows Explorer session on the
QTERM-A7/A12 to initiate the installation process.

NOTE ☞ It is recommended that the destination of the CAB file installation files be in the HardDisk
directory because that storage location is on the internal persistent storage, otherwise the
installation will be lost after a power cycle. See section 3.1.2, “Turn Off the QTERM-A7/A12”
for more details.

NOTE ☞ See section 8.1.1, “Operating System” on page 47 for information about UpgradeCE.exe, a
Beijer Electronics package manager program that can be used similarly to the Windows CE
CAB installer. UpgradeCE.exe software application packages and settings are retained even
after system firmware upgrades.

3.5 Run Third-Party Software

Third-party or custom software installed on the QTERM-A7/A12 may be listed in the Start
menu under “Programs.” Tap a program name in the menu to run the program.

A program may also have an icon on the desktop. If so, double-tap the icon to start the pro-
gram.

3.6 Build Your Own Software

You can write your own applications using Microsoft programming tools. Refer to Chapter 6,
“Application Development” for more information.

10 QTERM A7/A12 Windows Embedded CE


CHAPTER 4
SYSTEM SETTINGS

4.1 Control Panel

Many of the system settings can be adjusted through the Windows CE control panel. To access
the control panel, tap [Start], then select Settings and Control Panel.

Figure 5
Windows CE Control Panel

Applets on the control panel that are used to configure QTERM-A7/A12 settings include the
following (see Figure 5):

• Stylus
• PC Connection
• Keyboard
• Date/Time
• Volume and Sounds
• Network and Dial-up Connections
• Storage Manager

QTERM A7/A12 Windows Embedded CE 11


Control Panel System Settings

4.1.1 Stylus

Use the Stylus applet to set the double-tap speed and spacing or to recalibrate the touch screen.
You should recalibrate any time it becomes difficult to make selections or to double-tap items
on the screen. Double-tap the Stylus icon on the control panel, and the Stylus Properties dia-
log box is displayed.

4.1.1.1 Double-Tap

To set the speed and distance between double-taps, tap the Double-Tap tab, as shown below.

Figure 6
Stylus Properties, Double-Tap

On the checkered grid at the top, tap the grid twice (double-tap) using a tap speed that is com-
fortable for you. The tap speed should be quick, but not so quick that it becomes difficult to do.

Below the checkered grid is an image of a “director’s” sign. Double-tap on the image to test
your new setting. The top of the sign should lift up or drop down with each double-tap. If it
does not, reset the double-tap action on the checkered grid.

You can keep resetting the double-tap until it is right for you. Tap [OK] to save any changes
and exit. Tap [X] to exit the dialog box without saving.

4.1.1.2 Recalibrate

To recalibrate the touch screen, tap the Calibration tab, as shown below.

Figure 7
Stylus Properties, Calibration

12 QTERM A7/A12 Windows Embedded CE


System Settings Control Panel

Tap [Recalibrate], and a large “+” symbol is displayed on the screen. Tap and hold briefly as
close to the center of the symbol as possible. When you lift the stylus, the symbol moves to
another location on the screen. Tap and hold the center of the symbol again; lift the stylus, and
the symbol moves again. In order to fully calibrate the touch screen, you must continue this
process until you have tapped the center of the symbol at five different locations on the touch
screen. These five taps are used to calculate the horizontal and vertical offset parameters of the
touch screen. If the symbol continues to move after the fifth tap, the calibration was unsuccess-
ful and you must repeat the five taps. An unsuccessful calibration results when the offset cal-
culated for one calibration point differs from another. If the calibration is successful, the “+”
symbol is no longer visible. Tap the touch screen one more time, or press [Enter], to save the
calibration settings.

Touch screen calibration data is stored in the persistent registry (see section 4.3, “Registry” for
more information). After the unit has been calibrated once, the calibration data is retained
between re-boots. The touch screen calibration screen automatically appears when you boot
the unit if there is no calibration data present in the registry.

4.1.2 PC Connection

Use the PC Connection control panel applet to enable or disable remote connections with a
desktop PC (ActiveSync). Refer to Chapter 5, “Connect to a PC Via ActiveSync” on page 25
for more information about setting up an ActiveSync connection. Select the checkbox labeled,
“Allow connection with desktop computer when device is attached” to enable remote PC con-
nections with the QTERM-A7/A12 (see Figure 8).

Figure 8
PC Connection Properties

The default device used for remote connection is the USB-to-serial converter, which appears in
Windows CE as the serial port device on COM5 (“USB COM5”).

Tap [OK] to save any changes and exit. Tap [X] to exit the dialog box without saving.

QTERM A7/A12 Windows Embedded CE 13


Control Panel System Settings

4.1.3 Keyboard

Use the Keyboard applet to set the repeat delay and repeat rate for keyboard keys. These
parameters apply to any connected USB keyboard. Double-tap the Keyboard icon on the con-
trol panel, and the Keyboard Properties dialog box is displayed, as shown below.

Figure 9
Keyboard Properties

Enable Character Repeat


Select this option to turn the key repeat feature on. Uncheck this option to turn the key repeat
feature off. If selected, a key entry repeats if you hold down the key on the keyboard.

Repeat Delay
If you enabled “character repeat,” use this function to select the delay time that you want
between when a key is pressed and when it begins to repeat automatically. Tap and hold the
slider and slide it up or down the slider bar to set the delay, or tap the left or right arrow button
at the ends of the slider bar to move by smaller increments.

Repeat Rate
If you enabled “character repeat,” use this function to select the time that you want between
each repeat after the first repeat. Tap and hold the slider and slide it up or down the slider bar to
set the delay, or tap the left or right arrow button at the ends of the slider bar to move by
smaller increments.

Tap in the data entry box at the bottom of the dialog box, and press a key to test the repeat
delay and repeat rate. You can reset the delay and rate until the settings are right for you.

Tap [OK] to save any changes and exit. Tap [X] to exit the dialog box without saving.

14 QTERM A7/A12 Windows Embedded CE


System Settings Control Panel

4.1.4 Date/Time

Use this applet to set the time and date on the QTERM-A7/A12. Tap the Date/Time icon on
the control panel, or tap the clock on the task bar (see Figure 10).

Figure 10
Date/Time Properties

To change the year, continuously change the month to successive or prior months until the
desired year is reached. Alternatively, tap the year display, and type the year using the
on-screen soft keyboard or an attached USB keyboard.

To change the month, tap the left-pointing arrow at the top of the calendar to select the previ-
ous month, or tap the right-pointing arrow to select the next month. Alternatively, tap the
month display, and select the desired month from the pop-up list.

To select a date in a month, tap the date in the calendar.

To change the time, in the “Current Time” box, tap the hour, minute or AM/PM position to
select it, then tap the selection arrows to increase or decrease the number. Alternatively, tap the
time display to select the hours, minutes, seconds or “AM/PM” field, and enter the time using
the on-screen soft keyboard or an attached USB keyboard.

To select a different time zone, tap the drop-down arrow for the “Time Zone” box and then tap
the correct time zone in the drop-down list.

The checkbox “Automatically adjust clock for daylight saving” is selected by default. If the
QTERM-A7/A12 will be used in an area that does not follow daylight savings time, deselect
this option.

NOTE ☞ The QTERM-A7/A12 has been updated to be compliant with the latest dates for daylight sav-
ings time changes (per the U.S. daylight savings time zones and dates change for 2008).

Tap [Apply] to apply changes in the settings without exiting the dialog box. Tap [OK] to apply
the changes and exit. Tap [X] to exit the dialog box without saving your settings.

QTERM A7/A12 Windows Embedded CE 15


Control Panel System Settings

4.1.5 Volume and Sounds

Use this applet to adjust the volume of system responses and to specify for which screen
actions the QTERM-A7/A12 will respond with a sound. Tap the Volume & Sounds icon on
the control panel to display the Volume & Sounds Properties dialog box, as shown below.

Figure 11
Volume & Sounds Properties

To enable sounds and adjust the volume, tap the Volume tab.

Enable sounds for:


Events
If you want a sound emitted when the system gives a warning or a system event occurs, select
this option.
Applications
If you want sounds generated by programs, select this option.
Notifications
If you want sounds emitted for alarms, appointments and reminders, select this option.

Enable clicks and taps for:


Key Clicks
Select this option if you want to hear clicks when you press a key on an external keyboard. If
you select key clicks, also select whether you want the click sound to be Loud or Soft.
Screen Taps
Select this option if you want to hear a sound when you tap the screen. If you select this
option, also select whether you want the tap sound to be Loud or Soft.
System Volume
Use the slider at the left-hand side of the dialog box to select the overall volume of system
sounds. Tap and hold the slider and slide it up or down the slider bar to adjust the sounds
louder or softer, or tap the Soft or Loud arrows to adjust it in smaller increments. A sound is
emitted as you make each adjustment so you can monitor the setting.

Tap [OK] to save the settings and exit the dialog box. Tap [X] to exit the dialog box without
saving your settings.

16 QTERM A7/A12 Windows Embedded CE


System Settings Control Panel

4.1.6 Network and Dial-up Connections

The Network and Dial-up Connections control panel icon launches a Network Connections
application (see Figure 12), which is used to set up and configure remote connections. An icon
is created for each connection (connectoid). Once configured, the connectoid can be launched
to initiate the remote connection.

Figure 12
Network Connections

The default connectoids for QTERM-A7/A12 remote connections are USB COM5 and
DM9CE1. The USB COM5 connection uses a USB-to-serial converter to establish a new
serial port (COM5), which is used for ActiveSync communication. The DM9CE1 connection
uses the internal 10/100 Ethernet adapter to provide a standard TCP/IP interface.

The USB COM5 connection is automatic. Once an ActiveSync connection is established, a


new connectoid appears to reflect the new connection: USB SERIAL CABLE – COM5. The
properties of this connection indicate the IP address of the QTERM-A7/A12 for this connec-
tion.

The DM9CE1 connection automatically obtains IP configuration (address, subnet mask and
gateway) if DHCP is enabled. Right-click, or select File, Properties from the menu for the
DM9CE1 connectoid to configure DHCP or static values, as well as name servers for this con-
nection. DHCP is enabled by default.

QTERM A7/A12 Windows Embedded CE 17


Control Panel System Settings

Running ipconfig from the command shell (Start, Programs, Command Prompt) lists
detailed information for the QTERM-A7/A12 network connections.

4.1.7 Storage Manager

Use the Storage Manager applet to administer the QTERM-A7/A12’s internal and external
storage devices. The contents of the \HardDisk directory are located on an internal SD or
MMC interface NAND flash device. The contents of \USBHardDisk, \USBHardDisk2 and so
on, are located on external USB memory drives. These devices may be formatted, scanned and
defragmented using the Storage Manager utility.

Figure 13 shows the Storage Manager applet on a QTERM-A7/A12 with an SD-type internal
flash memory.

Figure 13
Storage Properties, Internal Flash Drive

Figure 14 shows the Storage Manager applet on a QTERM-A7/A12 with a USB memory drive
inserted and Partition Properties selected.

Figure 14
Storage Properties, USB Drive

18 QTERM A7/A12 Windows Embedded CE


System Settings QPanel

Figure 15 shows the results of a scan disk operation on the internal flash storage device.

Figure 15
Storage Properties, Internal Flash Drive Scan Disk

The storage device must be dismounted before formatting, scanning or defragmenting. For the
internal flash device, it is recommended that these operations be performed only from the
recovery Windows CE image (refer to section 8.2, “System Backup and Recovery”). The main
Windows CE operating system image actively accesses files on the internal flash device. This
access is interrupted by storage administration operations. Re-mounting the device will fail,
and it must be rebooted to return it to a working state.

FAT32 Quick Format is recommended for reformatting operations on the internal storage.
Sometimes a full format may be desired, but allow several minutes for completion. Note that
the eXFAT format option is selected by default; FAT32 must be manually selected from the
drop-down box.

WARNING ☞ Use caution when formatting the internal flash device! The result will be a complete loss of
user data, user applications and main operating system package. A recovery procedure will be
required to restore the QTERM-A7/A12 to a usable state. Refer to section 8.2, “System Backup
and Recovery” for more information.

NOTE ☞ Beijer Electronics recommends that the partition configuration be left intact for storage
devices. Do not remove partitions or create new partitions as this may cause data on the
devices to be irretrievable.

4.2 QPanel

The QPanel provides quick access to all of the QTERM-A7/A12 hardware controls, including
those for the display backlight, touch screen, speaker and power saving/screen saver modes.

To open the QPanel (see Figure 16), tap the desktop shortcut.

QTERM A7/A12 Windows Embedded CE 19


QPanel System Settings

Figure 16
QPanel

Tap [OK] to save any changes and exit. Tap [X] to exit the dialog box without saving.

4.2.1 Backlight Intensity

Use the Backlight controls to adjust the intensity of the display backlight. Tap and hold the
slider and slide it up or down the slider bar to set the intensity from 0 to 100%.

4.2.2 Audio

Tap and hold the slider to increase or decrease the speaker volume. Use this control for more
precision for the volume setting than the Volume and Sounds Control Panel applet provides.

NOTE ☞ The QTERM-A7/A12 speaker is intentionally over-driven at full volume, and certain media
files may sound distorted during playback. Some find that this gives better results after the unit
has been mounted into a panel. Volume should be adjusted to give optimal results for the
media files used in your application.

4.2.3 Touch Screen

Tap the Touch Screen Calibration button to initiate the calibration procedure. Refer to
section 4.1.1.2, “Recalibrate” for more details.

4.2.4 Power States

The power saving controls affect the transition times from full on to User Idle and System Idle
power states when the QTERM-A7/A12 is not in use. In User Idle mode, the display backlight
intensities are dimmed to a low level. In System Idle mode, they are disabled. Touch screen or
USB keyboard/mouse activity will cause the QTERM-A7/A12 to transition out of an idle state.
Refer to section 6.3.2, “Power” for more details about the QTERM-A7/A12 power states.

Tap the drop-down arrow for the User Idle or System Idle settings to select the number of sec-
onds after which the QTERM-A7/A12 will enter the selected power mode. The User Idle and

20 QTERM A7/A12 Windows Embedded CE


System Settings Registry

System Idle time-outs can be adjusted to a continuous range of time values by typing a number
in the drop-down box or via a programmatic interface (refer to section 6.3.2, “Power”).

Disable the transition to User Idle or System Idle power states by removing the checkmark
from the “User Idle mode after” or “System Idle mode after” check boxes, respectively. You
can also type 0 in either drop-down box to disable the transition.

Both the User Idle and System Idle timers operate independently. Both timers are reset with
user activity.

4.3 Registry

Windows CE uses a registry to store system settings and run-time configuration data. The
QTERM-A7/A12 supports a hive-based registry, meaning that the settings in the registry are
maintained between power cycles. The hive registry is stored in special system files on the
internal flash hard-disk. The memory resident registry is periodically (every few seconds)
written to the hive files. You can modify the registry in several ways.

• Windows CE provides an API (RegOpenKeyEx or RegQueryValueEx) and a C++ wrapper


class (CReg via creg.hxx provided in the QTERM-Ax SDK) for use in applications as a pro-
grammatic interface.
• You can run the RegEditCE.exe registry editing application on the QTERM-A7/A12.
• Microsoft Visual Studio 2008 and Microsoft Visual Studio 2005 each come with a suite of
remote debugging tools, including remote registry editors. Refer to Chapter 6, “Application
Development” for information on setting up a host PC to use these tools.

4.4 File System Filter

Certain system files included on the internal flash hard-disk are critical to the functioning of
the QTERM-A7/A12 terminal. In order to reduce the possibility of accidental deletion or cor-
ruption, Beijer Electronics has developed and installed a file system filter, which is a special
device driver that prevents write access to a list of files specified in a registry key. The default
contents of this registry key are as follows:

[HKEY_LOCAL_MACHINE\System\StorageManager\LockFiles]
"Lock"=dword:00000001
"Files"=multi_sz:"\\HardDisk\\nk.bin",
"\\HardDisk\\bin\\boot.bat",
"\\HardDisk\\bin\\ftdi_ser.dll",
"\\HardDisk\\system.mfs",
"\\HardDisk\\MFS"

The file system filter can be enabled or disabled by setting or clearing, respectively, the “Lock”
registry value. The “Files” multi-string registry value contains the list of locked files and direc-
tories. Directories in the list are locked along with all sub-files and subdirectories.

QTERM A7/A12 Windows Embedded CE 21


System Path System Settings

One example of the reason for the file system filter is that if the \HardDisk\nk.bin file—the
Windows CE operating system image—is corrupted or deleted, the QTERM-A7/A12 will not
boot or will boot to a recovery image. This filter protects against inadvertent delete operations.

NOTE ☞ The QTERM-A7/A12 has been provided with a boot recovery image. When booted to the
recovery image, you can restore the nk.bin file or other lost files (refer to section 8.2, “System
Backup and Recovery” for more details on emergency recovery).

The \HardDisk\bin\LockCE.exe program can be used from a command prompt shell to lock or
unlock the files/directories in the list. LockCE 0 unlocks; LockCE 1 locks.

4.5 System Path

The default Windows CE system path on the QTERM-A7/A12 is \Windows;\Hard-


Disk\bin;\HardDisk\fonts. Windows will search the \Windows directory first, then the \Hard-
Disk\bin directory for executables and supporting dynamically-linked libraries. For example,
when explorer.exe is executed from the root directory in the command shell, Windows will find
\Windows\explorer.exe.

The system path can be modified via a registry setting. Following is an example of the registry
key in which two directories have been added to the default path.

[HKEY_LOCAL_MACHINE\Loader]
"SystemPath"=multi_sz:"\\HardDisk\\bin\\",
"\\HardDisk\\fonts\\"
"\\HardDisk\\Programs\\"
"\\Temp\\"

4.6 Boot-up Configuration

There are two methods of configuring the QTERM-A7/A12 to automatically launch applica-
tions or scripts at boot time.

The first method of auto-launching applications is managed by a program called


BootUpCE.exe that is launched when Windows CE boots. BootUpCE initiates touch screen
calibration (if necessary), then launches a command shell and executes a batch file:
\HardDisk\bin\boot.bat. This batch file can be used to launch an application or run a custom
boot-up script. For example, to launch WinVerCE after boot, boot.bat should look something
like the following:

@echo Launching WinVerCE


start \HardDisk\bin\WinVerCE.exe

Because \HardDisk\bin\boot.bat is on the locked files list (refer to section 4.4, “File System
Filter”), it must be unlocked before writing a modified version.

22 QTERM A7/A12 Windows Embedded CE


System Settings Applications

The second and more advanced method of configuring Windows CE to launch one or more
applications in a specific order uses the [HKEY_LOCAL_MACHINE\Init] registry key. The
following MSDN articles describe this method in detail.

http://msdn.microsoft.com/en-us/library/aa913970.aspx
http://msdn.microsoft.com/en-us/library/aa448482.aspx

For reference, HKEY_LOCAL_MACHINE\init contains the following default value on the


QTERM-A7/A12:

[HKEY_LOCAL_MACHINE\init]
"Launch20"="device.dll"
"Launch30"="gwes.dll"
"Depend30"=hex:14,00
"Launch50"="explorer.exe"
"Depend50"=hex:14,00,1e,00
"Launch60"="servicesStart.exe"
"Depend60"=hex:14,00
"Launch70"="bootupCE.exe"
"Depend70"=hex:14,00,1e,00,32,00

As the above registry values illustrate, the Windows CE graphical shell is launched as part of
this boot-up procedure (explorer.exe). The “Launch50” registry value can be modified to point
to an alternate program in order to launch a custom shell or to run a program without a shell.

4.7 Applications

4.7.1 Microsoft

Microsoft applications that come with the QTERM-A7/A12 include, but are not limited to, the
following:

Application Description Path


Windows Explorer Standard graphical shell \Windows\explorer.exe
Command Prompt Command-line shell \Windows\cmd.exe
Media Player Video and audio decoder/player \Windows\ceplayer.exe
Internet Explorer Web browser \Windows\iesample.exe
Host PC synchronization and communi-
ActiveSync \Windows\replog.exe
cation server
Control Panel Device configuration utilities \Windows\ctlpnl.exe
Windows CE Load CAB file installer \Windows\wceload.exe

QTERM A7/A12 Windows Embedded CE 23


Applications System Settings

4.7.2 Beijer Electronics

Applications written and provided by Beijer Electronics include the following:

Application Description Path


Causes the persistent registry to revert to
CleanHiveCE factory defaults. Reboot QTERM-A7/A12 \HardDisk\bin\CleanHiveCE.exe
after executing.
Locks/unlocks protected files (refer to
section 4.4, “File System Filter”). Single
LockCE \HardDisk\bin\LockCE.exe
command line parameter either 0 (unlock)
or 1 (lock).
MinTermCE Serial port console and test program. \HardDisk\bin\MinTermCE.exe
PolygonsCE Display test program. \HardDisk\bin\PolygonsCE.exe
QeditCE Small, simple text editor. \HardDisk\bin\QeditCE.exe
Local registry editor tool (similar to
RegEditCE \HardDisk\bin\RegEditCE.exe
Remote Registry Editor).
Causes a delay of N milliseconds for the
calling batch file where the number N is
SleepCE \HardDisk\bin\SleepCE.exe
passed to the program as a command line
parameter.
Application written to demonstrate
QTERM-A7/A12 functionality and fea-
tures. Source code provided for this appli-
QTERM-A7/A12
cation upon request to demonstrate \HardDisk\bin\QTermDemo.exe
Demo
application development for the
QTERM-A7/A12, including custom
device driver interfaces.
QPanelCE Refer to section 4.2, “QPanel.” \HardDisk\bin\QPanelCE.exe
WinVerCE Displays the current version of the Win-
dows CE kernel, firmware and release \HardDisk\bin\WinVerCE.exe
date.
Causes the calling process to delay execu-
tion until the specified Windows CE appli-
WaitForAPIsCE
cation programming interfaces are ready,
[WinCE API enum \HardDisk\bin\WaitForAPIsCE.exe
e.g., SH_SHELL(21) and
value or values]
SH_WMGR(17). Multiple APIs may be
specified, separated by spaces.

24 QTERM A7/A12 Windows Embedded CE


CHAPTER 5
CONNECT TO A PC VIA ACTIVESYNC

5.1 Introduction

You can use Microsoft ActiveSync to communicate directly between the QTERM-A7/A12 and
a PC computer. To set up an ActiveSync connection between your QTERM-A7/A12 and a PC
computer, do the following:

ˆ Connect a standard null-modem cable to the PC and to the USB-serial converter that is
plugged into a USB port of the QTERM-A7/A12. Be sure to turn off power to both devices
before connecting the cable (see section 5.2, “Connect the Serial Cable”).

ˆ Load ActiveSync on the PC to which the QTERM-A7/A12 will be connected (see


section 5.4, “Download/Install ActiveSync”).

ˆ Make sure that connections to the PC are enabled (see section 4.1.2, “PC Connection”).

ˆ Verify that the baud rate on the QTERM-A7/A12 is optimal for the cable length (see
section 5.5, “Set the QTERM-A7/A12 Baud Rate”).

ˆ Start ActiveSync on the PC and on the QTERM-A7/A12 (see section 5.6, “Connect the PC
and QTERM-A7/A12”).

5.2 Connect the Serial Cable


Use a “null modem” RS-232 serial cable (or a standard serial cable with a null modem
adapter) to make an ActiveSync connection between a PC and the QTERM-A7/A12. Verify
that the serial cable and/or null modem adapter has all of the following pin connections, as all
of the listed EIA-232 signals are required by ActiveSync.

EIA-232 Signal First DB9 Pin # Second DB9 Pin #


DCD 1 4
RX 2 3
TX 3 2
DTR 4 1 and 6
GND 5 5
DSR 6 4
RTS 7 8
CTS 8 7
RI 9 No connection

For best results, the cable should not exceed six feet in length for communications at 115200
baud.

QTERM A7/A12 Windows Embedded CE 25


Enable PC Connection Connect to a PC Via ActiveSync

The serial cable is wired symmetrically—either end of the cable can be connected to the
QTERM-A7/A12 (assuming the connectors match). Connect one end of the serial cable to
COM5 on the QTERM-A7/A12. COM5 is available via the USB-to-serial converter. Connect
the other end of the serial cable to a free port on the PC. If possible, note the name of the port
you use (e.g., COM1, COM2, etc.). Refer to Figure 17.

Figure 17
ActiveSync Connections

NOTE ☞ The USB extension cable (item 2 in Figure 17) is required because the default for a remote
connection is USB COM5.

5.3 Enable PC Connection

Before you can install ActiveSync, the QTERM-A7/A12 must be configured to allow connec-
tion to a PC. Use the PC Connection control panel applet to enable remote connection with a
desktop PC (ActiveSync). Select the checkbox labeled, “Allow connection with desktop com-
puter when device is attached” to enable remote PC connection with the QTERM-A7/A12.
Refer to section 4.1.2, “PC Connection” for information.

26 QTERM A7/A12 Windows Embedded CE


Connect to a PC Via ActiveSync Download/Install ActiveSync

5.4 Download/Install ActiveSync


Download ActiveSync from the Microsoft website and install it on your PC as follows.

1. On your PC, open your Web browser, and navigate to the Microsoft Download Center at
http://www.microsoft.com/downloads/Search.aspx?displaylang=en.

2. Type ActiveSync in the search box and begin the search.

3. ActiveSync 4.2 and 4.5 are the two latest versions as of January 2009. Both will work with
the QTERM-A7/A12. Follow the appropriate link and download the desired version.

4. Install ActiveSync on your PC by executing the downloaded installer file or executable


and following the instructions.

5. When the installation is finished, ActiveSync automatically launches the “Get Connected”
wizard that will search the PC’s serial ports for a connection. If you are not ready to con-
nect to the QTERM-A7/A12, cancel this option.

5.5 Set the QTERM-A7/A12 Baud Rate

The baud rate is the rate at which data is sent between the PC and the QTERM-A7/A12. Nor-
mally, you will want to set the baud rate to the highest rate supported by your hardware and
cable length (see section 5.2, “Connect the Serial Cable” for cable length restrictions).

When connected, ActiveSync identifies the baud rate used by the QTERM-A7/A12. The
default baud rate for the QTERM-A7/A12 ports is 115200 bps.

NOTE ☞ If you have communication problems with an ActiveSync connection, try selecting a slower
baud rate.

To verify or change the baud rate for the QTERM-A7/A12, do the following on the
QTERM-A7/A12.

1. Tap [Start] to display the Start menu, then tap Settings and Network & Dial-up Connec-
tions. The Network Connections dialog box is displayed.

2. Tap USB COM5. Select File, Properties from the menu.

3. Tap [Configure].
4. To change the baud rate, tap the down arrow to display a list of possible settings, and tap
the baud rate that you want to use.

QTERM A7/A12 Windows Embedded CE 27


Connect the PC and QTERM-A7/A12 Connect to a PC Via ActiveSync

5.6 Connect the PC and QTERM-A7/A12

With the cable connected (see section 5.2, “Connect the Serial Cable”) and ActiveSync
installed on your PC (see section 5.4, “Download/Install ActiveSync”), do the following to
establish a connection between the PC and the QTERM-A7/A12.

1. On your PC, start ActiveSync.

2. Open the File menu, and select Get Connected, or select Connection Settings and then
click [Connect].

3. Click [Next]. The QTERM-A7/A12 automatically responds to the PC’s ActiveSync con-
nection request. (See Figure 18)

The first time you connect, the PC scans all available serial ports for the ActiveSync con-
nection, which can take some time. For this reason, the QTERM-A7/A12 or the PC may
time out before the connection is found. It is typical to have to re-run one or both Active-
Sync programs a few times before they find each other. This is especially true if your PC
has several serial ports. Once ActiveSync identifies the port, all future connections will
occur quickly.

Figure 18
ActiveSync, Get Connected

NOTE ☞ If you know to which serial port on the PC the QTERM-A7/A12 is connected, you can select
the port in ActiveSync on the PC and save the scanning time. Refer to section 5.6.1, “Select the
COM Port Manually.”

28 QTERM A7/A12 Windows Embedded CE


Connect to a PC Via ActiveSync Connect the PC and QTERM-A7/A12

When the “Connecting to Host” message appears on the QTERM-A7/A12, the Active-
Sync window on the PC displays “Connecting.....”

4. When the ActiveSync connection is established, the PC displays a window titled “New
Partnership” (see Figure 19). Typically, you should select No and then click [Next].

Figure 19
ActiveSync Partnership

The ActiveSync window then displays “Connected” (see Figure 20).

Figure 20
ActiveSync, Connected

QTERM A7/A12 Windows Embedded CE 29


Connect the PC and QTERM-A7/A12 Connect to a PC Via ActiveSync

5. You can now browse the QTERM-A7/A12 file system by selecting the Explore icon or the
Explore option on the PC’s ActiveSync File menu (see Figure 21).

Figure 21
ActiveSync, Explore Device

5.6.1 Select the COM Port Manually

You can save scanning time during the initial connection if you know to which serial port on
the PC the QTERM-A7/A12 is connected. Do the following to select the port.

1. In the ActiveSync program on the PC, select the Connection Settings option on the File
menu (see Figure 22).

Figure 22
ActiveSync, Connection Settings

30 QTERM A7/A12 Windows Embedded CE


Connect to a PC Via ActiveSync Connect the PC and QTERM-A7/A12

2. Enable the “Allow connections to one of the following:” option, and select the appropriate
COM port.

3. Tap [OK] to save the settings.

QTERM A7/A12 Windows Embedded CE 31


Connect the PC and QTERM-A7/A12 Connect to a PC Via ActiveSync

Notes

32 QTERM A7/A12 Windows Embedded CE


CHAPTER 6
APPLICATION DEVELOPMENT

6.1 Introduction

This chapter describes the process of developing and debugging applications for the
QTERM-A7/A12 and assumes familiarity with the C programming language and Windows
application remote debugging procedures. (If necessary, consult the Microsoft MSDN library
for a refresher on remote debugging.) This information is intended for integrators and applica-
tion developers as a guide in setting up the QTERM-A7/A12 for application development and
as a reference for programmatic interfaces (API) to software drivers for various terminal
peripherals.

The QTERM-A7/A12 is a Windows CE-based computer with specialized hardware peripher-


als that make it suitable for industrial applications. Application development and debugging
procedures for the QTERM-A7/A12, as well as the software driver API, are similar to other
Windows CE-based devices. This chapter provides instructions and references for
QTERM-A7/A12-specific functionality. For example, the QTERM-A7/A12 has a serial port,
but the serial port driver interface is not documented in this manual because the interface is a
standard, well-known API.

6.1.1 Glossary

API
Application Program Interface

SDK
Software Development Kit

IDE
Integrated Development Environment

6.1.2 Related Documents


• Microsoft Visual Studio 2005 MSDN Library
• Microsoft Visual Studio 2008 MSDN Library
• Windows Embedded CE 6.0 Documentation
http://msdn.microsoft.com/en-us/library/bb159115.aspx
• Shared Windows Mobile 6 and Windows Embedded CE 6.0 Library
http://msdn.microsoft.com/en-us/library/bb158484.aspx

QTERM A7/A12 Windows Embedded CE 31


Setup Application Development

6.2 Setup

6.2.1 Prerequisites

The following are required before setting up the QTERM-A7/A12 for application develop-
ment. Either an Ethernet or Serial connection is required (both are included here for complete-
ness).

Ethernet Connection:
The host can communicate with the QTERM-A7/A12 during a remote debugging session over
an Ethernet network. The QTERM-A7/A12 should be connected to the same network and on
the same subnet as the host.

The network can be established using the built-in 10/100 Ethernet adapter. Use the DM9CE1
connectoid to configure the Ethernet connection (refer to section 4.1.6, “Network and Dial-up
Connections”).

Serial Connection:
The host can communicate with the QTERM-A7/A12 during a remote debugging session via
ActiveSync over a serial connection. The connection must be a “full” serial port, meaning that
all of the following EIA-232 serial protocol signals must be connected to and supported by the
host PC: RX, TX, RTS, CTS, DTR, DSR and DCD. The QTERM-A7/A12 does not have a
full serial port, so a USB-serial converter is required.

Software Development Kit:


The SDK is an MSI installable file distributed by Beijer Electronics. The SDK should be
installed so that the host IDE knows how to connect to the QTERM-A7/A12. The SDK also
provides headers and libraries that correspond to the available services and features included
in the QTERM-A7/A12 Windows CE image.

Integrated Development Environment:


Microsoft Visual Studio 2005 and/or Microsoft Visual Studio 2008 should be installed as a
development environment for the QTERM-A7/A12 application. These programs are used to
compile and remotely debug the application. The latest service packs and updates for these
Microsoft programs must be installed.

6.2.2 SDK Installation

The latest Software Development Kit is available from the Beijer Electronics website
(http://www.beijerelectronicsinc.com). The SDK and Windows CE image release dates should
match to ensure that all features and services in the image correspond to those offered in the
SDK. Use the latest available SDK version if the release date of the most recent Windows CE
image supersedes that of the SDK.

To install the SDK on your PC host, download the .msi file from the Beijer Electronics web-
site, right-click the file name, and select Install. After the installation is complete, verify that

32 QTERM A7/A12 Windows Embedded CE


Application Development Setup

“QTERM-A7/A12” appears in the Tools, Connect to Device dialog box in Microsoft Visual
Studio 2005 and Microsoft Visual Studio 2008.

6.2.3 Target Setup

6.2.3.1 ActiveSync

You can use the ActiveSync protocol to establish a remote debugging connection with the Inte-
grated Development Environment. Refer to Chapter 5, “Connect to a PC Via ActiveSync” for
ActiveSync setup instructions.

6.2.3.2 Manual Server

If you do not use ActiveSync, you must set up a manual Ethernet client server on the
QTERM-A7/A12. You must configure this server to respond to debug or download connection
requests from the host PC's IDE. ActiveSync has the advantage of easier setup because the IP
address of the target is negotiated automatically; however, it also uses a slower connection
over the serial port.

At a QTERM-A7/A12 command prompt window, navigate to \HardDisk\bin\client. Instruc-


tions for using conmanclient2.exe and cmaccept.exe can be found online at
http://msdn2.microsoft.com/en-us/library/ms228708(VS.80).aspx. These instructions apply to
both Microsoft Visual Studio 2005 and Microsoft Visual Studio 2008.

6.2.4 Microsoft Visual Studio 2005/2008

Take the following steps to configure Visual Studio to connect with the QTERM-A7/A12 tar-
get. (Refer to Figure 23)

1. From the Visual Studio Tools menu, select Options, Device Tools, Devices.

2. Select QTERM-Ax from the “Show devices for platform” drop-down box. “QTERM-Ax
ARMV4I Device” should be the only device listed in the “Devices” box.

3. Select Properties.

4. From the “Default output location on device” drop-down box, select the desired location
for deploying the Visual Studio project executables and libraries. Select Root folder if you
want to download to \HardDisk. The path to the directory in the root location is specified
in the Visual Studio Project Properties dialog box.

5. Click [Configure].

6. If using ActiveSync, select Obtain an IP address automatically using ActiveSync.

QTERM A7/A12 Windows Embedded CE 33


Setup Application Development

If using the ConMan Ethernet client (manual server), select Use specific IP address, and
type in the IP address of the QTERM-A7/A12. Detailed instructions are available online at
http://msdn2.microsoft.com/en-us/library/ms228708(VS.80).aspx.

Figure 23
QTERM-A7/A12 Device Connection with Visual Studio

34 QTERM A7/A12 Windows Embedded CE


Application Development Setup

7. Verify the device connection. From the Tools menu, select Connect to Device. Refer to
Figure 24.

Figure 24
Visual Studio, Connect to Device

8. Make sure the selected platform is “QTERM-Ax,” and the device is “QTERM-Ax
ARMV4I Device.”

The status bar at the bottom of the Visual Studio workspace window should indicate a success-
ful connection.

You can use Visual Studio to construct sample native and managed applications to test the
Build, Deploy and Debug process. Take the following steps.

6.2.4.1 Native

1. From the Visual Studio File menu, select New Project.

2. Select Visual C++, Smart Device and MFC Smart Device Application in the window on
the right.

3. Enter a name for the project.

4. Select a directory for the project, and click [OK].

5. Click [Next]. Move the “QTERM-Ax SDK” to the “Selected SDKs” column. It should be
the only selected SDK (move any others to the left).

6. Continue to configure the application with the next few dialog boxes as desired.

7. Enable the Device toolbar from the View, Toolbars menu.

QTERM A7/A12 Windows Embedded CE 35


Setup Application Development

8. Make sure that the “Target Device” drop-down list shows “QTERM-Ax ARMV4I
Device.” If not, click [Device Options] (next to the drop-down list), and select
QTERM-A7/A12 from the “Show devices for platform” drop-down list.

9. Right-click the project from the Solution Explorer window, and select Properties to bring
up the Property Pages for the project.

10. In Configuration Properties, Debugging and Deployment, set the Remote Executable and
Remote Directory parameters, respectively (see Figure 25). These parameters determine
the path in the QTERM-A7/A12 file system where the executable is deployed and exe-
cuted.

Figure 25
Visual Studio, Native Project Properties

6.2.4.2 Managed

NOTE ☞ Managed C++ is not supported with .NET Compact Framework for Windows CE. VB.NET
and C-Sharp are supported with .NET Compact Framework.

The QTERM-A7/A12 comes with the .NET Compact Framework v3.5 pre-installed. Most
applications targeting the .NET Compact Framework v2.0 are compatible with v3.5.

36 QTERM A7/A12 Windows Embedded CE


Application Development Setup

Visual Studio 2005 will deploy, install and debug with the .NET Compact Framework v2.0 by
default, if “Deploy the latest version of the .NET Compact Framework” is checked (see Figure
26). Uncheck this box to debug with the preinstalled version (v3.5). Visual Studio 2005 does
not have an option to deploy and install v3.5.

Visual Studio 2008 offers a selection between v2.0 and v3.5 at the time of project creation
(refer to step 2 below). If “Deploy the latest version of the .NET Compact Framework” is
checked (see Figure 26), Visual Studio will deploy, install and debug with the selected version.

1. From the Visual Studio File menu, select New Project.

2. In Visual Studio 2005, select Other Languages, Visual C#, Smart Device, Windows CE
5.0 and Device Application in the window on the right.

In Visual Studio 2008, select Visual C#, Smart Device and Smart Device Project in the
window on the right. In the “Add New Smart Device Project” dialog box, select Windows
CE as the target platform, the desired .NET Compact Framework version (v3.5 is installed
by default on the QTERM-A7/A12) and Device Application from Templates.

3. Select a directory for the project, and click [OK].

4. Enable the Device toolbar from the View, Toolbars menu.

5. Make sure that the “Target Device” drop-down list shows “QTERM-Ax ARMV4I
Device.” If not, click [Device Options] (next to the drop-down list), and select
QTERM-Ax from the “Show devices for platform” drop-down list.

6. Right-click the project from the Solution Explorer window, and select Properties to bring
up the Property Pages for the project.

7. In Devices, select QTERM-Ax ARMV4I Device from the Target device drop-down list.

8. In Devices, select the desired Output file folder (see Figure 26). This parameter determines
the path in the QTERM-A7/A12 file system where the executable will be deployed and
executed.

QTERM A7/A12 Windows Embedded CE 37


Setup Application Development

Figure 26
Visual Studio, Managed Project Properties

6.2.5 Remote Tools

Microsoft provides several remote tools with the Visual Studio 2005 and Visual Studio 2008
installation, such as Remote Registry Editor and Remote Zoom In (for screen capture). These
tools work over an established remote debugging connection. Follow the procedures outlined
in sections 6.2.1 through 6.2.3 to set up this connection.

NOTE ☞ There may be a delay the first time a remote tool requests to connect to the QTERM-A7/A12
target.

The platform manager framework copies required libraries and executables for running the
remote tool during this time. Subsequent connection requests will not have this delay unless
the QTERM-A7/A12 has been rebooted since the last request.

Refer to the following MSDN links for additional information about the Microsoft remote
tools: http://msdn.microsoft.com/en-us/library/aa935548.aspx
http://msdn.microsoft.com/en-us/library/aa935675.aspx

38 QTERM A7/A12 Windows Embedded CE


Application Development Software Drivers

6.3 Software Drivers

Software access and control of specialized hardware peripherals on the QTERM-A7/A12 are
provided through device driver and registry interfaces. These interfaces utilize the standard
Windows stream driver API (e.g., CreateFile, WriteFile, ReadFile and DeviceIoControl) and
registry access API (RegOpenKeyEx, RegQueryValueEx, etc.). Most QTERM-A7/A12
peripherals do not fit the typical model for stream devices that transfer large amounts of data,
thus the traditional operations like read and write are not supported. The primary access and
control mechanism is the DeviceIoControl function, which provides flexibility via custom
IOCTL codes. Refer to Microsoft documentation for a detailed description of the driver and
registry API functions.

The following sections outline the behavior, supported IOCTL codes and registry keys/values
for each peripheral.

IOCTL codes are described in the form of sample C code and in-line comments. The inputs
and outputs of each IOCTL are described. Sample calls are provided to illustrate proper usage
for each IOCTL. IOCTL defines and enumeration values for input and output parameters to
the DeviceIoControl function are described in the file qsiCE.h that is included in the software
development kit distribution (\Program Files\Windows CE Tools\wce600\QTERM-A7/A12\
Include\Armv4i\qsiCE.h). The sample code below references qsiCE.h as appropriate.

Registry keys/values are listed in a standard [key] “value” format. These keys/values may be
queried or set programmatically via the registry access API or by using a utility program like
RegEditCE.exe (refer to section 4.7.2, “Beijer Electronics” on page 24).

NOTE ☞ The code in the following sections is included “as is” for illustration purposes only. It is rec-
ommended that the application developer check the return value for success or failure of
device driver API calls.

6.3.1 Backlight

The backlight driver is responsible for enabling/disabling and setting the intensity levels of the
display backlight. You may control these operations programmatically or via a user interface.

The intensity of the display can be independently controlled via driver DeviceIoControl calls.
The QTERM-A7/A12 panel application also includes slider controls for these settings (refer to
section 4.2, “QPanel”).

The Windows CE power manager contains timers that can be used to enable power-down
and/or power-off modes for the display backlight after a specified time has elapsed. The
power-down and power-off modes correspond to User Idle and System Idle system power
states. Set timers for User Idle and System Idle state transitions via driver DeviceIoControl
calls, the QTERM-A7/A12 panel application (refer to section 4.2.4, “Power States” for more
information on QTERM-A7/A12 panel power state controls) or registry values.

QTERM A7/A12 Windows Embedded CE 39


Software Drivers Application Development

A transition to User Idle causes the display backlight to dim to the specified intensity. This
intensity level can be set via a DeviceIoControl call. Any user activity will cause the power
manager to transition out of User Idle to a full on state, and thus restore the prior backlight
intensity level. Examples of user activity are tapping the touch screen or using a USB mouse or
keyboard.

A transition to System Idle causes the display backlight and the LCD display to be disabled.
Any user activity will cause the power manager to transition out of System Idle to a full on
state, and thus restore the prior backlight intensity levels.

API, described via code examples:


HANDLE hDevice;
hDevice = CreateFile(TEXT("BLT1:"), GENERIC_READ, 0, NULL,
OPEN_EXISTING, 0, NULL);

// set/get backlight intensity


int intensity = 80; // 0 to 100%
DeviceIoControl(hDevice, IOCTL_BACKLIGHT_SET_INTENSITY,
&intensity, sizeof(intensity), NULL, 0, NULL, NULL);
DeviceIoControl(hDevice, IOCTL_BACKLIGHT_GET_INTENSITY,
NULL, 0, &intensity, sizeof(intensity), NULL, NULL);

// set or get the backlight power down or power off timeout value
int pwrTime; // seconds
// set power down (User Idle transition timer)
DeviceIoControl(hDevice, IOCTL_BACKLIGHT_SET_POWERDOWN,
&pwrTime, sizeof(pwrTime), NULL, 0, NULL, NULL);
DeviceIoControl(hDevice, IOCTL_BACKLIGHT_GET_POWERDOWN,
NULL, 0, &pwrTime, sizeof(pwrTime), NULL, NULL);
// set power off (System Idle transition timer)
DeviceIoControl(hDevice, IOCTL_BACKLIGHT_SET_POWEROFF,
&pwrTime, sizeof(pwrTime), NULL, 0, NULL, NULL);
DeviceIoControl(hDevice, IOCTL_BACKLIGHT_GET_POWEROFF,
NULL, 0, &pwrTime, sizeof(pwrTime), NULL, NULL);

CloseHandle(hDevice);

Example registry settings:


Following are the defaults.

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Backlight]
"BacklightIntensity"=dword:00000064 ; 100%
"BacklightPowerDownIntensity"=dword:2 ; 2% ; used for UserIdle

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\Timeouts]
"ACUserIdle"=dword:3C ; sec from last user activity 0x3c=60s
"ACSystemIdle"=dword:12C ; sec from start of UserIdle 0x12c=300s=5min

Changes to these registry settings take effect only after a reboot.

40 QTERM A7/A12 Windows Embedded CE


Application Development Software Drivers

6.3.2 Power

The Power Management driver can be used to control power state transitions for the
QTERM-A7/A12 system or for specific peripherals. User applications may use the Windows
CE Power Management API (e.g., the SetSystemPowerState, SetDevicePower and Device-
PowerNotify functions) to control and set system or device power states. The power states for
the system are specified via specific strings, for example, "useridle." The power states for
peripherals are specified with the Windows CE power state enumerations D0 – D4.

Refer to the Power Management functions documentation on MSDN


(http://msdn.microsoft.com/en-us/library/aa909892.aspx), the pm.h header file that is included
in the SDK (\Program Files\Windows CE Tools\wce600\QTERM-A7/A12\Include
\Armv4i\pm.h) and the CEDEVICE_POWER_STATE enumeration at
http://msdn.microsoft.com/en-us/library/bb201981.aspx.

The following table shows the available QTERM-A7/A12 system power states, specified as
both strings and enumerations (when available).

State Description
Full power mode. All peripherals fully powered and
“on”, enabled. The power manager may still cause the system to
POWER_STATE_ON transition to a low power idle mode during periods of
reduced and no activity.
Reduced/low power mode. Display backlight is dimmed.
“useridle”,
The QTERM-A7/A12 consumes about one-half the power
POWER_STATE_USERIDLE
required when in the “on” state.
Reduced/low power mode. LCD and display backlight are
“systemidle”,
disabled. The QTERM-A7/A12 consumes about one-third
POWER_STATE_IDLE
to one-half the power required when in the “on” state.
Not supported. Using this parameter with the SetSystem-
“suspend”, “resuming”,
PowerState function will have no effect and will return fail-
POWER_STATE_SUPEND
ure.
“off”, “shutdown”, Causes an orderly shutdown of the QTERM-A7/A12, fol-
POWER_STATE_OFF lowed by a soft reboot.
“reboot”, “coldreboot”, Causes an orderly shutdown of the QTERM-A7/A12, fol-
POWER_STATE_RESET lowed by a soft reboot.

The following are examples illustrating how to put the system and backlight, display and USB
peripheral devices into a specific power state.

// Be sure to check return values for Power Management functions


#include <pm.h>

#define BACKLIGHT_DEVICE_NAME PMCLASS_GENERIC_DEVICE TEXT("\\BLT1:")


#define DISPLAY_DEVICE_NAME PMCLASS_DISPLAY TEXT("\\zylonite_lcd")

QTERM A7/A12 Windows Embedded CE 41


Software Drivers Application Development

DWORD dwDummy;
CEDEVICE_POWER_STATE cps;
TCHAR buf[50];

/////////
// System

// Get system power state


GetSystemPowerState(buf, 50, &dwDummy);
// buf contains the current power state string, e.g. "on"

// Perform a soft reset using the Power Manager API


// These two calls do the same thing
SetSystemPowerState("reboot", 0, 0x0);
SetSystemPowerState(NULL, POWER_STATE_RESET, 0x0);

// Put the QTERM-A7/A12 system in the system idle state, then


// go back to the on state
SetSystemPowerState("systemidle", 0, 0x0);
SetSystemPowerState("on", 0, 0x0);

///////////////
// Peripherals
// Backlight
// cps will have the current state
GetDevicePower(BACKLIGHT_DEVICE_NAME, POWER_NAME, &cps)
// Set the backlight driver's power state to D2 "standby" state.
// The backlight is dimmed, but not off in D2
SetDevicePower(BACKLIGHT_DEVICE_NAME, POWER_NAME, D2);

// Display
// cps will have the current state
GetDevicePower(DISPLAY_DEVICE_NAME, POWER_NAME, &cps)
// Set the display driver's power state to D4 "off" state,
// which turns the display off.
SetDevicePower(DISPLAY_DEVICE_NAME, POWER_NAME, D4);

6.3.3 Serial Ports

Refer to the following MSDN website regarding programming serial connections for informa-
tion about and examples of the Windows CE serial port API:
http://msdn.microsoft.com/en-us/library/aa913128.aspx.

The serial port driver uses the stream driver interface. COM1, COM2 and COM5 drivers have
port names of COM1:, COM2: and COM5:, which can be passed to the CreateFile function to
open these ports. COM5 is a virtual COM port that is available when a USB-to-serial converter
is attached.

The MinTermCE.exe is a simple terminal program (refer to section 4.7.2) that can be used to
test communications over the QTERM-A7/A12 serial ports.

42 QTERM A7/A12 Windows Embedded CE


Application Development Software Drivers

6.3.4 Network

Windows CE provides a standard API called Winsock for programming with TCP/IP-based
network connections. Network connections are available for multiple interfaces and peripher-
als on the QTERM-A7/A12, such as built-in 10/100Base-T wired Ethernet, external
USB-to-wired Ethernet adapter and optional built-in WiFi adapter. Refer to section 4.1.6,
“Network and Dial-up Connections” and Chapter 7, “Optional Peripherals” for additional
information on these interfaces and peripherals.

Refer to the following MSDN articles for detailed information and programming reference for
the Winsock Windows CE API:
http://msdn.microsoft.com/en-us/library/aa926807.aspx
http://msdn.microsoft.com/en-us/library/aa925696.aspx

Refer to the following MSDN article for Winsock programming samples:


http://msdn.microsoft.com/en-us/library/aa916375.aspx

Following are some MSDN articles describing networking, connectivity and using sockets
with the .NET Compact Framework:
http://msdn.microsoft.com/en-us/library/8y3swehx.aspx
http://msdn.microsoft.com/en-us/library/b6xa24z5.aspx

QTERM A7/A12 Windows Embedded CE 43


Software Drivers Application Development

Notes

44 QTERM A7/A12 Windows Embedded CE


CHAPTER 7
OPTIONAL PERIPHERALS

7.1 USB

USB mass storage devices may be accessed programmatically via the standard C file I/O rou-
tines (e.g., fopen, fwrite, etc.) or the Windows API functions: CreateFile, ReadFile, WriteFile
and so on. Refer to the documents listed in section 6.1.2, “Related Documents” for more infor-
mation.

The USB-to-serial converter used for the ActiveSync connection described in Chapter 5,
“Connect to a PC Via ActiveSync” is an optional USB peripheral. This device uses an FTDI
chipset for the USB to serial conversion. The QTERM-A7/A12 includes driver support for this
chipset. USB-to-serial converters with other chipsets are not natively supported and will
require additional third-party Windows CE drivers. The standard COM port interface
described in section 6.3.3, “Serial Ports” can be used to interface with this device.

Many other optional USB device peripherals may be attached to the QTERM-A7/A12. Beijer
Electronics supports mass storage, USB-to-serial converter, keyboard/mouse human interface
and hub devices. Wireless Ethernet 802.11b/g WiFi adapters are also supported. Other devices
may be attached and used provided there are available Windows CE 6.0 USB class drivers that
will run on an ARM platform. APIs for these devices must be provided by a third party or from
custom drivers.

QTERM A7/A12 Windows Embedded CE 45


USB Optional Peripherals

Notes

46 QTERM A7/A12 Windows Embedded CE


CHAPTER 8
TECHNICAL SUPPORT

8.1 Software Upgrades

This section provides instructions to install future software releases for the QTERM-A7/A12.
You can obtain the latest releases of QTERM-A7/A12 firmware and Windows CE operating
system software from either of the following Beijer Electronics websites:

http://www.beijerelectronicsinc.com/support/files
http://www.beijerelectronicsinc.com/engfiles/QTERM-WINCE/Apps/UpgradeCE.html

A USB keyboard is required for the following upgrade operations.

8.1.1 Operating System

The QTERM-A7/A12 Windows CE-based operating system is contained in an image file


called NK.bin. This file is packaged along with several other files and directories to form a sys-
tem package distribution. The QTERM-A7/A12 has an internal flash-based hard drive that is
programmed at the factory with the system package distribution. Periodically, Beijer Electron-
ics creates new versions of the operating system image (NK.bin), other files/directories in the
distribution or the directory structure of the distribution. Revisions to any of these results in a
new release of the system package distribution. Upgrading the system package is the only way
to install new versions of items in the package, including the operating system image.

Beijer Electronics has developed an update and package manager application called
UpgradeCE.exe. This program can be used to upgrade the system package with updates from
the Beijer Electronics website, as well as to install custom application packages. One advan-
tage of using UpgradeCE.exe rather than a CAB file or other update/install method is that reg-
istry settings are preserved, even after installation of a new operating system image (normally,
installing a new NK.bin causes registry settings to revert to factory defaults).

For more information about CAB files and the wceload process refer to the following website:
http://msdn.microsoft.com/en-us/library/aa924383.aspx.

For detailed information about UpgradeCE.exe, refer to the following website:


http://www.beijerelectronicsinc.com/engfiles/QTERM-WINCE/Apps/UpgradeCE.html.

The WinVerCE.exe utility (refer to section 4.7.2, “Beijer Electronics” on page 24) can be used
to determine the current system package version. Run WinVerCE.exe from the Start Menu on
the QTERM-A7/A12 task bar in the Beijer Electronics shortcut folder. The “Project Version”
and “Build Date” fields indicate the version and build date of the system package, respectively
(see Figure 27). These fields are updated when a new version of the system package is
installed. “Kernel Version” refers to the Windows CE kernel version and license level.

QTERM A7/A12 Windows Embedded CE 47


Software Upgrades Technical Support

Figure 27
WinVerCE

To upgrade the QTERM-A7/A12 system package, take the following steps:

1. Download the latest system package zip file. This file is available from two locations on
the Beijer Electronics website: http://www.beijerelectronicsinc.com/support/files/ or
http://www.beijerelectronicsinc.com/engfiles/qterm-wince.php.
The latter includes previous images and other items for download in addition to the latest
system package zip file.
The zip file contains the latest version of UpgradeCE.exe, the system package distribution
and release notes.

NOTE ☞ Be sure to read the release notes for the system package distribution! It is important to be
aware of changes to the system that could potentially affect applications and general behavior
before upgrading. The release notes are located next to the zip file on the
http://www.beijerelectronicsinc.com/engfiles/qterm-wince.php website.

2. Unzip the system package zip file to a USB memory drive. Retain any directory structure.

3. Make sure the QTERM-A7/A12 is powered on and any applications are closed.

4. Insert the USB memory drive and attach a USB keyboard to the QTERM-A7/A12. Make
sure these are the only USB devices attached.

5. Open a command prompt window and type:


cd \usbharddisk
UpgradeCE

This will initiate the system package upgrade process. (Refer to Figure 28.) UpgradeCE
displays a status line for each file in the package, indicating whether that file is up-to-date
or needs to be updated. Larger files that need to be updated (e.g., NK.bin) will take longer
and display multiple status lines indicating copy progress.

48 QTERM A7/A12 Windows Embedded CE


Technical Support Software Upgrades

Figure 28
System Package Upgrade

6. Once complete, UpgradeCE will indicate success and ask for confirmation to reboot. (See
Figure 29.) Answer y or n. The installation is not complete and UpgradeCE is disabled for
further upgrades until after a reboot.

Figure 29
System Package Upgrade Complete

UpgradeCE will request a reboot only if files requiring an update are in use or if the
NK.bin operating system image needs to be updated. It is common for the NK.bin image to
require updating in system package upgrades.

7. After rebooting the QTERM-A7/A12, run the WinVerCE.exe program to verify that the
system package was successfully upgraded.

QTERM A7/A12 Windows Embedded CE 49


Software Upgrades Technical Support

8.1.2 Bootloader

IMPORTANT ☞ This procedure should not be attempted without the guidance of a Beijer Electronics technical
support engineer and could render the QTERM-A7/A12 nonfunctional if done improperly.

The QTERM-A7/A12 bootloader upgrade procedure involves reprogramming an internal


NOR flash device with a 16 Mbyte binary image file. The image file contains both the boot-
loader for the Windows CE kernel as well as a Windows CE recovery image (also referred to
as the SOS—Small Operating System—image). A Windows CE utility provided by Beijer
Electronics can be used to upgrade the image file, according to the following procedure.

1. Obtain the latest bootloader image file and update utility from Beijer Electronics technical
support (http://www.beijerelectronicsinc.com/support/contact/?type=tech).

2. Copy the image file and update utility files to a blank USB memory drive.

3. Open a command prompt window and type:


cd \usbharddisk
NorImage \usbharddisk\<image file name>

4. Wait for the upgrade to finish. It should take several minutes to complete.

NOTE ☞ Do not interrupt this process or your device may be rendered nonfunctional.

Figure 30 shows an example upgrade procedure.

Figure 30
Bootloader Upgrade Procedure

5. Reboot for the new image to take effect.

6. Verify that the new image has been programmed by loading the recovery Windows CE
image and executing \HardDisk\bin\WinVerCE.exe (refer to section 8.2, “System Backup
and Recovery” for the procedure for booting to the recovery image). This program dis-
plays the recovery image version. Note that this version does not necessarily match the
bootloader image file version.

50 QTERM A7/A12 Windows Embedded CE


Technical Support System Backup and Recovery

8.2 System Backup and Recovery

The QTERM-A7/A12 contains a special recovery image known as the SOS (Small Operating
System) image. This is a stripped down version of the main Windows CE operating system. It
is loaded into a separate non-volatile flash location (NOR flash) to reduce its susceptibility to
corruption-causing events and to provide a method for administering the main non-volatile
storage (NAND flash). The SOS Windows CE image can access, but does not use or depend
on, the NAND flash storage (where the main Windows CE image is stored). The SOS image
also provides access to inserted USB memory devices (similar to the main image). Thus the
SOS image allows for backing up the NAND flash storage to a USB device as well as restoring
the NAND flash storage from a USB device.

If the main Windows CE operating system (or any other system critical file that prevents
proper booting) becomes corrupted, you will be able to access and repair the corruption by
booting to the recovery image. In addition, if the bootloader detects a boot failure of the main
operating system image due to a corruption, it will automatically boot the recovery image.

1. Remove power from the QTERM-A7/A12.

2. Connect a null-modem serial cable between com port 2 of the QTERM-A7/A12 and a
desktop PC.

3. Use a terminal type program on the desktop PC to send a stream of upper case “I” charac-
ters to the QTERM-A7/A12.

4. Connect power to the QTERM-A7/A12 while continuing to send the upper case “I” char-
acters.

5. Press the [L] key to boot to the SOS image or recovery image.

The QTERM-A7/A12 will return the following to the console of the terminal program:

Microsoft Windows CE Bootloader Common Library Version 1.4 Built May 14 2010 11:56:04
Microsoft Windows CE Ethernet Bootloader 1.8 for the QSI QTerm-A7/A12 Platform - Built May 14 2010
AutoBootDelay - 0x00000003

Press [ENTER] to download now or [SPACE] to cancel.

Initiating image download in 2 seconds.

Press the [SPACE] key to continue to the bootloader menu. Press the [L] key to boot to the SOS
image

The SOS image will always boot to the touch screen calibration screen, even if it has been cal-
ibrated on a previous boot. This is because the SOS maintains no persistent registry (or other)
information. Calibrate the touch screen to proceed to the recovery image desktop (see Figure
31). Press [ESC] on a USB keyboard to bypass the touch calibration screen.

QTERM A7/A12 Windows Embedded CE 51


System Backup and Recovery Technical Support

Figure 31
Recovery Image Desktop

The Windows CE display color scheme for the recovery image is high contrast with a white
background to help distinguish the recovery from the main image. The Windows Explorer
view options have also been set to show hidden files in order to aid backup operations (see Fig-
ure 32).

Figure 32
Windows Explorer View Options

52 QTERM A7/A12 Windows Embedded CE


Technical Support System Backup and Recovery

To back up the NAND flash storage, take the following steps.

1. Boot to the recovery image and calibrate the touch screen.

2. Insert an empty USB memory drive and verify that USBHardDisk appears in Windows
Explorer.

3. Ensure that the Windows Explorer view options have been set as shown in Figure 32.

4. Use Windows Explorer to select and copy all of the files from \HardDisk and paste to
\USBHardDisk. Figure 33 illustrates the select and copy operation.

Figure 33
Select and Copy Operation

To restore the NAND flash storage, take the following steps.

1. Insert a USB memory drive that contains files generated from the backup procedure
(described above).

2. Verify that USBHardDisk appears in Windows Explorer and that its contents are the main
storage backup files (e.g., NK.bin, system.hv and other files).

3. Ensure that the Windows Explorer view options have been set as shown in Figure 32.

4. Use Windows Explorer to select and delete all files from \HardDisk.

5. Optional step: Use the Storage Manager, Control Panel applet to administer the NAND
flash storage. The flash may be reformatted, scanned and/or defragmented with this Win-

QTERM A7/A12 Windows Embedded CE 53


System Backup and Recovery Technical Support

dows CE utility to help treat corruption of the file system tables. Incorrect file sizes and
remaining free space are two indications of this kind of corruption. Refer to section 4.1.7,
“Storage Manager” for more details.

6. Copy all files and directories from \USBHardDisk and paste to \HardDisk.

7. Reboot and verify that the main image boots and loads the correct application.

8. Recalibrate the touch screen using the Stylus, Control Panel applet (refer to
section 4.1.1.2, “Recalibrate”). This is necessary because the NAND flash backup files
may have been obtained from a different QTERM-A7/A12. Each QTERM-A7/A12 touch
screen requires custom calibration, thus the correct calibration data must be regenerated
for the unit being restored.

NOTE ☞ Beijer Electronics recommends creating a backup copy of the NAND flash storage using this
procedure after end user applications are installed and configured. This will reduce time and
effort spent trying to restore units that encounter corruption issues.

54 QTERM A7/A12 Windows Embedded CE

You might also like