Contents Contents ......................2 Overview ...................... 4 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 ACD functions ......................8 1.2.1 Status bar (DevCtl.exe) ....................
Page 3
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 RFID ..........................
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
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 Note their configuration, minor differences can significantly increase the time required for a potential conversion to Windows CE.
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.
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;...
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.
1.3 Overview of ACD Windows CE devices M210SE M260SE M215SE Description Mobile data terminal with integrated scanner, touchscreen Handheld terminal based and numeric keypad. 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’’...
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..
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.
To autostart programs when connecting and disconnecting devices, two entries are added to the registry. Examples: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE\Services\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.
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.
Page 15
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.
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.
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.
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().
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).
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.
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: •...
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.
Important software interfaces and device functions 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.
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 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 •...
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) •...
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.
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.
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 ExtScan2KeyCE_SoftwareDocu WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN...
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 parity 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.
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.
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.
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.
Page 34
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.
Sequence step / Parameter: Description: function: RFIDFindCards Transfer of RFID handle Get the physical dwCardFamily = CARDFAMILY_MIFARE transponder addresses lpTag = {0x9C 48 DE 35, 0x9C 4B 23 D2} (return parameter with lpnCount = 2 function) fSingleFindCard = FALSE RFIDSelectCard Transfer of RFID handle Select a Tag = {0x9C 4B 23 D2}...
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.
Page 37
void ShowReadData(HTAG Tag, LPBYTE lpabReadBlockData) 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_nSizeBlock; nChar++) _tprintf(_T("%02X"), lpabReadBlockData[nChar]); _tprintf(_T("\n")); BOOL ChangeBuffer(LPBYTE lpabBuf, int nSize) LPBYTE lpbHlp = (LPBYTE) malloc(nSize); if (!lpbHlp) return FALSE;...
Page 38
lResult = RFIDFindCards(g_hRfid, CARDFAMILY_MIFARE, &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);...
Page 39
#ifdef _UHF lResult = RFIDInit(&dwCardFamily, 5000, 8000, TRUE, &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, &Tag[0], &nFoundCards, FALSE); if (lResult != RFID_SUCCESS) // Error occurred when getting the transponder cards if (lResult == RFID_NO_TAG)
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.
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 Windows 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.
5.10.2 IE6 browser characteristics for Windows CE IE6 for Windows CE 2.63 MB for rendering / browser engine ROM footprint 4.2 MB for all catalogue items Printing Fixed width layout (dynamic fitting of page to screen) Back/forward navigation 64 KB RAM allocation for travel log Yes, provided as a sample application.
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.
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.
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.
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. 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.
6.1.2.3 Step-by-step installation (automatic sequence) 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.
Page 48
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. 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.
Page 49
Skip the test configuration Enter “00” and press the Enter key Skip the FTP setup Enter “00” and press the Enter key Reboot the device The device displays the desktop below once flashing is complete: Then execute CEReboot, this will complete the firmware update. WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 49 / 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.
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.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.
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.
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.
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.
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 server) 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.
6.4.1.3 Setting the root directory and other parameters 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).
Word from the command line Description Calls the FTP client program belonging to Windows. Suppresses the display of messages returned from remote servers. Disables interactive input when several files are transferred. -s:FTPUpdate.txt Transfers script file with the executable FTP commands. Defines the IP address or name of the various Windows CE devices.
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.
6.4.2.1 Software update with CE proprietary FTP client 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).
Example of a script file that is executed with a double-tap Script line Description Connection with the FTP server. open ftpserver myusername mypassword 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. Logs out and closes FTP connection.
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.
Page 63
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.
Need help?
Do you have a question about the M215SE and is the answer not in the manual?
Questions and answers