65
Programming Instructions ACD Windows CE Second Edition Devices Version: 3.00 © Copyright ACD Gruppe This document may not be duplicated or made accessible to third parties without permission.

WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

Programming Instructions ACD Windows CE Second Edition Devices Version: 3.00

© Copyright ACD Gruppe

This document may not be duplicated or made accessible to third parties without permission.

Page 2: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 2 / 65

Contents

Contents ............................................................................................................. 2

1 Overview ...................................................................................................... 4

1.1 Windows CE on ACD devices .................................................................................... 4 1.1.1 Flash memory ............................................................................................................. 6 1.1.2 The RAM memory ....................................................................................................... 6 1.1.3 Distinction between volatile / permanent memory ....................................................... 6 1.1.4 System startup ............................................................................................................ 7

1.2 ACD functions ............................................................................................................. 8 1.2.1 Status bar (DevCtl.exe) ............................................................................................... 8 1.2.2 System library acddev.dll ............................................................................................ 9

1.3 Overview of ACD Windows CE devices ................................................................... 10

2 Mobile Device Centre ................................................................................. 11

2.1 Versions .................................................................................................................... 11 2.2 Partnerships .............................................................................................................. 12 2.3 ActiveSync registry entries........................................................................................ 12 2.4 RAPI functions .......................................................................................................... 13

3 C++ programming with Visual Studio ......................................................... 14

3.1 SDK – Software Development Kits for ACD devices ................................................ 14 3.1.1 Installation ................................................................................................................. 14

3.2 Creating a project ...................................................................................................... 14 3.3 Generating codes and debugging ............................................................................. 16

3.3.1 Project subfolder ....................................................................................................... 16 3.4 Notes, recommendations, advice ............................................................................. 17

3.4.1 General ..................................................................................................................... 17 3.4.2 Unicode is standard .................................................................................................. 17 3.4.3 Defining the Windows CE version ............................................................................. 18

4 C# programming with Visual Studio ........................................................... 19

4.1 Installation ................................................................................................................. 19 4.2 Creating a project ...................................................................................................... 19 4.3 Deployment ............................................................................................................... 20 4.4 Generating codes and debugging ............................................................................. 20

4.4.1 Project subfolder ....................................................................................................... 21 4.4.2 DeveloperPack .......................................................................................................... 21 4.4.2.1 Versions .................................................................................................................... 22 4.4.2.2 Reference sources .................................................................................................... 22 4.4.2.3 Examples .................................................................................................................. 22

5 Important software interfaces and device functions ................................... 23

5.1 Startup process and autostart options ...................................................................... 23 5.1.1 ACDInit.bat ................................................................................................................ 23 5.1.2 STARTUP.BAT ......................................................................................................... 23 5.1.3 AutoApp.bat / AutoApp.exe ....................................................................................... 23 5.1.4 STARTUP configuration ............................................................................................ 24

5.2 Device API ................................................................................................................ 24 5.3 Battery functions ....................................................................................................... 25 5.4 Power management .................................................................................................. 26 5.5 Display and backlight ................................................................................................ 26 5.6 Keyboard ................................................................................................................... 27 5.7 Scanner module ........................................................................................................ 28

Scanner types ........................................................................................................................ 28 ScanDrv scanner driver ......................................................................................................... 28 Types of use for the scanner module .................................................................................... 28 5.7.1 Internal and external scan data insertion .................................................................. 29 5.7.1.1 Inserting data from the internal scanner (ScanDrv) ................................................... 29 5.7.1.2 Inserting data of an external scanner (ExtScan2KeyCE) .......................................... 29 5.7.1.3 Basic initialisation of an external scanner ................................................................. 30 5.7.1.4 Closing ExtScan2KeyCE ........................................................................................... 30

Page 3: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 3 / 65

5.7.2 How to use the scanner API ...................................................................................... 30 5.7.2.1 Scanner DLLs on the Windows CE devices .............................................................. 30 5.7.2.2 Triggering a scan from the application ...................................................................... 31 5.7.2.3 The callback function ................................................................................................ 31 5.7.2.4 ScanDrv functional scheme on M2xxSE devices ...................................................... 32

5.8 RFID .......................................................................................................................... 33 5.8.1 RFID types ................................................................................................................ 33 5.8.2 How to use the RFID module .................................................................................... 33 5.8.3 Sequence programming with DLL RFIDApi .............................................................. 33 5.8.4 Example program ...................................................................................................... 36

5.9 WLAN and Ethernet .................................................................................................. 40 5.9.1 ndisconfig .................................................................................................................. 40

5.10 Internet Explorer for Windows CE ............................................................................ 41 5.10.1 Internet Explorer 6 characteristics for Windows CE .................................................. 41 5.10.2 IE6 browser characteristics for Windows CE............................................................. 42 5.10.3 Internet Explorer 6 architecture ................................................................................. 43 5.10.4 IESample or IESimple ............................................................................................... 43 5.10.5 JScript ....................................................................................................................... 44

6 Managing ACD devices .............................................................................. 45

6.1 Updating the system ................................................................................................. 45 6.1.1 Updating system components ................................................................................... 45 6.1.2 Updating the device firmware .................................................................................... 46 6.1.2.1 How to check the firmware version ........................................................................... 46 6.1.2.2 Firmware update requirements ................................................................................. 46 6.1.2.3 Step-by-step installation (automatic sequence) ......................................................... 47 6.1.2.4 Replacing the boot loader ......................................................................................... 50 6.1.2.5 Replacing the boot bitmap......................................................................................... 50 6.1.2.6 Updating the flash disk .............................................................................................. 50 6.1.2.7 Updating the keyboard controller and PLD................................................................ 50

6.2 Generating and rendering links ................................................................................. 51 6.2.1 Manually creating links .............................................................................................. 51 6.2.2 Creating links in the program .................................................................................... 51 6.2.3 Creating links with an editor ...................................................................................... 52 6.2.4 Restoring links on device boot .................................................................................. 52

6.3 Installing software ..................................................................................................... 53 6.3.1 Installing from the IDE by the programmer ................................................................ 53 6.3.2 xcopy installation ....................................................................................................... 53 6.3.3 Program update / installation when booting .............................................................. 53 6.3.4 Installing with CAB files ............................................................................................. 54 6.3.4.1 Manual CAB file installation....................................................................................... 54 6.3.4.2 CAB file installation via the MobileDeviceCentre ....................................................... 54 6.3.4.3 CAB file installation when booting ............................................................................. 55

6.4 FTP server / client ..................................................................................................... 56 6.4.1 FTP server service (Windows CE device as server) ................................................. 56 6.4.1.1 Avoiding display problems with file names in Total Commander ............................... 56 6.4.1.2 Setting the password ................................................................................................. 56 6.4.1.3 Setting the root directory and other parameters ........................................................ 57 6.4.1.4 Software update with CE proprietary FTP servers .................................................... 57 6.4.2 FTP client function (Windows CE device as client) ................................................... 58 6.4.2.1 Software update with CE proprietary FTP client script .............................................. 60

6.5 Customising the startup screen ................................................................................ 61 6.6 ACD assistant programs ........................................................................................... 62

6.6.1 CEToolBox – collection of tools................................................................................. 62

Page 4: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 4 / 65

1 Overview This document is a manual designed for programmers, system administrators and configurators of ACD Windows CE devices. It is intended to provide an insight into the functionality and features of these devices and is the first source of information for questions on programming, configuration and administration. Due to the complexity of today’s operating systems and their programming, this document cannot provide an in-depth insight into all components. Separate documentation is available for certain topics. Reference to this documentation will be made in the text. The relevant documentation is available from ACD on request or can be found on the separately available development CD.

1.1 Windows CE on ACD devices Windows CE in version 6.0 is currently installed on all mobile ACD handheld devices from the second edition. Compact Framework 3.5 is available for the development of managed .NET applications:

Device Windows CE .NET Compact Framework

M210SE Windows CE 6.0 CF 3.5

M215SE Windows CE 6.0 CF 3.5

M260SE Windows CE 6.0 CF 3.5

Table 1 – Windows CE devices

To facilitate understanding, the standard Windows CE terminology is used consistently throughout the document.

Page 5: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 5 / 65

Windows CE is a configurable set of OS components that are compiled and compressed into a monolithic kernel. The OS components was configured when Windows CE was installed and changes can usually only be done by configuring the included separate software packs. On ACD devices, this scheme is not as strikt. The subsequent installation of user software and device drivers is allowed in this case. This significantly increases the flexibility of an individual, well-tested basic configuration.

Alongside the basic kernel, an ACD Windows CE device includes other components that are also relevant for software development (see diagram below). The kernel also includes system programs and certain drivers stored on a flash file system (\flashdisk\system folder and \flashdisk\drivers folder). Some of the devices also feature a microcontroller module (keyboard controller) and programmable logic gate (PLD). These devices have been programmed by ACD accordingly and can be automatically updated on request with a system update.

ACD Windows CE devices feature a processor module and the connected peripherals. The processor module is configured with a processor with ARM technology. On second edition devices, this is a Marvell/Intel processor of type PXA166 (XScale). Peripherals also include RAM and non-volatile flash memory.

���� Note

Despite its similar name, Windows Embedded Compact (Windows CE) has technically nothing in common with the desktop operating system offspring Windows Embedded Standard/Enterprise. With the exception of certain basic .NET programs, native desktop programs cannot run on Windows CE. From a programmer’s perspective, although Win32 APIs are extremely similar in their configuration, minor differences can significantly increase the time required for a potential conversion to Windows CE.

Page 6: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 6 / 65

1.1.1 Flash memory The flash memory stores all data that should be preserved when the device is powered down. The flash memory is designed as a combination of two flash chips (Intel) with a total capacity of 512 MB.

1.1.2 The RAM memory RAM technology is installed on the processor module as an internal memory. The RAM is divided into several areas: Kernel program code This is where the kernel code is stored that is extracted by the flash when the device is booted. The system’s response speed is therefore faster because the RAM (instead of the flash) is used to execute the kernel. Registry The registry occupies a small space on the RAM. It is used during system runtime and can be persisted triggered by Start�Programs�SysTools�Save Registry. Without persisting the registry, changes made during runtime will be lost. This significantly improves the stability of the entire system. Storage Memory This RAM area is allocated for volatile file storage. It is stored as a file system layer on directories defined specifically for the device (see Chapter 1.1.3). Program Memory Internal memory that can be used by programs. Program memory works like the RAM on desktop PCs.

1.1.3 Distinction between volatile / permanent memo ry

Device Directory characteristics

M210SE

M215SE

M260SE

All directories are permanent except:

• \tmp

Table 2 – Directory characteristics

���� Note

To set the division between storage memory and program memory, go to Start�Settings�Control Panel�System�Memory. The change cannot be persisted by saving the registry. Go to Start�Programs�ACD�StartConfig and with the System memory division option define the amount of storage memory that should be automatically allocated when the device is booted (in KB).

Page 7: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 7 / 65

1.1.4 System startup After switching on the device, the keyboard controller activates the voltage supply of the processor module. The steps described below are then executed. a) Starting the boot loader The boot loader initializes the registry and sets internal processor states. The boot loader searches for boot scripts (autoboot.bat) on the (optionally integrated) SD card and on locating a script, it will execute the script. If it does not find an SD card, it executes the processor module’s autoboot.dat saved in the NAND flash. b) Setting the display parameters and displaying th e boot image The autoboot.bat boot script in the CPU module NAND flash copies the display parameters to the processor in a command line sequence and activates the display output. A boot image (boot.bmp) is part of the file set for the SD card and is installed into the NAND memory when the OS is flashed so that it can load the boot script with a regular start. The image is displayed during the rest of the booting process. c) Loading and starting the OS kernel The NAND boot script file autoboot.bat then extracts the nk.nb0 kernel into the RAM memory. The entry point of the CE kernel is initiated and Windows CE initialises. In the memory division of the persistent registry , a search starts for a valid registry signature. If this signature is found, the data is copied to the RAM and used as the current registry. Changes are not copied automatically back into the flash; this process has to be initialised explicitly (“Save Registry”). If no valid registry is found, the default registry saved in the OS image is used instead. Windows creates a ROM file system where the Windows files are mirrored. It is also possible here to create other files in the file system that are then stored in the persistent flash file system . Drivers for Windows (e.g. snmp), that are to be integrated later by the monolithic kernel, can be stored in the \windows or \flashdisk\drivers folders. d) Launching ACD system services After initialisation, the kernel launches some ACD system programs. These are saved persistently in the memory (e.g. the “status bar” or the scanner data insertion). A dynamic start screen (GuiCmd) visualises the startup and automatically hides the desktop until the user program is fully initialised (see also Chapter 6.5) so that users cannot access the system during startup. The StartConfig tool is used to define which functions are available in the device (see the administration documentation). Shortly after startup, important system parameters are displayed on the desktop to quickly guide users through the OS.

Page 8: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 8 / 65

e) Launching user programs User programs are launched at the end of the boot sequence with a customised batch \flashdisk\autoapp.bat if this was configured in StartConfig. Info: The autoapp.bat file is copied into the \flashdisk folder once the production process has been completed successfully; the source is saved in \flashdisk\system\sysprep\custom. A template to create the autoboot.bat file is also stored in this folder.

1.2 ACD functions Once the kernel and device drivers have booted, an executable CE device is ready for use. Various components such as the scanner or keypad require other system services as either libraries or applications. These files are located in the directory \flashdisk\system.

1.2.1 Status bar (DevCtl.exe) You can access central services from the \flashdisk\system\devctl.exe file (“status bar”). The file launches automatically immediately after booting. It is responsible for:

• Evaluating the battery status

• Evaluating and processing keyboard events

• Processing and coordinating application messages with suspend and shutdown

• Providing device information (version information, device names, serial numbers, power statuses etc.)

• Setting the display brightness

• Managing power save mechanisms (display dimming)

• Displaying the status bar with battery icon and clock at the bottom of the screen Various status bar settings options can be defined in the configuration file \flashdisk\system\ini\dev.ini and Windows Messages:

- Hide / show option - Position - Battery status

o Charging / discharging o Battery level status

- Clock o Hours / minutes o Seconds (optional)

- User-defined text o Background colour o Position o Size o Font o Font colour o Normal / bold o Flashing o Acoustic signal simultaneously to the text flashing

The status bar can access the functions of the central system library acddev.dll.

Page 9: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 9 / 65

1.2.2 System library acddev.dll acddev.dll is located in \flashdisk\system. It pools together important basic functions that are used by the status bar (see 1.2.1). These are available to other user programs. To use the system library, the developer CD contains various interfaces for native applications as well as managed .NET applications. They include the following functions

• Battery level indicator and status

• Keyboard, alphabetic key, keylock handling, keyboard mapping

• Display lighting, brightness, dimming behaviour

• Device, version, serial number information

• Interaction option before suspend and shutdown

• Notification prompts with battery statuses, suspend / shutdown, scanner / RFID keystrokes

• Text option in the status bar

• Simplified registry and INI file processing functions Some of the acddev functions are provided for batch programming with tools such as the CEToolBox.

Page 10: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 10 / 65

1.3 Overview of ACD Windows CE devices

M210SE M260SE M215SE

Description Mobile data terminal with integrated scanner, touchscreen and numeric keypad.

Handheld terminal based on M210SE with integrated camera and long-range sensor.

System Windows CE 6.0

.NET-Version Compact Framework 3.5

Display TFT-Display 3,5’’ 240 x 320 pixels

Processor Intel XScale PXA166 / 800 MHz

Memory 512 MB Flash 256 MB DDR-RAM

Larger memory optionally available (SD card)

Scanner 1D scanner, optional 2D or long-range scanner -

Interfaces IrDA

- IrDA

USB Host / Slave

USB OTG USB Host / Slave

WLAN according to IEEE 802.11abg

3D acceleration sensor

optional: SD card

RFID Bluetooth

GSM UMTS

Table 3 – Device overview

Page 11: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 11 / 65

2 Mobile Device Centre

2.1 Versions The Windows Mobile Device Centre (previously known as ActiveSync) is an application for data exchange, deployment and debugging of the device. It is also used as a communication protocol to contact development environments Visual Studio 2005 / 2008.. The PC software required is available free of charge from Microsoft as a download.

If Visual Studio 2005 / 2008 is used for development, an ActiveSync version from 4.0 upwards or the Windows Mobile Device Centre must be installed. Parallel installation is not supported. From Windows Vista / Windows 7 upwards, the Windows Device Centre must be used instead of ActiveSync.

���� Note

The first time you connect an MDT device to a Windows 7 PC, you will need an Internet connection to download drivers even if the Windows Mobile Device Centre has already been installed. Due to today’s restrictions in enterprise LAN’s, the downloading of the driver will probably fail. Solution: Depending on the system, one of the two installation packs below must be installed: Windows Mobile Device Centre 6.1 for Windows Vista (32-bit) or Windows Mobile Device Centre 6.1 for Windows Vista (64-bit)

���� Note

On the Windows Mobile Device Centre and ActiveSync versions from 4.0 upwards, it is no longer possible to sync devices via network / WLAN and this function has been replaced by Bluetooth / USB synchronisation.

���� Note

Although network / WLAN synchronisation is no longer supported, it is still possible to upload programs and execute remote debugging over network / WLAN. When you open a project, the project must be uploaded once via a Windows Device Centre connection. If this connection is interrupted, the debugging session continues over network / WLAN and a socket connection. The Windows Device Centre connection must not be active.

Page 12: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 12 / 65

2.2 Partnerships The first time a Windows CE device is connected to a PC, a dialogue box opens on the PC screen where the user can choose to install a guest connection or a partnership between both devices. This is repeated every time the device attempts to connect to the PC if a partnership has not been created between both devices. If the Guest option is selected, the Device Centre / ActiveSync window appears on the screen. Click the Search button or File�Menu�Search to open an Explorer-like window to enable remote access to the folders and files on the Windows CE device. This connection allows you to transfer data in both directions. File syncing between both devices is not supported. If the Partnership option is selected, you must enter a unique name for the device. This will replace the device name on the Windows CE device. Another dialogue box will then appear. In this box, confirm whether the device can enter a partnership with another PC. Another window then appears containing checkboxes to select which types of information should be synced. It is generally recommended to disable all checkboxes. This step completes the configuration. The selected types of information and files are then synced between both devices. You can persistently save the partnership you have installed in the registry on the Windows CE device: Start�Programs�SysTools�Save Registry. When you now attempt to establish other connections, both devices and the time will be synced.

2.3 ActiveSync registry entries Registry entries can influence the response behaviour of ActiveSync on the PC as well as on the Windows CE devices. The entries in the registry can be viewed in the Microsoft Developer Network (see also http://msdn2.microsoft.com). You will find below a description of certain entries selected for the PC. In most cases, it is unnecessary to install a partnership :

• If syncing is not required.

• If no network/WLAN connection is required or available.

• With serial devices for end customers rather than programmer devices.

In these cases, a prompt to establish a partnership or guest connection can disrupt users. This prompt can be disabled with an entry in the registry.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE S ervices] "GuestOnly"=dword:00000001

Page 13: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 13 / 65

To autostart programs when connecting and disconnecting devices, two entries are added to the registry. Examples: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE\S ervices\ AutoStartOnConnect] "GetData"="X:\\Tools\\GetData.exe X:\\Data" "PutUpdate"="X:\\Tools\\PutUpdate.exe X:\\Update\\ Update.CAB"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE\ Services\ AutoStartOnDisconnect] "HandleData"="X:\\Tools\\HandleData.exe X:\\Data" As you can see, it is possible to enter several programs. This option also enables users to call up programs that use RAPI functions to access the connected Windows CE device from the PC.

2.4 RAPI functions When the Windows CE device is connected to the PC, remote API functions are used by the program running on the PC to directly access the Windows CE device. To do this, open Remote Procedure Calls on the device. This allows access to the registry, the file system and to the device’s databases. RAPI functions can be used to:

• Change the registry entries for device configuration

• Receive data recorded on the device

• Upload program and data updates

• Sync databases on the device and PC For more information, consult the Microsoft Developer Network (MSDN).

Page 14: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 14 / 65

3 C++ programming with Visual Studio

3.1 SDK – Software Development Kits for ACD devices SDKs define the functionality of the custom-compiled CE kernel installed on the CE devices. They are provided separately by ACD according to the Windows CE / device classes.

3.1.1 Installation All the required SDKs are available on the ACD developer CD . A distinction is made between Windows CE 5 / 6 and ACD device (SE / non-SE). Make sure during installation that the installation file is installed locally on the PC with administrator rights . If you install SDKs without assigning administrator rights, this will not necessarily prompt error messages yet the SDK cannot be integrated into Visual Studio. As a rule, Visual Studio should be programmed to run with administrator rights only in order to avoid unnecessary side effects caused by unauthorised events that could result in incorrect debugging behaviour.

3.2 Creating a project This chapter outlines the steps involved in creating a new project. The integrated Help functions also provide separate descriptions of IDE. Launch IDE and create a new project:

Select Smart Device project type and template, e.g. MFC Application:

Page 15: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 15 / 65

Once you have selected the project template, a wizard assistant will open to help you configure the project. In the wizard, first select the target platform. You can also add the ACD SDKs to the project.

Once you have configured the project settings, press Finish to generate the project. In the developer bar, select the binary you want to generate (Debug / Release) and the target SDK.

Page 16: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 16 / 65

3.3 Generating codes and debugging A Windows Mobile Device Centre / ActiveSync connection is required between the developer PC and device for the remote debugging of a program (see Chapter 2). In the menu, select Build � Build Solution (Ctrl + Shift + B) to compile and create the application. If the program is compiled and linked without any errors, it can then be transferred to the device with Build � Deploy Solution. Select the Debug � Start Debugging (F5) menu to check the application, transfer it to the device and then execute it. Similar to desktop PC applications, these applications also provide debugging tools (breakpoints, variables view / memory view, etc.). Click the relevant icon on the developer bar to also launch these functions.

No more information will be provided in this manual on the other IDE modules and debugging function. Basic information can be found in the articles on the Microsoft homepage or in the IDE Help (F1).

3.3.1 Project subfolder A separate directory is created in the project directory for each SDK you select. This subfolder is divided further into Debug and Release:

• \ACD_TR6CE6_M210SE_2013Q3 (ARMV4I)\Debug

• \ACD_TR6CE6_M210SE_2013Q3 (ARMV4I)\Release

The generated programs and / or DLLs as well as temporary Visual Studio files are saved in these subfolders.

Page 17: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 17 / 65

3.4 Notes, recommendations, advice

3.4.1 General The kernels of Windows CE differ significantly from those of Desktop-Windows operating systems. The functionalities differ, many functions are missing, react differently or are only partly installed. This is particularly worth remembering when calculating the time and effort involved.

3.4.2 Unicode is standard Under Windows CE, function parameters are defined as Unicode (two bytes) in the Win32 API. This also applies to standard text characters. The well-known ANSI string functions are (usually) not added directly; wide char alternatives are used instead. Examples: CHAR � WCHAR strcpy � wcscpy A compiler-dependent alternative is to use functions with the prefix _t. Example: _tcscpy , TCHAR (depending on the platform, this is replaced with ANSI or Unicode). A range of conversion functions are also available between Unicode and ANSI:

Function Description

wcstombs() Converts wide character string into multibyte string.

mbstowcs() Converts multibyte string into wide character string.

WideCharToMultiByte() Converts wide character string into multibyte string.

MultiByteToWideChar() Converts multibyte string into wide character string.

Table 4 – Unicode conversion

���� Note

In theory, the emulator is a useful tool to develop and test a program. However in practice, this is only partly the case as the emulator does not store the hardware and peripherals of the target devices. One example here includes the integrated scanner on mobile devices.

ACD recommends explicitly programming the target devices (ARMV4I) and testing the software by remote debugging on a developer device. • It takes only marginally longer to load a program to a device over WLAN, LAN

or USB as it does to load it onto the emulator.

• Any compiling work is usually avoided.

• The device hardware is also included in the program test.

• The finished program has been tested more effectively.

Page 18: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 18 / 65

3.4.3 Defining the Windows CE version To compile CE to be platform dependent, this or a similar define block can be added. #if _WIN32_WCE < 0x600 // Windows CE 5.0 #else // Windows CE 6.0 #endif If the CE version is to be defined in runtime, suitable Windows API functions are available such as GetVersionEx() .

Page 19: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 19 / 65

4 C# programming with Visual Studio Mobile applications for second edition Windows CE devices can be programmed with Visual Studio 2008.

- Visual Studio 2008 Compact Framework 3.5 (recommended) Compact Framework 2.0 (not recommended)

The application is transferred and executed (remote debugging) automatically by the Windows Mobile Device Centre / ActiveSync (see Chapter 2).

4.1 Installation

It is recommended to install the latest patches and service packs onto the developer PC to ensure that the most recent libraries are used.

Compact Framework 3.5: http://www.microsoft.com/downloads/de-de/details.as px?FamilyID=E497988A-C93A-404C-B161-3A0B323DCE24

Compact Framework 2.0: http://www.microsoft.com/downloads/de-de/details.as px?FamilyID=aea55f2f-07b5-4a8c-8a44-b4e1b196d5c0

4.2 Creating a project This chapter outlines the steps involved in creating a new project. The integrated Help functions also provide separate descriptions of IDE. Launch IDE and create a new project:

Click Smart Device project type and template, Smart Device Project:

Page 20: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 20 / 65

Once you have selected the project template, select the project type and the target framework (Compact Framework 3.5 / 2.0).

Then click OK to generate the project.

4.3 Deployment In the project settings (right-click Project � Properties), go to Devices to configure the deployment settings. Output file folder Define here the directory on the device where the application should be automatically copied to by Visual Studio after compilation. Deploy the latest version of the .NET Compact Frame work Deactivate this option as the second edition ACD devices are configured by default with a relevant version of .NET Compact Framework 3.5. If you enable this option, the .NET Compact Framework (3.5 or 2.0) you selected when you created the project is installed every time you reboot the device. This can lead to longer waiting times. This can also have the effect that the developer and rollout versions differ. If you have to use .NET Compact Framework 2.0, you must ensure that the correct CAB file is installed afterwards on all devices.

4.4 Generating codes and debugging A Windows Mobile Device Centre / ActiveSync connection is required between the developer PC and device for the remote debugging of a program (see Chapter 2). In the menu, select Build � Build Solution (Ctrl + Shift + B) to compile and create the application. If the program is compiled and linked without any errors, it can then be transferred to the device with Build � Deploy Solution. Select the Debug � Start Debugging (F5) menu to check the application, transfer it to the device and then execute it. Similar to desktop PC applications, these applications also provide debugging tools (breakpoints, variables view, etc.).

Page 21: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 21 / 65

Click the relevant icon on the developer bar to also launch these functions.

No more information will be provided in this manual on the other IDE modules and debugging function. Basic information can be found in the articles on the Microsoft homepage or in the IDE Help (F1).

4.4.1 Project subfolder A separate debug and release directory is created in the project directory under /bin:

• \bin\Debug

• \bin\Release

The generated programs and / or DLLs as well as temporary Visual Studio files are saved in these subfolders. When archiving your projects, you can comfortably delete some of the /obj directory contents (that can become extremely large) as it only contains temporary files.

4.4.2 DeveloperPack The DeveloperPack is a collection of various libraries with custom-developed DLLs for the mobile data terminals from ACD Elektronik GmbH. The libraries contain various interfaces for example for requesting system information or for managing device parameters. It also contains an advanced set of graphical user interfaces. The DeveloperPack is designed as an extension to the reduced functionality of .NET Compact Framework and is intended as a comfortable and easy-to-use platform from which users can implement device functions. The libraries have a hierarchical structure divided into various categories. The diagram below provides a map of the DeveloperPack:

Page 22: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 22 / 65

Below is a minimalist example of certain graphical user interfaces from the DeveloperPack.

To use the relevant DLL, this must be added to the project as a reference: Solution Explorer � References � Add Reference...

4.4.2.1 Versions The DeveloperPack is available for Compact Framework 3.5 as well as for Compact Framework 2.0.

4.4.2.2 Reference sources The DeveloperPack is saved on the ACD developer CD. It can however be obtained directly from the ACD development department by your contact.

4.4.2.3 Examples The ACD developer CD contains a compilation of various sample applications for various applications with the appropriate source code.

Page 23: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 23 / 65

5 Important software interfaces and device functio ns This chapter outlines which software mechanisms are available in ACD devices. It also provides programmers and system administrators with advice on what they need to know and remember to create secure applications for ACD devices.

5.1 Startup process and autostart options The individual sequences of the startup process are described below, focusing on the relevant startup files. The sequence of start batches are presented below in detail:

5.1.1 ACDInit.bat

Once the Windows CE kernel has booted, the \Flashdisk\System\ACDInit.bat batch file is launched automatically. In case the registry was previously reset at first start, the default registry settings will be restored. Also changes in content of the four folders app, cfg, DRV and sys in the path \ Flash Disk \ System \ Reg leads to same result. In either case the default REG-files will be imported and stored persistently in the registry. . If available, the update batch files UpdateCE.bat (applications) and Sysupdate.bat (system components) are also called from ACDinit.bat. If the ’abort startup’ key combination is pressed during booting, startup will be aborted.

5.1.2 STARTUP.BAT

\Flashdisk\System\Startup.bat contains all program calls that are initiated in the startup by the Start�Programs�ACD�StartConfig configuration program. It also includes applications such as the VNC server or ACDStatView used to view system information. The \flashdisk\autoapp.bat file is usually called at the end to launch the customer application.

5.1.3 AutoApp.bat / AutoApp.exe

The \Flashdisk\AutoApp file can be called as the last entry in StartConfig. By dispensing with a file extension, it is possible to execute a customised batch AutoApp.bat or an AutoApp.exe program when booting. This mechanism is the interface to call specific custom autostart functions. This is why the customer is responsible for generating the autoapp.* file and only has to copy it to \flashdisk to integrate it into the startup mechanism.

Page 24: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 24 / 65

5.1.4 STARTUP configuration The StartConfig.exe program is a configuration program developed for Windows CE devices. It is used to activate and configure programs that are launched when the device is booted. The configured settings are stored in a batch file. The batch file is launched in the ACDInit.bat sequence. Go to Start�Programs�ACD�StartConfig to call the tool. The existing configuration is displayed in the STARTUP dialogue box. The icon section is divided into two parts: The checkbox on the left is used to enable or disable the option. An icon is displayed on the right to show the type of option. Each option can also be edited, deleted or moved to another position in the list. The button is used to add new options.

In this dialogue box, you can select a new option from a list of standard programs. The option is added to the STARTUP list and can be activated there. A special rule applies here to AutoApp. In this case, either an Autoapp.exe file or an Autoapp.bat file is called exclusively. It is in the last position in the STARTUP in order to call customer applications. Another special case is Other... in the last position in the list. It is also possible to integrate other previously unknown programs. (e.g. the “old” start.bat) More detailed information is available in another document1.

5.2 Device API ACD devices provide various interfaces increasing the performance and make easier api use for programmers. Interfaces are developed to be compatible across all devices so that applications can be migrated from one device to another without any (major) modifications required.

1 StartConfig_SoftwareDocu

Page 25: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 25 / 65

The acddev.dll library plays an important role in this respect. It abstracts several functions, defines their use in APIs and serves as an ACD Windows CE-wide compatibility layer. It covers functions for the following areas:

• Power management / suspend / shutdown

• Backlight control

• Device information

• Keyboard

• Display

• Message structure

• Battery status The scanapi.dll library is also essential if you want to use the optionally installed scanner module. Used in its own programs, the scanapi.dll library binds to the ScanDrv.exe scanner driver and uses its functions. The ScanDrv.exe + scanapi.dll combination is used to configure and communicate with the scanner module. This combination transmits the scanner results to the application. In C#- programs that use DeveloperPack, the wrapper DLL ScanApiCF.dll is attached as the third function. It must be installed on the devices together with the C# program. The final implementation details are covered in separate documentation2 and on the developer CD which explains the detailed use of these library functions in the sample and header files. The functions of certain features are explained in detail below; they are primarily based on the APIs of the above mentioned device.

5.3 Battery functions The acddev.dll application is responsible for battery management. In combination with the DevCtl.exe system application, it determines the battery’s remaining capacity, charge/discharge status, generates warning messages and sends them as Windows Messages (see acddev header file sdadc.h). The battery level is defined as a API of the acddev file. It is also exported via the battery driver to Windows CE and is accessible there as standard Windows functions. Highlight the status bar (DevCtl.exe) (by tapping once) and enter the magic code 24121967 to view precisely those key parameters used to define the battery status. The battery management is parameterised using configuration parameters in the file \flashdisk\system\ini\dev.ini, sections [Battery] and [ADC]. These parameters should not be modified without consulting ACD first. There are several ways to visualise the battery status. Some applications will first read in the status (either using Windows battery functions or acddev.dll) and generate the status. The status bar can also display the battery status (enabled by default, can be disabled in the dev.ini file). Another option available is the ACDStatView program which displays a floating icon over customer applications. It can also trigger an acoustic and visual signal when the battery level is low. ACDStatView can be set from the StartConfig program.

2 ACDDev-External

Page 26: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 26 / 65

5.4 Power management Power management refers to controlling the use of power stored in the device’s battery. The aim is to extend the runtime of the battery. This is done in numerous ways:

• Monitoring the battery status (see previous chapter)

• Using power in energy-saving mode when possible

• Activating the suspend mode when the device is not used for longer periods The power-saving mode includes dimming or switching off the backlight display (see Chapter 5.5). The suspend mode freezes the operating status of the processor and memory. This means that the device only requires a fraction of energy when it is not being used. Online connections etc. are disconnected when the suspend mode is triggered. The acddev power management sends messages to all applications notifying them that the device will soon enter suspend mode (see also acddev header file power.h). Suspend can be either time-controlled to switch on after a defined number of seconds has elapsed or can be triggered manually. The suspend behaviour can be set separately for battery operation and for the external power supply. Set the time to elapse before suspend is entered in the Registry at [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contro l\Power\Timeouts] in the ACSuspend or BattSuspend parameters. This differentiates between the suspend behaviour in AC power supply and battery operation. The [AC|Batt]SystemIdle and [AC|Batt]UserIdle parameters are added to the suspend parameters, they may not be 0.

5.5 Display and backlight The display backlight consumes a lot of power. One significant way of reducing power consumption is therefore to switch off or dim the backlight when not in use. These parameters can be set in the dev.ini file.

Section [display] Definition BacklightNormal Intensity of backlight in normal operation

(0 – 10) BacklightReduced Intensity of backlight in reduced power-saving operation

(0 – 10) BattBacklightReducedTime Time (s) from the last touch/keyboard action until the power-

saving mode is activated in battery operation (0 disabled) BattBacklightOffTime Time (s) from the activation of power-saving mode until the

backlight is switched off in battery operation ACBacklightReducedTime As above, but for operation with AC supply ACBacklightOffTime As above, but for operation with AC supply

Table 5 – dev.ini backlight

These parameters can be modified with API (acddev header file display.h). The parameters persist and are entered into the dev.ini file when the ACD_SetAsDefaultBacklightParams() function is called.

Page 27: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 27 / 65

5.6 Keyboard The keyboard on Windows CE devices have two keyboard layers similar to the shift (Shift-) key on a standard computer keyboard that shifts between upper- and lowercase letters. It is also possible to remap certain keys on the keyboard and save functions, special characters or other character strings in diverse combinations. You can also execute any programs by pressing buttons. The \flashdisk\system\ini\keyb.ini file is used to map the keys. The key parameter can be entered on the right of the mapping character.

k_8 = Set the default layout (here “8”) k_9 = [\flashdisk\myapp.exe] Execute myapp.exe program k_0 = "<back>" Delete back k_f1 = "<F1>" Insert F1 key k_f2 = "END" Add letter string “END” k_f3 = "" Do not add character (blank definition) k_sca = "<intscanner>" Press and hold down left scanner key; reported to

application with messages

Table 6 – keyboard mapping

• k_ represents the directly accessible key layer (example “k_8” for key 8)

• s_ represents the key layer that is accessible with the shift key (example “s_8” for shift key 8) For more detailed information on the features one-finger operation, alphabetic keyboard, keyboard beep and lock, please consult the administration manual. Functions to operate the keyboard can also be configured via API: In the acddev header file keyboard.h, functions are listed that support the use of the keyboard lock, alphabetic key behaviour, insertion and activation of a “keyb.ini”s. A USB keyboard can be connected to devices with an external USB interface. Virtually all keys can be used here. However they cannot be remapped in the same way. The scanner is not triggered directly. Windows Messages is used to report when the key(s) defined to trigger the scanner is/are pressed (see the acddev header file intscanner.h). The application triggers the scanner over the scanapi.dll scanner interfaces. This same applies to RFIDread; the identifier <rfid> is used here. The standard configuration of the ScanDrv.exe scanner driver launched by default functions in this way.

���� Note

Enter the magic code 19011972 in the status bar to reload keyb.ini and dev.ini. To do this, highlight the status bar (by tapping on it) and enter the code on the keyboard / screen keypad.

Page 28: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 28 / 65

5.7 Scanner module A scanner module is integrated as a default feature on some ACD Windows CE devices. All devices can also be connected to an external scanner. On integrated scanner modules, a key is located on the left and right of the device to trigger the scanning beam. In principle, any key can be remapped as a scanner key by changing the keyboard layout (see Chapter 5.6).

Scanner types Depending on how the device is to be used, different types of scanners can be integrated into a mobile device:

Scanner module Description Screen resolution

SE 955 Short Range Scanner -

SE 965 Short Range Scanner (new model) -

SE 1524 Long Range Scanner -

SE 4500 2D-Imager 752 x 480 pixels

Table 7 – scanner types

The first three models of scanner modules read all types of 1D barcodes. The SE 4500 scanner module reads 1D and 2D barcodes and can also be used for taking photographs.

ScanDrv scanner driver The ScanDrv.exe scanner driver is started automatically when booting the devices. It immediately takes control of the integrated scanner module and configures the module with the settings in the default configuration file. Its name is read from the registry and may be changed: [HKEY_LOCAL_MACHINE\ACD\Scanner] "DefaultINI"=\\Flashdisk\\System\\Ini\\ScanDrv.ini A detailed description can be found in the documentation3 for the scanner driver.

Types of use for the scanner module The scanner module integrated on some models can be used in two ways.

• Non-customised applications use a scan data insert function in the keyboard buffer to insert the scan data next to the cursor position. This is done by the ScanDrv scanner driver in its default configuration.

Application developers can use the scanner API directly in the scanapi.dll which allows more control over the integrated scanner. It is available from ACD. When in use, the scanapi.dll file binds to the ScanDrv scanner driver and uses its functionality. The ScanDrv configuration must be adapted accordingly.

As the scanner module cannot be operated from both terminals at the same time, it is not possible to simultaneously use both operating modes.

3 ScanDrv_SoftwareDocu

Page 29: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 29 / 65

5.7.1 Internal and external scan data insertion Scanner modules can also be connected over external interfaces (USB, serial). In this case, this is referred to as external scan data insertion.

5.7.1.1 Inserting data from the internal scanner (S canDrv) The ScanDrv.exe file is launched when the device starts up. To configure the scanner settings, double-tap the barcode tray icon in the task bar or alternatively tap the same icon in the Control Panel.

For more information, consult the administration manual from version 2.00 onwards.

5.7.1.2 Inserting data of an external scanner (ExtS can2KeyCE) External laser scanners from a variety of manufacturers can be connected to Windows CE devices. Non-customised applications use a scan data insert function in the keyboard buffer to insert the scan data next to the cursor position. This is done with the ExtScan2KeyCE license application that is installed if necessary on the MDT device. More detailed information is available in another document4. Note: Some devices have an external USB interface. A RS232-to-USB conversion is performed in the vehicle docking station. The virtual COM5 interface is generated via a USB driver which is then used in ExtScan2KeyCE. Available interfaces

Device Interfaces Default

M210SE COM5 COM5 M215SE COM5 COM5

M260SE COM5, COM6 COM5, COM6

Table 8 – serial interface ports

4 ExtScan2KeyCE_SoftwareDocu

Page 30: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 30 / 65

5.7.1.3 Basic initialisation of an external scanner An external laser scanner which has scan data to be inserted into the keyboard with ExtScan2KeyCE must be configured with the following baud rate parameters: 9600 bits per second, 8 data bits, 1 stop bit, no p arity Depending on a certain parameter in the configuration file, the prefix character STX (= 02h) and suffix character ETX (= 03h) must be set in the scanner. Only scan data embedded between both these characters are accepted by ExtScan2KeyCE for insertion.

5.7.1.4 Closing ExtScan2KeyCE There are two ways to close the program:

• Enter the password 2801 in the first tab of the configuration dialogue box.

• Go to Start�Programs�ACD�Close ExtScan2KeyCE.

5.7.2 How to use the scanner API

5.7.2.1 Scanner DLLs on the Windows CE devices Two Win32 DLLs scan.dll and scanapi.dll are installed on Windows CE devices. The first DLL contains the hardware-dependent part of the scanner API and is used directly by the ScanDrv.exe scanner driver. Applications may not use this DLL! scanapi.dll contains the hardware-independent part of the scanner API and is used by applications. The stored API functions are used to “bind” this DLL to the ScanDrv.exe scanner driver and can use the scan.dll with this shortcut. For programming with Visual Studio, the developer CD contains the ScanAPI.h header file and the ScanAPI.libin folder in the \Dev_ScannerAPI\CE6.0 folder. The \Dev_ScannerAPI\TestAPI-Source folder contains the source files of a small test program where the basic functionality of the scanner API can be found. More detailed information on the scanner API can be found in a separate document5.

5 WinCE_SoftwareDocu_ScannerProgramming

Page 31: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 31 / 65

5.7.2.2 Triggering a scan from the application The ScanDrv scanner driver is responsible for comfortably rendering the scanner keys. The developer can also render the scanner keys: A Windows system message sends the command to the application to press/release the scanner keys. The name of the Windows message is defined in the intscanner.h header file of acddev.dll. This can be found in a device-specific subfolder of \Dev_ACDDev.dll on the developer CD. The wParam of the event routine sends the new status of the scanner keys (SC_MAKE, SC_BREAK). A segment of a code as an example: // Get ID for scanner message UINT uScannerMsg = RegisterWindowMessage(MESSAGETX T_SCANNER); // Assign message to a function BEGIN_MESSAGE_MAP(CM200CtlDlg, CDialog) //{{AFX_MSG_MAP(CM200CtlDlg) ... //}}AFX_MSG_MAP ON_REGISTERED_MESSAGE (uScannerMsg, OnScannerMsg) END_MESSAGE_MAP() // Process scanner message afx_msg LRESULT CMyAppDlg::OnScannerMsg(WPARAM wPar am, LPARAM lParam) { switch (wParam) { case SC_MAKE:

// Code scanner key pressed break; case SC_BREAK:

// Code scanner key released break; } return FALSE; }

The ACD DeveloperPack offers among other features useful functions for the scanner module installed in ACD devices.

5.7.2.3 The callback function In the application, a callback function is defined whose address is sent to the function ScanAPI_CMD_Initialize . This callback function receives barcode data, status data and error information. Configuration of the callback function according to the prototype declaration in scanapi.h :

typedef INT (*SCANAPICB)(int, long, long); This corresponds for example to the following function declaration

int CALLBACK ReceiveFromScanAPICB(int iEvent, long lParam1, long lParam2); with configuration of the relevant variables

SCANAPICB MyScanAPICB; // Address variable fo r callback function MyScanAPICB = (SCANAPICB)ReceiveFromScanAPICB; // Assign address

Page 32: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 32 / 65

5.7.2.4 ScanDrv functional scheme on M2xxSE devices When launched, ScanDrv.exe configures the scanner module based on the standard configuration file. If a first application uses the scanner API, ScanDrv.exe remains activated, however the scanner module is “removed” from ScanDrv.exe. The application can use ScanAPI commands and receives scan data. Other applications are denied access to the scanner module. Once the application has ended, the scanner module is then enabled (back to ScanDrv.exe). ScanDrv.exe will restore the previous default configuration if the application changed the scanner configuration settings. In comparison to the old scanner solution, the ScanAPI.dll has been extended (“new ScanAPI.dll”). It allows applications to run their specific scanner configuration conveniently with one single command rather than requiring individual API calls. More detailed information can be found in the relevant document6.

ScanDrv.exe

ScanAPI-

Handler-

Thread

ScanEn.dll

Scanner-

konfiguration

durch

ScanDrvCPL.cpl

im Control

Panel

ScanDrv.ini

Customer1.ini

Customer2.ini

Customer3.ini

...

Scandaten per Tastatureinschleifung

Scan

Data

Thread

Application1.exe

Scandaten per

API-Aufruf

Shared Memory,

Named Events,

Mutexe

Callback

Call-

back

Neue

ScanAPI.

dll

6 WinCE_SoftwareDocu_ScannerProgramming

Page 33: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 33 / 65

5.8 RFID A RFID module is integrated in some ACD Windows CE devices. It supports the recognition and data exchange of transponder cards from the Mifare family (ISO 14443A, not DesFire) with a storage capacity of up to 4 KB. The RFID module can also identify as well as read and write transponder cards from the ICode SLI family (ISO 15693) with 128 bytes and the ICode EPC (17 bytes) and ICode UID (24 bytes) families. It also supports the recognition of serial numbers from Hitag1 transponders as well as the recognition and definition of EPC UHF Gen 2 transponder cards with a capacity of 96 bits (12 bytes) and other capacities (e.g. 6 bytes).

5.8.1 RFID types Depending on how the device is to be used, different types of RFID readers can be integrated into a mobile device:

5.8.2 How to use the RFID module Application developers can directly use RFID-API in the RFIDApi.dll. It is available from ACD. This DLL is integrated into the application and allows the communication of the master Windows application with the RFID read / write device. The Block Framing Protocol (BFP, transponder cards: Mifare, Sli, Epc, Uid, Hitag1) is used as the protocol. The EPC UHF Gen 2 card family uses its own communication protocol between the master Windows application and the RFID read / write device.

5.8.3 Sequence programming with DLL RFIDApi The DLL RFIDApi.dll supports a variety of functions for data exchange between a CE / Windows 32 application and a RFID read / write device. These functions must be called up by following a precise sequence.

RFID application

RFID API - DLL

Reader 1 Mifare / ICode / Epc, Uid

(HF� 13,56MHz, 7 cm range)

Reader 2 Hitag

(LF � 125 kHz, 3-4 cm range)

Reader 3 EPC Gen 2

(UHF � 860MHz, 30 cm-1 m range)

ID R/W ID ID R/W

Page 34: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 34 / 65

Reading data from a transponder card:

The example below describes the sequence to read out the 12th sector of a Mifare transponder card with the physical transponder address 0x9C 4B 23 D2. This card is stored in the RFID field of the RFID read / write device. At the same time, another transponder card is also located in the recognition field of the read / write device. The card is assigned with the “transport configuration” status.

Sequence step / function:

Parameter: Description:

RFIDInit dwCardFamily = CARDFAMILY_MIFARE

nRecvTimeout = 5000

nPowerDownTimeout = 0

fErrorResult = TRUE

Return of RFID handle

Initialisation

RFIDLoadKey Transfer of RFID handle

dwCardFamily = CARDFAMILY_MIFARE

nSector = 11

lpKeyA = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}

lpKeyB = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}

fStoreKeyInEEPROM = FALSE

Load authentication

keys A and B into

RAM

RFIDSelectKeyAuth Transfer of RFID handle

dwCardFamily = CARDFAMILY_MIFARE

fKeyAuthFromEEPROM = FALSE

Load authentication

keys A and B

are loaded by RFID

read / write device from

RAM A detailed description of the individual transponde r types and DLL RFIDApi can be found in the RFID_SoftwareDocu_Vx.xx.pdf document.

Page 35: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 35 / 65

Sequence step / function:

Parameter: Description:

RFIDFindCards Transfer of RFID handle

dwCardFamily = CARDFAMILY_MIFARE

lpTag = {0x9C 48 DE 35, 0x9C 4B 23 D2}

lpnCount = 2

fSingleFindCard = FALSE

Get the physical

transponder addresses

(return parameter with

function)

RFIDSelectCard Transfer of RFID handle

Tag = {0x9C 4B 23 D2}

lpbCardSize = {0x08} {1 KB card}

fRequest = TRUE

Select a

transponder card

RFIDReadSector Transfer of RFID handle

Tag = {0x9C 4B 23 D2}

nSector = 11

lpbData =

// Block 0, 16 Bytes

{0x00,0x00,0x00,..................,0x00,0x00,0x00}

// Block 1, 16 Bytes

{0x00,0x00,0x00,..................,0x00,0x00,0x00}

// Block 2, 16 Bytes

{0x00,0x00,0x00,..................,0x00,0x00,0x00}

// Trailer block sector, 16 Bytes

{0x00,..,0x00,0xFF,0x07,0x80,0x69,0xFF,..,0xFF}

Read out sector data of 12th sector (nSector = 11, as counting from 0)

RFIDUnInit Transfer of RFID handle Uninitialise

Table 9 – RFID sequence description

Page 36: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 36 / 65

5.8.4 Example program The program sequence below shows how the basic RFIDApi functions are applied based on a simple example. On the example of the transponder card families MIFARE, ICODE SLI and UHF, the aim is to demonstrate how a family initialises, how various cards are detected in the RFID field and how individual cards are selected. Finally, the content of the first block on the transponder card is read out. This command is an example to be applied to all other basic commands (e.g. read out AFI etc.). The ACD DeveloperPack offers among other features useful functions for RFID readers installed in ACD devices. #include <windows.h> #include <tchar.h> #include <stdio.h> #include <conio.h> #include "RfidApi.h" HRFID g_hRfid; void DspError(void) { RES Res; // Get last error RFIDGetLastError(&Res); _tprintf(_T("error: function: %d status: %d Rfid error: %d"), Res.m_lFunc, Res.m_usStat, Res.m_lRfid); } int RetDspError(void) { // Show last error DspError(); // Uninitialise RFIDUnInit(g_hRfid); getch(); return 0; } void ShowCards(LPHTAG lpTag, UINT nFoundCards) { RFIDCARDINFO RfidCardInfo; int i; TCHAR szItem[250]; for(UINT nCards = 0; nCards < nFoundCards; nCards ++) { // Get card type information RfidCardInfo.m_nSize = sizeof(RFIDCARDINFO); RfidGetCardInfo(g_hRfid, lpTag[nCards], &RfidCa rdInfo); _tprintf(_T("Transponder card %d: 0x"), nCards + 1); CnvCardIdStr(lpTag[nCards], szItem, RfidCardInf o.m_dwCardFamily, RfidCardInfo); _tprintf(_T(“%s\n), szItem); } _tprintf(_T("\n")); }

Page 37: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 37 / 65

void ShowReadData(HTAG Tag, LPBYTE lpabReadBlockDat a) { RFIDCARDINFO RfidCardInfo; // Get card type information RfidCardInfo.m_nSize = sizeof(RFIDCARDINFO); RFIDGetCardInfo(g_hRfid, Tag, &RfidCardInfo); _tprintf(_T("Block 0: 0x")); for(int nChar = 0; nChar < RfidCardInfo.m_nSizeBl ock; nChar++) _tprintf(_T("%02X"), lpabReadBlockData[nChar] ); _tprintf(_T("\n")); } BOOL ChangeBuffer(LPBYTE lpabBuf, int nSize) { LPBYTE lpbHlp = (LPBYTE) malloc(nSize); if (!lpbHlp) return FALSE; memcpy(lpbHlp, lpabBuf, nSize); for(int i = 0; i < nSize; i++) lpabBuf[i] = lpbHlp[nSize - 1 - i]; free(lpbHlp); return TRUE; } int main(int argc, char* argv[]) { BYTE abReadBlockData[SIZE_ONEBLOCK_MIF]; UINT nFoundCards, nCards; LONG lResult; HTAG Tag[MAXCARD]; BYTE bCardSize; int nSize; RES Res; DWORD dwCardFamily = CARDFAMILY_MIFARE; //*********************************************** ******************** // MIFARE //*********************************************** ******************** // Initialise _tprintf(_T("initialise Mifare...\n\n")); nFoundCards = MAXCARD; // Interface port e.g. COM1: // Interface parameter e.g. 115200,N,8,1 lResult = RFIDInit(&dwCardFamily, 5000, 0, TRUE, &g_hRfid); if (lResult != RFID_SUCCESS) return(RetDspError()); // Initialisation correct _tprintf(_T("Initialise Mifare Ok!\n\n")); // Get and show transponder cards in Rfid field _tprintf(_T("get Mifare transponder cards in fiel d...\n\n"));

Page 38: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 38 / 65

lResult = RFIDFindCards(g_hRfid, CARDFAMILY_MIFAR E, &Tag[0], &nFoundCards, FALSE); if (lResult != RFID_SUCCESS) { // Error occurred when getting the transponder cards if (lResult == RFID_NO_TAG) { // No transponder card found _tprintf(_T("No Mifare transponder card found !\n")); } else return(RetDspError()); } if (nFoundCards > 0) { // Show transponder addresses ShowCards(&Tag[0], nFoundCards); for(nCards = 0; nCards < nFoundCards; nCards++) { // Select transponder cards lResult = RFIDSelectCard(g_hRfid, Tag[nCards] , &bCardSize, TRUE); if (lResult != RFID_SUCCESS) return(RetDspError()); // Read out block 0 nSize = sizeof(fromReadBlockData); lResult = RFIDReadBlock(g_hRfid, Tag[nCards], 0, fromReadBlockData, &nSize, TRUE); if (lResult != RFID_SUCCESS) return(RetDspError()); // Show block data ShowReadData(Tag[nCards], fromReadBlockData); } } // Uninitialise RFIDUnInit(g_hRfid); //*********************************************** ******************** // ICODE SLI, ICODE EPC, ICODE UID, UHF //*********************************************** ******************** // The function steps below also apply to the ICo de EPC, // ICode UID and EPC UHF Gen 2 transponder cards // (the card family must be changed in the RFIDIn it function) // Initialise _tprintf(_T("\n\nInitialise...\n\n")); nFoundCards = MAXCARD; #ifdef _ICODE_SLI dwCardFamily = CARDFAMILY_ICODE_SLI; #endif #ifdef _UHF dwCardFamily = CARDFAMILY_UHF; #endif #ifdef _ICODE_SLI lResult = RFIDInit(&dwCardFamily, 5000, 0, TRUE, &g_hRfid); #endif

Page 39: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 39 / 65

#ifdef _UHF lResult = RFIDInit(&dwCardFamily, 5000, 8000, TRU E, &g_hRfid); #endif if (lResult != RFID_SUCCESS) return(RetDspError()); // Initialisation correct _tprintf(_T("Initialise Ok!\n\n")); // Get and show transponder cards in Rfid field _tprintf(_T("Get transponder card in field...\n\n ")); lResult = RFIDFindCards(g_hRfid, dwCardFamily, &T ag[0], &nFoundCards, FALSE); if (lResult != RFID_SUCCESS) { // Error occurred when getting the transponder cards if (lResult == RFID_NO_TAG) // No transponder card found _tprintf(_T("no transponder card found!\n")) ; else return(RetDspError()); } if (nFoundCards > 0) { // Show transponder addresses ShowCards(&Tag[0], nFoundCards); for(nCards = 0; nCards < nFoundCards; nCards++ ) { // Select transponder cards lResult = RFIDSelectCard(g_hRfid, Tag[nCards ], &bCardSize, TRUE); if (lResult != RFID_SUCCESS) return(RetDspError()); nSize = sizeof(from ReadBlockData); #ifndef CARDFAMILY_UHF // Read out block 0 lResult = RFIDReadBlock(g_hRfid, Tag[nCards] , 0, fromReadBlockData, & nSize, TRUE); if (lResult != RFID_SUCCESS) return(RetDspError()); // Show block data ShowReadData(Tag[nCards], abReadBlockData); #else // Read Block 0 (Accesspwd) from RFU memory lResult = EPC_ReadBlockFromBank(g_hRfid, Tag [nCards], 0, 0, 0x0000000 0, fromReadBlockData, &nSize); if (lResult != RFID_SUCCESS) return(RetDspError()); ChangeBuffer(fromReadBlockData, nSize); // Show from ReadBlockData… #endif } } // Uninitialise RFIDUnInit(g_hRfid); getch(); return 0; }

Page 40: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 40 / 65

5.9 WLAN and Ethernet This chapter covers the tools and procedures required for efficient network operation. The ndisconfig help program is a useful resource designed to help you configure and administer the program’s WLAN parameters. ACDStatView is accessed from an icon on the screen which can also be opened from a customer application. The ACD DeveloperPack offers among other features useful functions for WLAN wireless cards and Ethernet adapters.

5.9.1 ndisconfig The ndisconfig.exe program is stored in the \Windows folder on Windows CE devices. It is used for loading and unloading network devices. There are two ways of using this function: • Unloading WLAN network devices if you want to use LAN devices via a docking station and only one

connection may be active at the same time.

• Unloading a network device to replace libraries and drivers with others that you want to access again when they are reloaded (for example, for updates).

Examples NDISCONFIG ADAPTER UNBIND SDCSD30AG1 � Unload a wireless profile NDISCONFIG ADAPTER REBIND SDCSD30AG1 � Reload a wireless profile

ndisconfig command syntax

Usage: ndisconfig [-d] [Parameters] Parameters: adapter add <miniportName> <adapterName> adapter del <adapterName> adapter rebind <adapterName> [<protocolName> ] adapter bind <adapterName> [<protocolName> ] adapter unbind <adapterName> [<protocolName> ] miniport add <miniportName> protocol binding resume

���� Note

The Rebind command is particularly useful, for example to activate new IP data written into the registry.

Page 41: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 41 / 65

5.10 Internet Explorer for Windows CE Internet Explorer 6 for Windows CE is installed by default on ACD devices.

5.10.1 Internet Explorer 6 characteristics for Wind ows CE Internet Explorer 6 for Windows CE is most similar to the IE6 desktop version. Choose this browser for applications that require full Internet access or display complex interfaces. You can use the Internet Explorer Component Object Model (COM) interfaces to build a custom browser or to add browser controls to an application. Alternatively, you can use the Internet Explorer container (IESample.*) to create a browser designed specifically to be integrated into an application. The browser supports touchscreen or keyboard input. The browser is capable of rendering documents that contain HTML, DHTML (dynamic HTML), and CSS data formats. XML support is available if the MSXML parser is included in the OS design. As a scripting host, Internet Explorer supports Microsoft JScript 5.6 and Microsoft Visual Basic Scripting Edition, Microsoft VBScript5.6, when these items are included in the OS.

Page 42: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 42 / 65

5.10.2 IE6 browser characteristics for Windows CE

IE6 for Windows CE

ROM footprint 2.63 MB for rendering / browser engine

4.2 MB for all catalogue items

Printing Yes

Fixed width layout (dynamic fitting of page to screen)

Yes

Back/forward navigation 64 KB RAM allocation for travel log

Internet options Yes, provided as a sample application.

An OEM can modify the sample or replace it with a custom application.

Localisation Individual modules (DLLs) in all languages

that are available for Windows CE.

Online help No

View source text Yes with view-source protocol

Cookies The maximum number of elements (4 KB maximum each) set by registry.

Persistent depending on the OEM implementation.

Protocols IPv4, IPv6, HTTP 1.1 (http, https), FTP, file://, TLS

Extensible Markup Language (XML) MSXML Parser 3.0

Dynamic HTML (DHTML) W3C Document Object Model Level 1

HTML

Version 4.01 is supported, with the exception of ABBR, Q, and OPTGROUP tags

Supports tables, forms and frames / iFrames

XML MIME viewer

No VRML

Scripting

JScript (ECMA-262 compliant)

VBScript

Supports script programming

Cascading style sheets (CSS) CSS1 and CSS2 core functions

Limited support for filters and transitions

File formats GIF, JPEG, BMP, XBM, PNG, HTML, TXT, GIF89a

Encryption 40-bit and 128-bit SSL

Security SSL2, SSL3, TLS 1.0, SGC, Passport v1.4

Table 10 – IE6 Win CE browser characteristics

More detailed specifications at: http://msdn2.microsoft.com/en-us/library/ms905630.a spx

Page 43: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 43 / 65

5.10.3 Internet Explorer 6 architecture

Figure 1: Internet Explorer 6 architecture

5.10.4 IESample or IESimple Two user interfaces are included in Windows CE by default: IESample and IESimple. The IESample program includes many of the functions that the Internet Explorers 6 desktop version provides.

The IESimple program is a browser designed for full-screenapplication for Windows CE terminals (M210, M260, M210SE, M260SE, M215SE) from the ACD Group. Besides rendering the Web application, the program can only be operated with the refresh key combination. If you add new features to one of these programs, you can still access its original elements. This is strongly recommended. More information on IESimple can be found in the relevant documentation7.

Figure 2: IESample

7 IESimple_SoftwareDocu

Page 44: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 44 / 65

5.10.5 Jscript JScript is originally based on JavaScript which is why it maintains compatibility with JavaScript. Additional Microsoft-specific features have been added to JScript. Only Internet Explorer fully supports JScript. Mozilla and Opera have however implemented a majority of the JScript extensions. JScript is currently available in version 8.0 yet maintains full backwards compatibility.

Page 45: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 45 / 65

6 Managing ACD devices This chapter focuses on the methods available to update and install system and user software or firmware onto the ACD CE devices. Transfer mechanisms are also presented which connect the device to the “outside environment” and to transfer files automatically. This chapter also covers ways of customising the software to user requirements, for example how to create persistent links on the desktop etc.

���� Note

ACD has developed the device manager with which several field devices can be administered. Please contact ACD if you require more information.

6.1 Updating the system Updating is an essential feature on a flexible system designed for industrial use and it has to fulfil specific requirements: on the one hand, updating has to be done quickly and with as few user interactions as possible yet it also has to be secure. This chapter explains which system components on the ACD devices can be updated. It also describes how these devices are updated.

6.1.1 Updating system components ACD Windows CE devices are primarily based on ARM technology and differ considerably from PC-based technology. BIOS firmware used to configure hardware settings is not installed on these devices. Instead of BIOS, ACD devices first run a minimal boot loader when they are powered on which is responsible for loading the CE kernel (OS kernel). The boot loader can also be used to update the system. This feature has more relevance in production than in field application. The CE kernel is the second component that can be replaced. It is configured with a unique version number. When running, the system gets system files from the flash memory stored in the flash disk file directory. The status of this collection of system programs is also versioned. On some devices, a microprocessor functions as a keyboard controller . This is also versioned. A versioned programmable logic device (PLD) also configures diverse hardware connections.

Page 46: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 46 / 65

6.1.2 Updating the device firmware A µSD card updates the device firmware on second edition Windows CE devices. The device will boot from this card once only and the firmware is updated automatically.

���� Note

Please note that you perform a firmware update at your own risk. Please also note that the device will be completely reset to its existing configuration.

���� Note

If the update installation is interrupted because the power supply is too low, this can cause serious damage to the device. Make sure that the battery is fully charged before you launch the update.

6.1.2.1 How to check the firmware version Boot the device and select the “SysInfo” tool in the start menu under Programs / ACD. Click the Version tab. The firmware version is shown under Flash-Ver.

6.1.2.2 Firmware update requirements • The battery must be fully charged. • Format a micro SD card with the FAT/FAT32 file system. • Copy the update files into the master directory (main directory; not in a subfolder) of the memory card

inserted in the device.

Page 47: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 47 / 65

6.1.2.3 Step-by-step installation (automatic sequen ce) Insert SD card into the device

M260SE:

The slot for the µSD card can be accessed from the battery compartment. The µSD card must be inserted into the µSD slot with the contacts facing upwards. The card has been correctly inserted when the card clicks into position.

M210SE:

The slot for the µSD card cannot be accessed directly. It is hidden underneath the top rubber cap. This can be removed carefully by loosening the 4 screws.

���� Note

Be careful around the antennae and cables located under the rubber cap to prevent any damage.

Insert the card into the fixated SD/µSD adapter in the slot. Avoid excessive pressure when inserting the card into the adapter, as this can unstick the adapter (despite adhesion).

Switch on the device once the µSD card has been ins erted; flashing starts automatically.

Page 48: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 48 / 65

Copying the system files

The flash disk is then copied, please wait and follow the instructions that appear on the screen. The device may perform a reboot.

Calibrate the touchscreen and press the Enter key t o confirm

Skip the DC loader message Disable the checkbox next to Update Lan, then tap Start

M210SE:

Remove the µSD card and then tap the screen. M260SE:

Shutdown the device and remove the battery.Then please pull off the µSD card. Finally turn on the device.

Page 49: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 49 / 65

Skip the test configuration

Skip the FTP setup

Reboot the device The device displays the desktop below once flashing is complete:

Then execute CEReboot, this will complete the firmware update.

Enter “00” and press the Enter key

Enter “00” and press the Enter key

Page 50: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 50 / 65

6.1.2.4 Replacing the boot loader

The boot loader can be automatically replaced/set during a firmware update.

6.1.2.5 Replacing the boot bitmap

The boot bitmap, that is displayed directly when the device is booted and switched on, can be automatically replaced/set during a firmware update. In this way, it is possible to customise the boot bitmap.

6.1.2.6 Updating the flash disk

The system programs are stored in the \flashdisk\system and \flashdisk\drivers folders. These cannot be simply deleted and re-configured as the programs in these folders are in use. The procedure below describes how to update the flash disk: - Rename the system and drivers folders, e.g. into system.old and drivers.old - Copy the new system and drivers folders to the device - Delete the registry with Start�Programs�SysTools�SysTools - Reboot the device with Start�Programs�ACD�System�CEReboot - Run any update batches on the desktop - Delete the folders you have renamed in step 1 By following the steps above, the ACD system programs and drivers are updated and the registry is configured with the new default parameters. Keyboard controller, PLD and boot loader are also updated in the flash disk folders created by ACD. If a .CAB file is launched to execute the update, the installation steps are carried out automatically.

6.1.2.7 Updating the keyboard controller and PLD

Keyboard controller and PLD can be manually updated with the CEHWProg.exe program. These components can also be updated as part of a general update or a flash disk update.

Risks are associated with an update of a keyboard controller or PLD. If the programming fails (power interruption), the device must be sent to ACD for repair.

Page 51: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 51 / 65

6.2 Generating and rendering links Links, or references, are used to refer to other files. In the world of Microsoft, links comprise of special files (*.lnk). In Windows CE, links are text files that can be modified via Text editor. Links are also recommended for generating directory entries in the Windows desktop menu structures.

6.2.1 Manually creating links Follow the procedure below to manually create links on Windows CE devices:

• Tap with the stylus on the program or folder icon to highlight it.

• Hold the stylus in position until the pop-up dialogue box opens.

• Then tap Copy in this box.

• Tap with the stylus on a free space in the window.

• Hold the stylus in position until the pop-up dialogue box opens.

• Then select the Paste Shortcut option in this box.

In addition to the program or folder icon, another Shortcut icon also appears.

Click this icon to open a file with the extension .lnk .

6.2.2 Creating links in the program Use the Win32 API function SHCreateShortcut() and SHCreateShortcutEx() to create links from a running program. Command line arguments can also be stored in the links you have created.

Page 52: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 52 / 65

6.2.3 Creating links with an editor In contrast to link files created by PC-based Windows OSs, link files from Windows CE are text files only. This allows you to create new link files with an editor or change existing link files. On Windows CE devices, WordPad can be used for this purpose, or any text editor (e.g. NotePad) program on a PC. The only requirement is that the suitable format is used.

Number of characters behind the separator

Separator #

Define folder or program Optionally with arguments for programs

Examples:

20#\Windows\repllog.exe 28#\Windows\repllog.exe /remote 38#"\Flashdisk\System\VolumeSettings.exe"

When you edit links you have created manually on the Windows CE device, certain special characters must be used. They can be deleted before you save the links. The links will still function.

6.2.4 Restoring links on device boot The \Windows\Desktop and \Windows\Programs folders contain links on the desktop or in the start menu on Windows CE devices. Some of these link files are imported into the RAM file system when the kernel is booted. However links that have been created afterwards in the RAM file system, they will not be restored the next time the device is switched on. In this case, the solution is to save the links you have created on the desktop or in the start menu under \Flashdisk and then copy these links to the \Windows\Desktop and \Windows\Programs folders on booting. All files are then copied to \flashdisk\system\WinAddon recursively into the \Windows folder. This means that

• Links for the desktop are stored in the \Flashdisk\System\WinAddon\Desktop folder and

• Links for the start menu are stored in the \Flashdisk\System\WinAddon\Programs folder.

A complete sequence of links are also stored in the \Flashdisk\System\Lnk folder in case they are required for use.

Page 53: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 53 / 65

6.3 Installing software There are various ways to install software on ACD Windows CE devices.

6.3.1 Installing from the IDE by the programmer When developing a program, a programmer generally uses a MobileDeviceCentre connection to upload the current program statuses as well as for remote debugging. The MobileDeviceCentre / IDE combination can also be used for program installation. This is recommended in the following cases

• Programs are always installed (and will be in the future) by a programmer or a qualified administrator.

• The majority of devices in use are always located within access of a programmer or qualified administrator.

• The number of devices is restricted.

6.3.2 xcopy installation Another way to install the software is for the administrator to add a MobileDeviceCentre, FTP or other connection to the Windows CE devices and manually copy the installation file(s) to the devices in the “xcopy” process (i.e. with subfolders). If an existing installation is overwritten, make sure that every program and every dependent system library (dll) which you want to replace is closed first or that the old files are renamed first (functions under Windows CE when device is running). When doing so, the following is recommended:

• Programs are always installed (and will be in the future) by an administrator.

• The majority of devices in use are always located within access of an administrator.

• The number of devices is restricted even though this administration method supports the use of considerably more devices than the first method.

6.3.3 Program update / installation when booting Updates/installation files are copied to the device. With slower connections, this is done in the background without affecting other programs. The last way is to copy an UpdateCE.bat file directly into the \flashdisk folder with the aim of “triggering” the action on the next reboot. When this file is detected, the startup process runs the file and deletes the file once it has been executed. The advantage here is the installation runs automatically during the startup process before the customer application is executed. The application files are not running and can be exchanged without any difficulty. UpdateCE.bat can execute any action or execute installations or updates. The chapter below provides an example based on a CAB file installation.

Page 54: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 54 / 65

6.3.4 Installing with CAB files A convenient way of installing software is with a CAB file. A CAB file is an installation file that contains an entire set of files and subfolders similar to a zip file. It can also include registry entries that are entered into the registry of Windows CE devices during installation. An automatic program installation allows the CAB file to react flexibly to other potential requirements (technical: a dll file is executed and controls the installation). Other preliminary and finalising operations can be run in parallel to the installation. This method is particularly suitable for field updates.

6.3.4.1 Manual CAB file installation

A MobileDeviceCentre, FTP or other connection is established and the CAB file is copied to the device. Click the My Device icon on the Explorer desktop to open the CAB file. Double-tap the CAB file icon to start the installation. A dialogue box then appears where you can select the installation folder. The CAB files provided by ACD should be extracted into the pre-defined folders. Once the installation is complete, the CAB file is automatically deleted. A basic requirement to ensure a successful installation is to first close all programs and their libraries that you want to replace. A remote installation is also possible via VNC.

6.3.4.2 CAB file installation via the MobileDeviceC entre A MobileDeviceCentre connection is established to the Windows CE device. The CAB file is then installed on the connected Windows CE device from the CeAppMgr.exe program of the MobileDeviceCentre. CeAppMgr.exe requires the name and path of an ini file that controls the installation as command line parameters. A batch can be called to launch the file: @echo off "C:\Windows\WindowsMobile\CeAppMgr.exe" .\ACDemuCE. ini exit Example of an ini file: [CEAppManager] Version = 1.0 INI file version Component = ACDemuCE Application name [ACDemuCE] Description = ACDemuCE Uninstall = ACDemuCE CabFiles = ACD ACDemuCE.CAB Name(s) of the CAB file(s) to be installed

Page 55: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 55 / 65

When you call a batch, the following prompt appears:

Click No. Flashdisk is usually defined as the target storage media.

Click the OK button to upload the CAB file onto the device. The CAB file installation then starts and a dialogue box appears to select the installation folder. Once the installation is complete, the CAB file is automatically deleted. In case registry information has been installed, save the registry persistently with Start�Programs�SySTools�Save Registry .

6.3.4.3 CAB file installation when booting

The mechanism described in chapter 6.3.3 is particularly suitable for extracting CAB files when booting. To do this, copy the UpdateCE.bat file and the cab file which is installed from the batch. Example of an UpdateCE.bat: @echo off \Windows\wceload.exe /noaskdest "\Flashdisk\Setup.C AB" The /noaskdest parameter triggers an automatic installation when booting without prompting an installation folder dialogue (non-interactive). Once the installation is complete, the CAB file and the update batch are deleted automatically. Add an additional parameter to prevent the deletion of the CAB file: @echo off \Windows\wceload.exe /noaskdest /delete 0 "\Flashdisk\Setup.CAB"

Page 56: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 56 / 65

6.4 FTP server / client ACD Windows CE devices feature an integrated FTP server. FTP client functions are available as API or as a command line tool.

6.4.1 FTP server service (Windows CE device as serv er) With the User name/password and known IP address, it is easy to upload/download files to/from the device with the FTP server service on CE devices. It is a relatively simple server which means that long folder/file names can be reduced in size on the client display, especially when the file names contain separators. For example, some graphic FTP clients will shorten “Microsoft Remote Display Control” to simply “Control”.

6.4.1.1 Avoiding display problems with file names i n Total Commander For the correct display of file names, the following steps (on the example of a very comfortable file browser and FTP client TotalCommander) should be followed:

• Entry in file wcx_ftp.ini, usually in c:\Windows\:

[WinCE] Template1=MM-DD-YY hh:mm ----- S* n* Template2=MM-DD-YY hh:mm -d------------ n*

• Reboot TotalCommander

• Go to Connect FTP�Edit to change the server type from “Automatic recognition” to “WinCE”

6.4.1.2 Setting the password On shipment, the user is defined as default with the password acd. Go to Start�Settings�Control Panel�Password to change the password. Then persistently save the registry with SaveRegistry.

Page 57: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 57 / 65

6.4.1.3 Setting the root directory and other parame ters

The root directory is defined in the registry under HKEY_LOCAL_MACHINE\Comm\FTPD, key name DefaultDir. The default is "\" (root directory). You can also set whether users with anonymous login are assigned with write-only authorisation (set AllowAnonymousUpload option to 1, default is 0). Anonymous logins are configured with 1 in the AllowAnonymous option (default: 0). The server service is disabled on the next reboot with the IsEnabled option set to 0 (default: 1).

6.4.1.4 Software update with CE proprietary FTP ser vers Any FTP client can be used to transfer files or update to Windows CE devices. Examples under Windows include the integrated FTP client of the Total Commanders or FileZilla. With the help of FTP script files for batch-compatible FTP clients, files can be automatically transferred from and to Windows CE devices. Example of a user-defined script batch for the Wind ows ftp.exe Call file FTPUpdate.bat @echo off ftp -v -i -s:FTPUpdate.txt %1 exit

Page 58: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 58 / 65

Word from the command line Description

ftp Calls the FTP client program belonging to Windows.

-v Suppresses the display of messages returned from remote servers.

-i Disables interactive input when several files are transferred.

-s:FTPUpdate.txt Transfers script file with the executable FTP commands.

%1 Defines the IP address or name of the various Windows CE devices.

Table 11 – FtpUpdate command line parameters

FTP script file FTPUpdate.txt

Script line Description

myusername User name

mypassword Password

binary Switches to binary transfer mode.

cd \flashdisk Switches to the target directory of the Windows CE device.

put UpdateCE.bat Transfers update batches with the next boot of the Windows CE device.

put xyz.CAB Transfers the CAB file to be installed by UpdateCE.bat the next time the Windows CE device is booted.

bye Logs out and closes FTP connection.

Table 12 – FTP script file

6.4.2 FTP client function (Windows CE device as cli ent) In addition to the FTP server service, the FTPSimple program (separate documentation8 available) is available as an FTP client to access remote FTP servers from the CE device. The FTPsimple program uses FTPlib.dll, a proprietary ACD library which provides programmers with a simple API to generate their own FTP client programs. FTPlib.dll is described in more detail in another document9. FTPsimple is a console program which means that it is batch-compatible and can be used to execute FTP script files. FTPsimple can transfer the script file in the command line (batch) for execution or enter the command “script” in the console window. A script file must be saved in the ANSI format and can contain any number of FTP command sequences. As soon as the first error occurs in a script sequence, the sequence will be aborted, the error message displayed and the device waits for a manual command.

8 FTPSimple_SoftwareDocu 9 FTPLib_Programmer API

Page 59: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 59 / 65

To execute FTP scripts with a double-tap on the touchscreen, the scripts should be assigned with the file extension .ftp. On ACD Windows CE devices, this extension is linked with the program FTPsimple. FTPsimple contains a collection of the known FTP set of commands. Other special commands have been added which support the specific application of the device. Open the help command in the console window to display the list of commands. An error is usually reported with an error number and an error text. If the error number is negative, it is a proprietary FTPSimple error message, otherwise it belongs to the Windows Systems.

Command line parameters

Description

-? /? -h /h Activates the help function for other parameters.

-sServer Behind –s enter the name or IP address of the FTP server without a space character.

-uUser Behind –u enter the user name (without a space character) that was configured in the FTP server.

-pPassword Behind –p enter the user password without a space character.

-cScript file Behind –c enter the name including the absolute path of the FTP script file without a space character.

Table 13 – FTPsimple command line parameters

Do not call FTPSimple in a batch but run with the START command.

Examples include: START FTPSimple.exe -s123.123.123.123 –uanonymous –pxyz -c\Flashdisk\System\x.ftp START FTPSimple.exe -sserversname –uanonymous –pxyz -c” \Flashdisk\System\x y z.ftp” The reason is that the FTPSimple console window would otherwise be hidden by another console window (of the batch that has not yet finished). Server, user and password can be defined in the FTP script with the open command. Remember though that this data can then be viewed by others!

���� Note

In FTPsimple, files are always transferred in binary mode.

Page 60: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 60 / 65

6.4.2.1 Software update with CE proprietary FTP cli ent script On a Windows CE device, a software update can also be executed via FTP. Several variations are presented below.

1. FTP download controlled in the application program. FTP-API from ACD can be used for programming (FTPlib.dll , FTPlib.lib, FTPlib.h).

2. FTP download when booting a Windows CE device. The call for the FTPsimple program must be added to the STARTUP configuration and configured with the appropriate parameters.

3. Double-tap the icon of an FTP script file to manually launch FTP download.

4. Execute a batch to manually launch FTP download. Example of an update batch (downloads an update.cab file) @echo off FTPsimple.exe -s10.1.2.3 –umyuser –pmypassword -c\ myscript.ftp if not exist update.cab goto ready \Windows\wceload.exe /noaskdest \Flashdisk\update.c ab :ready exit Example of a script file belonging to a batch

Script line Description

cd update Switches to the FTP server source directory.

get update.cab Transfers the CAB file to be installed in the batch.

bye Logs out and closes FTP connection.

Table 14 – Example of a script file software update

Page 61: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 61 / 65

Example of a script file that is executed with a double-tap

Script line Description

open ftpserver myusername mypassword

Connection with the FTP server. Enter the user and password.

cd update Switches to the FTP server source directory.

get update.cab Transfers the CAB file to be installed later.

bye Logs out and closes FTP connection.

Table 15 – Example 2 of script file software update

The ACD DeveloperPack offers among other features useful FTP functions.

6.5 Customising the startup screen The startup screen (in contrast to the Boot image (Chapter Fehler! Verweisquelle konnte nicht gefunden werden. ) and Start image) is displayed once the kernel has booted in order to bridge the initialisation time where users can access the desktop. It also acts as a platform to insert your own company’s logo. Without a customised image file, the startup screen displays the ACD logo. This logo is displayed immediately after the kernel is booted. In a seamless transition after the Boot image. To install another bitmap , it must be available in the same native resolution of the screen (240x320 pixels, 8-bit colour depth) as a bmp file with the name \flashdisk\ACDBitmapOnTop.bmp. The Start image is then quickly replaced with a progress bar to show the progress and alternating text. In this progress bar, another bitmap is displayed with the name \flashdisk\system\Logo.bmp. This can also be replaced with a customised image. This must be dimensioned to 220x90 pixels and 8-bit colour depth.

Page 62: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 62 / 65

6.6 ACD assistant programs Some small assistant tools are available that provide support with various (automatic) administrative tasks, e.g. with an update. Their functions are usually recommended for use rather than other solutions as these functions have been optimised based on the advanced functions of ACD Windows CE devices and provide added operational safety.

6.6.1 CEToolBox – collection of tools CEToolBox functions are a collection of various system functions and are described in the administration manual. The advanced functions are covered below. The syntax

CEToolBox - [command[ parameter]]

The commands Pause before execution [pause x] Adds a pause before the first command in the command line is run. If this command is defined on its own, the CEToolBox waits until the waiting time has elapsed and then closes. x=time in milliseconds (ms). Hides task bar [hidetaskbar] As the name suggests, this option hides the task bar. Registry [saveregistry | eraseregistry] Deletes/saves the registry. Memory division (RAM) [setsysmemdiv x | getsysmemdiv] Sets division of RAM between storage and system memory with x=memory in KB for storage memory. Gets RAM memory division with text output (function compatibility to SystemMemoryDivision.exe). Reboot [softresetclean|softreset|watchdogclean|watchdog] Variations with “clean”: RAM is deleted. Default if no parameter is transferred: watchdogclean Return value: 0 (program should not return) Caution: only the variations with “clean” are validated in the name. Use the variations without “clean” without support from ACD / for test purposes only.

Page 63: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 63 / 65

Shutdown [shutdown|suspend] Prompt a shutdown or suspend. Return value: 0 AutoOnReset of keyboard controller [setaonreset|delaonreset] Enables/deletes the AutoOnReset flag of TC which leads to an automatic reboot after a shutdown. AutoOnDS of keyboard controller [setaonds|delaonds] Enables/deletes the AutoOnDS flag of TC, which leads to an automatic switch on after suspend as long as the device is inserted in the docking station. AutoWakeup of keyboard controller [setautowakeup|delautowakeup] Enables/deletes the AutoWakeup flag of TC, which leads to an automatic switch on after suspend as long as the device is in suspend mode (suspend – immediate wakeup). Starts/stops Bluetooth device [btdevicestart | btdevicestop] Stops or starts the Bluetooth device. Forces reload of Bluetooth driver. Activates/deactivates SDIO [sdioon | sdiooff] Activates over power supply or resetting the module (not M300) General information on CEToolBox • If no valid command was identified or errors occurred in the execution, the return value is 9.

• It is possible to execute several commands in one single command line. The functions are then executed

in the command line parameter sequence. Functions used to retrieve a return value for evaluation must/should be the last/only function parameter of the CEToolbox

Page 64: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 64 / 65

List of tables Table 1 – Windows CE devices .......................................................................................................................... 4 Table 2 – Directory characteristics ..................................................................................................................... 6 Table 3 – Device overview ............................................................................................................................... 10 Table 4 – Unicode conversion .......................................................................................................................... 17 Table 5 – dev.ini backlight ................................................................................................................................ 26 Table 6 – keyboard mapping ............................................................................................................................ 27 Table 7 – scanner types ................................................................................................................................... 28 Table 8 – serial interface ports ......................................................................................................................... 29 Table 9 – RFID sequence description .............................................................................................................. 35 Table 10 – IE6 Win CE browser characteristics ............................................................................................... 42 Table 11 – FtpUpdate command line parameters ............................................................................................ 58 Table 12 – FTP script file .................................................................................................................................. 58 Table 13 – FTPsimple command line parameters ........................................................................................... 59 Table 14 – Example of a script file software update ........................................................................................ 60 Table 15 – Example 2 of script file software update ........................................................................................ 61

Index ACDDev.dll 9, 25, 31 ACDInit.bat 23 ACDStatView 25, 40 ACDWi.dll 40 Alphabetic keyboard 27 Autoapp.bat 8, 23, 24 Autostart 13, 23 Battery status 8, 25, 26 Bluetooth 11 Boot image 7 Boot-Bitmap 50 Booting 7 Bootloader 7, 45, 50 CAB file 54, 55 CE kernel 7, 45 CeAppMgr.exe 54 CEToolBox 9, 62 Company logo 61 Data exchange 11 Desktop 52, 61 dev.ini 25, 26 DevCtl.exe 8, 25 Developer CD 14 Device information 8 Display 8, 10, 25, 26 Distinction between memory types 6 Ethernet 40 ExtScan2KeyCE 29 Flash memory 6, 10 Flashdisk 45, 50 FTP server 56 FTP-Client 58

FTPlib.dll 58 FTPSimple.exe 58 FullScreen 43 IESimple 43 IrDA 10 JScript 41, 44 keyb.ini 27 Keyboard 8, 25, 27 Keyboard controller 5, 45, 50 Keyboard lock 27 LAN 12, 40 Links 51, 52 Mobile Device Center 11 MobileDeviceCenter 53, 54 One-finger operation 27 Operating system kernel 7 Partnership 12 Password 56, 59 PLD 5, 45, 50 Power management 25, 26 Power Saving 8 Program Memory 6 RAM memory 6, 10 References 51 Registry 6, 7, 12, 13, 54 Remapping the keyboard 27 RFID 9, 10, 27, 33 ROM file system 7 Save Registry 55, 56 ScanDrv 28, 29 ScanDrv.exe 25, 27 Scanner 9, 25, 27, 28

Page 65: WinCEGeräteSE Handbuch Programmierung v3.00 EN › wp-content › uploads › 2018 › 01 › WinCE… · ScanDrv scanner driver ... 5.10.3 Internet Explorer 6 architecture ... SD

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 65 / 65

Scanner API 28, 30 SDK 14 Serial interface 29 Serial number 8 Services 7 Shutdown 8 Software installation 53, 54 Start image 7, 61 Start menu 52 StartConfig 7, 24 Startup 23, 24, 53 Status bar 8, 25 Storage Memory 6 Suspend 8, 25, 26 Syncing 11, 12 System memory division 6 Time 12

Unicode 17 Update 45, 53, 57, 60 UpdateCE.bat 53, 55 USB 11, 27, 29 User programs 8 VBScript 41 Version information 8, 18, 25 Visual Studio 11, 14, 19 VNC 54 wceload.exe 55 Win32 API 51 Win32-API 5 WLAN 10, 11, 12, 40 xcopy 53 XML 41 XScale 5