background image

 
 

 

 

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. 

Summary of Contents for M210SE

Page 1: ...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: ...efining 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 ...

Page 3: ...e 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 progra...

Page 4: ...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 availa...

Page 5: ...ivers 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 sec...

Page 6: ...ols 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 memor...

Page 7: ... 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 save...

Page 8: ... 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 M...

Page 9: ...l 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 sta...

Page 10: ...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 o...

Page 11: ...d 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 Win...

Page 12: ...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 t...

Page 13: ...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 t...

Page 14: ...tallation 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 re...

Page 15: ...nt 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: ...en 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 I...

Page 17: ...version 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 e...

Page 18: ...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: ...s 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 aspx FamilyID E497988A C93A 404C B161 3A0B323DCE24 Compact Framework 2 0 http www microsoft com downloads de de details aspx FamilyID aea55f2f 07b5 4a8c 8a44 b4e1b196d5c0 4 2 Creating a project Thi...

Page 20: ...d 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 conne...

Page 21: ... 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...

Page 22: ...ces 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 ap...

Page 23: ...ault 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...

Page 24: ... 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 application...

Page 25: ...he 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 ...

Page 26: ...uspend is entered in the Registry at HKEY_LOCAL_MACHINE System CurrentControlSet Control 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 consu...

Page 27: ...ccessible 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 in...

Page 28: ...ted 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 documentation 3 for the scanner driver Types ...

Page 29: ...external scanner ExtScan2KeyCE 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 avail...

Page 30: ... 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 applicati...

Page 31: ...TERED_MESSAGE uScannerMsg OnScannerMsg END_MESSAGE_MAP Process scanner message afx_msg LRESULT CMyAppDlg OnScannerMsg WPARAM wParam 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 f...

Page 32: ...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 document ...

Page 33: ...rs 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 pro...

Page 34: ... 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...

Page 35: ... 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...

Page 36: ...eful 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 v...

Page 37: ...mcpy 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 para...

Page 38: ...Result 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 ICode EPC ICode UID and EPC UHF...

Page 39: ...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_SUCCE...

Page 40: ...re 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 NDISC...

Page 41: ...bject 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 X...

Page 42: ...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 Scr...

Page 43: ...orers 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 recommend...

Page 44: ... 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: ... 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...

Page 46: ...date 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...

Page 47: ...ard 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...

Page 48: ...ppear on the screen The device may perform a reboot Calibrate the touchscreen and press the Enter key to 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: ...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: ... 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 controlle...

Page 51: ...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 app...

Page 52: ...inks 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 dev...

Page 53: ...em 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 th...

Page 54: ...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 installat...

Page 55: ...ls 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 CAB The noaskdest parameter triggers an automatic installation wh...

Page 56: ...ors 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 in 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 ...

Page 57: ... 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 servers 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 ...

Page 58: ... booted bye Logs out and closes FTP connection Table 12 FTP script file 6 4 2 FTP client function Windows CE device as client In addition to the FTP server service the FTPSimple program separate documentation 8 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 sim...

Page 59: ...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 ...

Page 60: ...ion 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 cab ready exit Ex...

Page 61: ...rt 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 mu...

Page 62: ...se 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...

Page 63: ...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 CETool...

Page 64: ...tatus 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...

Page 65: ...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 ...

Reviews: