General information Table of Contents SLG D10 Overview Configuration parameters MOBY D Description of protocols 1 2 3 SLG D11/D12 C/C++ MDWAPI Overview Configuration parameters Description of protocols Programming instructions 4 5 6 Software support for MOBY D Reader Family ID FEISC Installation Programming interface 7 8 Software support for ID FECOM serial interface Installation Programming interface 9 10 C++ Class Library ID FEDM Overview Basic features Base classes Global functions Reader class First steps in programming MOBY D Abbreviations Published in May 2005 11 12 13 14 15 A Safety instructions ! This manual contains notes that should be observed to ensure your personal safety and to protect the product and connected equipment from damage. These notes are highlighted in the manual by a warning triangle and are marked as follows according to the level of danger: Danger indicates an imminently hazardous situation which, if not avoided, will result in death, serious injury or considerable property damage. ! Warning ! Caution indicates an imminently hazardous situation which, if not avoided, may result in death, serious injury or considerable property damage. indicates an imminently hazardous situation which, if not avoided, may result in minor injury or property damage. Note highlights an important item of information about the product or indicates a section of the instructions that requires careful attention. Qualified personnel The equipment may be commissioned and operated by qualified personnel only. For the purposes of the safety instructions in this instruction manual, a "Qualified Person" is one who is authorized to commission, ground and label devices, systems and circuits according to accepted safety standards. Trademarks MOBY(R) is a registered trademark of SIEMENS AG. Microsoft(R), Windows(R), Visual C++(R) and Visual Basic(R) are registered trademarks of the Microsoft Corporation. Borland(R), C++Builder(R) and Delphi(R) are registered trademarks of the Inprise Corporation. The remaining names in this document may be trademarks which, when used by third parties for their own purposes, may result in a violation of the rights of the trademark bearer. Copyright (c) Siemens AG 2001, 2002, 2003, 2005 All rights reserved Exclusion of liability Passing this document on to third parties, reproducing this document or using or relating its contents is not permitted without express authority. Offenders will be liable for damages. All rights, including rights created by patent grant or registration of a utility model or design, are reserved. We have checked the contents of this Manual to ensure that they match the hardware and software described herein. However, because deviations cannot be completely ruled out, we cannot guarantee complete conformance. However, the information contained in this document is checked regularly and any necessary corrections are included in subsequent editions. We are thankful for any recommendations or suggestions. Siemens AG Automation & Drives Special Products, Automotive Industry Projects, Training P.O.Box 4848, D-90713 Nuremberg Siemens-Aktiengesellschaft We reserve the right to make technical changes. Order no. (4)J31069-D0138-U001-A3-7618 05/05 General information General information * These programming instructions describe a software library that is also available to you in the form of an annotated source code. For this reason, we shall refrain here from documenting any more than absolutely necessary to give you a basic understanding of the functionality and use of classes. We shall assume that the user of this library will read the source code and will be able to work his or her way through the details with the assistance of this documentation, the header files and the inserted comments. * Appendix A contains a Getting Started section that includes decision-making aids and describes the first steps in programming MOBY D. * Individual bits within a byte that are marked with a "0" are reserved for future testing or manufacturing purposes. These bits may not be modified. Doing so may cause the reader to malfunction. * The following numerical formats are used: 0...9: Decimal numbers 0x00...0xFF: Hexadecimal numbers b0...1: Binary numbers * Hexadecimal numbers in brackets "[ ]" indicate a control byte (command) or a status byte (error). - The following applies to read/write devices SLG D10/SLG D11/SLG D12. - No connections led out for digital input/output signals - No LEDs available for status indications or diagnoses - The SLG D11 and SLG D12 do not have buzzers. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 1 Table of Contents 05/05 Table of Contents General information ......................................................................................... 1 1 2 3 SLG D10 overview.................................................................................. 10 1.1 1.1.1 1.1.2 lntroduction ........................................................................................................ 10 MOBY D SLG D10............................................................................................. 10 Data safety......................................................................................................... 10 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 Data transmission between MOBY D SLG D10 and the host ........................... 11 Configuration commands and control commands ............................................. 11 ISO15693 host commands ................................................................................ 12 Buffered Read Mode.......................................................................................... 15 Scan mode......................................................................................................... 16 Reader Multiplex Mode...................................................................................... 18 1.3 1.3.1 1.3.2 Asynchronous interface ..................................................................................... 19 Data format and protocol frames ....................................................................... 19 CRC16 calculation algorithm ............................................................................. 21 SLG D10 configuration parameters (CFG) ........................................... 22 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 Reader parameters............................................................................................ 24 CFG0: Passwords.............................................................................................. 24 CFG1: General inputs and outputs.................................................................... 25 CFG2: COM interface ........................................................................................ 27 CFG3: HF interface I.......................................................................................... 31 CFG4: HF interface II......................................................................................... 34 CFG5: HF interface III........................................................................................ 35 CFG6: Reserved................................................................................................ 35 CFG7: Reserved................................................................................................ 36 2.2 2.2.1 2.2.2 Transponder parameters ................................................................................... 37 CFG8: General transponder parameters........................................................... 37 CFG9: Reserved................................................................................................ 42 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 System parameters............................................................................................ 43 CFG10: General system parameters................................................................. 43 CFG11: Buffered Read Mode............................................................................ 45 CFG12: Scan Mode ........................................................................................... 55 CFG13: Anticollision .......................................................................................... 63 CFG14: Reserved.............................................................................................. 66 CFG15: Reserved.............................................................................................. 66 Description of protocols for SLG D10.................................................. 67 3.1 3.1.1 2 Protocols for configuring the reader .................................................................. 67 [0xA0] Reader Login .......................................................................................... 67 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Table of Contents 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 [0x80] Read Configuration ................................................................................. 68 [0x81] Write Configuration ................................................................................. 69 [0x82] Save Configuration to EEPROM............................................................. 70 [0x83] Set Default Configuration........................................................................ 71 [0x85] Set System Timer ................................................................................... 72 [0x86] Get System Timer ................................................................................... 73 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.2.10 3.2.11 3.2.12 Protocols for controlling the reader.................................................................... 74 [0x52] Baud Rate Detection............................................................................... 74 [0x55] Start Flash Loader .................................................................................. 74 [0x63] CPU Reset .............................................................................................. 75 [0x65] Get Software Version.............................................................................. 75 [0x69] RF Reset................................................................................................. 77 [0x6A] RF ON/OFF ............................................................................................ 78 [0x6C] Set Noise Level ...................................................................................... 79 [0x6D] Get Noise Level...................................................................................... 80 [0x6E] Reader Diagnostic .................................................................................. 81 [0x6F] Basic antenna tuning .............................................................................. 83 [0x71] Set Output............................................................................................... 84 [0x74] Get Input ................................................................................................. 86 3.3 3.3.1 3.3.2 Special commands ............................................................................................ 87 [0x1B] Reset QUIET Bit (I-CODE1 transponders only) ..................................... 87 [0x1C] EAS (I-CODE1 transponders only) ........................................................ 87 3.4 3.4.1 3.4.1.1 3.4.1.2 3.4.1.3 3.4.1.4 3.4.2 3.4.3 3.4.4 3.4.4.1 3.4.4.2 3.4.4.3 3.4.4.4 3.4.4.5 3.4.4.6 3.4.4.7 3.4.4.8 3.4.4.9 3.4.4.10 3.4.4.11 3.4.4.12 3.4.4.13 Protocols for ISO15693 host commands........................................................... 88 Supported ISO15693 host commands for ISO15693 transponders.................. 88 Infineon (my-d)................................................................................................... 88 Philips (I-Code SLI)............................................................................................ 89 STMicroelectronics (LRI512) ............................................................................. 90 Texas Instruments (Tag-it HFI).......................................................................... 91 Supported ISO15693 host commands for I-Code1 Transponders.................... 92 Supported ISO15693 host commands for Tag-it HF Transponders.................. 93 [0xB0] Host commands for ISO15693: required and optional commands ........ 94 [0x01] Inventory ................................................................................................. 95 [0x02] Stay Quiet ............................................................................................... 97 [0x22] Lock Multiple Blocks ............................................................................... 98 [0x23] Read Multiple Blocks ............................................................................ 100 [0x24] Write Multiple Blocks ............................................................................ 103 [0x25] Select .................................................................................................... 105 [0x26] Reset to Ready ..................................................................................... 106 [0x27] Write AFI ............................................................................................... 107 [0x28] Lock AFI................................................................................................ 108 [0x29] Write DSFID.......................................................................................... 109 [0x2A] Lock DSFID .......................................................................................... 110 [0x2B] Get System Information........................................................................ 111 [0x2C] Get Multiple Block Security Status ....................................................... 113 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 3 Table of Contents 05/05 3.4.4.14 [0xA0] Read Config Block................................................................................ 115 3.4.4.15 [0xA1] Write Config Block ................................................................................ 116 3.4.5 [0xB1] Host commands for ISO15693: user-specific and manufacturerspecific commands .......................................................................................... 117 3.4.6 [0xBF] ISO15693 transparent command ......................................................... 118 4 5 4 3.5 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 Protocols for the Buffered Read Mode ............................................................ 121 Processes in the Buffered Read Mode............................................................ 121 Transponder access in the Buffered Read Mode............................................ 122 [0x21] Read Buffer........................................................................................... 123 [0x31] Read Data Buffer Info ........................................................................... 125 [0x32] Clear Data Buffer .................................................................................. 126 [0x33] Initialize Buffer ...................................................................................... 126 3.6 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 Appendix.......................................................................................................... 127 Codes for transponder types ........................................................................... 127 Time response of the asynchronous interface................................................. 128 Time response of the ISO15693 host commands ........................................... 129 Index of status bytes........................................................................................ 138 Index of control bytes....................................................................................... 141 Index of configuration parameters ................................................................... 142 Memory model for I-CODE1 transponders ...................................................... 143 Examples of Reading Data .............................................................................. 147 SLG D11/D12 overview ........................................................................ 151 4.1 4.1.1 4.1.2 4.1.3 Data transmission between MOBY D SLG D11/D12 and the host ................. 151 Configuration commands and control commands ........................................... 151 ISO15693 host commands .............................................................................. 152 Scan mode....................................................................................................... 155 4.2 4.2.1 4.2.2 Asynchronous interface ................................................................................... 157 Data format und protocol frame....................................................................... 157 CRC16 calculation algorithm ........................................................................... 159 SLG D11/D12 configuration parameters (CFG) ................................. 160 5.1 CFG0: Reserved.............................................................................................. 162 5.2 CFG1: Interface ............................................................................................... 162 5.3 CFG2: General inputs/outputs......................................................................... 166 5.4 CFG3: HF interface.......................................................................................... 168 5.5 CFG4: Transponder parameters ..................................................................... 169 5.6 CFG5: Anticollision .......................................................................................... 172 5.7 CFG6: Scan mode 1 ........................................................................................ 174 5.8 CFG7: Scan mode 2 ........................................................................................ 178 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6 Table of Contents Description of protocols for SLG D11/D12 ........................................ 180 6.1 6.1.1 6.1.2 6.1.3 6.1.4 Protocols for configuring the reader ................................................................ 180 [0x80] Read Configuration ............................................................................... 180 [0x81] Write Configuration ............................................................................... 181 [0x82] Save Configuration ............................................................................... 182 [0x83] Set Default Configuration...................................................................... 183 6.2 6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.2.7 Protocols for controlling the reader.................................................................. 184 [0x52] Baud Rate Detection............................................................................. 184 [0x55] Start Flash Loader ................................................................................ 184 [0x63] CPU Reset ............................................................................................ 185 [0x65] Get Software Version............................................................................ 186 [0x69] RF Reset............................................................................................... 187 [0x6A] RF ON/OFF .......................................................................................... 187 [0x71] Set Output............................................................................................. 188 6.3 6.3.1 Special commands .......................................................................................... 190 [0x1B] Reset QUIET Bit (I-CODE1 transponders only) ................................... 190 6.4 6.4.1 6.4.1.1 6.4.1.2 6.4.1.3 6.4.1.4 6.4.2 6.4.3 6.4.4 6.4.4.1 6.4.4.2 6.4.4.3 6.4.4.4 6.4.4.5 6.4.4.6 6.4.4.7 6.4.4.8 6.4.4.9 6.4.4.10 6.4.4.11 6.4.4.12 6.4.4.13 6.4.4.14 6.4.4.15 6.4.5 Protocols for ISO15693 host commands......................................................... 191 Supported ISO15693 host commands for ISO15693 transponders................ 191 Infineon (my-d)................................................................................................. 191 Philips (I-Code SLI).......................................................................................... 192 STMicroelectronics (LRI512) ........................................................................... 193 Texas Instruments (Tag-it HFI)........................................................................ 194 Supported ISO15693 host commands for I-Code1 Transponders.................. 195 Supported ISO15693 host commands for Tag-it HF Transponders................ 196 [0xB0] Host commands for ISO15693: required and optional commands ...... 197 [0x01] Inventory ............................................................................................... 198 [0x02] Stay Quiet ............................................................................................. 200 [0x22] Lock Multiple Blocks ............................................................................. 201 [0x23] Read Multiple Blocks ............................................................................ 203 [0x24] Write Multiple Blocks ............................................................................ 206 [0x25] Select .................................................................................................... 209 [0x26] Reset to Ready ..................................................................................... 210 [0x27] Write AFI ............................................................................................... 211 [0x28] Lock AFI................................................................................................ 212 [0x29] Write DSFID.......................................................................................... 213 [0x2A] Lock DSFID .......................................................................................... 214 [0x2B] Get System Information........................................................................ 215 [0x2C] Get Multiple Block Security Status ....................................................... 217 [0xA0] Read Config Block................................................................................ 219 [0xA1] Write Config Block ................................................................................ 220 [0xB1] Host commands for ISO15693: user-specific and manufacturerspecific commands .......................................................................................... 222 [0xBF] ISO15693 transparent command ......................................................... 223 6.4.6 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 5 Table of Contents 6.5 6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7 6.5.8 7 8 6 05/05 Appendix.......................................................................................................... 226 Codes for transponder types ........................................................................... 226 Time response of the asynchronous interface................................................. 227 Time response of the ISO15693 host commands ........................................... 228 Index of status bytes........................................................................................ 236 Index of control bytes....................................................................................... 239 Index of configuration parameters ................................................................... 239 Storage model for I-CODE1 transponders ...................................................... 240 Examples of Reading Data .............................................................................. 243 Installing the FEISC-DLL ..................................................................... 245 7.1 Introduction ...................................................................................................... 245 7.2 Installation........................................................................................................ 246 7.3 Integration into the application program .......................................................... 246 FEISC-DLL programming interface .................................................... 247 8.1 Overview .......................................................................................................... 247 8.2 Parameter passing........................................................................................... 249 8.3 Event signaling to applications ........................................................................ 250 8.4 8.4.1 8.4.2 8.4.3 8.4.4 8.4.5 8.4.6 8.4.7 8.4.8 8.4.9 8.4.10 8.4.11 8.4.12 8.4.13 8.4.14 8.4.15 8.4.16 8.4.17 8.4.18 8.4.19 8.4.20 8.4.21 8.4.22 8.4.23 List of functions................................................................................................ 251 FEISC_NewReader ......................................................................................... 254 FEISC_DeleteReader ...................................................................................... 255 FEISC_GetReaderList ..................................................................................... 256 FEISC_GetDLLVersion.................................................................................... 257 FEISC_GetErrorText ....................................................................................... 257 FEISC_GetStatusText ..................................................................................... 258 FEISC_GetReaderPara ................................................................................... 259 FEISC_SetReaderPara ................................................................................... 260 FEISC_AddEventHandler ................................................................................ 261 FEISC_DelEventHandler ................................................................................. 263 FEISC_BuildProtocol ....................................................................................... 264 FEISC_SplitProtocol ........................................................................................ 265 FEISC_SendTransparent ................................................................................ 266 FEISC_Transmit .............................................................................................. 267 FEISC_Receive ............................................................................................... 268 FEISC_GetLastSendProt................................................................................. 269 FEISC_GetLastRecProt................................................................................... 269 FEISC_GetLastState ....................................................................................... 270 FEISC_GetLastRecProtLen ............................................................................ 270 FEISC_GetLastError........................................................................................ 271 FEISC_0x1B_ResetQuietBit............................................................................ 271 FEISC_0x1C_EASRequest ............................................................................. 271 FEISC_0x21_ReadBuffer ................................................................................ 272 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 9 10 Table of Contents 8.4.24 8.4.25 8.4.26 8.4.27 8.4.28 8.4.29 8.4.30 8.4.31 8.4.32 8.4.33 8.4.34 8.4.35 8.4.36 8.4.37 8.4.38 8.4.39 8.4.40 8.4.41 8.4.42 8.4.43 8.4.44 8.4.45 8.4.46 8.4.47 8.4.48 8.4.49 FEISC_0x31_ReadDataBufferInfo .................................................................. 273 FEISC_0x32_ClearDataBuffer ........................................................................ 273 FEISC_0x33_InitBuffer .................................................................................... 274 FEISC_0x52_GetBaud .................................................................................... 274 FEISC_0x55_StartFlashLoader....................................................................... 274 FEISC_0x63_CPUReset ................................................................................. 275 FEISC_0x65_SoftVersion................................................................................ 275 FEISC_0x69_RFReset .................................................................................... 276 FEISC_0x6A_RFOnOff.................................................................................... 276 FEISC_0x6B_InitNoiseThreshold.................................................................... 276 FEISC_0x6C_SetNoiseLevel .......................................................................... 277 FEISC_0x6D_GetNoiseLevel .......................................................................... 277 FEISC_0x6E_RdDiag ...................................................................................... 278 FEISC_0x75_AdjAntenna................................................................................ 278 FEISC_0x71_SetOutput .................................................................................. 279 FEISC_0x74_ReadInput.................................................................................. 279 FEISC_0x80_ReadConfBlock ......................................................................... 280 FEISC_0x81_WriteConfBlock ......................................................................... 280 FEISC_0x82_SaveConfBlock.......................................................................... 281 FEISC_0x83_ResetConfBlock ........................................................................ 281 FEISC_0x85_SetSysTimer.............................................................................. 282 FEISC_0x86_GetSysTimer ............................................................................. 282 FEISC_0xA0_RdLogin..................................................................................... 283 FEISC_0xB0_ISOCmd .................................................................................... 284 FEISC_0xB1_ ISOCustAndPropCmd.............................................................. 285 FEISC_0xBF_ ISOTranspCmd........................................................................ 286 8.5 Support for multithreading ............................................................................... 287 8.6 8.6.1 8.6.2 8.6.3 Appendix.......................................................................................................... 289 ID FEISC error codes ...................................................................................... 289 List of parameter IDs ....................................................................................... 290 List of constants for the FEISC_EVENT_INIT structure.................................. 291 Installing the FECOM-DLL................................................................... 292 9.1 Introduction ...................................................................................................... 292 9.2 Installation........................................................................................................ 292 9.3 Integration into the application program .......................................................... 293 FECOM-DLL programming interface.................................................. 294 10.1 Overview .......................................................................................................... 294 10.2 Event signaling for control lines....................................................................... 296 10.3 10.3.1 10.3.2 List of functions................................................................................................ 297 FECOM_OpenPort .......................................................................................... 298 FECOM_ClosePort .......................................................................................... 299 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 7 Table of Contents 11 12 13 8 05/05 10.3.3 10.3.4 10.3.5 10.3.6 10.3.7 10.3.8 10.3.9 10.3.10 10.3.11 10.3.12 10.3.13 10.3.14 10.3.15 FECOM_GetPortList........................................................................................ 300 FECOM_GetDLLVersion ................................................................................. 301 FECOM_GetErrorText ..................................................................................... 301 FECOM_GetLastError ..................................................................................... 302 FECOM_GetPortHnd....................................................................................... 303 FECOM_GetPortPara...................................................................................... 304 FECOM_SetPortPara ...................................................................................... 305 FECOM_DoPortCmd ....................................................................................... 306 FECOM_AddEventHandler ............................................................................. 307 FECOM_DelEventHandler............................................................................... 309 FECOM_Transceive ........................................................................................ 310 FECOM_Transmit............................................................................................ 311 FECOM_Receive............................................................................................. 312 10.4 10.4.1 10.4.2 10.4.3 Appendix.......................................................................................................... 313 ID FECOM error codes .................................................................................... 313 List of parameter IDs ....................................................................................... 315 List of constants for the FECOM_EVENT_INIT structure ............................... 317 Class library overview ......................................................................... 318 11.1 11.1.1 11.1.2 Introduction ...................................................................................................... 318 Overview of all MOBY D components ............................................................. 319 Supported operating systems and development environments ...................... 320 11.2 Installation........................................................................................................ 321 11.3 11.3.1 11.3.2 Class overview................................................................................................. 322 Class structure diagram................................................................................... 322 Component diagram ........................................................................................ 323 Basic features of the class library...................................................... 324 12.1 Internal structure.............................................................................................. 324 12.2 Data containers................................................................................................ 326 12.3 Access constants............................................................................................. 328 12.4 Protocol traffic.................................................................................................. 329 12.5 Serialization ..................................................................................................... 329 12.6 Error handling .................................................................................................. 330 Base classes of the class library........................................................ 331 13.1 13.1.1 13.1.2 FEDM_Base .................................................................................................... 331 Functions (public) ............................................................................................ 331 Functions (protected)....................................................................................... 331 13.2 13.2.1 13.2.2 FEDM_DataBase............................................................................................. 332 Attributes (protected) ....................................................................................... 332 Attributes (public)............................................................................................. 333 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Table of Contents 13.2.3 13.2.4 14 15 A Functions (public) ............................................................................................ 334 Abstract functions (public) ............................................................................... 335 Global functions of the class library .................................................. 336 14.1 FEDM_Functions ............................................................................................. 336 14.2 14.2.1 14.2.2 14.2.3 Appendix.......................................................................................................... 338 FEDM error codes ........................................................................................... 338 List of storage type constants.......................................................................... 339 Macros ............................................................................................................. 339 FEDM_ISCReader reader class of the class library .......................... 340 15.1 Overview .......................................................................................................... 340 15.2 15.2.1 15.2.2 15.2.3 15.2.4 15.2.5 FEDM_ISCReader........................................................................................... 342 Implemented data containers .......................................................................... 342 Attributes (protected) ....................................................................................... 342 Functions (public) ............................................................................................ 343 Functions (protected)....................................................................................... 344 Examples for the use of the SendProtocol function ........................................ 345 15.3 15.3.1 FEDM_ISCTable.............................................................................................. 351 Examples for the use of the table .................................................................... 352 15.4 List of constants............................................................................................... 355 First steps in programming MOBY D ................................................. 356 A.1 Available SLG modes ...................................................................................... 356 A.2 Serial interface settings ................................................................................... 358 A.3 Parameterization of the SLG ........................................................................... 359 Abbreviations ............................................................................................... 362 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 9 SLG D10 overview 1 1.1 1.1.1 05/05 SLG D10 overview lntroduction MOBY D SLG D10 The SLG D10 are the long range readers of the MOBY D family. The MOBY D family covers the complete spectrum of reader ranges. It includes proximity, midrange and long range devices, which differ in their maximum write/read ranges. MOBY D readers of different types can be used together since the readers have the same communication interface. Each reader is equipped with a bidirectional asynchronous interface (RS 232 or RS 422). The multitag function is still another advantage. The readers use this function to read and write to different transponder types and to handle multiple transponders located within the HF field. The SLG D10 are the most powerful members of the MOBY D family. They have the widest reader range, the most extensive configuration options and the largest command set. However, their basic command set and functions are still fully compatible with the commands of the other MOBY D family members. Thanks to their extensive configurability, the SLG D10 can be readily adapted to any individual application by configuring their hardware and software. 1.1.2 Data safety Since it must be possible to safeguard your data against unauthorized access, the reader is equipped with the following protective mechanisms: * Configuration protection: Access to the configuration data stored in the reader EEPROM can be locked. Access to the configuration parameters stored in the reader is protected by a 32-bit password known as the "Reader ID" or the reader identifier. This ensures that the configuration parameters in the reader EEPROM can only be read or modified after the user logs in with a valid Reader ID using the [0xA0] Reader Login command, provided that a password has been defined. 10 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 1.2 SLG D10 overview Data transmission between MOBY D SLG D10 and the host There are five different kinds of data transmission between the MOBY D reader and the host (terminal, PC). ISO15693 host commands, Buffered Read Mode and Scan Mode are used for the exchange of data between the transponder and the host. Configuration commands and control commands are used for matching the reader parameters to various applications. The following table shows what interfaces are supported by the various kinds of data transmission: Asynchronous interface (RS 232 / RS 422) 1.2.1 Configuration commands Reader control commands ISO15693 host commands Buffered Read Mode Scan mode Configuration commands and control commands This type of data transmission is suitable for reader configuration and diagnosis via the asynchronous interface. The reader configuration parameters are stored in the reader memory. They must be stored in the EEPROM for the particular configuration data to be preserved even when the device is shut off. When the device is switched back on, the reader reads out the configuration from the EEPROM. Reader control diagnosis is executed immediately. The reader response contains status or data information of the command. Host (terminal / PC / ....) Parameter command / control command Reader Parameters received and saved / control command processed Yes No Status / date Error status C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 11 SLG D10 overview 1.2.2 05/05 ISO15693 host commands The ISO15693 host commands provide a way for host and transponders to exchange data with the aid of the reader. The transponders must remain within the recognition field of the reader. Note When you write data to a transponder, you must ensure that the transponder remains within the recognition field of the reader during the entire write procedure. If the transponder leaves the recognition field of the reader during the write procedure, data will be lost. The reader distinguishes between three modes. Addressed mode Before data can be read or written in addressed mode, the UID of the transponder must be known. You will learn the UID when you send the protocol [0x01] Inventory. When a transponder is located in the recognition field of the reader at this moment, it replies with its UID. The transponder must then be addressed with the correct UID during all subsequent read and write commands. The following flowchart shows the steps required for communication with a transponder in addressed mode. Host (Terminal / PC / ....) "Inventory" to query the UID Reader Transponder in antenna field? Yes No Status/number of selected transponders/UIDs Status = no transponders Read data with UID from the transponder Transponder with correct UID in the antenna field? Yes No Status/read transponder data Status = no transponder in reader field Write data with UID to the transponder Transponder with correct UID in the antenna field? Yes No Status OK Status = no transponder in read field 12 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 overview Not addressed mode In not addressed mode, you do not need to know the UID of the transponder. This mode is recommended when only one transponder is located in the recognition field of the reader. The following flowchart shows the steps required for communication with one transponder in not addressed mode. Host (Terminal / PC / ....) Read data Reader Transponder in antenna field? Yes No Status/read transponder data Status = no transponder in reader field Write data Transponder in antenna field? Yes No Status OK Status = no transponder in reader field C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 13 SLG D10 overview 05/05 Selected: In this mode, the reader only communicates with one selected transponder. Before you can read or write in select mode, the UID of the transponder must be known. You will learn the UID when you send the protocol [0x01] Inventory. In a second step, the transponder must be selected with the command [0x25] Select. This must contain the UID of the transponder. The following flowchart shows the steps required for communication with a transponder in select mode. Host (Terminal / PC / ....) "Inventory" for query of UID Reader Transponder in antenna field? Yes No Status/number of selected transponders/UIDs Status = no transponders Select transponder with UID Transponder with correct UID in the antenna field? Yes No Status/read transponder data Status = no transponder in reader field Read data Selected transponder in antenna field? Yes No Status/read transponder data Status = no transponder in reader field Write data Selected transponder in antenna field? Yes No Status OK Status = no transponder in reader field 14 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 1.2.3 SLG D10 overview Buffered Read Mode The Buffered Read Mode is a high-level operating mode that tracks down transponders in the detection range of the reader. This operating mode is especially suitable for those application that use the transponder for object identification. The Buffered Read Mode processes all data read from the transponders and filters operations to make the user interface transparent to transponder data and to keep data traffic between the reader and the host at a minimum. Only three commands are used for controlling the Buffered Read Mode. In this operating mode, the reader automatically selects the transponders in it detection range and reads their requested data. The transponder data that are thus read out are stored in a FIFO data buffer. The transponder data that were read out can then be read using the [0x21] Read Buffer command. This command always reads the first data set available in the data buffer. However, before you can retrieve the next data set from the buffer using the read command, you must first delete the data you already read using the [0x32] Clear Data Buffer command. If the Buffered Read Mode is enabled in the configuration block, CFG10: General system parameters, the reader begins reading transponder data immediately after it is switched on. The Buffered Read Mode can be reinitialized using the Fehler! Verweisquelle konnte nicht gefunden werden. command. In the Buffered Read Mode, the reader responds to each valid message with a data or status protocol. The response also contains the control byte received by the reader. Host (terminal / PC / ....) Read data Reader Transponder data in the data buffer ? Yes No Status protocol / data protocol Status = no valid data Clear data Transponder data read ? Yes No Status OK Status = no valid data C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 15 SLG D10 overview 05/05 Note * In the Buffered Read Mode, only read operations are possible. * Buffered Read Mode can only be used when Scan Mode is off. * Buffered Read Mode can be used together with Reader Multiplex Mode.1 1.2.4 Scan mode In this operating mode the reader automatically sends data to the host as soon as a transponder moves into its field and valid data could be read. In scan mode the contents of the message block (UID, data block) can be adjusted to all user applications. Scan mode can be used with the asynchronous interface. The reader starts outputting the protocol block as soon as all required data have been read correctly from the transponder. If the reader is unable to read the data of a protocol block completely and correctly, it does not output any data. If, for instance, the address of the data block is invalid, the UID of the transponder is not sent. Scan mode with the asynchronous interface The data are output as shown below based on their configuration. The specified order cannot be changed. The format of the sent protocols depends on the configuration and number of transponders in the recognition field of the reader. Example 1: One transponder is located in the recognition field. UID and data block are to be read. Example 2: Three transponders are located in the recognition field. Only the UID is to be read. PR 1 16 UID1 EZ UID2 EZ UID3 EZ Not possible with SLG D10 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 overview Example 3: Three transponders are located in the recognition field. Only the data block is to be read. PR Data1 EZ Data2 EZ Data3 EZ Example 4: Two transponders are located in the recognition field. UID and data block are to be read. PR PR: UID: Data: TZ: EZ: ts: tr: UID1 TZ Data1 EZ UID2 TZ Data2 EZ Communication prefix (optional) Serial number (fixed) Data blocks (can be programmed as desired) Separator character (optional) End character (optional) SCAN-LOCK-TIME Time until the next new read access of the transponder Note * If configuration protocols are to be sent to the reader when scan mode is active, we recommend that no transponder be located in the field of the reader during this time. * Only read operations are possible in scan mode. * Scan mode is only available when buffered read mode is deactivated. * Scan mode can be used together with Reader Multiplex Mode. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 17 SLG D10 overview 1.2.5 05/05 Reader Multiplex Mode The HF operations of the readers must be multiplexed to prevent the readers from interfering with each other and to permit operation of several readers close together. This is accomplished with multiplex mode. Together with buffered read mode, multiplex mode permits maximum operating speeds. Each reader passes control on to the next reader after it has concluded its task. This is like round robin control except that it is much faster than control executed by a single host, since it is controlled at reader level. To set up multiplex mode, buffered read mode or scan mode must be activated in configuration block CFG10: General system parameters (see chap.2.3.1). In addition, multiplex mode must be selected in the SYNC setting in configuration block CFG11: Buffered Read Mode (see chap. 2.3.2). The reader which is to trigger the multiplex chain must be configured as MASTER in the SYNC setting in configuration block CFG11: Buffered Read Mode. In multiplex mode, input signal IN1 and output signal OUT1 are reserved for the synchronization of the cable connections. Be sure to insulate signal input and signal output and to power them via external direct current. 18 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 1.3 1.3.1 SLG D10 overview Asynchronous interface Data format and protocol frames You can configure the SLG D10 reader via an asynchronous interface and write data to and read out data from transponders. Communication between the reader and the connected host (terminal, PC, etc.) is governed by fixed protocols. These are designed for data busses and contain a bus address. When data is transmitted via the asynchronous interface, the reader supplies the requested data or a status byte. The response also contains the transmitted control byte. The reader does not respond if a defective protocol frame is transmitted. Protocol frame Host Reader 1 2 3 LENGTH= n COM-ADR CONTRO L BYTE 4...(n-2) (n-1) PROTOCOL DATA MSB CRC16 n LSB CRC16 Host Reader 1 LENGTH = n 2 COM-ADR 3 CONTROL BYTE 4 STATUS 1 (5...(n-2)) (n-1) (PROTOCOL DATA) MSB CRC16 n LSB CRC16 LENGTH: Number of protocol bytes 1 ... n (6 ... 255) including length bytes and checksums COM-ADR: 0..254, device address in bus mode Note * The reader can always be accessed via device address 255! * The SLG D10 have only been provided with a point-to-point connection (RS 232, RS 422 upon request) (no RS 485)! 1 See chap. 3.6.4 Index of status bytes. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 19 SLG D10 overview 05/05 STATUS / PROTOCOL DATA: Contains status messages or protocol data from or for the reader. When the data are sent, the MSB is always transferred first when the reader is in ISO15693 host command mode (see also chapter 3.6.8 Examples of Reading Data). CRC16: Cyclic redundancy check of protocol bytes from 1 to (n-2), as indicated by the CCITT-CRC16 polynomial: x16 + x12 + x5 + 1 Starting value: 0xFFFF Data format Start bits: 1 Data bits: 8 Stop bits: 1 Parity: Even (default) Uneven None Timing * Waiting time at start A waiting time of at least 5 ms must be observed before sending a protocol start character (length byte). * Host reader: .. Reaction time Waiting time O 5...n ms O O5 ms min.O Host reader: .. .. .. .. .. * * Data timout The individual characters within a protocol must follow in intervals of not more than 12 ms. * O12 ms max. O O12 ms max. O O 12 ms max. O Host reader: 20 Character n Character n+1 Character n+2 .. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 1.3.2 SLG D10 overview CRC16 calculation algorithm Polynomial: x16 + x12 + x5 + 1 CRC_POLYNOM = 0x8408; Starting value: CRC_PRESET = 0xFFFF; 0xFFFF Example in C: unsigned int crc = CRC_PRESET; for (i = 0; i < cnt; i++) /* cnt = Number of protocol bytes without CRC */ { crc ^= DATA[i]; for (j = 0; j < 8; j++) { if (crc & 0x0001) crc = (crc >> 1) ^ CRC_POLYNOM; else crc = (crc >> 1); } } C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 21 SLG D10 configuration parameters (CFG) 2 05/05 SLG D10 configuration parameters (CFG) The configuration memory of the reader is divided into configuration blocks of 16 bytes each. Each block consists of 14 bytes of configuration parameters and a 2-byte CRC16 checksum. Each configuration block has a number (CFG0...CFGn). Configuration block structure in the configuration memory and EEPROM of the reader (CFG): Byte 0 1 2 3 4 5 6 7 8 9 10 11 12 Contents PARAMETERS 13 14 15 CRC16 The parameters are stored in two separate locations within the configuration memory: * Reader RAM * Storage EEPROM (for storing parameters when the device is switched off) You can address multiple locations in the configuration memory via the value of the CFG-ADR parameter described in chap. 3.1 Protocols for configuring the reader. CFG-ADR: CFGn: Memory address of the required configuration block LOC: Location of the configuration block (RAM / EEPROM) MODE: Specifies whether one or all configuration blocks are to be accessed Bit: Function 7 6 5 4 3 2 LOC MODE CFGn: Configuration block address 1 0 The configuration blocks in the EEPROM are protected by a 16-bit CRC checksum. These checksums are checked every time the reader is reset. If an incorrect checksum is detected, the reader enters the "EE Init Mode" error status and sets the faulty configuration block back to the default values. The LED1 flashes alternately red and green when EE-Init mode is activated. The reader responds to external commands with the "0x10 EEPROM Error" status. You can exit EE-Init Mode by resetting the block (cold start or [0x63] CPU Reset command). The reader then switches to the configured operating state if the checksum of all data records is correct. 1 22 Not available for SLG D10 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) Note * Malfunctions may occur if parameters are configured outside of their permissible range or if unspecified parameters are changed! * The EEPROM is returned to its default settings when the firmware is updated. The reader enters the "EE Init Mode" error status. Description of configuration parameter structure Byte 0 Contents Concerns RAM Any changes to this parameter become effective immediately after this configuration block is written to or stored in the RAM. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 1 2 ......n Concerns EEPROM - ..... Reserved Any changes to this parameter become effective only after this configuration block has been written to / stored in the EEPROM and the reader has been reset. These bits or bytes are reserved for future extensions or for internal testing and production purposes. They must not be modified, as this may lead to faulty reader operation. 23 SLG D10 configuration parameters (CFG) 2.1 2.1.1 05/05 Reader parameters CFG0: Passwords The parameters of configuration block CFG0 contain identification codes for the personalization of the reader. In this way, you can prevent unauthorized access to some reader functions. For security reasons, the data of this configuration block cannot be read by the host. Access is write access only. The [0x83] Set Default Configuration command is also not available. Byte Contents Default Byte Contents 0 1 2 3 READER ID 4 5 6 0x00 0x00 0x00 0x00000000 7 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 0x00 READER-ID: Password the host uses to log into the reader to read and write configuration parameter blocks. Note * READER-ID = 0x00000000 disables the password function. * A read procedure with the [0x80] Read Configuration command always yields `0x00000000'. * A changed password becomes effective when the reader is reset. * The [0x82] Save Configuration to EEPROM and [0x83] Set Default Configuration commands do not change register CFG0 if all configuration blocks are in use. * The [0xA0] Reader Login command is used to gain access to the configuration data. 24 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) Configuration protection Access to the configuration parameters stored on the reader is protected by a 32bit password called the READER ID. This means that the configuration parameters in the EEPROM of the reader can only be read or changed after a login with the command [0xA0] Reader Login has been performed with a valid reader ID. 2.1.2 CFG1: General inputs and outputs1 The parameters of configuration block CFG1 contain the digital input and output settings. Byte Contents Default Byte Contents Default 0 1 2 3 4 5 6 IDLE-MODE FLASH-IDLE IN-ACTIVE 0x00 REL-TIME MSB 0xA800 0xFC00 0x00 0x00 7 8 9 REL-TIME LSB OUT2- TIME 0x00 0x00 10 11 12 13 0x00 0x00 0x00 0x00 0x00 IDLE-MODE: Defines the status of the signal transmitters (OUT1, OUT2 and REL) during idle mode. Bit: 15 14 Function: REL mode 12 11 10 9 8 OUT2 mode OUT1 mode 0 0 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 Mode 1 13 Function b00 UNCHANGED Status of signal transmitter unchanged b01 ON Signal transmitter on b10 OFF Signal transmitter off b11 FLASHING Signal transmitter alternately on and off Not available for SLG D10 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 25 SLG D10 configuration parameters (CFG) 05/05 FLASH-IDLE: Assigns a separate flash frequency to each output. Bit: 15 14 Function: REL frequ. 13 12 11 10 9 8 OUT2 frequ. OUT1 frequ. 0 0 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 Frequ. Frequency b11 1 Hz b10 2 Hz b01 4 Hz b00 8 Hz IN-ACTIVE: Specifies whether the input is active on an open or closed contact: Bit: 7 6 5 4 3 2 1 0 Function 0 0 0 0 0 0 IN2 IN1 Bit = 0 Input active on closed contact Bit = 1 Input active on open contact REL-TIME: Determines the relay hold time. If the reader receives a valid transponder response, the relay will be active for the duration set here. The function is disabled by setting REL-TIME to zero. Range: 0x00 ... 0xFFFF (* 100 ms) = 100 ms ... 6553.5 s. OUT2-TIME: Defines the relay hold time. If the reader receives a valid transponder response, output 2 (OUT2) will be active for the duration set here. The function is disabled by setting OUT2-TIME to zero. Range: 0x00 ... 0xFFFF (* 100 ms) = 100 ms ... 6553.5 s. 26 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) 2.1.3 CFG2: COM interface The parameters of configuration block CFG2 contain the data transmission settings. Byte 0 1 2 3 4 5 6 Contents COM-ADR 0x00 BAUD TRANSFORM FLASHLOADERBAUD 0x00 TRRESPONSETIME 0x00 0x08 0x01 0x08 0x00 38400 baud e,8,1 38400 baud Default 0x00 Byte 7 8 9 10 11 12 13 Contents TRRESPONSETIME 0x00 0x00 0x00 0x00 0x00 0x00 Default 0x64 10 sec 1 COM-ADR : Reader bus address (0 .. 254) for communication via the asynchronous interface; intended for bus applications (not SLG D10). Note * Address 255 may not be configured. * The reader can be accessed via COM address 255 in the send protocol at any time. It then responds with the defined address. * For COM address 0, the reader reads out the bus address from the DIP1 ... DIP3 switch settings (not externally adjustable) either after being switched on or after the [0x63] CPU Reset command. 1 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11}. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 27 SLG D10 configuration parameters (CFG) 05/05 1 BAUD : The baud rate of the asynchronous interface is set here. BAUD Baud rate 0x05 4800 baud 0x06 9600 baud 0x07 19200 baud 0x08 38400 baud 0x09 57600 baud 0x0A 115200 baud Note A change to the baud rate becomes effective only after configuration block CFG2 has been written to / stored in the EEPROM and the reader has been reset. 1 28 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11}. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) 1 TRANS-FORM : This byte is used to define various parameters describing the data transmission format of the asynchronous interface. Bit: 7 6 5 4 3 2 1 Function: 0 0 0 0 S D P 0 P: Parity P Parity b00 None b01 Even b10 Uneven b11 Do not use. D: Data bits D Data bits b0 8 b1 Do not use. S: Stop bits S Stop bits b0 1 b1 Do not use. Note * Any changes to TRANS-FORM become effective only after configuration block CFG2 has been written to / stored in the EEPROM and the reader has been reset. * Eight data bits and one stop bit must always be used. 1 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11}. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 29 SLG D10 configuration parameters (CFG) 05/05 FLASH-LOADER-BAUD1: The baud rate of the flash loader is set here.2 BAUD Baud rate 0x06 9600 baud 0x07 19200 baud 0x08 38400 baud TR-RESPONSE-TIME: This byte allows you to specify the maximum response time for transponder commands. TR-RESPONSE-TIME starts when the reader has received a new command. The reader sends a response protocol at the latest after expiration of TR-RESPONSETIME. In this case, execution of current commands between reader and transponder are terminated. If this time is too short, the interface status [0x83] "HF communication error" appears. Max. response time TR-RESPONSE-TIME 1 ... 65535 * 100 msec Note * TR-RESPONSE-TIME has no influence on the protocols for the configuration and control of the reader. * TR-RESPONSE-TIME must be less than "Block Timeout" in the settings of the Com port of the host. 1 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11}. 2 See chap. 3.2.2 [0x55] Start Flash Loader 30 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) 2.1.4 CFG3: HF interface I The parameters of configuration block CFG3 contain global settings for the transponder driver and the reader. Byte 0 1 Contents TAG-DRV Default Byte 2 3 4 5 6 HFPOWER1 EASLEVEL FSK-RXCHN1 0x00 0x00 0x90 0xFF 0x02 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 1 0x000B 7 Contents 0x00 1 TAG-DRV : Specifies the transponder types to be handled by the reader. Byte: 0 1 Bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Driver 0 0 0 0 0 0 0 0 0 0 0 0 .D 0 .B .A b0 Driver for this transponder type is disabled. b1 .A: .B: .D: Driver for this transponder type is enabled. Driver for I-CODE1 Driver for Tag-it HF Driver for ISO15693 In general, you should only enable those transponder drivers that you require for a particular application. This will reduce reader response time to transponder read/write operations and rule out the possibility of "parasitic" transponder access as far as possible. 1 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11}. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 31 SLG D10 configuration parameters (CFG) 05/05 1 HF-POWER : Specifies the HF output power Bit: Function 7 6 5 MUL 0 LEVEL 4 3 2 1 0 MUL Defines the multiplier for LEVEL MUL b0 HF OUTPUT= LEVEL * 1 W b1 HF OUTPUT= LEVEL * 1/4 W LEVEL HF output power LEVEL HF output (MUL = b1) 1 0.25 W 2 0.50 W 3 0.75 W 4 1.00 W ... ... 39 9.75 W 40 10.0 W 41 10.25 W Note * The HF hardware is continuously checked by a monitoring function. In the event of an error, the reader responds to each command with error code 0x84. * A change in the HF OUTPUT becomes effective only after configuration CFG3 has been written to / stored in the EEPROM and the reader has been reset. 1 32 A plausibility test is performed when this parameter is stored in the readerIf an error occurs, the reader responds with STATUS = {0x11}. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) EAS-LEVEL: (I-CODE1 transponders only) Specifies the number of correct bits for the EAS command. 1 FSK-RX-CHN : (FSK transponders only) Specifies the type of receiver antenna. FSK-RX-CHN 0x00 Supplementary antenna only 0x01 Basic antenna only 0x02 Both antennas Note Although the SLG D10 has only one antenna, the parameter can still remain set to 0x02 (both antennas). 1 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11}. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 33 SLG D10 configuration parameters (CFG) 2.1.5 05/05 CFG4: HF interface II The parameters of configuration block CFG4 contain the values for noise-level settings. Byte 0 1 2 3 4 5 6 Contents NOISE-MIN NOISE-AVG NOISE-MAX NL-MODE Default 0x0000 0x0000 0x0000 0x00 Byte 7 Contents IGNOREWEAKCOLL Default 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 0x01 NOISE-MIN: Minimum noise level in mV NOISE-AVG: Average noise level in mV NOISE-MAX: Maximum noise level in mV NL-MODE: NL-MODE Noise level is set as follows 0 automatically 1 using the parameters specified under NOISE-MIN, NOISEAVG and NOISE-MAX or using the [0x6C] Set Noise Level command Note * When NL-MODE = {0}, the reader measures the noise levels continuously and stores them under NOISE-MIN, NOISE-AVG and NOISE-MAX. * To preserve the settings stored under NOISE-MIN, NOISE-AVG and NOISEMAX even after the device is switched off and after a [0x63] CPU Reset command, you must store this configuration block in the EEPROM using the [0x82] Save Configuration to EEPROM command. 34 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) IGNORE-WEAK-COLL: (only I-Code1 transponder) Specifies whether or not a weak collision provides valid data. IGNOREWEAK-COLL 2.1.6 0 Valid data in case of weak collision 1 Invalid data in case of weak collision; data ignored CFG5: HF interface III The parameters for configuration block CFG5 contain time settings for the transponder interface. Byte 0 Contents 0x00 1 2 3 4 5 6 0x00 0x00 0x00 0x00 0x00 RF-MOD Default Byte 0x0F 7 Contents 0x00 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 Default RF-MOD: HF modulation in 16% mode The adjustable range is 10% to 30% (0x0A ... 0x1E). 0x0A: 10% modulation ... ... 0x1E: 30% modulation 2.1.7 CFG6: Reserved Configuration block CFG6 is reserved for future use. Byte 0 Contents 0x00 Byte 7 Contents 0x00 1 2 3 4 5 6 0x00 0x00 0x00 0x00 0x00 0x00 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 35 SLG D10 configuration parameters (CFG) 2.1.8 05/05 CFG7: Reserved Configuration block CFG7 is reserved for future use. Byte 0 Contents 0x00 Byte 7 Contents 0x00 36 1 2 3 4 5 6 0x00 0x00 0x00 0x00 0x00 0x00 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 2.2 SLG D10 configuration parameters (CFG) Transponder parameters 2.2.1 CFG8: General transponder parameters The parameters of configuration block CFG8 contain general transponder settings. Byte 1 2 3 4 5 6 Contents I-CODEMODE FAMCODE APP-ID 0x80 ISO15693MODE ISO15693AFI ISO15693OPTION Default 0x01 0x00 0x00 0x0B 0x00 0x00 7 8 9 10 11 12 13 0x00 ISO15693TAGITOPTION 0x00 0x00 0x00 0x00 Byte 0 Contents ISO15693CMDOPTION Default 0x03 I-CODE-MODE: (I-CODE1 transponders only) Bit: 7 6 5 4 3 2 1 0 Function Mapping 0 0 0 0 0 0 FAST FAST FAST b0 Normal mode (1 / 256) b1 Fast mode (1 / 1) Mapping Mapping b0 Reserved b1 I-Code1 memory model FAM-CODE: (I-CODE1 transponders only) Family code for selecting a transponder C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 37 SLG D10 configuration parameters (CFG) 05/05 APP-ID: (I-CODE1 transponders only) Application ID for selecting a transponder Note If FAM-CODE and APP-ID are set to zero, all I-CODE1 transponders respond. Otherwise, only those transponders with the appropriate FAM-CODE and APP-ID respond. ISO15693-MODE: Bit: 7 6 5 4 3 2 1 Function 0 0 AFI NO-TS DATA- SUBRATE CARRIER 0 MOD DATACODING DATACODING DATACODING b0 Normal mode (1 / 256) b1 Fast mode (1 / 4) MOD MOD b0 100% This option increases the modulation bandwidth b1 10% SUB-CARRIER SUB-CARRIER b0 ASK (1 subcarrier) b1 FSK (2 subcarriers) Note The number of time slots (NO-TS) should be 16 in FSK mode. Only when just one transponder is in operation can the number of time slots be set to 1 to accelerate communication in FSK mode. 38 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) DATA-RATE DATA-RATE Data rate b0 Low b1 High NO-TS NO-TS b0 16 time slots b1 1 time slot Note When the number of time slots (NO-TS) is 1, anti-collision is only possible in ASK subcarrier mode. AFI AFI b0 Disabled b1 Enabled ISO15693-AFI: Identifier for the application family for selecting a transponder C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 39 SLG D10 configuration parameters (CFG) 05/05 ISO15693-OPTION: Bit: 7 6 5 4 3 2 Function 0 0 0 0 WR-OPTION 1 0 0 0 WR-OPTION WR-OPTION b00 Automatically set b10 Transponder option = 0 b11 Transponder option = 1 Note * If the WR-OPTION is set automatically, the reader sets WR-OPTION to 0 when the ISO15693 host command is in not-addressed mode. If a Tag-it HF transponder is used, WR-OPTION must be set to 1. * For more details on the correct WR-OPTION, see chapter 3.4.1 Supported ISO15693 host commands for ISO15693 transponders. ISO15693-CMD-OPTION: Bit: 7 6 5 4 3 2 1 Function 0 0 0 0 0 0 BREAK 0 BREAK BREAK b10 Pause time slot for "NO transponder" (Pause is always a 100% modulated EOF) This option accelerates the anticollision process but also increases the modulation bandwidth. b11 40 Total length of time slot for "NO transponder" C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) ISO15693-TAGIT-OPTION: Manufacturer-specific options Bit: 7 Function EN 6 5 4 3 2 1 0 0 0 0 0 0 INVREAD 0 INV-READ INV-READ b0 Read the inventory is deactivated. b1 Read the inventory is activated. Note This mode may only be used with buffered read mode. EN EN b0 Tag-it options deactivated b1 Tag-it options activated C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 41 SLG D10 configuration parameters (CFG) 2.2.2 05/05 CFG9: Reserved Configuration block CFG9 is reserved for future use. Byte 0 Contents 0x00 Byte 7 Contents 0x00 42 1 2 3 4 5 6 0x00 0x00 0x00 0x00 0x00 0x00 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 2.3 SLG D10 configuration parameters (CFG) System parameters 2.3.1 CFG10: General system parameters The parameters of configuration block CFG10 contain general system settings. Byte 0 Contents SYSMODE Default Byte 1 2 3 4 5 6 0x00 0x00 0x00 0x00 0x00 0x00 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 0x04 7 Contents 0x00 SYS-MODE: The SYS-MODE register is used to set the various reader operating modes. Bit: 7 6 5 4 3 2 Function 0 0 0 0 0 ACOLL 1 0 OP Mode OP ode: OP Mode Function b00 ISO15693 host mode b01 Buffered read mode b10 Scan mode ISO15693 host mode: You can use this bit combination to activate ISO15693 host mode. When ISO15693 host mode is activated, ISO15693 host commands can be used. Buffered read mode: You can use this bit combination to activate buffered read mode. When buffered read mode is activated, no ISO15693 host commands can be used. Scan mode: You can use this bit combination to activate scan mode. In scan mode the reader automatically sends the transponder data after it is detected. When scan mode is activated, ISO15693 host commands cannot be used. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 43 SLG D10 configuration parameters (CFG) 05/05 Note A change in OP mode becomes effective only after configuration block CFG10 has been written to / stored in the EEPROM and the reader has been reset. ACOLL: This bit enables the anticollision mode. The reader automatically sets transponderspecific communication parameters when in the anticollision mode. ACOLL Function b0 Disabled (default) b1 Enabled Note * When the anticollision mode is disabled, the reader does not perform anticollision procedures for transponders located within the antenna field. See the description of the parameters in CFG13: Anticollision. * When anti-collision mode is off, no Stay Quiet command is sent to the transponder. 44 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) 2.3.2 CFG11: Buffered Read Mode The parameters of configuration block CFG11 contain the Buffered Read Mode settings. To activate this mode, set the BRM bit in the SYS-MODE register of configuration block CFG10: General system parameters. If a large or unknown number of transponders is located within the antenna range, it is advisable to enable the anticollision mode. Buffered read mode can be used with the multiplex mode of the reader. The parameters for this function must be configured as described in this chapter. Byte 0 1 1 2 3 1 4 1 5 6 Contents TR-DATA DB-ADR DB-N TR-ID VALID-TIME Default 0x01 0x05 0x01 0x85 0x00 0x0A 0x80 7 8 9 10 11 12 13 0x00 0x00 0x00 0x00 Byte Contents SYNC SYNC-TIMEOUT Default 0x03E8 0x00 READ 1 TR-DATA : Selects the data types for reader operations Bit: 7 Function Byte order 6 5 4 3 2 1 0 0 TIMER 0 0 EAS DB UID UID UID Function b0 UID is not stored. b1 UID is stored. DB Data Block 1 Function b0 Data block is not stored. b1 Data block is stored. A plausibility test is carried out when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11}. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 45 SLG D10 configuration parameters (CFG) 05/05 EAS (only I-CODE1) EAS Function b0 No EAS function. b1 EAS command is executed. TIMER TIMER Function b0 No internal system timer. b1 Internal system timer activated. (for details, see chapter 3.1.6 on [0x85] Set System Timer) Note The internal system timer is not a real-time clock (RTC). Therefore, a specific degree of accuracy cannot be guaranteed. Byte order Specifies the order of the bytes within the protocol frame. Byte Order 46 Function b0 MSB first. b1 LSB first. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) DB-ADR: Address of the first data block. Range: 0x00...0xFF. For valid addresses see: chap. 3.6.7 Memory model for I-CODE1 transponders and chap. 3.4.1 Supported ISO15693 host commands for ISO15693 transponders. Bit: 7 6 5 4 Function 3 2 1 0 DB-ADR Note A change to DB-ADR becomes effective only after configuration block CFG11 has been written to / stored in the EEPROM and the reader has been reset. 1 DB-N : Number of data blocks. Range: 0x01...0x20. The data blocks in buffered read mode are always 4 bytes in size. See chap. 3.6.8 on Examples of Reading Data, buffered read mode (DB-SIZE of transponder = 4 bytes) and buffered read mode (DB-SIZE of transponder = 8 bytes). Valid numbers are found in: chap. 3.6.7 Memory model for I-CODE1 transponders and chap. 3.4.1 Supported ISO15693 host commands for ISO15693 transponders. Bit: 7 6 Function 0 0 5 4 3 2 1 0 DB-N Note A change to DB-ADR becomes effective only after configuration block CFG11 has been written to / stored in the EEPROM and the reader has been reset. 1 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11}. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 47 SLG D10 configuration parameters (CFG) 05/05 1 TR-ID : The TR-ID register sets the parameters for transponder identification. If the content of the addressed data block is the same for several transponders, only one data record is generated. Bit: 7 6 Function IDSOURCE 5 4 3 2 1 0 DB-ADR DB-ADR: Sets the data block address for transponder identification. If ID-SOURCE uses the UID as a data source, DB-ADR is ignored in the Buffered Read Mode. ID-SOURCE: Sets the data source for transponder identification. ID-SOURCE Function b0 Data block b1 UID Note * A change to the TR-ID becomes effective only after configuration block CFG11 has been written to / stored in the EEPROM and the reader has been reset. * Address TR-ID DB-ADR must lie within the range of the selected data block: TR-DATA DB-ADR TR-ID DB-ADR TR-DATA DB-ADR + TR-DATA DB-N - 1. * TR-ID TR-ADR is used as the UID for Tag-it HF transponders, provided that UID has not been selected in the TR-DATA configuration parameter. 1 48 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11}. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) VALID-TIME: Minimum time period within which a transponder must be identified before it can be read a second time. Time period VALID-TIME 0...65535 x 100 ms Note A change to VALID-TIME becomes effective only after configuration block CFG11 has been written to / stored in the EEPROM and the reader has been reset. READ: (Tag-it HF and ISO15693 transponders only) Specifies whether, in the event of a read error for an ISO15693 transponder, the missing data blocks should be re-read repeatedly until VALID-TIME has expired. This setting is intended for reading transponders under poor reading conditions (noise, motion, poor location, etc.). Bit: 7 6 5 4 3 2 Function 0 0 0 0 RE-READ 1 0 RE-READ: Indicates how often data blocks should be re-read after a read error. RE-READ Function b0000 No new read ... ... b1111 15x new read RE-READ = 0 means that the reader forces a read access when an error occurs during the first read access but does not read again. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 49 SLG D10 configuration parameters (CFG) 05/05 SYNC: Sets the synchronization parameters Bit: 7 Function RFOFF 6 5 4 3 2 1 0 0 0 0 MASTER MODE 0 MODE: MODE Function b00 Multiplex mode OFF b11 Multiplex mode ON MASTER: MASTER Function b0 Slave b1 Master RFOFF: b0: When the reader has concluded its HF communication task and transferred control to the next reader, the HF field is not turned off. Only the task is concluded. b1: When the reader has concluded its HF communication task and transferred control to the next reader, the HF field is turned off. Note One reader in the synchronization chain must be configured as MASTER so that it can start synchronization. SYNC-TIMEOUT: (0...65535 x 1 msec = 0 msec ... 65.535 seconds) Timeout between two synchronization pulses. Note When the reader does not detect a synchronization pulse on "IN1" within the SYNC-TIMEOUT time, it automatically generates a synchronization pulse on "OUT1" after SYNC-TIMEOUT expires. In addition, the error message [0x85] for synchronization error appears. 50 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) Example 1 Only one transponder is located in the antenna field. The transponder requires one second to pass by the antenna. The antenna field is uniform and has no "HF holes". The application data are located in data blocks 1 and 2. The internal system time is needed to determine when the transponder has passed by the antenna. CFG10: General system parameters 0 1 2 3 4 5 6 Contents Byte SYS-MODE - - - - - - Settings 0x01 0x00 0x00 0x00 0x00 0x00 0x00 Byte 7 8 9 10 11 12 13 Contents - - - - - - - Settings 0x00 0x00 0x00 0x00 0x00 0x00 0x00 4 5 6 CFG11: Buffered Read Mode Byte 0 1 2 3 Contents TR-DATA DB-ADR DB-N TR-ID VALID-TIME READ Settings 0x22 0x01 0x02 0x01 0x0014 0x00 7 8 9 10 11 12 13 Contents SYNC SYNC-TIMEOUT - - - - Settings 0x00 0x00 0x00 0x00 0x00 0x00 5 6 Byte 0x00 CFG13: Anticollision Byte 0 1 2 3 4 Contents TIMESLOTS DIFFHASH MINHASH MAXHASH COLLISIONS - Settings 0x00 0x00 0x00 0x00 0x2222 0x00 Byte 7 8 9 10 11 12 13 Contents - - - - ONT - - Settings 0x00 0x00 0x00 0x00 0x01 0x00 0x00 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 51 SLG D10 configuration parameters (CFG) 05/05 CFG10: General system parameters * Buffered Read Mode is enabled * Anticollision mode is disabled CFG11: Buffered Read Mode * Data blocks 1 and 2 with time information * Data block 1 is used to identify the transponder * Each transponder must pass by the antenna in two seconds. CFG13: Anticollision (disabled) * I-CODE1 transponders are read with a time slot and a hash value = 0. * I-CODE1 and Tag-it HF transponders are read without the anticollision procedure. 52 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) Example 2 There is an unknown number of transponders in the antenna field at a given point in time. The packets require two seconds to pass by the antenna. The antenna field is not unifom and contains "HF holes". The application data are located in data blocks 1 and 2. CFG10: General system parameters Byte 0 1 2 3 4 5 6 Contents SYS-MODE - - - - - - Settings 0x05 0x00 0x00 0x00 0x00 0x00 0x00 Byte 7 8 9 10 11 12 13 Contents - - - - - - - Settings 0x00 0x00 0x00 0x00 0x00 0x00 0x00 5 6 CFG11: Buffered Read Mode Byte 0 1 2 3 4 Contents TR-DATA DB-ADR DB-N TR-ID VALID-TIME READ Settings 0x02 0x01 0x02 0x01 0x0028 0x80 7 8 9 10 11 12 13 Contents SYNC SYNC-TIMEOUT - - - - Settings 0x00 0x00 0x00 0x00 0x00 0x00 4 5 6 Byte 0x00 CFG13: Anticollision Byte 0 1 2 Contents TIMESLOTS DIFFHASH MIN-HASH MAXHASH COLLISIONS - Settings 0x53 0x00 0x00 0x00 0x2222 0x00 Byte 7 8 9 10 11 Contents - - - - ONT - - Settings 0x00 0x00 0x00 0x00 0x01 0x00 0x00 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 3 12 13 53 SLG D10 configuration parameters (CFG) 05/05 CFG10: General system parameters * Buffered Read Mode is enabled * Anticollision mode is enabled CFG11: Buffered Read Mode * Data blocks 1 and 2 with time information are read by the transponders * Data block 1 is used for identifying the transponders * Each transponder must pass by the antenna in four seconds. * If read errors occur for a Tag-it HF transponder, the reader attempts to re-read this transponder within 4 seconds. CFG13: Anticollision * I-CODE1 transponders are read with 16 to 64 time slots and a hash value = 0 using the anticollision procedure. * I-Code1 and Tag-it HF transponders are read without the anticollision procedure. 54 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 2.3.3 SLG D10 configuration parameters (CFG) CFG12: Scan Mode The parameters of configuration block CFG12 contain the settings for scan mode. To activate scan mode, set the SCAN-MODE bit in the SYS-MODE register of configuration block CFG 10: General System Parameters. See chapter 2.3.1. Scan mode can be used with multiplex mode of the reader. The parameters for this function must be configured in CFG11: Buffered Read Mode (see chap. 2.3.2). Byte Contents Default Byte Contents Default 0 1 2 3 4 5 6 SCANNERMODE 0x00 0x00 SCANDATA DB-ADR D-LGT SCANLOCKTIME 0x01 0x05 0x04 0x00 0x02 7 8 9 10 11 12 13 SCANLOCK-TIME D-START DB-USE SEPCHAR SEP-USR ENDCHAR END-USR 0x0A 0x00 0x02 0x20 0x00 0x01 0x00 ASCII Comma 10 seconds CR+LF SCANNER MODE: Specifies the type of scan procedure. Bit: 7 Function Trigger 6 5 4 3 0 0 0 0 2 1 0 Mode Mode: Mode Function b000 Read once b010 Read continuously Read once: (Activated during the read procedure. Ends after successful read access.) As soon as transponders have been decoded, the reader concludes the scan procedure. The reader must be triggered again before additional transponders can be read. Read continuously: The reader recognizes as many transponders as it can decode regardless of whether these are always the same transponders or different ones. This mode is primarily suitable for demonstrative and diagnostic purposes. The reader automatically forces an HF reset between two read procedures. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 55 SLG D10 configuration parameters (CFG) 05/05 Trigger: Trigger Function b0 Trigger deactivated b1 Trigger activated Trigger deactivated: The reader scans continuously. This mode increases power consumption, however. Trigger activated: The reader begins scanning when the trigger is activated. The digital input IN2 can be used as the trigger signal to start the scan procedure. The trigger pulse must last at least 100 msec. SCAN-DATA: Selects the data types to be sent in scan mode Bit: 7 Function Byte order 6 5 4 3 2 1 0 COM prefix TIME 0 0 0 DB UID If one of the bits 0 to 1 (UID, DB) is not set, scan mode remains disabled. UID When this bit is set, the UID is output. UID Function b0 No output of the UID b1 Output of the UID DB (data block) When this bit is set, a specified data field is output. DB Function b0 No output of a data field b1 Output of a data field TIME Internal system timer (for details, see chapter 3.1.6 [0x85] Set System Timer) When this bit is set, output of the internal system timer is activated. TIME 56 Function b0 No output of the internal system timer b1 Output of the internal system timer C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) COM prefix: When this option is set, the reader transfers the COM-ADR before each data record. COM prefix Function b0 COM-ADR of the reader is not transferred. b1 COM-ADR of the reader is transferred. Byte order: Specifies the order of the bytes within the protocol framework. Byte order Function b0 MSB first b1 LSB first DB-ADR: Transponder address of the first data block which is transferred in scan mode. Range: 0x00 to 0xFF. For valid addresses, see chapter 3.6.7 Memory model for I-CODE1 transponders and chapter 3.4.1 Supported ISO15693 host commands for ISO15693 transponders. D-LGT: D-LGT defines the length of raw data transferred during scan mode. The number of data bytes to be transferred, starting with D-START. Example: Data block Note A maximum of 254 bytes including UID, time and so on can be transferred with the interface. If more than 254 bytes are sent, the last bytes are cut off. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 57 SLG D10 configuration parameters (CFG) 05/05 SCAN-LOCK-TIME: (1 ... 65535 * 100 msec = 100 msec ... 6553.5 sec) SCAN-LOCK-TIME specifies the time during which the reader does not send the transponder data a second time after the first send procedure. It makes no difference whether or not the transponder is in the recognition field of the reader during SCAN-LOCK-TIME. SCAN-LOCK-TIME begins after the data are sent from the transponder to the reader. tr: to: ts: Time for reading the transponder data Data transmission from reader to host SCAN-LOCK-TIME During the SCAN-LOCK-TIME it makes no difference whether or not the transponder is located in the recognition field of the reader. D-START: This parameter defines the first byte of raw data (defined by DB-ADR and D-LGT) which is transferred in scan mode. To transfer the entire data block, D-START must be set to 0. Note The size of a data block depends on the type of transponder. 58 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) DB-USE: Specifies the data format Bit: 7 6 5 4 Function 0 0 0 0 3 2 1 0 DB-FORMAT DB-FORMAT: b0000 Unformatted hexadecimal data The data are sent here as they were read from the transponder. b0010 ASCII-formatted hexadecimal data The raw data received from the transponder are converted here to ASCII code before being sent. The data bytes are separated first into nibbles and then converted in accordance with the following table to ASCII characters. Raw Data (Hex./Binary) ASCII Data (ASCII/Hex) 0x0 b0000 `0' 0x30 0x1 b0001 `1' 0x31 0x2 b0010 `2' 0x32 0x3 b0011 `3' 0x33 0x4 b0100 `4' 0x34 0x5 b0101 `5' 0x35 0x6 b0110 `6' 0x36 0x7 b0111 `7' 0x37 0x8 b1000 `8' 0x38 0x9 b1001 `9' 0x39 0xA b1010 `A' 0x41 0xB b1011 `B' 0x42 0xC b1100 `C' 0x43 0xD b1101 `D' 0x44 0xE b1110 `E' 0x45 0xF b1111 `F' 0x46 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 59 SLG D10 configuration parameters (CFG) 05/05 SEP-CHAR/END-CHAR: Specifies the separator character/end character between two data types for the sending data Bit: 7 Function USER 6 5 4 `' `,' `;' ASCII CR+LF 2 TAB 1 CR 0 LF CR+LF Hex 0x0D and 0x0A CR 0x0D LF 0x0A TAB 0x07 `;' 0x3B `,' 0x2C `' 0x20 USER 3 User-defined in SEP-USR/END-USR Note Only one option can be selected. SEP-USR: User-defined separation character END-USR: User-defined end character 60 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) Scan read mode, examples The diagram below shows the function of the four different settings of scan mode. The examples assume use of only one transponder in the antenna field. Read once, trigger deactivated Trigger (IN2) Scan Lock Time Transponder outside the field Transponder outside the field Readaccess bad Readaccess bad HF communication Readaccess okay Readaccess okay Readaccess okay Host communication Read once, trigger activated Trigger (IN2) Scan Lock Time Start Transponder outside the field Start Transponder outside the field Start HF communication ReadLesen ok. access okay Readaccess bad Readaccess okay Readaccess okay Host communication In "read once" mode the reader only sends data to the host when new transponders were detected or the transponders left the antenna field during SCAN-LOCKTIME and reentered the field later. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 61 SLG D10 configuration parameters (CFG) 05/05 Read continuously, trigger deactivated Trigger (IN2) Scan Lock Time RF reset RF reset RF reset RF reset HF communication Readaccess okay Readaccess okay Readaccess okay Readaccess okay Host communication Read continuously, trigger activated Trigger (IN2) Scan Lock Time RF reset RF reset RF reset RF reset RF reset HF communication ReadLesen access ok. okay Readaccess okay Readaccess okay Readaccess okay Readaccess okay Host communication In "read continuously" mode the reader sends data to the host when new transponders were detected or SCAN-LOCK-TIME for the transponders is over. 62 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 2.3.4 SLG D10 configuration parameters (CFG) CFG13: Anticollision The parameters of configuration block CFG13 contain anticollision settings. To enable the anticollision mode, set the ACOLL bit in the SYS-MODE register in configuration block CFG10: General system parameters. Byte Contents Default Byte Contents 0 1 2 3 4 TIMESLOTS DIFFHASH MIN-HASH MAXHASH COLLISIONS 0x11 0x04 0x00 0x9F 0x2222 7 8 9 10 11 12 13 0x00 0x00 0x00 0x00 ONT 0x00 0x00 Default 5 6 0x00 0x01 TIMESLOTS: (I-CODE1 transponders only) Number of time slots with which the transponders are read. Bit: 7 6 Function 0 5 4 MAX-TS 3 2 0 MIN-TS 1 0 MIN-TS: Minimum number of time slots MAX-TS: Maximum number of times slots MIN-TS / MAX-TS Number of time slots b111 256 b110 128 b101 64 b100 32 b011 16 b010 8 b001 4 b000 1 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 63 SLG D10 configuration parameters (CFG) 05/05 Each I-CODE1 transponder responds in a selected time slot. If too few time slots are selected for the number of transponders in the antenna field, only a limited number of transponders can be selected simultaneously. Too many time slots lead to lengthy delays. The optimum number of time slots lies at about twice the number of I-CODE1 transponders expected to be found in the antenna field at one time. The reader calculates the expected number of transponders from the parameters in COLLISIONS and sets the corresponding number of time slots to between MIN-TS and MAX-TS. To force a fixed number of time slots, both MIN-TS and MAX-TS must contain the required number of time slots. Note If the anticollision mode is disabled in configuration block CFG10: General system parameters, the reader uses MIN-TS for communication with the transponders. DIFF-HASH: (I-CODE1 transponders only) Value by which the hash value is changed between two transponder selections. 7 6 5 4 Function 0 0 0 DIFF-HASH Bit: 3 2 1 0 2 1 0 2 1 MIN-HASH: (I-CODE1 transponders only) Minimum hash value. 7 6 5 4 Function 0 0 0 MIN-HASH Bit: 3 MAX-HASH: (I-CODE1 transponders only) Maximum hash value. 7 6 5 4 Function 0 0 0 MAX-HASH Bit: 3 0 The hash value and the UID of an I-CODE1 transponder specify the time slot in which the transponder responds. The hash value begins at MIN-HASH and is increased by DIFF-HASH after each transponder selection. If the hash value exceeds MAX-HASH, the difference between the hash value and MAX-HASH is added to MIN-HASH. To set a fixed hash value, both MIN-HASH and MAX-HASH must contain the required hash value. DIFF-HASH is then ignored. Hash values 64 MIN-HASH MAX-HASH DIFF-HASH 0 0 0 Ignored 0-4-8 0 8 4 0 - 4 - 8 - 2 - 6 - 10 0 10 4 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D10 configuration parameters (CFG) Note If the anticollision mode is disabled, the reader uses the hash value = 0 for transponder communication. COLLISIONS: (I-CODE1 transponders only) These parameters are used to calculate the expected number of time slots in the antenna field. The following equation is used for this purpose: Time slots TS-TR * (weak collisions * TR-WEAK + strong collisions * TR-COLL + checksum error * TR-CRC) The calculated number of time slots is rounded up to a valid value between MIN-TS and MAX-TS. Byte 4 Bit 15 5 14 13 Function TS-TR 12 11 10 9 TR-WEAK 8 7 6 5 TR-COLL 4 3 2 1 0 TR-CRC TS-TR: Number of time slots per suspected transponder at the common air interface TR-WEAK: Number of transponders per weak collision at the common air interface TR-COLL: Number of transponders per collision at the common air interface. TR-CRC: Number of transponders per checksum error at the common air interface ONT: Specifies which transponder data are sent to the host 7 6 5 4 3 2 1 0 Function 0 0 0 0 0 0 0 ONT Bit: ONT: ONT b0 Function The data of all transponders in the field are sent to the host. The reader carries out an RF reset prior to each command that reads an UID. b1 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 Only the data of the newly selected transponders are sent to the host. 65 SLG D10 configuration parameters (CFG) 2.3.5 05/05 CFG14: Reserved The configuration block CFG14 is reserved for later use. Byte 0 Contents 0x00 Byte 7 Contents 0x00 2.3.6 1 2 3 4 5 6 0x00 0x00 0x00 0x00 0x00 0x00 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 CFG15: Reserved The configuration block CFG15 is reserved for later use. Byte 0 Contents 0x00 Byte 7 Contents 0x00 66 1 2 3 4 5 6 0x00 0x00 0x00 0x00 0x00 0x00 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3 Description of protocols for SLG D10 Description of protocols for SLG D10 3.1 Protocols for configuring the reader Using the reader configuration protocols, the reader can be adapted to a wide range of specific conditions for different applications. The configuration parameters cannot be accessed until the command [0xA0] Reader Login has been executed with the correct READER-ID. Since your data must be protected against unauthorized access, the reader is provided with the following protection routine. * Configuration protection Access to the configuration data stored in the EEPROM of the reader is locked. 3.1.1 [0xA0] Reader Login To gain access to the configuration parameters, the reader login must be performed every time the device is switched on or the [0x63] CPU Reset command is carried out. Host reader: 1 2 3 4...7 8,9 9 COM-ADR [0xA0] READER-ID CRC16 2 3 4 5,6 Host reader 1 6 COM-ADR [0xA0] STATUS 1 CRC16 READER-ID: The READER-ID is a password that protects the configuration parameters from all read and write access. READER-IDs can be changed in configuration block CFG0: Passwords. Note * Logging in with an incorrect READER-ID can cause you to become "logged out." * You can log out using the [0x63] CPU Reset command. 1 See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 67 Description of protocols for SLG D10 3.1.2 05/05 [0x80] Read Configuration "Read Configuration" lets you determine the current configuration of the reader. The configuration is read in blocks of 14 bytes each and addressed by CFGn in the CFG-ADR byte. Host reader 1 2 3 4 5,6 6 COM-ADR [0x80] CFG-ADR CRC16 Host reader 1 2 3 4 5...18 19,20 20 COM-ADR [0x80] STATUS1 CFG-REC CRC16 2 CFG-ADR : Bit: 7 Function LOC CFGn: LOC: 6 5 4 3 2 0 CFGn: Configuration block address 1 0 Memory address of the required configuration block Configuration block location LOC Block location b0 RAM b1 EEPROM CFG-REC: Configuration block with a length of 14 bytes that was read from address CFGn in CFG-ADR. Note * If the password function has been enabled, you must execute the [0xA0] Reader Login command before you can read the configuration block. Otherwise, error code 0x13 will be output. * An attempt to read reserved configuration blocks leads to error code 0x15. 1 See chap. 3.6.4 Index of status bytes 2 See chap. 2 SLG D10 configuration parameters (CFG) 68 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D10 3.1.3 [0x81] Write Configuration The "Write Configuration" command lets you modify the reader configuration. To do so, write blocks with a length of 14 bytes each in the configuration memory. The blocks are addressed by CFGn in the CFG-ADR byte. A description of the parameters is found in chap. 2 SLG D10 configuration parameters (CFG). Host reader 1 2 3 4 5...18 19,20 20 COM-ADR [0x81] CFG-ADR CFG-REC CRC16 Host reader 1 2 3 4 5,6 6 COM-ADR [0x81] STATUS1 CRC16 2 CFG-ADR : Bit: Function CFGn: LOC: 7 6 5 4 3 2 LOC 0 CFGn: Configuration block address 1 0 Memory address of the required configuration block Configuration block location LOC Block location b0 RAM b1 EEPROM CFG-REC: Configuration block with a length of 14 bytes that is stored in the reader configuration memory under address CFGn. Note * If the password function is enabled, you must execute the [0xA0] Reader Login command before you can save the configuration block. Otherwise, error code 0x13 will be output. * An attempt to write to reserved configuration blocks leads to error code 0x16. 1 See chap. 3.6.4 Index of status bytes 2 See chap. 2 SLG D10 configuration parameters (CFG) C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 69 Description of protocols for SLG D10 3.1.4 05/05 [0x82] Save Configuration to EEPROM This command lets you write the configuration block (CFG-ADR) in the RAM configuration memory to the EEPROM configuration memory of the reader. Host reader 1 2 3 4 5,6 6 COM-ADR [0x82] CFG-ADR CRC16 1 2 3 4 5,6 6 COM-ADR [0x82] STATUS1 CRC16 Host reader 2 CFG-ADR : Bit: 7 6 5 Function 0 MODE CFGn: Configuration block address CFGn: MODE: 4 3 2 1 0 Memory address of the required configuration block Specifies whether one or all configuration blocks are affected MODE Mode b0 Configuration block defined by CFGs b1 All configuration blocks Note * Configuration block CFG0: Passwords is only saved if MODE = 0. * If the password function is enabled, you must execute the [0xA0] Reader Login command before you can save the configuration block. Otherwise, error code 0x13 will be output. * An attempt to save reserved configuration blocks to the EEPROM leads to error code 0x16. 1 See chap. 3.6.4 Index of status bytes 2 See chap. 2 SLG D10 configuration parameters (CFG) 70 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D10 3.1.5 [0x83] Set Default Configuration The "Set Default Configuration" command lets you reset each configuration block to the manufacturer default settings. Host reader 1 2 3 4 5,6 6 COM-ADR [0x83] CFG-ADR CRC16 1 2 3 4 5,6 6 COM-ADR [0x83] STATUS1 CRC16 Host reader 2 CFG-ADR : Bit: Function 7 6 5 4 3 2 LOC MODE CFGn: Configuration block address CFGn: Memory address of the required configuration block LOC: Configuration block location LOC 0 Block location b0 RAM b1 RAM and EEPROM MODE: 1 Specifies whether one or all configuration blocks should be reset MODE Type b0 The configuration block defined by CFGn is reset. b1 All configuration blocks are reset. Note * Configuration block CFG0: Passwords is only reset to default settings if MODE = 0. * To protect the configuration in the RAM from being lost when the device is switched off, use the [0x82] Save Configuration to EEPROM command. * If the password function is enabled, you must execute the [0xA0] Reader Login command before you can reset the configuration block to default settings. Otherwise, error code 0x13 will be output. * If you attempt to set the default configuration for reserved configuration blocks, error code 0x16 will be output. 1 See chap. 3.6.4 Index of status bytes 2 See chap. 2 SLG D10 configuration parameters (CFG) C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 71 Description of protocols for SLG D10 3.1.6 05/05 [0x85] Set System Timer The "Set System Timer" command is used to set the internal system timer of the CPU. The corresponding system time is stored in each data set after every select, read or write command to a transponder. Host reader 1 2 3 4...7 8,9 9 COM-ADR [0x85] TIMER CRC16 1 2 3 4 5,6 6 COM-ADR [0x85] STATUS1 CRC16 Host reader TIMER: Byte 4 5 6,7 TIME Hr. Min. ms 0...23 0...59 0...59999 Note The internal sytem timer is not a real-time clock (RTC). Therefore, a specific degree of accuracy cannot be guaranteed. 1 72 See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.1.7 Description of protocols for SLG D10 [0x86] Get System Timer The "Get System Timer" command reads the internal system timer of the CPU. Host reader 1 2 3 4,5 5 COM-ADR [0x86] CRC16 Host reader 1 2 3 4 5...8 9,10 10 COM-ADR [0x86] STATUS1 TIMER CRC16 TIMER: Byte 5 6 7,8 TIME Hr. Min. ms 0...23 0...59 0...59999 Note The internal sytem timer is not a real-time clock (RTC). Therefore, a specific degree of accuracy cannot be guaranteed. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 73 Description of protocols for SLG D10 3.2 3.2.1 05/05 Protocols for controlling the reader [0x52] Baud Rate Detection This protocol is used to determine the baud rate set for the asynchronous interface of the reader. Host reader 1 2 3 4 5,6 6 COM-ADR [0x52] 0x00 CRC16 1 2 3 4 5,6 6 COM-ADR [0x52] 0x00 CRC16 Host reader Note The response protocol is only sent if the request was executed with the baud rate and correct parity of the reader. 3.2.2 [0x55] Start Flash Loader This protocol starts the flash loader of the reader. The SLG D10 firmware is loaded at the factory. Host reader 1 2 3 4,5 5 0x00 [0x55] CRC16 1 2 3 4 5,6 6 0x00 [0x55] 0x00 CRC16 Host reader Note * This command is only available if the COM-ADR1 of the reader is set to "0". * The baud rate for the flash loader is set in configuration block CFG2: COM interface. 1 74 See chap. 2.1.3 CFG2: COM interface C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.2.3 Description of protocols for SLG D10 [0x63] CPU Reset This protocol lets you reset the reader CPU. Host reader 1 2 3 4,5 5 COM-ADR [0x63] CRC16 1 2 3 4 5,6 6 COM-ADR [0x63] STATUS1 CRC16 Host reader 3.2.4 [0x65] Get Software Version This protocol lets you determine the software version of the reader, the reader type and the transponder types supported by the software. Host reader 1 2 3 4,5 5 COM-ADR [0x65] CRC16 3 4 Host reader 1 2 13 COM-ADR 1 5,6 7 SW-REV D-REV [0x65] STATUS 8 9 10,11 12,13 HW-TYPE SW-TYPE TR-TYPE CRC16 (c) SW-REV: Firmware version Byte 5 Bit: 7 .. 4 3 .. 0 Decoder firmware Main controller firmware Function: 6 7 .. 0 D-REV: Version of the development firmware. D-REV is set to "0" for customized firmware versions. 1 See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 75 Description of protocols for SLG D10 05/05 HW-TYPE: Reader hardware type 7 6 5 4 3 2 1 0 Function: 0 0 0 0 SLG D10 FSK ASK CHN Bit: CHN: CHN Function b0 One receive channel b1 Two receive channels ASK / FSK: ASK / FSK Function b0 ASK / FSK not possible b1 ASK / FSK possible SW-TYPE: Reader firmware type SW-TYPE 0x29 Reader type SLG D10 TR-TYPE: Shows the transponders supported by the software. 14 13 12 11 10 9 8 Function: 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 Function: 0 0 0 0 ISO15693 0 Tag-it HF I-CODE1 Bit: Bit: 76 15 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.2.5 Description of protocols for SLG D10 [0x69] RF Reset The HF field of the reader antenna can be switched off for trf = 15 msec using the "RF Reset" command. This resets all transponders within the reader antenna field back to their basic settings. Host reader 1 2 3 4,5 5 COM-ADR [0x69] CRC16 1 2 3 4 5,6 6 COM-ADR [0x69] STATUS1 CRC16 Host reader Note * After the "RF Reset" command, the reader cannot receive new transponders before time trf has expired. * After the "RF Reset" command, transponders located within the antenna field must be reselected. * If the Buffered Read Mode is disabled, the "RF Reset" command causes the data table to become initialized. * The response of this command is sent after the reset has been executed. 1 See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 77 Description of protocols for SLG D10 3.2.6 05/05 [0x6A] RF ON/OFF The "RF ON/OFF" command switches the HF field of the reader antenna ON or OFF. Host reader 1 2 3 4 5,6 6 COM-ADR [0x6A] RF CRC16 1 2 3 4 5,6 6 COM-ADR [0x6A] STATUS1 CRC16 Host reader RF: RF HF field of reader antenna 0x00 OFF 0x01 ON Note * An enabled Buffered Read Mode is interrupted for as long as the HF is switched off. 1 78 See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.2.7 Description of protocols for SLG D10 [0x6C] Set Noise Level The "Set Noise Level" command sets the minimum, average and maximum noise levels and sets bit NL-MODE = {1} in register CFG4: HF interface II. Host reader 1 2 3 4...9 10,11 11 COM-ADR [0x6C] NOISE-LEVEL CRC16 1 2 3 4 5,6 6 COM-ADR [0x6C] STATUS1 CRC16 Host reader NOISE-LEVEL: Byte 4,5 NOISE-LEVEL Minimum noise level 6,7 8,9 Average noise level Maximum noise level Note To set the noise level permanently, save configuration block CFG4: HF interface II to the EEPROM using the [0x82] Save Configuration to EEPROM command. 1 See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 79 Description of protocols for SLG D10 3.2.8 05/05 [0x6D] Get Noise Level The "Get Noise Level" command reads out the current noise levels from the reader. Host reader 1 2 3 4,5 5 COM-ADR [0x6D] CRC16 Host reader 1 2 3 4 5...10 11,12 12 COM-ADR [0x6D] STATUS1 NOISELEVEL CRC16 NOISE-LEVEL: Byte 5,6 NOISE-LEVEL Minimum noise level 1 80 7,8 9,10 Average noise level Maximum noise level See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.2.9 Description of protocols for SLG D10 [0x6E] Reader Diagnostic The "Reader Diagnostic" command executes a series of hardware diagnosis functions in the reader. Host reader 1 2 3 4 5,6 6 COM-ADR [0x6E] MODE CRC16 Host reader 1 2 3 4 5...(n-2) (n-1),n n COM-ADR [0x6E] STATUS1 DATA CRC16 MODE: Reader diagnosis modes MODE Description 0x01 Detailed information is read for STATUS = 0x84 DATA: Response data to the reader diagnosis modes MODE = 0x01: 5 FLAGS FLAGS: Bit: 7 6 Function: TEMP- ALARM TEMP-ALARM TEMP-WARN CONTROL |Z|> |Z|< NOISE RF-HW 1 5 4 3 TEMPWARN CONTROL |Z|> 2 1 0 |Z|< NOISE RFHW = Maximum permissible temperature of output stage exceeded = Temperature of output stage too high = HF power outside control range = Impedance value >> 50 Ohm = Impedance value << 50 Ohm = Ambient noise too high or incorrect antenna setting = HF hardware not functioning / HF power cannot be initialized See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 81 Description of protocols for SLG D10 05/05 Error conditions: Error Set condition Delete condition HF power LED 51 TEMP-ALARM Temp. alarm value Temp. < alarm value 120 C OFF ON TEMP-WARN Temp. warning value 100 C Temp. < warning value ON, reduce ON CONTROL HF power outside control range Set antenna, check cable ON ON |Z| > Absolute value of impedance >> 50 Ohm Set antenna ON ON |Z| < Absolute value of impedance << 50 Ohm Set antenna ON ON NOISE Noise 1000 mV Noise < maximum value ON ON RF-HW No HF hardware / CPU reset error while initializing HF power OFF ON MODE = 0x02: 5 6 7 RF-POWER 0x00 TEMP RF-POWER: Current HF output power [*0.1W] TEMP: (SLG D10 only) Temperature of the HF output stage [C] 1 82 Not visible on the outside C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.2.10 Description of protocols for SLG D10 [0x6F] Basic antenna tuning This protocol is used to tune the basic antenna with the MOBY D tuning controller. Host reader 1 2 3 5 COM-ADR [0xF9] 4...5 CRC16 Host reader 1 2 7 COM-ADR [0xF9] 3 4 5...6 STATUS1 CRC16 Note Only use this command to tune the basic antenna. Never use it to tune the supplemental antenna. Without readjustment the output power is set to approx. 4 Watt. If in Buffered Read Mode, the reader is turned off. No more communication is possible with the transponders. The status (0x82) "command not possible" appears. Flashing of LED 5 at 2 Hz indicates the antenna setting mode. If an error occurs (e.g., maximum current or voltage too high or temperature alarm), the LED flashes at 8 Hz. To exit basic antenna tuning, the host must execute the command [0x63] CPU Reset. 1 See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 83 Description of protocols for SLG D10 3.2.11 05/05 [0x71] Set Output1 The "Set Output" command lets you enable the reader outputs for a limited or unlimited length of time. Each output takes on the state of the OS byte during the time period indicated in the protocol. The flashing frequency is specified by the OSF byte. This protocol can be used to switch the outputs on or off for the specified length of time. When the reader receives the "Set Output" command, all times that have been active up to that point are overwritten by the new times contained in the protocol, provided they > 0. Host reader 1 2 3 13 COM-ADR [0x71] 4,5 6,7 OS OSF 8,9 10,11 12,13 0x00 OUT-TIME CRC16 Host reader 1 2 6 3 4 COM-ADR [0x71] 5,6 STATUS 2 CRC16 OS: The OS word ("Output State") specifies the state of the signal transmitters (OUT1, OUT2 and REL) during the time period indicated in OUT-TIME. The signal tansmitters can be selected individually or as a group. 15 Bit: Function: 14 13 11 10 9 8 REL mode OUT2 mode OUT1 mode 0 0 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 Mode Function b00 UNCHANGED OUT-TIME does not change the state of the signal transmitter b01 ON Signal transmitter during OUT-TIME = enabled b10 OFF Signal transmitter during OUT-TIME = disabled b11 FLASHING Signal transmitter during OUT-TIME = alternates with OSF 1 Connections have not been led out in SLG D10 2 See chap. 3.6.4 Index of status bytes 84 12 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D10 Note If you are using read synchronization, you cannot use output OUT1 for general tasks. OSF: The OSF word ("Output State Flash," output flashing frequency) lets you assign a separate flashing frequency to each output. 15 Bit: Function: 14 13 12 11 10 9 8 REL frequ. OUT2 frequ. OUT1 frequ. 0 0 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 Frequ. Frequency b11 1 Hz b10 2 Hz b01 4 Hz b00 8 Hz OUT-TIME: The outputs (OUT1, OUT2, REL) can be enabled for a specific length of time or continuously using the value set in OUT-TIME. Time settings 0 and 65535 (0xFFFF) are exceptions (see the following table). Time period OUT-TIME 0 State unchanged 1...65534 x 100 msec (100 ms...1:49:13 hr) Output enabled during "Time" 65535 (0xFFFF) Enabled continuously Note * To reset a continuously enabled output, send OUT-TIME = 1 to the reader. It will switch to the idle state after 100 msec. * A continuously enabled output is reset after a reset procedure or power failure. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 85 Description of protocols for SLG D10 05/05 Example 1 * OUT1 alternates at 4 Hz for 500 msec. * OUT2 is enabled for 500 msec. * REL remains unchanged OS OSF OUT-TIME 0x1C00 0x0400 0x0005 Example 2 The relay is enabled for 1000 msec without influencing the other signal transmitters. 3.2.12 OS OSF OUT-TIME 0x4000 0x0000 0x000A [0x74] Get Input1 This protocol is used to query the current state of digital inputs IN1 ... IN2 and DIP1 ... DIP4 at any time. Host reader 1 2 3 4,5 5 COM-ADR [0x74] CRC16 3 4 Host reader 1 2 7 COM-ADR [0x74] STATUS 2 5 6,7 INPUTS CRC16 INPUTS: Bit: 7 Function: DIP4 6 5 4 3 2 1 0 DIP3 DIP2 DIP1 0 0 IN2 IN1 1 Digital input = enabled3 Note * If reader synchronization is used, input IN1 cannot be used for general tasks. * If the trigger is activated in scan mode, input IN2 cannot be used for general tasks. 1 Connections have not been led out in SLG D10 2 See chap. 3.6.4 Index of status bytes 3 See chap. 2.1.2 CFG1: General inputs and outputs 86 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.3 3.3.1 Description of protocols for SLG D10 Special commands [0x1B] Reset QUIET Bit (I-CODE1 transponders only) This command resets the QUIET bit of all I-CODE1 transponders in the antenna field. Following this command, transponders that were previously in the resting mode are re-enabled. chap. 3.6.7 Memory model for I-CODE1 transponders describes how to enable the resting mode for I-CODE1 transponders. Host reader 1 2 3 4,5 5 COM-ADR 0x1B CRC16 2 3 4 Host reader 1 6 3.3.2 COM-ADR 0x1B STATUS 5,6 1 CRC16 [0x1C] EAS (I-CODE1 transponders only) This command sends an EAS request to the transponder. If the EAS function of a transponder is enabled, the transponder responds with a special EAS sequence. The transponder does not have to be selected for this command. The status byte is set in order to inform the host about whether or not the reader has received this sequence. The EAS level is set in configuration block CFG3: HF interface I. chap. 3.6.7 Memory model for I-CODE1 transponders describes how to enable the EAS function for I-CODE1 transponders. Host reader 1 2 3 4,5 5 COM-ADR 0x1C CRC16 Host reader 1 1 2 3 4 5,6 6 COM-ADR 0x1C STATUS1 CRC16 See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 87 Description of protocols for SLG D10 3.4 05/05 Protocols for ISO15693 host commands 3.4.1 Supported ISO15693 host commands for ISO15693 transponders The command codes listed in the following table support the various transponder commands and functions of each ISO15693 transponder type. 3.4.1.1 Infineon (my-d) IC manufacturer's ID: 0x05 Memory organization: SRF55V10P: 128 x 8 bytes = 8 Kbits SRF55V02P: 32 x 8 bytes = 2 Kbits No. of blocks 128 (user range: 3 to 127) No. of blocks 32 (user range: 3 to 31) Block length 8 bytes Block length 8 bytes Command Code Command Mode Not Addressed Remarks Addressed Selected - - Inventory 0x02 Stay Quiet - - 0x22 Lock Multiple Blocks1 - WR-OPTION = 02 0x23 Read Multiple Blocks1 - DB-SIZE = 8 Security status is always 0x00 0x24 Write Multiple Blocks1 - DB-SIZE = 8, WR-OPTION = 02 0x25 Select - - 0x26 Reset to Ready WR-OPTION = 02 0x27 Write AFI WR-OPTION = 02 0x28 Lock AFI 0x29 Write DSFID - - - - 0x2A Lock DSFID - - - - 0x2B Get System Information - - - - 0x2C Get Multiple Block Security Status - - - - 0x01 1 Customer-specific commands (0x10) read, (0x30) write and (0x90) write byte are used automatically by the reader. 2 WR-OPTION is automatically set by MOBY D readers when the WR-OPTION parameter in CFG8 is set to "00:automatically set." See chapter 2.2.1 CFG8: General transponder parameters. 88 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.4.1.2 Description of protocols for SLG D10 Philips (I-Code SLI) IC manufacturer's ID: 0x04 Memory organization: 32 x 4 bytes = 1 Kbit No. of blocks 32 (user range: 0 to 27) Block length 4 bytes Command Code Command Mode Remarks Not Addressed Addressed Selected 0x01 Inventory - - - 0x02 Stay Quiet - - 0x22 Lock Multiple Blocks WR-OPTION = 01 0x23 Read Multiple Blocks DB-SIZE = 4 Security status is always 0x00 0x24 Write Multiple Blocks DB-SIZE = 4, WR-OPTION = 01 0x25 Select - - 0x26 Reset to Ready 0x27 Write AFI WR-OPTION = 01 0x28 Lock AFI WR-OPTION = 01 0x29 Write DSFID WR-OPTION = 01 0x2A Lock DSFID WR-OPTION = 01 0x2B Get System Information 0x2C Get Multiple Block Security Status 1 WR-OPTION is automatically set by MOBY D readers when the WR-OPTION parameter in CFG8 is set to "00:automatically set." See chapter 2.2.1 CFG8: General transponder parameters. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 89 Description of protocols for SLG D10 3.4.1.3 05/05 STMicroelectronics (LRI512) IC manufacturer's ID: 0x02 Memory organization: 16 x 4 bytes = 512 bits No. of blocks 16 (user range: 0 to 15) Block length 4 bytes Command Code Command Mode Remarks Not Addressed Addressed Selected 0x01 Inventory - - - 0x02 Stay Quiet - - 0x22 Lock Multiple Blocks WR-OPTION = 01 0x23 Read Multiple Blocks () DB-N must be 1 in "not addressed" mode. 0x24 Write Multiple Blocks DB-SIZE = 4, WR-OPTION = 01 0x25 Select - - 0x26 Reset to Ready 0x27 Write AFI WR-OPTION = 01 0x28 Lock AFI WR-OPTION = 01 0x29 Write DSFID - - - 0x2A Lock DSFID - - - 0x2B Get System Information - - - 0x2C Get Multiple Block Security Status - - - 1 90 WR-OPTION is automatically set by MOBY D readers when the WR-OPTION parameter in CFG8 is set to "00:automatically set." See chapter 2.2.1 CFG8: General transponder parameters. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.4.1.4 Description of protocols for SLG D10 Texas Instruments (Tag-it HFI) IC manufacturer's ID: 0x07 Memory organization: 64 x 4 bytes = 2 Kbits of user data No. of blocks 64 (user range: 0 to 63) Block length 4 bytes Command Code Command Mode Remarks Not Addressed Addressed Selected 0x01 Inventory - - - 0x02 Stay Quiet - - 0x22 Lock Multiple Blocks WR-OPTION = 11 0x23 Read Multiple Blocks DB-SIZE = 4 0x24 Write Multiple Blocks DB-SIZE = 4, WR-OPTION = 11 0x25 Select - - 0x26 Reset to Ready 0x27 Write AFI WR-OPTION = 11 0x28 Lock AFI WR-OPTION = 11 0x29 Write DSFID WR-OPTION = 11 0x2A Lock DSFID WR-OPTION = 11 0x2B Get System Information 0x2C Get Multiple Block Security Status Note * The reader automatically uses the commands "Write_2_Blocks" and "Lock_2_Blocks." This only takes effect when the block address starts with an even-number address. * The command "Write_2_Blocks" / "Lock_2_Blocks" is combined with the command "Write Single Block" / "Lock Single Block" when an odd number of blocks must be written and locked. 1 WR-OPTION is automatically set by MOBY D readers when the WR-OPTION parameter in CFG8 is set to "00:automatically set." See chapter 2.2.1 CFG8: General transponder parameters. In "not addressed" mode, the WR-OPTION must be set by hand to "WR-OPTION = 1." C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 91 Description of protocols for SLG D10 3.4.2 05/05 Supported ISO15693 host commands for I-Code1 Transponders The command codes listed in the following table support the various transponder commands and functions of the I-Code1 transponder types. Memory organization: 16 x 4 bytes = 512 bits No. of blocks 16 (user range: 0 to 11) Block length 4 bytes Command Code Command Mode Remarks Not Addressed Addressed Selected 0x01 Inventory - - - 0x02 Stay Quiet - - - - 0x22 Lock Multiple Blocks - - - - 0x23 Read Multiple Blocks - 0x24 Write Multiple Blocks - - 0x25 Select - - - - 0x26 Reset to Ready - - - - 0x27 Write AFI - - - - 0x28 Lock AFI - - - - 0x29 Write DSFID - - - - 0x2A Lock DSFID - - - - 0x2B Get System Information - - - - 0x2C Get Multiple Block Security Status - - - - 0xA0 Read Config Block - - 0xA1 Write Config Block - - 92 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.4.3 Description of protocols for SLG D10 Supported ISO15693 host commands for Tag-it HF Transponders The command codes listed in the following table support the various transponder commands and functions of the Tag-it HF transponder types. Memory organization: 8 x 4 bytes = 256 bits No. of blocks 8 (user range: 0 to 7) Block length 4 bytes Command Code Command Mode Remarks Not Addressed Addressed Selected 0x01 Inventory - - - 0x02 Stay Quiet - - - - 0x22 Lock Multiple Blocks - 0x23 Read Multiple Blocks - 0x24 Write Multiple Blocks - 0x25 Select - - - - 0x26 Reset to Ready - - - - 0x27 Write AFI - - - - 0x28 Lock AFI - - - - 0x29 Write DSFID - - - - 0x2A Lock DSFID - - - - 0x2B Get System Information - 0x2C Get Multiple Block Security Status - - - - 0xA0 Read Config Block - - - - 0xA1 Write Config Block - - - - C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 93 Description of protocols for SLG D10 3.4.4 05/05 [0xB0] Host commands for ISO15693: required and optional commands This command sends RF commands as defined by ISO15693 to the transponder. Host reader 1 2 3 4...(n-2) (n-1),n n COM-ADR [0xB0] REQUESTDATA CRC16 3 4 5...(n-2) (n-1),n RESPONSEDATA CRC16 Host reader 1 n 2 COM-ADR [0xB0] STATUS 1 REQUEST-DATA: Command-specific request RESPONSE-DATA: Command-specific response Note * Data are only transmitted if STATUS = {0x00, 0x83, 0x84, 0x93, 0x94, 0x95}. * The command does not function if Buffered Read Mode or Scan mode is enabled. 1 94 See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.4.4.1 Description of protocols for SLG D10 [0x01] Inventory This command reads the UIDs of all transponders in the antenna field. When the reader detects a new transponder, it automatically switches the transponder to the idle state. In this state the transponder does not send a response to the next inventory command. The transponder always sends a response under one of the following conditions. * It has exited and reentered the antenna field. * A [0x69] RF Reset command was sent to the reader. * The ONT bit in register ONT of configuration block CFG13: Anticollision (see chap. 2.3.4) is not set. * Anticollision mode in CFG10: General system parameters (see chap. 2.3.1) is deactivated. REQUEST-DATA 4 5 0x01 MODE RESPONSE-DATA 5 6 7 8...15 DATA-SETS TR-TYPE DSFID UID DATA-SETS repeated MODE: Bit: 7 Function MORE 6 5 4 3 2 1 0 0 0 0 0 0 0 0 MORE: MORE b0 New inventory is requested b1 Additional data is requested (More than 24 data records are available with status [0x94]. DATA-SETS: Number of transponder data sets to be transmitted in this reader response. TR-TYPE: Transponder type. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 95 Description of protocols for SLG D10 05/05 DSFID: (ISO15693 transponders only) Family code for data storage. If not in use, this value returns {0x00}. UID: Transponder UID (read-only access) Note * This command supports all transponders. * If ONT = {b1}, the UIDs are only read from those transponders that entered the antenna field after the last execution of the "Inventory" command. * If ONT = {b0}, an RF Reset is executed to read the UIDs of all transponders in the antenna field. * If the STATUS byte in the protocol frame has the value {0x94}, additional UIDs can be read out from the reader with MORE = {b1}. 96 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.4.4.2 Description of protocols for SLG D10 [0x02] Stay Quiet This command sets the transponder into the quiet state. Only needed when anticollision mode is disabled. REQUEST-DATA 4 5 6...13 0x02 MODE UID MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b001 addressed UID: Transponder UID (read-only access) Note This command only functions for ISO15693 transponders. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 97 Description of protocols for SLG D10 3.4.4.3 05/05 [0x22] Lock Multiple Blocks This command locks one or more data blocks. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 3.4.1 Supported ISO15693 host commands for ISO15693 transponders. Note This command only functions for ISO15693 transponders and Tag-it HF. The write protection cannot be canceled again. REQUEST-DATA 4 5 (6-13) 6 / (14) 7 / (15) 0x22 MODE UID DB-ADR DB-N RESPONSE-DATA (STATUS = {0x03}) 5 DB-ADR-E RESPONSE-DATA (STATUS = {0x95}) 5 6 ISO15693ERROR DB-ADR-E MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Unaddressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. 98 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D10 DB-ADR: Number of the first block to be locked. The first block number can lie between 0 and 255. DB-N: Number of data blocks to be locked, beginning with DB-ADR. The maximum value of DB-N depends on the block size. The maximum number of bytes is 128. DB-Size Max. DB-N 4 0x20 = 32 8 0x10 = 16 x = 128 / x ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. DB-ADR-E: Block number in which the error occurred C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 99 Description of protocols for SLG D10 3.4.4.4 05/05 [0x23] Read Multiple Blocks This command reads one or more data blocks. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 3.4.1 Supported ISO15693 host commands for ISO15693 transponders. REQUEST-DATA 4 5 (6...13) 6 / (14) 7 / (15) 0x23 MODE UID DB-ADR DB-N RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR RESPONSE-DATA 5 6 7 8...n DB-N DB-SIZE SEC-STATUS DB DB-N repeated MODE: 7 6 5 4 3 2 Function 0 0 0 0 SEC ADR Bit: 1 0 ADR: ADR b000 Unaddressed b001 Addressed b010 Selected SEC: SEC b0 SEC-STATUS always = {0x00} b1 Security status of the followed block in SEC-STATUS UID: Transponder UID (read-only access). The UID is only required in the addressed mode. 100 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D10 DB-ADR: Number of the first block to be read. The first block number can lie between 0 and 255. DB-N: Number of data blocks to be read by the transponder, beginning with DB-ADR. The maximum value of DB-N depends on the block size. The maximum number of bytes is 128. DB-Size Max. DB-N 4 0x20 = 32 8 0x10 = 16 x = 128 / x ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. DB-SIZE: Number of bytes in a data block This value depends on the specifications of the transponder manufacturer. See chapter 3.4.1 Supported ISO15693 host commands for ISO15693 transponders. SEC-STATUS: Block security status of followed data block. If not in use, this value returns {0x00}. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 101 Description of protocols for SLG D10 05/05 DB: Requested data block. The block size is specified in DB-SIZE. Note * A read procedure out of a block sends the command for reading out a single block to the transponder. * If a transponder does not support commands for reading multiple blocks, multiple blocks are read out of the transponder individually. * Only one transponder can be read in the unaddressed mode. * I-CODE1 and Tag-it HF transponders cannot be read in the selected mode. * The command [0x01] Inventory must be executed to select the transponder before an addressed read access of an I-Code1 transponder even when the UID is known. * If the transponder was already selected with an Inventory command, a nonaddressed read access of I-Code1 transponders is not possible. The selection must be canceled with the command [0x69] RF Reset. 102 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.4.4.5 Description of protocols for SLG D10 [0x24] Write Multiple Blocks This command writes one or several data blocks. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 3.4.1 Supported ISO15693 host commands for ISO15693 transponders. REQUEST-DATA 4 5 (6...13) 6 / (14) 7 / (15) 8 / (16) 9...n / (17...n) 0x24 MODE UID DB-ADR DB-N DB-SIZE DB Repeated DB-N times RESPONSE-DATA (STATUS = {0x03}) 5 DB-ADR-E RESPONSE-DATA (STATUS = {0x95}) 5 6 ISO15693ERROR DB-ADR-E MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Unaddressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. DB-ADR: Address of the first block to be written to the transponder. The first block number can lie between 0 and 255. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 103 Description of protocols for SLG D10 05/05 DB-N: Number of data blocks to be written to the transponder, beginning with DB-ADR. The maximum value of DB-N depends on the block size. The maximum number of bytes is 128. DB-Size Max. DB-N 4 0x20 = 32 8 0x10 = 16 x = 128 / x DB-SIZE: Number of bytes in a data block This value depends on the specifications of the transponder manufacturer. DB: The data block to be written to the transponder. The required block size is defined in DB-SIZE. The number of expected bytes is DB-N * DB-SIZE. ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. DB-ADR-E: Number of the block in which the error occured Note * A write procedure to a block sends the command for writing a single block to the transponder. The reader handles this internally. * If a transponder does not support commands for writing multiple blocks, multiple blocks are written to the transponder individually. * For I-CODE1 transponders, writing is only possible in the addressed mode. * For Tag-it HF transponders, writing is not possible in the selected mode. 104 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.4.4.6 Description of protocols for SLG D10 [0x25] Select This command sets a transponder to the "selected" state. Only one ISO15693 transponder can be selected at any one time. A transponder that has already been selected is automatically set to the ready state. REQUEST-DATA 4 5 6...13 0x25 MODE UID RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR MODE: Bit: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR 1 0 ADR: ADR b001 Addressed UID: Transponder UID (read-only access) ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. Note This command only functions for ISO15693 transponders. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 105 Description of protocols for SLG D10 3.4.4.7 05/05 [0x26] Reset to Ready This command sets a transponder into the ready state. REQUEST-DATA 4 5 (6...13) 0x26 MODE UID RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Unaddressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. Note This command only functions for ISO15693 transponders. 106 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.4.4.8 Description of protocols for SLG D10 [0x27] Write AFI This command writes a new AFI code to one or more transponders. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 3.4.1 Supported ISO15693 host commands for ISO15693 transponders. REQUEST-DATA 4 5 (6...13) 6 / (14) 0x27 MODE UID AFI RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Unaddressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. AFI: Application Family Identifier of the transponder ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. Note This command only functions for ISO15693 transponders. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 107 Description of protocols for SLG D10 3.4.4.9 05/05 [0x28] Lock AFI This command locks the AFI register in one or more transponders. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 3.4.1 Supported ISO15693 host commands for ISO15693 transponders. REQUEST-DATA 4 5 (6...13) 0x28 MODE UID RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Unaddressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. Note This command only functions for ISO15693 transponders. 108 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.4.4.10 Description of protocols for SLG D10 [0x29] Write DSFID This command writes the DSFID to one or more transponders. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 3.4.1 Supported ISO15693 host commands for ISO15693 transponders. REQUEST-DATA 4 5 (6...13) 6 / (14) 0x29 MODE UID DSFID RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Unaddressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. DSFID: Data Storage Format Identifier of the transponder ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. Note This command only functions for ISO15693 transponders. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 109 Description of protocols for SLG D10 3.4.4.11 05/05 [0x2A] Lock DSFID This command locks the DSFID register in one or more transponders. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 3.4.1 Supported ISO15693 host commands for ISO15693 transponders. REQUEST-DATA 4 5 (6...13) 0x2A MODE UID RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Unaddressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. Note This command only functions for ISO15693 transponders. 110 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.4.4.12 Description of protocols for SLG D10 [0x2B] Get System Information This command reads out the system information from the transponder. REQUEST-DATA 4 5 (6...13) 0x2B MODE UID RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR RESPONSE-DATA 5 6...13 14 15,16 17 DSFID UID AFI MEM-SIZE IC-REF `0' Only LSB (32 bits) valid Manufacturer Code MEM-SIZE Chip Version Tag-it HF ISO15693 MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Unaddressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. DSFID: Data Storage Format Identifier of the transponder C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 111 Description of protocols for SLG D10 05/05 Only LSB: The LSB (32 bits) of the write protected UID of the transponder. AFI: Application Family Identifier of the transponder. If not supported by the transponder, this value is {0x00}. Manufacturer code: Manufacturer-specific code (Tag-it HF 0x01) MEM-SIZE: Memory size of the transponder. If not supported by the transponder, this value is {0x0000}. Byte Bit Content 15 16 7...5 4...0 7...0 In res. (Block size in bytes) - 1 (Number of blocks) - 1 IC-REF: IC reference of the transponder. If not supported by the transponder, this value is {0x00}. Chip Version: Chip version of the transponder. Note This command only functions for ISO15693 transponders and Tag-it HF transponders. 112 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.4.4.13 Description of protocols for SLG D10 [0x2C] Get Multiple Block Security Status This command reads out the security status for public blocks from a transponder. REQUEST-DATA 4 5 (6...13) 6 / (14) 7 / (15) 0x2C MODE UID DB-ADR DB-N RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR RESPONSE-DATA 5 6 DB-N SEC-STATUS DB-N repeated MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Unaddressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. DB-ADR: Number of the first block whose security status is requested. Valid values range from 0 and 255. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 113 Description of protocols for SLG D10 05/05 DB-N: Number of security data blocks to be read, beginning with DB-ADR. The maximum value of DB-N depends on the block size. DB-Size Max. DB-N 4 0x20 = 32 8 0x10 = 16 x = 128 / x ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. SEC-STATUS: Block security status. Note This command only functions for ISO15693 transponders. 114 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.4.4.14 Description of protocols for SLG D10 [0xA0] Read Config Block This command reads out a configuration block from the MOBY D memory model (see chap. 3.6.7 Memory model for I-CODE1 transponders). REQUEST-DATA 4 5 6...13 14 0xA0 MODE UID CB-ADR RESPONSE-DATA 5-8 CB MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b001 Addressed UID: Transponder UID (read-only access) CB-ADR: Address of the configuration block to be read by the transponder. CB: Requested configuration block Note This command only functions for I-CODE1 transponders. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 115 Description of protocols for SLG D10 3.4.4.15 05/05 [0xA1] Write Config Block This command writes a configuration block to the MOBY D memory model (see chap. 3.6.7 Memory model for I-CODE1 transponders). REQUEST-DATA 4 5 6...13 14 15...18 0xA1 MODE UID CB-ADR CB MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b001 Addressed UID: Transponder UID (read-only access) CB-ADR: Address of the configuration block to be written to the transponder. CB: The configuration block to be written to the transponder. Note This command only functions for I-CODE1 transponders. Example of write-accessing configuration block 0 of a tag-it HF transponder Configuration block 0 activates protective functions of the transponder ("1": r/w, "0": ro). The reader only evaluates bits with the value "0" in LSB (byte 0). 3 2 1 0 b xxxx xxxx b xxxx xxxx b xxxx xxxx b 1001 1010 It attempts to lock blocks 0, 2, 5 and 6. If a block is already locked, the status is set to [0x00]. With ISO15693 transponders, the command [0x22] Lock Multiple Blocks must be used. 116 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.4.5 Description of protocols for SLG D10 [0xB1] Host commands for ISO15693: user-specific and manufacturer-specific commands This command sends user-specific and manufacturer-specific commands to the transponder. Host reader 1 2 3 4 5...(n-2) (n-1),n n COM-ADR [0xB1] MFR REQUESTDATA CRC16 3 4 5...(n-2) (n-1),n RESPONSEDATA CRC16 Host reader 1 n 2 COM-ADR [0xB1] STATUS 1 MFR: Manufacturer code MFR 0xXX REQUEST-DATA: Manufacturer-specific request RESPONSE-DATA: Manufacturer-specific response Note * Data are only transmitted if STATUS = {0x00, 0x83, 0x84, 0x94, 0x95}. * This command does not function if Buffered Read Mode or Scan mode is enabled. 1 See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 117 Description of protocols for SLG D10 3.4.6 05/05 [0xBF] ISO15693 transparent command This command sends user-transparent commands to the transponder. Host reader 1 2 3 4 5,6 n COM-ADR [0xBF] MODE RSPLENGTH MODE 1+2 7,8 9...(n-2) MODE 5 (n-1),n CMD-RSP- REQUESTDELAY DATA MODE 3+4 7,8 (c) 9,10 CRC16 11...(n-2) (n-1),n CMD-RSP- EOF-PULSE- REQUEST- CRC16 DELAY DELAY DATA 7,8 9,10 11...(n-2) (n-1),n CMD-RSP- MULTIPLE DELAY 302 GRIDS REQUEST- CRC16 DATA 4 5...(n-2) (n-1),n RESPONSEDATA CRC16 Host reader 1 n 2 COM-ADR 3 [0xBF] STATUS 1 MODE: Request options 0x01 = Read request Response is requested according to CMD-RSP-DELAY 0x02 = Write request with option "0" The reader attempts to receive a response after CMD-RSP-DELAY + a multiple of 302 sec. If a response is not received within 20 msec, the command sends status "No transponder" [0x01] back. 0x03 = Write request with option "1" The reader attempts to receive a response after CMD-RSP-DELAY. If it does not receive a response, the reader sends an EOF after EOFPULSE-DELAY and attempts to receive a response after CMD-RSPDELAY. 1 See chap. 3.6.4 Index of status bytes 118 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D10 0x04 = Inventory request The reader attempts to receive a response after CMD-RSP-DELAY. Execution depends on the "Nb_slot_flag" flag in accordance with ISO15693 as follows: "0" The reader sends an EOF after EOF-PULSE-DELAY and, in the next time slot, again attempts to receive a response (after CMDRSP_DELAY). This procedure is repeated 16 times. In this case, RSP-LENGTH specifies the response length in a time slot. Transponder responses with a different response length are ignored. If there is a checksum error in one of the time slots, the protocol status is set to 0x02 [CRC error]. The user must calculate where in the transponder data the error occurred. "1" The reader sends the received data back. 0x05 = Request with grid position of the response The reader attempts to read a response in accordance with ISO15693-3 CMD-RSP-DELAY. If it receives no reply, the reader reads in the time grid specified in MULTIPLE 302 sec GRIDS. If it receives no reply, the command returns the status "no transponder" 0x00. The maximum value for MULTIPLE 302 sec GRIDS is 125 (-> 302.08 sec x 125 = 37.76 msec). The length of the read data varies depending on error flag in the transponder response: - 4 bytes if error flag = 1 - RSP-LENGTH if error flag = 0 RSP-LENGTH: Transponder response length in bits without SOF and EOF If the error flag is set in the transponder response, the length of the read data is 4 bytes. CMD-RSP-DELAY: Response delay of transponder response (ISO15693: T1) e.g. ISO15693 average value: {0x021F} * 590 nsec = 320.4 sec EOF-PULSE-DELAY: The EOF pulse delay is used in write procedures using ISO15693 write option "1." It specifies the response delay of the transponder response (ISO15693: T1). E.g. ISO15693 maximum value: {0x846A} * 590 nsec = 20 msec C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 119 Description of protocols for SLG D10 05/05 REQUEST-DATA: Complete transponder request without SOF, CRC16 and EOF Note The FLAGS for the read and write options in REQUEST-DATA must correspond to the MODE byte in the request protocol. The reader always forces a command according to the method specified in the MODE byte of the request protocol. RESPONSE-DATA: Complete transponder response without SOF and EOF. The reader performs a CRC16 checksum test. However, it is the CRC16 of the transponder that is transmitted with the response data. Note * Data are only transmitted if STATUS = {0x00, 0x02, 0x83, 0x84, 0x94}. * The response data always consist of the number of data bytes specified in RSP-LENGTH. Note * This command only functions for ISO15693 transponders. * This command does not function if Buffered Read Mode or Scan mode is enabled. 120 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.5 3.5.1 Description of protocols for SLG D10 Protocols for the Buffered Read Mode Processes in the Buffered Read Mode In the Buffered Read Mode, the reader itself reads out data from each transponder within the antenna field. This operating mode must be enabled in configuration block CFG10: General system parameters and configured in configuration block CFG11: Buffered Read Mode. The requested transponder data sets are stored in a FIFO buffer. The Buffered Read Mode operates independently of any host commands and begins immediately after the device is switched on or after the [0x63] CPU Reset command. You will require two commands to read out requested transponder data sets. The figure below shows the basic processes in the Buffered Read Mode. Host reader [0x21] Command to the reader Read Buffer to read out data O typ. 6 ms Host reader Status, e.g. = {0x92} There are no data sets in the data buffer. no valid data Host reader U . U . U . U . [0x21] Command to the reader Read Buffer to read out data O typ. 6 ms Host reader Host reader Status, e.g. = OK The data buffer contains data sets. and n data sets n data sets are transmitted to the host. U . U . U . U . [0x32] Command to the reader Clear Data Buffer to clear data sets that have already been read O typ. 6 ms Host reader Status, e.g. = OK The n data sets that had already been read were deleted from the buffer. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 121 Description of protocols for SLG D10 05/05 O: The host waits for a response from the reader U: The host can perform other tasks, e.g. communicate with other readers. You can obtain additional information regarding the capacity of the data buffer using the [0x31] Read Data Buffer Info command. Note When the HF supply is turned off with command [0x6A] RF ON/OFF and reader synchronization is used, an arriving synchronization pulse is forwarded by the reader directly to the synchronization output. 3.5.2 Transponder access in the Buffered Read Mode The Buffered Read Mode only reads data blocks from transponders located in the antenna field. You can configure the anticollision procedure in configuration block CFG13: Anticollision and enable it in configuration block CFG10: General system parameters. All transponder types set in configuration block CFG3: HF interface I are used in the Buffered Read Mode. After the device is switched on or after the [0x63] CPU Reset command, the Buffered Read Mode starts with transponder type D. 122 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.5.3 Description of protocols for SLG D10 [0x21] Read Buffer The "Read Buffer" command reads out a number of data sets from the data buffer. Host reader 1 2 3 4 5,6 6 COM-ADR [0x21] DATASETS CRC16 3 4 Host reader 1 2 6 / (n) COM-ADR 1 [0x21] STATUS (7...(n-2)) 5,6 / ((n-1),n) DATA CRC16 (5) (6) TR-DATA DATASETS (c) DATA-SETS: Number of data sets to be transmitted from the data buffer. If the data buffer does not contain the indicated number of data sets, all existing data sets will be transmitted and an error will be output. If the response protocol reaches the maximum length of 256 bytes, the reader reduces the number of data sets. TR-DATA: Selects the data types for the read procedure. 7 6 5 4 3 2 1 0 Function - - TIMER - - - DB UID Bit: UID = UID DB = Data block TIMER = 1 Internal system timer (For details, see chap. 3.1.6 [0x85] Set System Timer.) See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 123 Description of protocols for SLG D10 05/05 DATA: Number of data sets requested from the data buffer. Only the selected data are transmitted to the host. Details are presented in chap. 2.3.2 CFG11: Buffered Read Mode. Every data set has the following structure: Data type UID Data blocks TIMER DATA Byte number. Byte number. Byte number. 1 2...9 TR-TYP UID 1 2 3...6 to 3...130 DB-ADR DB-N DB 1...4 TIMER In Buffered Read Mode, the block length is always 4 bytes. If the block length of the transponder is not 4 bytes, the reader always devides the data into 4-byte blocks. Note * This command continues reading the same data sets until they are deleted with the [0x32] Clear Data Buffer command. * This command only functions in the Buffered Read Mode. * Data are only transmitted if STATUS = {0x00, 0x83, 0x84, 0x93, 0x94}. 124 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.5.4 Description of protocols for SLG D10 [0x31] Read Data Buffer Info The "Read Data Buffer Info" command reads the current parameters in the data buffer. Host reader 1 2 3 4,5 5 COM-ADR [0x31] CRC16 Host reader 1 2 3 4 5,6 7,8 12 COM-ADR [0x31] STATUS1 TAB-SIZE TABSTART 9,10 11,12 TAB-LEN CRC16 (c) TAB-SIZE: Maximum number of transponder data sets in the data buffer. TAB-START: Address of the first data set in the data buffer. TAB-LEN: Number of reserved transponder data sets in the data buffer. Note * Additional information on the status of the data tables is transmitted if STATUS = {0x00, 0x84, 0x85, 0x93}. * The data structure may be inconsistent if some transponders leave the antenna field before all requested data blocks have been read out. Thus, TAB-LEN does not necessarily contain the number of valid data sets in the data buffer. 1 See chap. 3.6.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 125 Description of protocols for SLG D10 3.5.5 05/05 [0x32] Clear Data Buffer The "Clear Data Buffer" command clears those data sets from the data buffer that you have already read using the [0x21] Read Buffer command. Host reader 1 2 3 4,5 5 COM-ADR [0x32] CRC16 1 2 3 4 5,6 6 COM-ADR [0x32] STATUS1 CRC16 Host reader 3.5.6 [0x33] Initialize Buffer The "Initialize Buffer" command resets the buffer back to its basic state. It makes no difference whether or not the data sets in the buffer have already been read. Host reader 1 2 3 4,5 5 COM-ADR [0x33] CRC16 2 3 4 Host reader 1 6 1 COM-ADR [0x33] STATUS 5,6 1 CRC16 See chap. 3.6.4 Index of status bytes 126 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.6 3.6.1 Description of protocols for SLG D10 Appendix Codes for transponder types Value Transponder type 0x00 Philips I-CODE1 0x01 Texas Instruments Tag-it HF 0x03 ISO15693 transponder C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 127 Description of protocols for SLG D10 3.6.2 05/05 Time response of the asynchronous interface The reaction times of the asynchronous interface depend on the following factors: * Quantity of data to be read or written * Type and number of transponders supported by the reader * Location of the transponder at the time of the request * Any existing electromagnetic interference * Success or failure of the request Minimum Typical I-CODE1 EE parameter change Units Tag-it HF 5 msec 1 block (16 bytes) 22 300 msec all (16) blocks 340 600 msec [0x1B] Reset QUIET Bit 5 9 ... 45 - 300 msec [0x1C] EAS 5 15 ... 56 - 300 msec 15 [0x69] RF Reset msec [0xB0] Host commands 5 for ISO15693: required and optional commands 1 2 msec [0xB1] Host commands for ISO15693: userspecific and manufacturer-specific commands 5 1 2 msec [0xBF] ISO15693 transparent command 5 1 2 msec 1 Details in chap. 3.6.3 Time response of the ISO15693 host commands 2 As set in CFG2: COM interface, TR-RESPONSE-TIME 128 Maximum C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.6.3 Description of protocols for SLG D10 Time response of the ISO15693 host commands The reaction time to the ISO15693 host commands depends on the following factors: * Number of transponders in the antenna field (duration of anticollision process) * Amount of data to be read or written * Types of transponders supported by the reader * Location of the transponder at the time of the request * Any existing electromagnetic interference Time reaction of the I-CODE1 and Tag-it HF transponders (only execution time) Typical I-CODE1 Units I-CODE1 1 (normal) (fast) Tag-it HF 1 - - 50 msec 1 time slot 97 21 - msec 16 time slots 276 132 - msec 256 time slots 3137 1905 - msec 1 block, unaddressed 13 msec 1 block, addressed 18 msec 4 blocks, unaddressed 44 msec 4 blocks, addressed 66 msec Inventory with 1 transponder: Read multiple blocks: See table below Write multiple blocks: 1 block, unaddressed - - 27 msec 4 blocks, unaddressed - - 104 msec Write multiple blocks (1 block, addressed): - - 33 msec 1 time slot 149 27 - msec 16 time slots 361 170 - msec 256 time slots 3744 2465 - msec - - 126 msec Write multiple blocks (4 blocks, addressed): 1 1 time slot 311 67 - msec 16 time slots 960 444 - msec 256 time slots 11360 6491 - msec See chap. 2.2.1 CFG8: General transponder parameters C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 129 Description of protocols for SLG D10 05/05 Read out multiple blocks (I-CODE1 transponders) Time slots 1 Number of blocks Unaddressed 16 Addressed Unaddressed 256 Addressed Unaddressed Addressed Typical 7,5 14 40 98 564 1435 (fast)1 msec 48 96 81 180 605 1518 (normal)1 msec 1 (4 bytes) 11 18 98 156 1493 2364 (fast)1 msec with SECSTATUS2 52 100 140 238 1534 2446 (normal)1 msec 18 98 156 1493 2364 (fast)1 msec 100 140 238 1534 2446 (normal)1 msec 22 157 214 2421 3293 (fast)1 msec 104 198 297 2462 3374 (normal)1 msec 1 (4 bytes) 4 (16 bytes) 11 52 4 (16 bytes) 15 with SECSTATUS2 56 Time reactions of the ISO15693 transponders All times refer to the following parameters. ISO15693-MODE = 0x0B (see chapter 2.2.1 CFG8: General transponder parameters). * Fast mode (1 / 4) * High data speed * AFI deactivated * Only ISO15693 transponder driver active Modulation and subcarrier have almost no measurable effect on the reaction time. 1 See chap. 2.2.1 CFG8: General transponder parameters 2 See chap. 3.4.4.4 [0x23] Read Multiple Blocks 130 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D10 Time reactions for [0x01] Inventory The following diagram shows average values for time reactions based on the number of transponders. The times for certain UIDs may be longer or shorter than those shown below. The time reaction including the communication time is measured at 115 kbaud. Other baud rates cause a slight increase in times. Since inventory timing is primarily determined by anticollision, the communication time can be disregarded. Execution time Send Tx Receive Rx + = Communication time The measuring scenario for average values is a worst case scenario during which the transponders have all stopped near the antenna. Results improve when the transponders are moving and are located at different distances from the antenna. Only ASK or a single subcarrier can be used for configuration with a time slot. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 131 Description of protocols for SLG D10 05/05 The diagram for a time slot ends at approximately 30 transponders. The reason for this is that with this measuring scenario (transponders close to antenna) execution time with more than 30 transponders increases quickly. If you have more than 30 transponders, it is better to use the configuration with 16 time slots. When to switch from the configuration with one time slot to the configuration with 16 time slots depends on the application. Thirty transponders is an average value. It may be higher or lower for certain applications. You can increase the value if your application fulfills the following criteria: * Small transponders in comparison to the reader antenna. * Transponders are at different distances from the antenna. You should decrease the value if your application fulfills the following criteria: * Large transponders in comparison to the reader antenna. * Transponders are all at the same distance to the antenna. * Transponders are very close to the antenna. Zeitschlitze Datencodierung Subcarrier Zeit [ms] The timing diagram with 16 time slots and one to 150 transponders shows the inventory time reactions including communication time. Buffered read mode was used. 16 1 von 4 - Transponder Remember that the time reaction of the Inventory (0xB0 0x01) command depends on the MORE bit. The MORE bit is set when the number of transponders exceeds 24. If the MORE bit is set by the reader in response to the Inventory command, communication time is affected by the speed of the host system. 132 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D10 More data requested Execution time Send Tx Receive Rx + = Host Communication time Time reactions of general commands with independent transponder performance Command Execution time (msec) Communication time at 115 kBaud (msec) Addressed Selected Addressed Selected Stay Quiet 6.8 - 2.1 - Select 8.1 - 2.1 - Reset to Ready 8.2 5.6 2.1 1.3 Get System Information 12.3 10.5 3.2 2.5 Get Multiple Block Security Status 1 block 9 7 2.4 1.6 2 blocks 9.5 7.5 2.5 1.7 8 blocks 11.5 9 3 2.3 32 blocks 19.5 16.5 5.4 4.6 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 133 Description of protocols for SLG D10 05/05 Time reactions of read functions Infineon my-d Execution time (msec) Read Without security block Communication time at 115 kBaud (msec) With security block Addressed Selected Addressed Selected Addressed Selected 1 block 8 bytes 12.5 20 13 10.5 3.3 2.5 4 blocks 32 bytes 42.5 35 46 35 5.9 5.1 16 blocks 128 bytes 175 133 176 133 16.2 15.4 Philips I-Code SLI Execution time (msec) Read Without security block Communication time at 115 kBaud (msec) With security block Addressed Selected Addressed Selected Addressed Selected 1 block 4 bytes 10 7.5 10.5 7.5 2.9 2.1 2 blocks 8 bytes 12 9 12.5 10 3.3 2.6 8 blocks 32 bytes 20 17 22.5 20 6.2 5.5 (28 blocks) 112 bytes 47 44 56 52.5 15.8 15 Texas Instruments Tag-it HFI Execution time (msec) Read Without security block Communication time at 115 kBaud (msec) With security block Addressed Selected Addressed Selected Addressed Selected 1 block 4 bytes 10 7.5 10.5 7.5 2.9 2.1 2 blocks 8 bytes 12 9 12.5 10 3.3 2.6 8 blocks 32 bytes 20 17 22.5 20 6.2 5.5 32 blocks 128 bytes 52 44 62 60 17.7 16.9 134 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D10 STMicroelectronics (LRI512) Execution time (msec) Read Without security block Communication time at 115 kBaud (msec) With security block Addressed Selected Addressed Selected Addressed Selected 1 block 4 bytes 10 7.5 10.5 7.5 2.9 2.1 2 blocks 8 bytes 18.5 13 19 14 3.3 2.6 8 blocks 32 bytes 67 45 69.5 47.5 6.2 5.5 (16 blocks) 64 bytes 131 88 136.5 93.5 10.1 9.3 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 135 Description of protocols for SLG D10 05/05 Time reactions of write functions Infineon my-d WR-Option = 0 Write Execution time (msec) Write data block Communication time at 115 kBaud (msec) Lock data block Write data block Lock data block Addressed Selected Addressed Selected Addressed Selected Addressed Selected 1 block 8 bytes 16 13.5 13 11 3.1 2.3 2.2 1.5 4 blocks 32 bytes 58 47 49 39 5.4 4.6 2.2 1.5 16 blocks 128 bytes 225 182 192 148 14.6 13.8 2.2 1.5 Write AFI 12 9.5 2.1 1.3 Lock AFI 11.5 8.5 2.1 1.3 Write DSFID - - - - Lock DSFID - - - - I-Code SLI WR-Option = 0 Write Execution time (msec) Write data block Communication time at 115 kBaud (msec) Lock data block Write data block Lock data block Addressed Selected Addressed Selected Addressed Selected Addressed Selected 1 block 4 bytes 14 11 10 7.5 2.7 1.9 2.2 1.5 2 blocks 8 bytes 26 20.5 18.5 13 3.1 2.3 2.2 1.5 8 blocks 32 bytes 97 76 68 47 5.3 4.6 2.2 1.5 (28 blocks) 112 bytes 333 258 12.9 12.2 Write AFI 12.5 9.5 2.1 1.3 Lock AFI 9.5 7.5 2.1 1.3 Write DSFID 12.5 9.5 2.1 1.3 Lock DSFID 9.5 7.5 2.1 1.3 136 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D10 Texas Instruments Tag-it HFI WR-Option = 1 Write Execution time (msec) Write data block Communication time at 115 kBaud (msec) Lock data block Write data block Lock data block Addressed Selected Addressed Selected Addressed Selected Addressed Selected 1 block 4 bytes 20.5 17.5 19 16.5 2.7 1.9 2.2 1.5 2 blocks 8 bytes 22 19.5 19 16.5 3.1 2.3 2.2 1.5 8 blocks 32 bytes 82.5 72 71 61 5.3 4.6 2.2 1.5 32 blocks 128 bytes 322 279 14.5 13.8 2.2 1.5 Write AFI 19 16.5 2.1 1.3 Lock AFI 18 16.5 2.1 1.3 Write DSFID 19 16 2.1 1.3 Lock DSFID 18 16.5 2.1 1.3 STMicroelectronics (LRI512) WR-Option = 0 Write Execution time (msec) Write data block Addressed Selected 1 block 4 bytes 36.5 2 blocks 8 bytes Communication time at 115 kBaud (msec) Lock data block Addressed Selected Write data block Lock data block Addressed Selected Addressed Selected 31 2.7 1.9 2.2 1.5 71 60 3.1 2.3 2.2 1.5 8 blocks 32 bytes 277 235 5.4 4.6 2.2 1.5 (16 blocks) 64 bytes 553 468 8.5 7.5 2.2 1.5 Write AFI Lock AFI Write DSFID Lock DSFID C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 137 Description of protocols for SLG D10 3.6.4 05/05 Index of status bytes Hexadecimal value 0x00 General information OK: * Data / parameters correctly read or stored * Control command executed Hexadecimal value Transponder status 0x01 No transponder: * No transponder located in the detection field of the reader * Transponder in the detection field was switched to silent * Interference in communication between reader and transponder. The reader can no longer recognize the transponder. 0x02 Incorrect data: * CRC16 checksum error in the received data 0x03 Write error: Plausibility test of the written data failed: * Attempt to write to read-only area (only I-CODE1 and Tag-it HF transponders) * Distance between transponder and reader antenna too large * Attempt to write under excessive ambient noise conditions 0x04 Addressing error: The requested data are outside of the logical or physical addressing range of transponder: * The address is outside of the maximum address range of the transponder. * The address is outside of the configured address range of the transponder. 0x05 Incorrect transponder type: This command is not supported by this transponder: * A specific command is not supported by the transponder. Hexadecimal value 138 Parameter status 0x10 EEPROM error: * It is not possible to write to the EEPROM of the reader * A faulty parameter checksum occurred prior to the write procedure to the EEPROM. 0x11 Parameter outside of valid range: * Valid parameter range was exceeded 0x13 Login required: * An attempt was made to access the configuration before having logged in C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D10 Hexadecimal value Parameter status 0x14 Login error: * Attempt to log in with an incorrect password 0x15 Read protection: * Configuration block reserved for future use 0x16 Write protection: * Configuration block reserved for future use Hexadecimal value Interface status 0x80 Unknown command: * Selected function not supported by reader 0x81 Length error: * Selected function has the wrong number of parameters 0x82 Command not possible: * An ISO15693 host command was sent to the reader in the Buffered Read Mode or in Scan Mode. * A protocol for the Buffered Read Mode was sent to the reader in the standard mode 0x83 HF communication error: An error occurred in the communication between the transponder and reader. Possible causes: * Timeout during transponder communication. TR-RESPONSE-TIME in CFG2: COM interface (see chap. 2.1.3) is too short. * Algorithm for collision handling was interrupted before no more collision were detected. Causes for the interruption: - More transponders in the field than time slots 0x84 HF error: Detailed status information can be read with the [0x6E] Reader Diagnostic command. * Incorrect configuration of the antenna; check antenna cable and antenna setting. * Ambient noise too high * HF power does not match the configured value * Excessive temperature of the HF output stage; HF power can be reduced or switched off altogether. * Defective HF hardware 0x85 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 Synchronization error: * A timeout has occurred on the synchronization input. During the SYNC-TIMEOUT time, no synchronization pulse was detected (see chap. 2.3.2 CFG11: Buffered Read Mode). Increase the SYNCTIMEOUT time of the readers. * At least one reader in the chain is being used with synchronization mode switched off. 139 Description of protocols for SLG D10 Hexadecimal value 1 05/05 Buffer status 0x92 No valid data: * No valid data in the Buffered Read Mode * No transponder in the antenna field * VALID-TIME1 for the transponders in the antenna field has not yet expired. 0x93 Data buffer overflow: * A data buffer overflow occurred 0x94 Additional data: * More transponder data sets were requested than the transponder protocol can transmit simultaneously. 0x95 ISO15693 error: * An additional error code for ISO15693 transponders was sent with the response data See chap. 2.3.2 CFG11: Buffered Read Mode 140 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.6.5 Description of protocols for SLG D10 Index of control bytes Control byte Description Page [0x1B] [0x1B] Reset QUIET Bit (I-CODE1 transponders only) 87 [0x1C] [0x1C] EAS (I-CODE1 transponders only) 87 [0x21] [0x21] Read Buffer 123 [0x31] [0x31] Read Data Buffer Info 125 [0x32] [0x32] Clear Data Buffer 126 [0x33] [0x33] Initialize Buffer 126 [0x52] [0x52] Baud Rate Detection 74 [0x55] [0x55] Start Flash Loader 74 [0x63] [0x63] CPU Reset 75 [0x65] [0x65] Get Software Version 75 [0x69] [0x69] RF Reset 77 [0x6A] [0x6A] RF ON/OFF 78 [0x6C] [0x6C] Set Noise Level 79 [0x6D] [0x6D] Get Noise Level 80 [0x6E] [0x6E] Reader Diagnostic 81 [0x6F] [0x6F] Basic antenna tuning 83 [0x71] [0x71] Set Output 84 [0x74] [0x74] Get Input 86 [0x80] [0x80] Read Configuration 68 [0x81] [0x81] Write Configuration 69 [0x82] [0x82] Save Configuration to EEPROM 70 [0x83] [0x83] Set Default Configuration 71 [0x85] [0x85] Set System Timer 72 [0x86] [0x86] Get System Timer 73 [0xA0] [0xA0] Reader Login 67 [0xB0] [0xB0] Host commands for ISO15693: required and optional commands 94 [0xB1] [0xB1] Host commands for ISO15693: user-specific and manufac- 117 turer-specific commands [0xBF] [0xBF] ISO15693 transparent command C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 118 141 Description of protocols for SLG D10 3.6.6 05/05 Index of configuration parameters CFGn Access1 Description Page Reader parameters 0 CFG0: Passwords WO 24 1 Configuration protection R/W 25 Access to the configuration parameters stored on the reader is protected with a 32-bit password called the "READER-ID." This means that the configuration parameters in the EEPROM of the reader can only be read or changed after you have logged in with the command [0xA0] Reader Login with a valid reader ID CFG1: General inputs and outputs 2 CFG2: COM interface R/W 27 3 CFG3: HF interface I R/W 31 4 CFG4: HF interface II R/W 34 5 CFG5: HF interface III R/W 35 6 CFG6: Reserved RP/WP 35 7 CFG7: Reserved RP/WP 36 Transponder parameters 8 CFG8: General transponder parameters R/W 37 9 CFG9: Reserved RP/WP 42 System parameters 142 10 CFG10: General system parameters R/W 43 11 CFG11: Buffered Read Mode R/W 45 12 CFG12: Scan Mode R/W 55 13 CFG13: Anticollision R/W 63 14 CFG14: Reserved RP/WP 66 15 CFG15: Reserved RP/WP 66 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.6.7 Description of protocols for SLG D10 Memory model for I-CODE1 transponders For access, the memory is subdivided into regions with a length of 4 bytes each. I-CODE1 address I-Scan address Contents Description Remarks 0...1 - UID UID (8 bytes) Read only 2 C0 Configuration Conditions for write access Read / write 3 C1 Special functions (EAS, QUIET bit) 4 C2 Family code / application ID 5 D0 6 D1 7 D2 8 D3 9 D4 10 D5 11 D6 12 D7 13 D8 14 D9 15 D10 User User memory Can be set to "read only" Read / write Can be set to "read only" Note * When writing data to a transponder, it must be ensured that the transponder remains completely inside the antenna field while writing is taking place. * If the "QUIET-Bit" is set in the I-Code1 memory model (see chap. 2.2.1 CFG8: General transponder parameters), the [0x24] Write Multiple Blocks command can only be used on DB block 3. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 143 Description of protocols for SLG D10 05/05 UID: This block contains a unique, 64-bit transponder UID (read-only access). Bit 144 Byte 0...7 0 8...15 1 16...23 2 24...31 3 32...39 4 40...47 5 48...55 6 56...63 7 Function UID, MSB UID, LSB C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D10 Configuration block 0: This block is used to enable protective functions of the transponder. The bits can be set to 0, but can never be set back to 1. After you have enabled write protection for block C0, you cannot enable any additional protective functions (hardware write protection). Bit Function2 Byte Procedure I-Scan block I-CODE1 block "1" = r/w, "0" = ro D0 5 1 "1" = r/w, "0" = ro D1 6 2 "1" = r/w, "0" = ro D2 7 3 "1" = r/w, "0" = ro D3 8 4 "1" = r/w, "0" = ro D4 9 5 "1" = r/w, "0" = ro D5 10 6 "1" = r/w, "0" = ro D6 11 7 "1" = r/w, "0" = ro D7 12 "1" = r/w, "0" = ro D8 13 0 8 0 1 9 "1" = r/w, "0" = ro D9 14 10 "1" = r/w, "0" = ro D10 15 11 - - - 12 - - - 13 - - - 14 - - - 15 - - - 16...23 2 - - - 24 - - - 25 3 - - - 26 - - - 27 "1" = r/w, "0" = ro C2 4 28 "1" = r/w, "0" = ro C1 3 29 "1" = r/w, "0" = ro C0 2 30 "0" = ro S no. 1 31 "0" = ro S no. 0 1 See chap.3.4.4.4 [0x23] Read Multiple Blocks 2 See chap. 2.3.2 CFG11: Buffered Read Mode C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 145 Description of protocols for SLG D10 05/05 Configuration block 1: This block is used to enable special functions (EAS / QUIET mode). If the EAS mode ("Electronic Article Surveillance") is enabled, all transponders respond to an EAS command. If the QUIET mode is enabled, the transponder is permanently disabled. It can be re-enabled using the "Reset QUIET Bit" command. The I-CODE1 transponder responds to no command other than the EAS. Bit 0 Byte 0 Function "1": enable EAS "0": disable EAS 1 "1": enable QUIET mode "0": disable QUIET mode 2...7 - 8...15 1 - 16...23 2 - 24...31 3 - Bits 2 to 31 are reserved for future use and are set to "0" Configuration block 2: The family code and the application ID can be specified in this block. This function lets you create "transponder families." It is only enabled if the values are not equal to 0. Bit Byte Function 0...7 0 Family code 8...15 1 Application ID 16...23 2 - 24...31 3 - Bits 16 to 31 can be used for user data without restrictions. 146 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 3.6.8 Description of protocols for SLG D10 Examples of Reading Data Different values must be used for the DB-N factor regardless of whether you are using ISO15693 Host Mode or Buffered Read Mode. Depending on DB-SIZE of the transponder, they are not 4 bytes. Make sure that the data block always has 4 bytes in Buffered Read Mode (BRM). Use DB-N=2 (2 x 4 bytes) in buffered Read Mode to read a transponder with a DB-SIZE of 8 bytes. Below are four examples. The setting LSB first and MSB first specifies the order of the received data bytes in Buffered Read Mode. See below: Buffered Read Mode (BRM) (DB-SIZE of transponder = 4 bytes) and Buffered Read Mode (BRM) (DB-SIZE of transponder = 8 bytes). ISO15693 host command (DB-SIZE of transponder = 4 bytes) C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 147 Description of protocols for SLG D10 05/05 Buffered Read Mode (BRM) (DB-SIZE of transponder = 4 bytes) 148 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D10 ISO15693 host command (DB-SIZE of transponder = 8 bytes) C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 149 Description of protocols for SLG D10 05/05 Buffered Read Mode (BRM) (DB-SIZE of transponder = 8 bytes) 150 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 4 4.1 SLG D11/D12 overview SLG D11/D12 overview Data transmission between MOBY D SLG D11/D12 and the host There are four different kinds of data transmission between the MOBY D reader and the host (terminal, PC). ISO15693 host commands and Scan mode are used for the exchange of data between the transponder and the host. Configuration commands and control commands are used for matching the reader parameters to various applications. The following table shows what interfaces are supported by the various kinds of data transmission: Asynchronous interface (RS 232 / RS 422) 4.1.1 Configuration commands Control commands ISO15693 host commands Scan mode Configuration commands and control commands This kind of data transmission is used for configuring the reader and for diagnosis via the asynchronous interface or the USB interface. The reader configuration parameters are stored in the reader memory. To protect the current configuration from being lost when the device is switched off, you must store it in the EEPROM. After the reader is switched on, it reads the configuration saved in the EEPROM. The reader control is processed immediately. The reader response contains status or data information of the control command. Host (terminal / PC / ....) Parameter command / control command Reader Parameters received and saved / control command processed Yes No Status / data Error status C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 151 SLG D11/D12 overview 4.1.2 05/05 ISO15693 host commands The ISO15693 host commands are a method of exchanging data between the host and the transponders using the reader. The transponders must remain within the detection field of the reader for this purpose. Note When writing data to a transponder, you must ensure that the transponder remains completely within the recognition field of the reader during the entire write procedure. Data will be lost if the transponder leaves the detection range during the write procedure. The reader differentiates between three modes. Addressed mode: Before data can be read or written in addressed mode, the UID of the transponder must be known. You will learn the UID when you send the protocol [0x01] Inventory. When a transponder is located in the recognition field of the reader at this moment, it replies with its UID. The transponder must then be addressed with the correct UID during all subsequent read and write commands. The following flowchart shows the steps required for communication with a transponder in addressed mode. Host (terminal / PC / ....) "Inventory" tu query the UID Reader Transponder in the antenna field? Yes No Status / number of selected transponders / UID Status = no transponder Read data with UID from the transponder Transponder with correct UID in the antenna field? Yes No Status / transponder data that have been read Status = no transponder in reader field Write data with UID to the transponder Transponder with correct UID in the antenna field? Yes No Status OK Status = no transponder in reader field 152 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D11/D12 overview Not addressed mode: In not addressed mode, you do not need to know the UID of the transponder. This mode is recommended when only one transponder is located in the recognition field of the reader. The following flowchart shows the steps required for communication with one transponder in not addressed mode. Host (terminal / PC / ....) Read data Reader Transponder in the antenna field ? Yes No Status / transponder data that have been read Status = no transponder in reader field Write data Transponder in the antenna field ? Yes No Status OK Status = no transponder in reader field C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 153 SLG D11/D12 overview 05/05 Selected: In this mode, the reader only communicates with one selected transponder. Before you can read or write in select mode, the UID of the transponder must be known. You will learn the UID when you send the protocol [0x01] Inventory. In a second step, the transponder must be selected with the command [0x25] Select. This must contain the UID of the transponder. The following flowchart shows the steps required for communication with a transponder in select mode. Host (Terminal / PC / ....) "Inventory" for query of UID Reader Transponder in antenna field? Yes No Status/number of selected transponders/UIDs Status = no transponders Select transponder with UID Transponder with correct UID in the antenna field? Yes No Status/read transponder data Status = no transponder in reader field Read data Selected transponder in antenna field? Yes No Status/read transponder data Status = no transponder in reader field Write data Selected transponder in antenna field? Yes No Status OK Status = no transponder in reader field 154 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 4.1.3 SLG D11/D12 overview Scan mode In this mode, the reader automatically sends data to the host as soon as a transponder enters the recognition field and valid data can be read. When scan mode is set, the contents of the message block (UID, data block) can be adjusted to any user application. Scan mode can be used with the asynchronous interface. The reader begins with the output of the protocol block as soon as all required data have been correctly read from the transponder. If the reader is unable to read all data of a protocol block completely and correctly, it outputs no data. If, for example, the address of the data block is invalid, the UID of the transponder is not sent. Scan mode with the asynchronous interface The data are output as shown below based on their configuration. The specified order cannot be changed. The format of the sent protocols depends on the configuration and number of transponders in the recognition field of the reader. Example 1: One transponder is located in the recognition field. UID and data block are to be read: Example 2: Three transponders are located in the recognition field. Only the UID is to be read. PR UID1 EZ UID2 EZ UID3 EZ Example 3: Three transponders are located in the recognition field. Only the data block is to be read. PR Data1 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 EZ Data2 EZ Data3 EZ 155 SLG D11/D12 overview 05/05 Example 4: Two transponders are located in the recognition field. UID and data block are to be read. PR PR: UID: Data: TZ: EZ: ts: tr: UID1 TZ Data1 EZ UID2 TZ Data2 EZ Communication prefix (optional) Serial number (fixed) Data blocks (can be programmed as desired) Separator character (optional) End character (optional) SCAN-LOCK-TIME Time until the next new read access of the transponder Note * When configuration protocols are to be sent to the reader when scan mode is active, no transponder should be located in the recognition field of the reader during this time. * Only read operations are possible in scan mode. 156 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 4.2 4.2.1 SLG D11/D12 overview Asynchronous interface Data format und protocol frame You can configure the SLG D11/D12 reader via an asynchronous interface and write data to and read data out from transponders. Communication between the reader and the connected host (terminal, PC, etc.) is governed by fixed protocols. These are designed for data busses and contain a bus address. The reader provides the requested data or a status byte when data is transmitted via the asynchronous interface. The response also contains the transmitted control byte. The reader does not respond if a defective protocol frame is transmitted. Protocol frame: Host reader 1 LENGTH = n 2 COMADR 3 CONTRO L BYTE 2 COMADR 3 CONTROL BYTE 4...(n-2) PROTOCOL DATA (n-1) MSB CRC16 n LSB CRC16 Host reader 1 LENGTH = n 4 STATUS1 (5...(n-2)) (PROTOCOL DATA) (n-1) MSB CRC16 n LSB CRC16 LENGTH n: Number of protocol bytes 1 ... n (6 ... 255), including length byte and checksum COM-ADR: 0..254, device address in bus mode Note * The reader can always be accessed via device address 255! * SLG D11/D12 has only been provided with a point-to-point connection (RS 232, RS 422 upon request) (no RS 485)! 1 See chap. 6.5.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 157 SLG D11/D12 overview 05/05 STATUS / PROTOCOL DATA: Contains status message or protocol data from or for the reader. When the data are sent, the MSB is always transferred first when the reader is in ISO15693 host command mode (see also chapter 6.5.8 Examples of Reading Data). CRC16: Cyclic redundancy test of the protocol bytes from 1 to (n-2), as indicated by the CCITT polynomial: x16 + x12 + x5 + 1 Starting value: 0xFFFF Data format: Start bits: 1 Data bits: 8 Stop bits: 1 Parity: Even (default) Uneven None Timing: * Waiting time at start: A waiting time of at least 5 ms must be observed before sending a protocol start character (length byte). Host reader: .. Reaction time Waiting time O 5...n ms O O5 ms min.O Host reader: * .. .. .. .. .. Data timeout: The individual characters within a protocol must occur in intervals of not more than 12 ms. O12 ms max. O Host reader: 158 Character n O12 ms max. O Character n+1 O12 ms max. O Character n+2 .. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 4.2.2 SLG D11/D12 overview CRC16 calculation algorithm Polynomial: x16 + x12 + x5 + 1 CRC_POLYNOM = 0x8408; Starting value: 0xFFFF CRC_PRESET = 0xFFFF; Example in C: unsigned int crc = CRC_PRESET; for (i = 0; i < cnt; i++) /* cnt = Number of protocol bytes without CRC */ { crc ^= DATA[i]; for (j = 0; j < 8; j++) { if (crc & 0x0001) crc = (crc >> 1) ^ CRC_POLYNOM; else crc = (crc >> 1); } } C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 159 SLG D11/D12 configuration parameters (CFG) 5 05/05 SLG D11/D12 configuration parameters (CFG) The reader configuration memory is subdivided into configuration blocks of 16 bytes each. Each block consists of 14 bytes of configuration parameters and a 2-byte CRC16 checksum. Each configuration block has a number (CFG0...CFGn). Configuration block structure in the configuration memory and EEPROM of the reader (CFG): Byte 0 1 2 3 4 5 6 7 8 9 10 11 12 Contents PARAMETERS 13 14 15 CRC16 The parameters are stored in two separate locations within the configuration memory: * Reader RAM * Storage EEPROM (for storing parameters when the device is switched off) You can address multiple locations in the configuration memory via the value of the CFG-ADR parameter described in chap. 6.1 Protocols for configuring the reader. CFG-ADR: CFGn: LOC: MODE: Bit: Function Memory address of the required configuration block Configuration block location (RAM / EEPROM) Specifies whether one or all configuration blocks should be accessed 7 6 5 4 3 2 LOC MODE CFGn: Configuration block address 1 0 The configuration blocks in the EEPROM are protected by a 16-bit CRC checksum. These checksums are checked every time the reader is reset. If an false checksum is discovered, the reader enters into the "EE Init Mode" error status and resets the defective configuration block back to its default values. The LED1 flashes alternately red and green. The reader responds to external commands with the "0x10 EEPROM Error" status. You can exit EE-Init mode by another reset (cold start or [0x63] CPU Reset command). The reader then switches to the configured operating state if the checksum of all data records is correct. Note * Malfunctions may occur if parameters are configured outside of their permissible range or if unspecified parameters are changed. * The EEPROM is returned to its default settings when firmware is updated. The reader enters the "EE Init Mode" error status. 1 Not available with SLG D11/D12 160 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D11/D12 configuration parameters (CFG) Description of configuration parameter structure Byte 0 Contents concerns RAM Any changes to this parameter become effective immediately after this configuration block is written to or stored in the RAM. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 1 2 ......n concerns EEPROM - ..... reserved Any changes to this parameter become effective only after this configuration block has been written to / stored in the EEPROM and the reader has been reset. These bits or bytes are reserved for future extensions or for internal testing and production purposes. They must not be modified, as this may lead to faulty reader operation. 161 SLG D11/D12 configuration parameters (CFG) 5.1 05/05 CFG0: Reserved The configuration block CFG0 is reserved for later use. Byte 0 Contents 0x00 Byte 7 Contents 0x00 5.2 1 2 3 4 5 6 0x00 0x00 0x00 0x00 0x00 0x00 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 CFG1: Interface The parameters of configuration block CFG1 contain the data transmission settings. Byte Contents Default 0 3 4 5 6 BAUD TRANSFORM1 0x00 0x00 TRRESPONSETIME 0x00 0x08 0x01 0x00 38400 baud e,8,1 9 10 11 12 13 0x00 0x00 0x00 0x00 READERMODE COM-ADR 1 0x00 Byte 7 Contents TR0x00 RESPONSETIME Default 0x1E 8 2 1 0x00 0x00 3 seconds 1 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11} 162 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D11/D12 configuration parameters (CFG) COM-ADR: Reader bus address (0 .. 254) for communication via the asynchronous interface; intended for applications with an RS 485 interface. Note * Do not configure address 255. * The reader can be accessed via COM address 255 in the send protocol at any time. It then responds with the address that has been set up. BAUD1: The baud rate of the asynchronous interface is set here. BAUD Baud rate 5 4800 baud 6 9600 baud 7 19200 baud 8 38400 baud Note * A change in baud rate does not take effect until after the CFG1 configuration block is written to/stored on the EEPROM and the reader is reset. * The reader sets the baud rate to 38400 baud when an invalid baud rate has been set by the user. 1 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11} C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 163 SLG D11/D12 configuration parameters (CFG) 05/05 TRANS-FORM1: This byte is used to define various parameters of the data transmission format of the asynchronous interface. Bit: 7 6 5 4 3 2 1 Function: 0 0 0 0 S D P 0 P: Parity P Parity b00 None b01 Even b02 Uneven b11 Do not use. D: Data bits D Data bits b0 8 b1 Do not use. S: Stop bits S Stop bits b0 1 b1 Do not use. Note * Any changes to TRANS-FORM become effective only after configuration block CFG1 has been written to / stored on the EEPROM and the reader has been reset. * Eight data bits and one stop bit must always be used. 1 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11} 164 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D11/D12 configuration parameters (CFG) TR-RESPONSE-TIME: This parameter can be used to specify the maximum response duration for transponder commands. TR-RESPONSE-TIME starts when the reader has received a new command. The reader sends a response protocol at the latest after expiration of TR-RESPONSETIME. In this case, execution of current commands between reader and transponder are terminated. If this time is too short, the interface status [0x83] "HF communication error" appears. Max. response duration TR-RESPONSE-TIME 1 ... 65535 * 100 msec Note * TR-RESPONSE-TIME does not affect the protocols for the configuration of the reader and the protocols for the control of the reader. * TR-RESPONSE-TIME must be less than "block timeout" in the settings of the COM port of the host. READER-MODE: This byte is used to specify the operating mode of the reader. Bit: 7 6 5 4 3 2 1 0 Function: 0 0 0 0 0 0 0 SCAN-E SCAN-E: Scan mode can be activated with this bit. SCAN-E Reader mode b0 ISO15693 host (see chap. 6.3) b1 Scan mode (see chap. 5.6) C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 165 SLG D11/D12 configuration parameters (CFG) 5.3 05/05 1 CFG2: General inputs/outputs By using the following parameters, you can set the LED and buzzer operating mode at any time. One byte is reserved for "enabled" and one byte for "silent." The operating mode settings are performed using these bytes as shown below. In addition, different LED flashing frequencies and buzzer intervals can be assigned to "enabled" and "silent." Thus, the LED is used to indicate the operating mode. Byte 0 Contents 0x00 1 2 3 4 5 6 0x00 0x00 IDLESTATE IDLEFLASH 0x00 0x00 0xA9 0x00 Default 8 9 10 11 12 13 Contents ACTIVESTATE ACTIVEFLASH ACTIVEGRN-TIME ACTIVERED-TIME ACTIVEBUZZERTIME 0x00 0x00 Default 0x00 0x0A 0x0A 0x0A 1 second 1 second 1 second Byte 7 0x26 Note The readers are equipped with a two-color LED (red / green). By combining the two basic colors, the color orange may also be produced. LED color: 1 Red Green Red 1 0 Green 0 1 Orange 1 1 Not available for SLG D11/D12 166 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D11/D12 configuration parameters (CFG) * IDLE-STATE / ACTIVE-STATE One byte is used for the "IDLE" state (free) and one byte for the "ACTIVE" state (active) to set the operating mode of the signal transmitter. 7 Bit: 6 5 Buzzer / 0 LED (turn on) Function: 4 3 Buzzer 2 1 RED 0 GRN Turn on buzzer / LED (in free state only) If this option has been selected, the buzzer and LED are switched on for two seconds after the reader is switched on to indicate that the reader is operational. After the reader is reset by the software, both LEDs light up for two seconds. GRN / RED / buzzer Bit combination Signal transmitter b00 Unchanged b01 On b10 Off b11 Alternates between on/off * IDLE-FLASH / ACTIVE-FLASH With the "IDLE-FLASH" and "ACTIVE-FLASH" bytes, you can set the signal transmitter to different flashing frequencies for "idle" and "enabled". 7 6 5 Function: 0 0 Buzzer Bit: Bit combination 4 3 2 RED 1 0 GRN Flashing frequency b11 1 Hz b10 2 Hz b01 4 Hz b00 8 Hz * ACTIVE-xxx-TIME If a transponder has been detected, you can set the signal transmitter and duration using the "ACTIVE-STATE" and "ACTIVE-FLASH" bytes. Each signal transmitter (LED, buzzer) can be enabled for a limited period of time. Signal transmitter Time period ACTIVE-GRN-TIME 0...255 x 100 ms ACTIVE-RED-TIME 0...255 x 100 ms ACTIVE-BUZZER-TIME 0...255 x 100 ms C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 167 SLG D11/D12 configuration parameters (CFG) 5.4 05/05 CFG3: HF interface The parameters of configuration block CFG3 contain global settings for the transponder driver and the reader. 0 Byte 1 TAG-DRV1 Contents Default 2 3 4 5 6 0x00 0x00 0x00 0x00 0x00 0x000B Byte Contents 7 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 0x00 1 TAG-DRV : Specifies the transponder types to be processed by the reader. Byte: 0 Bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 .D 0 .B .A Driver 1 b0 Driver for this transponder type is disabled b1 Driver for this transponder type is enabled .A: .B: .D: Driver for I-CODE1 Driver for Tag-it HF Driver for ISO15693 In general, you should only enable those transponder drivers that you require for a particular application. This will reduce reader response time to transponder read/write operations and rule out the possibility of "parasitic" transponder access as far as possible. 1 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11}. 168 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 5.5 SLG D11/D12 configuration parameters (CFG) CFG4: Transponder parameters The parameters of configuration block CFG4 contain general transponder settings. Byte Contents Default Byte Contents 0 1 2 3 4 5 6 I-CODEMODE FAMCODE APP-ID 0x00 ISO15693MODE ISO15693AFI ISO15693OPTION 0x00 0x00 0x00 0x0F 0x00 0x0C 7 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 0x00 I-CODE-MODE: (I-CODE1 transponders only) Bit: Function: 7 6 5 4 3 2 1 0 Mapping 0 0 0 0 0 0 0 Mapping: Mapping b0 Reserved b1 I-Code1 memory model Note If mapping is set to "I-Code1 memory model," host commands [0xA0] Read Config Block and [0xA1] Write Config Block are not available. Configuration blocks 0, 1 and 2 can now be changed with the command [0x24] Write Multiple Blocks at the I-Code1 address 2, 3 and 4. FAM-CODE: (I-CODE1 transponders only) Family code for selection a transponder C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 169 SLG D11/D12 configuration parameters (CFG) 05/05 APP-ID: (I-CODE1 transponders only) Application ID for selecting a transponder Note If FAM-CODE and APP-ID are set to zero, all I-CODE1 transponders respond. Otherwise, only those transponders with the appropriate FAM-CODE and APP-ID respond. ISO15693-MODE: Bit: 7 6 5 4 3 2 1 0 Function 0 0 AFI NO-TS DATARATE SUBCARRIER MOD DATACODING DATA-CODING DATA-CODING b0 Do not use. b1 Fast mode (1 / 4) MOD MOD b0 Do not use. b1 10% SUB-CARRIER SUB-CARRIER b0 ASK (1 subcarrier) b1 FSK (2 subcarriers) DATA-RATE DATA-RATE b0 Do not use. b1 High NO-TS NO-TS 170 b0 16 time slots b1 1 time slot C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D11/D12 configuration parameters (CFG) AFI AFI b0 Disabled b1 Enabled ISO15693-AFI: Code for the application family for selecting a transponder ISO15693-OPTION: 7 6 5 4 3 Function 0 0 0 0 WR-OPTION Bit: 2 1 0 0 0 WR-OPTION (supported as of firmware 2.04) WR-OPTION b00 Set automatically b10 Transponder option = 0 b11 Transponder option = 1 Note * If the WR-OPTION is set automatically, the reader sets WR-OPTION to 0 when the ISO15693 host command is in not addressed mode. If a Tag-it HF transponder is used, WR-OPTION must be set to 1. * For more details on the correct WR-OPTION, see chapter 6.4.1 Supported ISO15693 host commands for ISO15693 transponders. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 171 SLG D11/D12 configuration parameters (CFG) 5.6 05/05 CFG5: Anticollision The parameters of configuration block CFG5 contain anticollision settings. Byte 0 Contents TIMESLOTS1 Default Byte 1 2 3 4 5 6 0x00 0x00 0x00 0x00 0x00 0x00 8 9 10 11 12 13 0x00 0x00 0x0F ONT 0x00 0x00 0x02 7 Contents 0x00 Default 0x01 1 TIMESLOTS : (I-CODE1 transponders only) Number of time slots with which the transponders are read. TIMESLOTS Number of time slots 0x03 16 0x02 8 0x01 4 0x00 1 Each I-CODE1 transponder responds in a selected time slot. If too few time slots are selected for the number of transponders in the antenna field, only a limited number of transponders can be selected simultaneously. Too many time slots lead to lengthy delays. The optimum number of time slots lies at about twice the number of I-CODE1 transponders expected to be found in the antenna field at one time. 1 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the reader responds with STATUS = {0x11}. 172 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D11/D12 configuration parameters (CFG) ONT: Specifies which transponder data is to be sent to the host. Bit: 7 6 5 4 3 2 1 0 Driver 0 0 0 0 0 0 0 ONT ONT: ONT b0 Function The data of all transponders in the field are sent to the host. The reader executes an RF reset prior to each command that reads an UID. b1 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 Only the data of the newly selected transponders are sent to the host. 173 SLG D11/D12 configuration parameters (CFG) 5.7 05/05 CFG6: Scan mode 1 The parameters of configuration block CFG6 contain the settings for the scan mode. You can activate the scan mode by setting the SCAN-MODE bit in configuration block 1 (see chap. 5.1). Byte 0 Contents SCANNERMODE Standard SLG D11/D12 Byte 1 2 3 4 5 6 0x00 0x00 SCANDATA 0x00 0x00 SCANLOCKTIME 0x02 0x01 7 8 Contents SCAN0x00 LOCK-TIME Standard SLG D11/D12 0x00 9 10 11 12 13 0x00 0x00 DB-ADR D-LGT D-START 0x00 0x04 0x00 0x0A 1 second SCANNER-MODE: Specifies the type of scan procedure. Bit: 7 Function Trigger 6 5 4 3 2 0 0 0 0 mode 1 0 MODE: Bit combination Mode b000 Read once b010 Read continuously Read once: (enabled during the read procedure - ends after reading was sucessful) The reader ends the scan procedure as soon as all transponders in the recognition field have been decoded. Transponders which enter the antenna field are transmitted once. Read continuously The reader provides as many transponders as it can decode, regardless of whether or not these are always the same transponders. This operating mode is primarily suitable for demonstration and diagnosis purposes. 174 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D11/D12 configuration parameters (CFG) Trigger: Trigger Function b0 Trigger deactivated b1 Trigger activated Trigger deactivated: The reader scans continuously. This mode increases power consumption, however. Trigger activated: The reader begins scanning when the trigger is activated by the external switch. Note When trigger is enabled and not activated by the external switch, the HF field is off. SCAN-DATA: Selects the data types to be sent in the scan mode. 7 Bit: Function Byte Order 6 5 4 3 2 1 0 COMPrefix 0 0 0 0 DB UID UID When this bit is set, the UID is output. UID Function b0 No output of the UID b1 Output of the UID DB (data block) When this bit is set, a specified data field is output. DB Function b0 No output of a data field b1 Output of a data field COM prefix: When this option is set, the reader transfers the COM-ADR before each data record. COM prefix Function b0 COM-ADR of the reader is not transferred. b1 COM-ADR of the reader is transferred. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 175 SLG D11/D12 configuration parameters (CFG) 05/05 Byte order: Specifies the order of the bytes within the protocol frame Byte order Function b0 MSB first b1 LSB first SCAN-LOCK-TIME: (1 ... 65535 * 10 msec = 10 msec ... 10.9 min) SCAN-LOCK-TIME specifies the time during which the reader does not send the transponder data a second time after the first send procedure. It makes no difference whether or not the transponder is in the recognition field of the reader during SCAN-LOCK-TIME. SCAN-LOCK-TIME begins after the data are sent from the transponder to the reader. tr: to: ts: Time for reading the transponder data Data transmission from reader to host SCAN-LOCK-TIME During the SCAN-LOCK-TIME it makes no difference whether or not the transponder is located in the recognition field of the reader. DB-ADR: Transponder address of the first data block which is transmitted in scan mode. Range: 0x00 to 0xFF For valid addresses, see chapter 6.5.7 Storage model for I-CODE1 transponders and chapter 6.4.1 Supported ISO15693 host commands for ISO15693 transponders. 176 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D11/D12 configuration parameters (CFG) D-LGT: D-LGT defines the length of raw data transferred during scan mode. The number of data bytes to be transferred, starting with D-START. Example: Data block Note A maximum of 254 bytes including UID, time and so on can be transferred with the interface. If more than 254 bytes are sent, the last bytes are cut off. D-START: This parameter defines the first byte of raw data (defined by DB-ADR and D-LGT) which is transferred in scan mode. To transfer the entire data block, D-START must be set to 0. Note The size of a data block depends on the type of transponder. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 177 SLG D11/D12 configuration parameters (CFG) 5.8 Byte 05/05 CFG7: Scan mode 2 0 1 2 3 4 5 6 0x00 0x00 Contents DB-USE SEP-CHAR SEP-USR ENDCHAR END-USR Default 0x02 0x20 0x2C 0x01 0x0D 7 8 9 10 11 12 13 0x00 0x00 0x00 0x00 0x00 0x00 Byte Contents 0x00 DB-USE: Specifies the format of the data and their value 7 6 5 4 3 Function 0 0 0 0 DB-FORMAT Bit: 2 1 0 DB-FORMAT: b0000 Unformatted hexadecimal data The data are sent here as they were read from the transponder. b0010 ASCII-formatted hexadecimal data The raw data received from the transponder are converted here to ASCII code before being sent. The data bytes are separated first into nibbles and then converted in accordance with the following table to ASCII characters. Raw Data (Hex./Binary) 178 ASCII Data (ASCII/Hex) 0x0 b0000 '0' 0x30 0x1 b0001 '1' 0x31 0x2 b0010 '2' 0x32 0x3 b0011 '3' 0x33 0x4 b0100 '4' 0x34 0x5 b0101 '5' 0x35 0x6 b0110 '6' 0x36 0x7 b0111 '7' 0x37 0x8 b1000 '8' 0x38 0x9 b1001 '9' 0x39 0xA b1010 'A' 0x41 0xB b1011 'B' 0x42 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 SLG D11/D12 configuration parameters (CFG) 0xC b1100 'C' 0x43 0xD b1101 'D' 0x44 0xE b1110 'E' 0x45 0xF b1111 'F' 0x46 SEP-CHAR / END-CHAR: Specifies the separation character/end character between two data types for send data. 7 Bit: Function USER 6 5 4 3 2 1 0 `' `,' `;' TAB CR LF CR+LF ASCII CR+LF Hex 0x0D and 0x0A CR 0x0D LF 0x0A TAB 0x07 `;' 0x3B `,' 0x2C `' 0x20 USER User-defined in SEP-USR/END-USR Note Only one option can be selected. SEP-USR: User-defined separation character END-USR: User-defined end character C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 179 Description of protocols for SLG D11/D12 6 05/05 Description of protocols for SLG D11/D12 6.1 Protocols for configuring the reader Using the reader configuration protocols, the reader can be adapted to a wide range of specific conditions for different applications. 6.1.1 [0x80] Read Configuration >"Read Configuration" lets you determine the current configuration of the reader. The configuration is read in blocks of 14 bytes each and addressed by CFGn in the CFG-ADR byte . Host reader 1 2 3 4 5,6 6 COM-ADR [0x80] CFG-ADR CRC16 3 4 5...18 19,20 CFG-REC CRC16 Host reader 1 2 20 COM-ADR [0x80] STATUS 1 2 CFG-ADR : Bit: Function CFGn: LOC: 7 6 5 4 3 2 LOC 0 CFGn: Configuration block address 1 0 Memory address of the required configuration block Configuration block location LOC Block location 0 RAM 1 EEPROM CFG-REC: Configuration block with a length of 14 bytes that was read from address CFGn in CFG-ADR. Note A read access to the EEPROM with reserved configuration blocks leads to error message 0x15. 1 See chap. 6.5.4 Index of status bytes 2 See chap. 5 SLG D11/D12 configuration parameters (CFG) 180 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.1.2 Description of protocols for SLG D11/D12 [0x81] Write Configuration The "Write Configuration" command lets you modify the reader configuration. To do so, write blocks with a length of 14 bytes each to the configuration memory. The blocks are addressed via CFGn in the CFG-ADR byte. A description of the parameters is found in chap. 5 SLG D10 configuration parameters (CFG). Host reader 1 2 3 4 5...18 19,20 20 COM-ADR [0x81] CFG-ADR CFG-REC CRC16 Host reader 1 2 3 4 5,6 6 COM-ADR [0x81] STATUS1 CRC16 CFG-ADR2: Bit: 7 Function LOC CFGn: LOC: 6 5 0 CFGn: Configuration block address 4 3 2 1 0 Memory address of the required configuration block Configuration block location LOC Block location b0 RAM b1 EEPROM CFG-REC: Configuration block with a length of 14 bytes that is stored in the reader configuration memory under the CFGn address. Note A write access to the EEPROM with reserved configuration blocks leads to error code 0x16. 1 See chap. 6.5.4 Index of status bytes 2 See chap. 5 SLG D11/D12 configuration parameters (CFG) C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 181 Description of protocols for SLG D11/D12 6.1.3 05/05 [0x82] Save Configuration This command is used to save the configuration block in the RAM to the EEPROM. Host reader 1 2 3 4 5,6 6 COM-ADR [0x82] CFG-ADR CRC16 1 2 3 4 5,6 6 COM-ADR [0x82] STATUS1 CRC16 Host reader CFG-ADR2: Bit: 7 Function 0 CFGn: MODE: 6 5 MODE CFGn: Configuration block address 4 3 2 1 0 Memory address of the required configuration block Specifies whether one or all configuration blocks should be saved MODE Save procedure b0 The configuration block defined by CFGn is saved b1 All configuration blocks are saved Note * To protect the configuration in the RAM from being lost when the device is switched off, use [0x82] Save Configuration. * A save procedure to the EEPROM with reserved configuration blocks leads to error code 0x16. 1 See chap. 6.5.4 Index of status bytes 2 See chap. 5 SLG D11/D12 configuration parameters (CFG) 182 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.1.4 Description of protocols for SLG D11/D12 [0x83] Set Default Configuration The "Set Default Configuration" command lets you reset each configuration block to the default settings of the manufacturer. Host reader 1 2 3 4 5,6 6 COM-ADR [0x83] CFG-ADR CRC16 Host reader 1 2 3 4 5,6 6 COM-ADR [0x83] STATUS CRC16 CFG-ADR: Bit: 7 Function LOC 6 5 4 3 2 MODE CFGn: Configuration block address 1 0 CFGn: Memory address of the required configuration block MODE: Specifies whether one or all configuration blocks should be reset MODE Type b0 The configuration block defined by CFGn is reset b1 All configuration blocks are reset LOC: Position of the configuration block LOC Type b0 RAM b1 RAM and EEPROM Note * To protect the configuration in the RAM from being lost when the device is switched off, use [0x82] Save Configuration. * A "Set Default Configuration"with reserved configuration blocks will cause an error code. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 183 Description of protocols for SLG D11/D12 6.2 6.2.1 05/05 Protocols for controlling the reader [0x52] Baud Rate Detection This protocol is used to determine the baud rate set for the asynchronous interface of the reader. Host reader 1 2 3 4 5,6 6 COM-ADR [0x52] 0x00 CRC16 1 2 3 4 5,6 6 COM-ADR [0x52] 0x00 CRC16 Host reader Note The response protocol is only sent if the request was executed with the baud rate and correct parity of the reader. 6.2.2 [0x55] Start Flash Loader This protocol starts the flash loader of the reader. The SLG D11/D12 firmware is loaded at the factory. Host reader 1 2 3 4,5 5 0x00 [0x55] CRC16 1 2 3 4 5,6 6 0x00 [0x55] 0x00 CRC16 Host reader Note This command is only available if the COM-ADR of the reader is set to "0." 184 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.2.3 Description of protocols for SLG D11/D12 [0x63] CPU Reset This protocol lets you reset the reader CPU. Host reader 1 2 3 4,5 5 COM-ADR [0x63] CRC16 1 2 3 4 5,6 6 COM-ADR [0x63] STATUS1 CRC16 Host reader Note After a "CPU Reset," the HF field is off. 1 See chap. 6.5.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 185 Description of protocols for SLG D11/D12 6.2.4 05/05 [0x65] Get Software Version This protocol lets you determine the reader software version, the reader type and the transponder types supported by the software. Host reader 1 2 3 4,5 5 COM-ADR [0x65] CRC16 Host reader 1 2 3 4 5,6 7 13 COM-ADR [0x65] STATUS1 SW-REV D-REV 8 9 10,11 12,13 0 SW-TYPE TR-TYPE CRC16 (c) SW-REV: Firmware version D-REV: Version of development firmware. D-REV is set to "0" for customized firmware versions. SW-TYPE: Reader firmware type SW-TYPE Reader type 0x4A SLG D11/D12 TR-TYPE: Shows the transponders supported by the software. 14 13 12 11 10 9 8 Function: 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 Function: 0 0 0 0 ISO 15693 0 Tag-it HF ICODE1 Bit: Bit: 1 15 See chap. 6.5.4 Index of status bytes 186 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.2.5 Description of protocols for SLG D11/D12 [0x69] RF Reset The HF field of the reader antenna can be switched off for trf = 15 ms using the "RF Reset" command. This resets all transponders within the antenna field of the reader back to their basic setting. Host reader 1 2 3 4,5 5 COM-ADR [0x69] CRC16 1 2 3 4 5,6 6 COM-ADR [0x69] STATUS1 CRC16 Host reader Note * After the "RF Reset" command, the reader cannot receive new transponders before time trf has expired. * After the "RF Reset" command, transponders that are located within the antenna field must be reselected. * The response of this command is sent after the reset. 6.2.6 [0x6A] RF ON/OFF The "RF ON/OFF" command switches the HF field of the reader antenna ON or OFF. Host reader 1 2 3 4 5,6 6 COM-ADR [0x6A] RF CRC16 2 3 4 Host reader 1 6 COM-ADR [0x6A] STATUS 5,6 1 CRC16 RF: RF 1 HF field of reader antenna 0x00 OFF 0x01 ON See chap. 6.5.4 Index of status bytes C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 187 Description of protocols for SLG D11/D12 6.2.7 05/05 [0x71] Set Output1 The "Set Output" command lets you enable the digital outputs or indicators (LED, buzzer) of the reader for a limited or unlimited period of time. Each output takes on the state of the OS byte druing the time period indicated in the protocol. The flashing frequency is specified by the OSF byte. This protocol can be used to switch the buzzer and the LEDs on or off for the specified length of time. When the reader receives the "Set Output" command, all times that have been active up to that point in time are overwritten by the new times contained in the protocol, provided they >0. Host reader 1 2 3 4,5 6,7 13 COM-ADR [0x71] OS OSF 8,9 10,11 12,13 OS-TIME 0x0000 CRC16 4 5,6 Host reader 1 2 6 3 COM-ADR [0x71] STATUS 2 CRC16 OS: The OS word ("Output State") specifies the state of the signal transmitters (LEDs and buzzer) during the time period indicated in "OS-Time". The signal tansmitters can be selected individually or as a group. 14 13 12 11 10 9 8 Function: 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 0 0 Buzzer mode Bit: 15 Mode Green LED mode Function b00 UNCHANGED OS-Time does not change the state of the signal transmitter b01 ON Signal transmitter during OS-Time = enabled b10 OFF Signal transmitter during OS-Time = disabled b11 FLASHES Signal transmitter during OS-Time = alternates with OSF 1 Connections have not been led out in SLG D12 2 See chap. 6.5.4 Index of status bytes 188 Red LED mode C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D11/D12 OSF: The OSF word ("Output State Flash", output flashing frequency) lets you assign a separate flashing or pulse frequency to each LED and buzzer. 14 13 12 11 10 9 8 Function: 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 0 0 Buzzer freq. (OUT1) Bit: 15 Freq. Red LED freq. Green LED freq. Frequency b11 1 Hz b10 2 Hz b01 4 Hz b00 8 Hz OS-TIME The value set for "OS-TIME" lets you enable the LEDs and the buzzer for a certain time period or continuously. OS-TIME 0x0000 State of LEDs/Buzzer Unchanged 0x0001 1 x 100 msec 100 msec active ... ... 0xFFFE 65534 x 100 msec 1:49:13 h active 0xFFFF Always active Note * To reset a signal transmitter than is enabled continuosly, send the reader a value of 1 for "OS-Time". The reader then switches to the idle state after 100 ms. * A continuously enabled signal transmitter is reset as a result of a reset procedure or power failure. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 189 Description of protocols for SLG D11/D12 6.3 6.3.1 05/05 Special commands [0x1B] Reset QUIET Bit (I-CODE1 transponders only) This command resets the QUIET bit of all I-CODE1 transponders in the antenna field. Following this command, transponders that were previously in the resting mode are re-enabled. chap. 3.6.7 Memory model for I-CODE1 transponders describes how to enable the resting mode for I-CODE1 transponders. Host reader 1 2 3 4,5 5 COM-ADR 0x1B CRC16 2 3 4 Host reader 1 6 1 COM-ADR 0x1B STATUS 5,6 1 CRC16 See chap. 6.5.4 Index of status bytes 190 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.4 Description of protocols for SLG D11/D12 Protocols for ISO15693 host commands 6.4.1 Supported ISO15693 host commands for ISO15693 transponders The command codes listed in the following table support the various transponder commands and functions of each ISO15693 transponder type. 6.4.1.1 Infineon (my-d) IC manufacturer's ID: 0x05 Memory organization: SRF55V10P: 128 x 8 bytes = 8 Kbits SRF55V02P: 32 x 8 bytes = 2 Kbits No. of blocks 128 (user range: 3 to 127) No. of blocks 32 (user range: 3 to 31) Block length 8 bytes Block length 8 bytes Command Code Command Mode Not Addressed Remarks Addressed Selected - - Inventory 0x02 Stay Quiet - - 0x22 Lock Multiple Blocks1 - WR-OPTION = 02 0x23 Read Multiple Blocks1 - DB-SIZE = 8 Security status is always 0x00 0x24 Write Multiple Blocks1 - DB-SIZE = 8, WR-OPTION = 02 0x25 Select - - 0x26 Reset to Ready WR-OPTION = 02 0x27 Write AFI WR-OPTION = 02 0x28 Lock AFI 0x29 Write DSFID - - - - 0x2A Lock DSFID - - - - 0x2B Get System Information - - - - 0x2C Get Multiple Block Security Status - - - - 0x01 1 Customer-specific commands (0x10) read, (0x30) write and (0x90) write byte are used automatically by the reader. 2 WR-OPTION is automatically set by MOBY D readers when the WR-OPTION parameter in CFG4 is set to "00:automatically set." See chapter 5.5 CFG4: Transponder parameters. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 191 Description of protocols for SLG D11/D12 6.4.1.2 05/05 Philips (I-Code SLI) IC manufacturer's ID: 0x04 Memory organization: 32 x 4 bytes = 1 Kbit No. of blocks 32 (user range: 0 to 27) Block length 4 bytes Command Code Command Mode Remarks Not Addressed Addressed Selected 0x01 Inventory - - - 0x02 Stay Quiet - - 0x22 Lock Multiple Blocks WR-OPTION = 01 0x23 Read Multiple Blocks DB-SIZE = 4 Security status is always 0x00 0x24 Write Multiple Blocks DB-SIZE = 4, WR-OPTION = 01 0x25 Select - - 0x26 Reset to Ready 0x27 Write AFI WR-OPTION = 01 0x28 Lock AFI WR-OPTION = 01 0x29 Write DSFID WR-OPTION = 01 0x2A Lock DSFID WR-OPTION = 01 0x2B Get System Information 0x2C Get Multiple Block Security Status 1 WR-OPTION is automatically set by MOBY D readers when the WR-OPTION parameter in CFG4 is set to "00:automatically set." See chapter 5.5 CFG4: Transponder parameters. 192 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.4.1.3 Description of protocols for SLG D11/D12 STMicroelectronics (LRI512) IC manufacturer's ID: 0x02 Memory organization: 16 x 4 bytes = 512 bits No. of blocks 16 (user range: 0 to 15) Block length 4 bytes Command Code Command Mode Remarks Not Addressed Addressed Selected 0x01 Inventory - - - 0x02 Stay Quiet - - 0x22 Lock Multiple Blocks WR-OPTION = 01 0x23 Read Multiple Blocks () DB-N must be 1 in "not addressed" mode. 0x24 Write Multiple Blocks DB-SIZE = 4, WR-OPTION = 01 0x25 Select - - 0x26 Reset to Ready 0x27 Write AFI WR-OPTION = 01 0x28 Lock AFI WR-OPTION = 01 0x29 Write DSFID - - - 0x2A Lock DSFID - - - 0x2B Get System Information - - - 0x2C Get Multiple Block Security Status - - - 1 WR-OPTION is automatically set by MOBY D readers when the WR-OPTION parameter in CFG4 is set to "00:automatically set." See chapter 5.5 CFG4: Transponder parameters. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 193 Description of protocols for SLG D11/D12 6.4.1.4 05/05 Texas Instruments (Tag-it HFI) IC manufacturer's ID: 0x07 Memory organization: 64 x 4 bytes = 2 Kbits of user data No. of blocks 64 (user range: 0 to 63) Block length 4 bytes Command Code Command Mode Remarks Not Addressed Addressed Selected 0x01 Inventory - - - 0x02 Stay Quiet - - 0x22 Lock Multiple Blocks WR-OPTION = 11 0x23 Read Multiple Blocks DB-SIZE = 4 0x24 Write Multiple Blocks DB-SIZE = 4, WR-OPTION = 11 0x25 Select - - 0x26 Reset to Ready 0x27 Write AFI WR-OPTION = 11 0x28 Lock AFI WR-OPTION = 11 0x29 Write DSFID WR-OPTION = 11 0x2A Lock DSFID WR-OPTION = 11 0x2B Get System Information 0x2C Get Multiple Block Security Status Note * The reader automatically uses the commands "Write_2_Blocks" and "Lock_2_Blocks." This only takes effect when the block address starts with an even-number address. * The command "Write_2_Blocks" / "Lock_2_Blocks" is combined with the command "Write Single Block" / "Lock Single Block" when an odd number of blocks must be written and locked. 1 WR-OPTION is automatically set by MOBY D readers when the WR-OPTION parameter in CFG4 is set to "00:automatically set." See chapter 5.5 CFG4: Transponder parameters. In "not addressed" mode, the WR-OPTION must be set by hand to "WR-OPTION = 1." 194 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.4.2 Description of protocols for SLG D11/D12 Supported ISO15693 host commands for I-Code1 Transponders The command codes listed in the following table support the various transponder commands and functions of the I-Code1 transponder types. Memory organization: 16 x 4 bytes = 512 bits No. of blocks 16 (user range: 0 to 11) Block length 4 bytes Command Code Command Mode Remarks Not Addressed Addressed Selected 0x01 Inventory - - - 0x02 Stay Quiet - - - - 0x22 Lock Multiple Blocks - - - - 0x23 Read Multiple Blocks - 0x24 Write Multiple Blocks - - 0x25 Select - - - - 0x26 Reset to Ready - - - - 0x27 Write AFI - - - - 0x28 Lock AFI - - - - 0x29 Write DSFID - - - - 0x2A Lock DSFID - - - - 0x2B Get System Information - - - - 0x2C Get Multiple Block Security Status - - - - 0xA0 Read Config Block - - 0xA1 Write Config Block - - C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 195 Description of protocols for SLG D11/D12 6.4.3 05/05 Supported ISO15693 host commands for Tag-it HF Transponders The command codes listed in the following table support the various transponder commands and functions of the Tag-it HF transponder types. Memory organization: 8 x 4 bytes = 256 bits No. of blocks 8 (user range: 0 to 7) Block length 4 bytes Command Code Command Mode Remarks Not Addressed Addressed Selected 0x01 Inventory - - - 0x02 Stay Quiet - - - - 0x22 Lock Multiple Blocks - 0x23 Read Multiple Blocks - 0x24 Write Multiple Blocks - 0x25 Select - - - - 0x26 Reset to Ready - - - - 0x27 Write AFI - - - - 0x28 Lock AFI - - - - 0x29 Write DSFID - - - - 0x2A Lock DSFID - - - - 0x2B Get System Information - 0x2C Get Multiple Block Security Status - - - - 0xA0 Read Config Block - - - - 0xA1 Write Config Block - - - - 196 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.4.4 Description of protocols for SLG D11/D12 [0xB0] Host commands for ISO15693: required and optional commands This command sends RF commands as defined by ISO15693 to the transponder. Host reader 1 2 3 4...(n-2) (n-1),n n COM-ADR [0xB0] REQUESTDATA CRC16 Host reader 1 2 3 4 5...(n-2) (n-1),n n COM-ADR [0xB0] STATUS RESPONSEDATA CRC16 REQUEST-DATA: Command-specific request RESPONSE-DATA: Command-specific response Note * Data are only transmitted if STATUS = {0x00, 0x83, 0x94, 0x95}. * The commands will not function when Scan mode is activated. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 197 Description of protocols for SLG D11/D12 6.4.4.1 05/05 [0x01] Inventory This command reads the UIDs of all transponders in the antenna field. When the reader detects a new transponder, it automatically switches the transponder to the idle state. In this state the transponder does not send a response to the next inventory command. The transponder always sends a response under one of the following conditions. * It has exited and reentered the antenna field. * A [0x69] RF Reset command was sent to the reader. * The ONT bit in register ONT of configuration block CFG5: Anticollision (see chap. 5.6) is not set. REQUEST-DATA 4 5 0x01 MODE RESPONSE-DATA 5 6 7 8...15 DATA-SETS TR-TYPE DSFID UID DATA-SETS repeated MODE: Bit: 7 Function MORE 6 5 4 3 2 1 0 0 0 0 0 0 0 0 MORE: MORE b0 b1 New inventory is requested Additional data is requested (More than 24 data records are available with status [0x94]. DATA-SETS: Number of transponder data sets to be transmitted in this reader response. TR-TYPE: Transponder type. See chap. 6.5.1 Codes for transponder types. 198 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D11/D12 DSFID: (ISO15693 transponders only) Data Storage Format Identifier of the transponder If not in use, this value returns {0x00}. UID: Transponder UID (read-only access) Note * This command supports all transponders. * If ONT = {b1}, the UIDs are only read from those transponders that entered the antenna field after the last execution of the "Inventory" command. * If ONT = {b0}, an RF Reset is executed to read the UIDs of all transponders in the antenna field. * If the STATUS byte in the protocol frame has the value {0x94}, additional UIDs can be read out from the reader with MORE = {b1}. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 199 Description of protocols for SLG D11/D12 6.4.4.2 05/05 [0x02] Stay Quiet This command sets the transponder into the quiet state. REQUEST-DATA 4 5 6...13 0x02 MODE UID MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b001 Addressed UID: Transponder UID (read-only access) Note This command only functions for ISO15693 transponders. 200 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.4.4.3 Description of protocols for SLG D11/D12 [0x22] Lock Multiple Blocks This command locks one or more data blocks. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 6.4.1 Supported ISO15693 host commands for ISO15693 transponders. Note This command only functions for ISO15693 transponders and Tag-it HF. REQUEST-DATA 4 5 (6...13) 6 / (14) 7 / (15) 0x22 MODE UID DB-ADR DB-N RESPONSE-DATA (STATUS = {0x03}) 5 DB-ADR-E RESPONSE-DATA (STATUS = {0x95}) 5 6 ISO15693ERROR DB-ADR-E MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Unaddressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 201 Description of protocols for SLG D11/D12 05/05 DB-ADR: Number of the first block to be locked. The first block number can lie between 0 and 255. DB-N: Number of data blocks to be locked, beginning with DB-ADR. The maximum value of DB-N depends on the block size. The maximum number of bytes is 128. DB-Size Max. DB-N 4 0x20 = 32 8 0x10 = 16 x = 128 / x ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. DB-ADR-E: Block number in which the error occured. 202 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.4.4.4 Description of protocols for SLG D11/D12 [0x23] Read Multiple Blocks This command reads one or more data blocks. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 6.4.1 Supported ISO15693 host commands for ISO15693 transponders. REQUEST-DATA 4 5 (6...13) 6 / (14) 7 / (15) 0x23 MODE UID DB-ADR DB-N RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR RESPONSE-DATA 5 6 7 8...n DB-N DB-SIZE SEC-STATUS DB DB-N repeated MODE: 7 6 5 4 3 2 Function 0 0 0 0 SEC ADR Bit: 1 0 ADR: ADR b000 Unaddressed b001 Addressed b010 Selected SEC: SEC b0 SEC-STATUS always = {0x00} b1 Security status of followed block in SEC-STATUS C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 203 Description of protocols for SLG D11/D12 05/05 UID: Transponder UID (read-only access). The UID is only required in the addressed mode. DB-ADR: Number of first block to be read. The first block number can lie between 0 and 255. DB-N: Number of data blocks to be read by the transponder, beginning with DB-ADR. The maximum value of DB-N depends on the block size. The maximum number of bytes is 128. DB-Size Max. DB-N 4 0x20 = 32 8 0x10 = 16 x = 128 / x ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. DB-SIZE: Number of bytes in a data block This value depends on the specifications of the transponder manufacturer. See chapter 6.4.1 Supported ISO15693 host commands for ISO15693 transponders. SEC-STATUS: Block security status of the last data block if supported by ISO15693 transponder. I-CODE1 transponders do not support this function. 204 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D11/D12 DB: Requested data block. The block size is specified in DB-SIZE. Note * A read procedure from a block sends the command for reading out a single block to the transponder. The reader handles this internally. * If a transponder does not support commands for reading multiple blocks, mulitple blocks are read out of the transponder individually. * Only one transponder can be read in the inaddressed mode. * I-CODE1 and Tag-it HF transponders cannot be read in the selected mode. * The command [0x01] Inventory must be executed to select the transponder before an addressed read access of an I-Code1 transponder even when the UID is known. * If the transponder was already selected with an Inventory command, a nonaddressed read access of I-Code1 transponders is not possible. The selection must be canceled with the command [0x69] RF Reset. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 205 Description of protocols for SLG D11/D12 6.4.4.5 05/05 [0x24] Write Multiple Blocks This command writes one or several data blocks. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 6.4.1 Supported ISO15693 host commands for ISO15693 transponders. REQUEST-DATA 4 5 (6...13) 6 / (14) 7 / (15) 8 / (16) 9...n / (17...n) 0x24 MODE UID DB-ADR DB-N DB-SIZE DB DB-N repeated RESPONSE-DATA (STATUS = {0x03}) 5 DB-ADR-E RESPONSE-DATA (STATUS = {0x95}) 5 6 ISO15693ERROR DB-ADR-E MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Unaddressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. DB-ADR: Address of the first block to be written to the transponder. The first block number can lie between 0 and 255. 206 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D11/D12 DB-N: Number of data blocks to be written to the transponder, beginning with DB-ADR. The maximum value of DB-N depends on the block size. The maximum number of bytes is 128. DB-Size Max. DB-N 4 0x20 = 32 8 0x10 = 16 x = 128 / x DB-SIZE: Number of bytes in a data block This value depends on the specifications of the transponder manufacturer. See chapter 6.4.1 Supported ISO15693 host commands for ISO15693 transponders. DB: The data block to be written to the transponder. The required block size is defined in DB-SIZE. The number of expected bytes is DB-N * DB-SIZE. ISO15693-ERROR: (ISO transponders only) ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. DB-ADR-E: Block number in which the error occured. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 207 Description of protocols for SLG D11/D12 05/05 Note * A write procedure to a block sends the command for writing a single block to the transponder. * If a transponder does not support commands for writing multiple blocks, multiple blocks are written into the transponder individually. * In I-CODE1 transponders, writing is only possible in the addressed mode. * In Tag-it HF transponders, writing is not possible in the selected mode. * When an error occurs during a write command, the number of the erroneous block is sent to the host. * If the reader uses the I-Code1 memory model (see chap. 5.5 CFG4: Transponder parameters), the original I-Code 1 addresses must be used in DB-ADR. 208 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.4.4.6 Description of protocols for SLG D11/D12 [0x25] Select This command sets a transponder to the "selected" state. Only one ISO15693 transponder can be selected at any one time. A transponder that has already been selected is automatically set to the "ready" state. REQUEST-DATA 4 5 6...13 0x25 MODE UID RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b001 Addressed UID: Transponder UID (read-only access) ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. Note This command only functions for ISO15693 transponders. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 209 Description of protocols for SLG D11/D12 6.4.4.7 05/05 [0x26] Reset to Ready This command sets a transponder to the "ready" state. REQUEST-DATA 4 5 (6...13) 0x26 MODE UID RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Not addressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. Note This command only functions for ISO15693 transponders. 210 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.4.4.8 Description of protocols for SLG D11/D12 [0x27] Write AFI This command writes a new AFI code to one or more transponders. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 6.4.1 Supported ISO15693 host commands for ISO15693 transponders. REQUEST-DATA 4 5 (6...13) 6 / (14) 0x27 MODE UID AFI RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Not addressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. AFI: Application Family Identifier of the transponder ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. Note This command only functions for ISO15693 transponders. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 211 Description of protocols for SLG D11/D12 6.4.4.9 05/05 [0x28] Lock AFI This command locks the AFI register in one or more transponders. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 6.4.1 Supported ISO15693 host commands for ISO15693 transponders. REQUEST-DATA 4 5 (6...13) 0x28 MODE UID RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Not addressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. Note This command only functions for ISO15693 transponders. 212 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.4.4.10 Description of protocols for SLG D11/D12 [0x29] Write DSFID This command writes the DSFID to one or more transponders. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 6.4.1 Supported ISO15693 host commands for ISO15693 transponders. REQUEST-DATA 4 5 (6...13) 6 / (14) 0x29 MODE UID DSFID RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Not addressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. DSFID: Data Storage Format Identifier of the transponder ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. Note This command only functions for ISO15693 transponders. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 213 Description of protocols for SLG D11/D12 6.4.4.11 05/05 [0x2A] Lock DSFID This command locks the DSFID register in one or more transponders. Different ISO15693 host commands are supported depending on the ISO15693 transponder type. These are described in chapter 6.4.1 Supported ISO15693 host commands for ISO15693 transponders. REQUEST-DATA 4 5 (6...13) 0x2A MODE UID RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Not addressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. Note This command only functions for ISO15693 transponders. 214 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.4.4.12 Description of protocols for SLG D11/D12 [0x2B] Get System Information This command reads out the system information from a transponder. REQUEST-DATA 4 5 (6...13) 0x2B MODE UID RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR RESPONSE-DATA 5 6...13 14 15,16 17 DSFID UID AFI MEM-SIZE IC-REF `0' Only LSB (32 bits) valid Manufacturer Code MEM-SIZE Chip Version Tag-it HF ISO15693 MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Not addressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. DSFID: Data Storage Format Identifier of the transponder Only LSB: The LSB (32 bits) of the write protected UID of the transponder. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 215 Description of protocols for SLG D11/D12 05/05 AFI: Application Family Identifier of the transponder If not supported by the transponder, this value is {0x00}. Manufacturer Code: Manufacturer code (see chapter 6.5.1 Codes for transponder types) MEM-SIZE: Memory size of the transponder. If not supported by the transponder, this value is {0x00}. Byte Bit Contents 15 16 7...4 3...0 7...0 In res. Block size in bytes Number of blocks IC-REF: IC reference (version) of the transponder. If not supported by the transponder, this value is {0x00}. Chip Version: Chip version of the transponder Note This command only functions for ISO15693 transponders and Tag-it HF transponders. 216 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.4.4.13 Description of protocols for SLG D11/D12 [0x2C] Get Multiple Block Security Status This command reads out the security status for public blocks from a transponder. REQUEST-DATA 4 5 (6...13) 6 / (14) 7 / (15) 0x2C MODE UID DB-ADR DB-N RESPONSE-DATA (STATUS = {0x95}) 5 ISO15693ERROR RESPONSE-DATA 5 6 DB-N SEC-STATUS DB-N repeated MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b000 Not addressed b001 Addressed b010 Selected UID: Transponder UID (read-only access). The UID is only required in the addressed mode. DB-ADR: Number of the first block whose security status is requested. Valid values range from 0 and 255. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 217 Description of protocols for SLG D11/D12 05/05 DB-N: The number of security data blocks to be read starting with DB-ADR. The maximum value of DB-N depends on the block size. DB-Size Max. DB-N 4 0x20 = 32 8 0x10 = 16 x = 128 / x ISO15693-ERROR: ISO15693 error code of the transponder response. This byte is only available if STATUS = {0x95}. SEC-STATUS: Block security status. Note This command only functions for ISO15693 transponders. 218 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.4.4.14 Description of protocols for SLG D11/D12 [0xA0] Read Config Block This command reads a configuration block from the MOBY D memory model (see chap. 6.5.7 Storage model for I-CODE1 transponders). REQUEST-DATA 4 5 6...13 14 0xA0 MODE UID CB-ADR RESPONSE-DATA 5...8 CB MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b001 Addressed UID: Transponder UID (read-only access) CB-ADR: Address of the configuration block to be read by the transponder. CB: Requested configuration block Note * This command only functions for I-CODE1 and Tag-it HF transponders. * This command is not available when the reader is set to the I-Code1 memory model (see chap. 5.5 CFG4: Transponder parameters, I-CODE-MODE). Configuration blocks 0, 1, 2 can now be read with the command [0x23] Read Multiple Blocks from I-Code1 address 2, 3, 4. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 219 Description of protocols for SLG D11/D12 6.4.4.15 05/05 [0xA1] Write Config Block This command writes a configuration block to the MOBY D memory model (see chap. 6.5.7 Storage model for I-CODE1 transponders). REQUEST-DATA 4 5 6...13 14 15...18 0xA1 MODE UID CB-ADR CB MODE: 7 6 5 4 3 2 Function 0 0 0 0 0 ADR Bit: 1 0 ADR: ADR b001 Addressed UID: Transponder UID (read-only access) CB-ADR: Address of the configuration block to be written to the transponder. CB: The configuration block to be written to the transponder. Note * This command only functions for I-CODE1 and Tag-it HF transponders. * This command is not available when the reader is set to the I-Code1 memory model (see chap. 5.5 CFG4: Transponder parameters, I-CODE-MODE). Configuration blocks 0, 1, 2 can now be written with the command [0x24] Write Multiple Blocks to I-Code1 address 2, 3, 4. 220 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D11/D12 Example of write-accessing configuration block 0 of a tag-it HF transponder Configuration block 0 activates protective functions of the transponder ("1": r/w, "0": ro). The reader only evaluates bits with the value "0" in LSB (byte 0). 3 2 1 0 b xxxx xxxx b xxxx xxxx b xxxx xxxx b 1001 1010 It attempts to lock blocks 0, 2, 5 and 6. If a block is already locked, the status is set to [0x00]. With ISO15693 transponders, the command [0x22] Lock Multiple Blocks must be used. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 221 Description of protocols for SLG D11/D12 6.4.5 05/05 [0xB1] Host commands for ISO15693: user-specific and manufacturer-specific commands This command sends user-specific and manufacturer-specific commands to the transponder. Host reader 1 2 3 4 5...(n-2) (n-1),n n COM-ADR [0xB1] MFR REQUESTDATA CRC16 Host reader 1 2 3 4 5...(n-2) (n-1),n n COM-ADR [0xB1] STATUS RESPONSEDATA CRC16 MFR: Manufacturer code MFR 0xXX REQUEST-DATA: Manufacturer-specific request RESPONSE-DATA: Manufacturer-specific response Note * Data are only transmitted if STATUS = {0x00, 0x83, 0x94, 0x95}. * This command does not function if the scan mode is enabled. 222 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.4.6 Description of protocols for SLG D11/D12 [0xBF] ISO15693 transparent command This command sends user-transparent commands to the transponder. Host reader 1 2 3 n COM-ADR [0xBF] 4 5,6 MODE RSPLENGTH MODE 1+2 7,8 MODE 3+4 MODE 5 (c) 9...(n-2) (n-1),n Reserved REQUESTDATA CRC16 7,8 9,10 11...(n-2) (n-1),n Reserved EOF-PULSEDELAY REQUESTDATA CRC16 7,8 9,10 11...(n-2) (n-1),n Reserved MULTIPLE 302 GRIDS REQUESTDATA CRC16 4 5...(n-2) (n-1),n STATUS RESPONSEDATA CRC16 Host reader 1 2 3 n COM-ADR [0xBF] MODE: Request options 0x01 = Read scan Response is scanned after ISO15693-3 T1 (318.6 sec to 323.3 sec) 0x02 = Write scan with option "0" The reader attempts to scan the response after ISO15693-3 T1 (318.6 sec to 323.3 sec). If it does not receive a reply, the reader scans again after 302 sec). When a reply does not arrive within 20 msec, the command returns the status "no transponder" [0x01]. Depending on the error flag in the transponder reply, the length of the scanned data is: - 4 bytes with error flag = 1 - RSP-LENGTH with error flag = 0 0x03 = Write scan with option "1" The reader attempts to receive a response after ISO15693-3 T1 (318.6 sec to 323.3 sec). If no response arrives, the reader sends an EOF after EOF-PULSE-DELAY and, after ISO15693-3 T1 (318.6 sec to 323.3 sec) attempts to receive the response. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 223 Description of protocols for SLG D11/D12 05/05 0x04 = Inventory request The reader attempts to receive a response after ISO15693-3 T1 (318.6 sec to 323.3 sec). Execution depends on the "Nb_slot_flag" flag in accordance with ISO15693 as follows: "0" The reader sends an EOF after EOF-PULSE-DELAY and, in the next time slot, again attempts to receive a response (after ISO15693-3 T1 (318.6 sec to 323.3 sec)). This procedure is repeated 16 times. In this case, RSP-LENGTH specifies the response length in a time slot. Transponder responses with a different response length are ignored. If there is a checksum error in one of the time slots, the protocol status is set to 0x02 [CRC error]. The user must calculate where in the transponder data the error occurred. "1" The reader sends the received data back. 0x05 = Write scan with option "0" and time interval for the response After ISO15693-3 T1 (318.6 sec to 323.3 sec), the reader attempts to read a response. If no response arrives, the reader reads at the time intervals specified in MULTIPLE 302sec GRIDS. If no response arrives, the command returns the status "no transponder" 0x01. Depending on the error flag in the transponder response, the length of the read data is: - 4 bytes if error flag = 1 - RSP-LENGTH if error flag = 0 RSP-LENGTH: Transponder response length in bits without SOF and EOF With write operations, RSP-LENGTH depends on the error flag in the transponder response. * 4 bytes if error flag = 1 * RSP-LENGTH if error flag = 0 Reserved (CMD-RSP-DELAY) Not used in the MOBY D protocol. To avoid problems with other MOBY D readers, this value should equal the response delay of the transponder response (ISO15693: T1) and should, for example, have the ISO15693 average value: {0x021F} * 590 ns = 320.9 s EOF-PULSE-DELAY: The EOF pulse delay is used in write procedures with ISO15693 write option "1." It is used to specify the response delay of the transponder response (ISO15693: T1). E.g. ISO15693 maximum value: {0x846A} * 590 ns = 20 ms 224 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D11/D12 REQUEST-DATA: Complete transponder request without SOF, CRC16 and EOF Note The FLAGS for the read and write options in REQUEST-DATA must correspond to the MODE byte in the request protocol. The reader always forces a command according to the method specified in the MODE byte of the request protocol. RESPONSE-DATA: Complete transponder response without SOF and EOF. The reader performs a CRC16 checksum test. However, it is the CRC16 of the transponder that is transmitted with the response data. Note * Data are only transmitted if STATUS = {0x00, 0x83, 0x94, 0x95}. * The response data always consist of the number of data bytes specified in RSP-LENGTH. Note * This command only functions for ISO15693 transponders. * This command does not function if the scan mode is enabled. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 225 Description of protocols for SLG D11/D12 6.5 6.5.1 05/05 Appendix Codes for transponder types Value Transponder type 0x00 Philips I-CODE1 0x01 Texas Instruments Tag-it HF 0x03 ISO15693 transponder The information is provided by executing the command [0x01] Inventory. 226 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.5.2 Description of protocols for SLG D11/D12 Time response of the asynchronous interface The reaction times of the asynchronous interface depend on the following factors: * Quantity of data to be read or written * Type and number of transponders supported by the reader * Location of the transponder at the time of the request * Any existing electromagnetic interference * Success or failure of the request Minimum Typical I-CODE1 EE parameter change Maximum Units Tag-it HF 5 msec 1 block (16 bytes) 22.5 300 msec all ( 8 ) blocks 180 600 msec 300 msec [0x1B] Reset QUIET Bit (only I-Code1 transponder) 5 5.1 - 5.1 [0x69] RF Reset msec [0xB0] Host commands 5 for ISO15693: required and optional commands 1 2 msec [0xB1] Host commands for ISO15693: userspecific and manufacturer-specific commands 5 1 2 msec [0xBF] ISO15693 transparent command 5 1 2 msec 1 For details, see chap. 6.5.3 Time response of the ISO15693 host commands 2 Same as set in CFG1: Interface, TR-RESPONSE-TIME C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 227 Description of protocols for SLG D11/D12 6.5.3 05/05 Time response of the ISO15693 host commands The reaction time to the ISO15693 host commands depends on the following factors: * Number of transponders in the antenna field (duration of anticollision process) * Quantity of data to be read or written * Types of transponders supported by the reader * Location of the transponder at the time of the request * Any existing electromagnetic interference Time behavior of I-Code1 and Tag-it HF transponders (only reaction time) All times are based on the following parameters. See chap. 5.5 CFG4: Transponder parameters and chap. 5.6 CFG5: Anticollision. * ISO15693-MODE = 0x0B * Only the transponder driver being used is active. * ONT = only the data of the newly selected transponder are sent to the host. Typical I-CODE1 Units Tag-it HF - 62 msec 1 time slot 15 - msec 16 time slots 123 - msec 1 block, unaddressed 11.5 msec 1 block, addressed 17.5 msec 4 blocks, unaddressed 42 msec 4 blocks, addressed 65 msec Inventory with 1 transponder: Read multiple blocks: See table below Write multiple blocks: 1 block, unaddressed - 26.5 msec 4 blocks, unaddressed - 103 msec Write multiple blocks (1 block, addressed): - 32 msec 1 time slot 25 - msec 16 time slots 153 - msec Write multiple blocks (4 blocks, addressed): 228 - 124 msec 1 time slot 65 - msec 16 time slots 435 - msec C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D11/D12 Read multiple blocks (I-CODE1 transponder) Number of Blocks Time Slots 1 Not Addressed 16 Addressed Not Addressed Addressed 1 (4 bytes) 6.5 13.5 38.5 95 4 (16 bytes) 11 17.5 97 153 Time behavior of ISO15693 transponders All times are based on the following parameters. See chap. 5.5 CFG4: Transponder parameters and chap. 5.6 CFG5: Anticollision. * ISO15693-MODE = 0x0B * AFI deactivated * 16 time slots * Only ISO15693 transponder drivers active * ONT = only the data of new transponders are sent to the host. Modulation and subcarrier have almost no measurable effect on the reaction time. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 229 Description of protocols for SLG D11/D12 05/05 Time behavior for [0x01] Inventory The following diagrams show average values for time behavior based on the number of transponders. With certain UIDs, the times may be greater or less than those shown below. Time behavior is measured including communication time at 38.4 kbaud. Other baud rates increase the times slightly. Since inventory timing is primarily based on anticollision, communication time can be disregarded. Execution time Send Tx Receive Rx + = Communication time Remember that the time behavior of the command Inventory [0xB0 0x01] depends on the MORE-Bit. MORE-Bit is set when the number of transponders exceeds 16. This means that, if MORE-Bit is set by the reader as the response to the Inventory command, communication time will be affected by the speed of the host system. 230 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D11/D12 More data requested Execution time Send Tx Receive Rx + = Host Communication time Time reactions of general commands with independent transponder performance Command Execution time (msec) Communication time at 38.4 kBaud (msec) Addressed Selected Addressed Selected Stay Quiet 7.5 - 6.1 - Select 9 - 6 - Reset to Ready 9 5.3 6 3.8 Get System Information 14 10.2 9.7 7.4 Get Multiple Block Security Status 1 block 5.7 6.3 7.2 4.9 2 blocks 10.2 6.7 7.4 5.1 8 blocks 12.3 8.8 9.2 6.9 32 blocks 21 17.3 16 13.7 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 231 Description of protocols for SLG D11/D12 05/05 Time reactions of read functions All times are based on 1 time slot. Infineon my-d Execution time (msec) Read Without security block Communication time at 38.4 kBaud (msec) With security block Addressed Selected Addressed Selected Addressed Selected 1 block 8 bytes 13.5 10.1 13.5 10.1 9.8 7.5 4 blocks 32 bytes 49 35.5 49 35.5 17.6 15.2 16 blocks 128 bytes 188 138 188 138 48.9 46.6 Philips I-Code SLI Execution time (msec) Read Without security block Communication time at 38.4 kBaud (msec) With security block Addressed Selected Addressed Selected Addressed Selected 1 block 4 bytes 10.5 7 11 7.5 8.6 6.2 2 blocks 8 bytes 12.5 9 13 9.5 10.1 7.8 8 blocks 32 bytes 21.5 18 24 20.5 18.6 16.3 (28 blocks) 112 bytes 51.5 48.5 60 56.5 47.2 44.9 Texas Instruments Tag-it HFI Execution time (msec) Read Without security block Communication time at 38.4 kBaud (msec) With security block Addressed Selected Addressed Selected Addressed Selected 1 block 4 bytes 10.8 7.2 11.1 7.6 8.6 6.2 2 blocks 8 bytes 12.7 9.2 13.3 9.8 10.1 7.8 8 blocks 32 bytes 21.6 18.2 24.1 20.7 18.7 16.4 32 blocks 128 bytes 57.8 54.3 67.5 64 53 50.7 232 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D11/D12 STMicroelectronics (LRI512) Execution time (msec) Read Without security block Communication time at 38.4 kBaud (msec) With security block Addressed Selected Addressed Selected Addressed Selected 1 block 4 bytes 10.8 7.4 11.2 7.7 8.6 6.2 2 blocks 8 bytes 20.1 13.5 20.6 14 10.1 7.8 8 blocks 32 bytes 74.6 49.5 77.2 52 18.6 16.3 16 blocks 64 bytes 147.4 97.5 152.4 102.6 29.9 27.6 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 233 Description of protocols for SLG D11/D12 05/05 Time reactions of write functions All times are based on 1 time slot. Infineon my-d WR-Option = 0 Write Execution time (msec) Write data block Communication time at 38.4 kBaud (msec) Lock data block Write data block Lock data block Addressed Selected Addressed Selected Addressed Selected Addressed Selected 1 block 8 bytes 17.5 14 15 11.5 9.2 6.8 6.7 4.4 4 blocks 32 bytes 65 51.5 54 41 16 13.8 6.7 4.4 16 blocks 128 bytes 251 202 210 161 43.4 40.7 6.7 4.4 Write AFI 13 9.5 6.1 4 Lock AFI 12.5 9 6 3.8 Write DSFID - - - - Lock DSFID - - - - I-Code SLI WR-Option = 0 Write Execution time (msec) Write data block Communication time at 38.4 kBaud (msec) Lock data block Write data block Lock data block Addressed Selected Addressed Selected Addressed Selected Addressed Selected 1 block 4 bytes 14.5 11.5 11 7.5 8 5.7 6.7 4.4 2 blocks 8 bytes 28 21.5 20 13.5 9.2 6.7 6.7 4.4 8 blocks 32 bytes 106.5 81.5 58.5 14.2 13.7 6.7 4.4 (28 blocks) 112 bytes 368 281 39 35.6 6.7 4.4 Write AFI 12.5 10 6.3 4 Lock AFI 10.5 7 6 3.7 Write DSFID 12.5 10 6.3 4 Lock DSFID 10.5 7 6 3.7 234 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D11/D12 Texas Instruments Tag-it HFI WR-Option = 1 Write Execution time (msec) Write data block Communication time at 38.4 kBaud (msec) Lock data block Write data block Lock data block Addressed Selected Addressed Selected Addressed Selected Addressed Selected 1 block 4 bytes 21.5 18 19.5 16.5 8 5.8 6.7 4.4 2 blocks 8 bytes 23.5 20 37.5 30.5 9.1 6.9 6.7 4.4 8 blocks 32 bytes 89 76 93 77.5 16 13.6 6.7 4.4 32 blocks 128 bytes 350 299 43.3 41.3 6.7 4.4 Write AFI 20 16 6.3 4.1 Lock AFI 19 15.5 7 3.7 Write DSFID 20 16 6.3 4.1 Lock DSFID 19 15.5 7 3.7 STMicroelectronics (LRI512) WR-Option = 0 Write Execution time (msec) Write data block Communication time at 38.4 kBaud (msec) Lock data block Addressed Selected 1 block 4 bytes 39 2 blocks 8 bytes Selected Lock data block Addressed Selected 32.5 8 5.8 76 63 9.1 6.9 8 blocks 32 bytes 298 249 16.1 13.5 (16 blocks) 64 bytes 594 494 25.1 23.1 Write AFI - - - - Lock AFI - - - - Write DSFID - - - - Lock DSFID - - - - C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 Addressed Write data block Addressed Selected 235 Description of protocols for SLG D11/D12 6.5.4 05/05 Index of status bytes Hexadecimal value 0x00 General information OK: * Data / parameters correctly read or stored * Control command executed Hexadecimal value Transponder status 0x01 No transponder: * No transponder located in the detection field of the reader * Transponder in the detection field was switched to silent * Interference in communication between reader and transponder. The reader can no longer recognize the transponder. 0x02 Incorrect data: * CRC16 checksum error in the received data 0x03 Write error: Plausibility test of the written data failed: * Attempt to write to read-only area * Distance between transponder and reader antenna too large * Attempt to write under excessive ambient noise conditions 0x04 Addressing error: The requested data are outside of the logical or physical addressing range of transponder: * The address is outside of the maximum address range of the transponder. * The address is outside of the configured address range of the transponder. 0x05 Incorrect transponder type: This command is not supported by this transponder: * Attempt to write to or read from a transponder * A specific command is not supported by the transponder. Hexadecimal value 236 Parameter status 0x10 EEPROM error: * It is not possible to write to the EEPROM of the reader * A faulty parameter checksum occurred prior to the write procedure to the EEPROM. 0x11 Parameter outside of valid range: * Valid parameter range exceeded C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D11/D12 Hexadecimal value Interface status 0x80 Unknown command: * Selected function not supported by reader 0x81 Length error: * Protocol is too short or too long 0x82 Command not possible 0x83 HF communication error: An error occurred in the communication between the transponder and reader. Possible causes: * Algorithm for collision handling was interrupted before no more collision were detected. Causes for the interruption: - Timeout during communication with the host 0x94 Additional data: * More transponder data sets were requested than the transponder protocol can transmit simultaneously. 0x95 ISO15693 error: * Additional error code for ISO15693 transponders was sent with the response data C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 237 Description of protocols for SLG D11/D12 05/05 Error codes for ISO15693 transponders Hexadecimal value 238 Explanation of error codes in the transponder response 0x01 Command not supported (the request code is not recognized) 0x02 Command not recognized (e.g. due to format error) 0x03 Option not supported 0x0F Unknown error 0x10 Specified block does not exist 0x11 Specified block has already been locked and cannot be re-locked 0x12 Specificed block is locked and its contents cannot be modified 0x13 Attempt to program the specified block failed 0x14 Attempt to lock the specified block failed 0xA0 ... 0xDF Error codes for user-specific commands All other Reserved for future use C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.5.5 Description of protocols for SLG D11/D12 Index of control bytes Control byte 6.5.6 Description [0x52] [0x52] Baud Rate Detection 184 [0x63] [0x63] CPU Reset 185 [0x65] [0x65] Get Software Version 186 [0x69] [0x69] RF Reset 187 [0x6A] [0x6A] RF ON/OFF 187 [0x71] [0x71] Set Output 188 [0x80] [0x80] Read Configuration 180 [0x81] [0x81] Write Configuration 181 [0x82] [0x82] Save Configuration 182 [0x83] [0x83] Set Default Configuration 183 [0xB0] [0xB0] Host commands for ISO15693: required and optional commands 197 Index of configuration parameters CFGn 1 Page Access1 Description Page 0 CFG0: Reserved RP/WP 162 1 CFG1: Interface R/W 162 2 CFG2: General inputs/outputs R/W 166 3 CFG3: HF interface R/W 168 4 CFG4: Transponder parameters R/W 169 5 CFG5: Anticollision R/W 172 6 CFG6: Scan mode 1 R/W 174 7 CFG7: Scan mode 2 R/W 178 WO = write only; R/W = read and write access; `RP/WP' = no access C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 239 Description of protocols for SLG D11/D12 6.5.7 05/05 Storage model for I-CODE1 transponders For access, the memory is subdivided into regions with a length of 4 bytes each. I-CODE1 address I-Scan address Contents Description Remarks 0...1 - UID UID (8 bytes) Read only 2 C0 Configuration Conditions for write access Read / write 3 C1 Special functions (EAS, QUIET bit) 4 C2 Family code / application ID 5 D0 6 D1 7 D2 8 D3 9 D4 10 D5 11 D6 12 D7 13 D8 14 D9 15 D10 User User memory Can be set to "read only" Read / write Can be set to "read only" Note When writing data to a transponder, it must be ensured that the transponder remains completely inside the antenna field while writing is taking place. UID: This block contains a unique, 64-bit transponder UID (read-only access). Bit Byte 0...7 0 8...15 1 Function UID, MSB 16...23 2 24...31 3 32...39 4 40...47 5 48...55 6 56...63 7 240 UID, LSB C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Description of protocols for SLG D11/D12 Configuration block 0: This block is used to enable protective functions of the transponder. The bits can be set to 0, but can never be set back to 1. After you have enabled write protection for block C0, you cannot enable any additional protective functions (hardware write protection) Bit Procedure I-Scan block I-CODE1 block "1" = r/w, "0" = ro D0 5 1 "1" = r/w, "0" = ro D1 6 2 "1" = r/w, "0" = ro D2 7 3 "1" = r/w, "0" = ro D3 8 0 0 4 "1" = r/w, "0" = ro D4 9 5 "1" = r/w, "0" = ro D5 10 6 "1" = r/w, "0" = ro D6 11 7 "1" = r/w, "0" = ro D7 12 8 1 Function1 Byte "1" = r/w, "0" = ro D8 13 9 1 "1" = r/w, "0" = ro D9 14 10 "1" = r/w, "0" = ro D10 15 11 - - - 12 - - - 13 - - - 14 - - - 15 - - - 16...23 2 - - - 24 3 - - - 25 - - - 26 - - - 27 "1" = r/w, "0" = ro C2 4 28 "1" = r/w, "0" = ro C1 3 29 "1" = r/w, "0" = ro C0 2 30 "0" = ro UID 1 31 "0" = ro UID 0 ro = read only; r/w = read and write access C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 241 Description of protocols for SLG D11/D12 05/05 Configuration block 1: This block is used to enable special functions (QUIET mode). If the QUIET node is enabled, the transponder is permanently disabled. It can be re-enabled using the "Reset QUIET Bit" command. The I-CODE1 transponder responds to no command. Bit 0 Byte 0 Function Reserved 1 "1": enable QUIET mode 2...7 - "0": disable QUIET mode 8...15 1 - 16...23 2 - 24...31 3 - Bits 2 to 31 are reserved for future use and are set to "0" Configuration block 2: The family code and the application ID can be specified in this block. This function lets you create "transponder families". It is only enabled if the values are not equal to 0. Bit Byte Function 0...7 0 Family code 8...15 1 Application ID 16...23 2 - 24...31 3 - Bits 16 to 31 can be used for user data without restrictions. 242 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 6.5.8 Description of protocols for SLG D11/D12 Examples of Reading Data The setting "LSB first" and "MSB first" specifies the order of received data bytes. ISO15693 host command (DB-SIZE of transponder = 4 bytes) C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 243 Description of protocols for SLG D11/D12 05/05 ISO15693 host command (DB-SIZE of transponder = 8 bytes) 244 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 7 Installing the FEISC-DLL Installing the FEISC-DLL 7.1 Introduction The ID FEISC support package provides assistance in programming application sofware that integrates MOBY D readers and supports the ANSI-C, ANSI-C++ and Visual Basic programming languages1 as well as basically any other language that can invoke C functions. This support package is only suited for the MS Windows 9x/ME/2000 and NT operating systems. 2. The support package provides a simple function interface to MOBY D. Each protocol described in the system manual of the MOBY D reader family has a separate function. The ID FECOM support package can be used for communication via a PC serial interface. The two support packages are perfectly coordinated with each other. However, there is no absolute necessity to use the ID FECOM. Those who wish to use their own interface functions can take advantage of the function collection of the ID FEISC for building and splitting protocols (see also chap. 8.1 Overview). The support package consists of the following components: File Use FEISC.DLL DLL with all functions FEISC.LIB LIB file for linking in C/C++ projects FEISCBOR.LIB LIB file for linking in C/C++ projects with a Borland compiler FEISC.H Header file for C/C++ projects FEISCDEF.H Header file with error codes for C/C++ projects (optional) FEISC.BAS Declare file for Visual Basic projects FEISC.PAS Declare file for Delphi projects 1 As of Visual Basic 4.0 2 As of NT Version 3.51 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 245 Installing the FEISC-DLL 7.2 05/05 Installation Installation is very simple: copy the following files to the corresponding directories. * Copy FEISC.DLL to the application program directory or to the Windows system directory (recommended). For C/C++ programmers: * Copy FEISC.LIB to the project or LIB directory or add FEISCBOR.LIB to your project * Copy FEISC.H and FEISCDEF.H (optional) to the project directory or the INCLUDE directory For Visual Basic programmers: * Copy the FEISC.BAS to the project directory For Delphi programmers: * 7.3 Copy FEISC.PAS to the project directory Integration into the application program For C/C++ programmers: * All functions can be used immediately once the LIB file has been made known to the development tool. Prerequisite is, of course, that the include instruction is used to declare the DLL functions within each source file that invokes FEISC functions. For Delphi programmers: * Append "FEISC" to the USES statement in each source file of your project that invokes functions from FEISC.DLL.. For Visual Basic programmers: * Add the FEISC.BAS file to your project. ID FECOM must also be integrated in your project if functions are invoked from it. 246 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8 8.1 FEISC-DLL programming interface FEISC-DLL programming interface Overview For the convenience of the programmer, the FEISC-DLL encapsulates all functions and parameters necessary for simple communication with readers of the MOBY D family. With the aid of the ID FECOM support package, this makes it possible to use a function call to directly carry out all protocols contained in the system manual for the MOBY D reader family. The functions in the FEISC are only responsible for internal administration, protocol building, protocol splitting and any required error outputs. Communication with a MOBY D reader cannot be carried out using only the FEISC-DLL. However, it is possible to initiate a protocol output and to communicate with a MOBY D reader via an asynchronous serial interface using FECOM.DLL. Other interface drivers are not supported. Where it is necessary to use other asynchronous serial interface drivers, the scope of useable functions of the FEISC.DLL is severely restricted and any protocol traffic via the asynchronous serial interface must be coded by the programmer. In this case, the FEISC.DLL provides assistance in protocol building (FEISC_BuildProtocol) and protocol splitting (FEISC_SplitProtocol). Core elements of the DLL are the object manager and the reader objects generated during runtime. The object manager has a self-administration capability that frees up an application program from having to provide intermediate storage for any values, settings or other parameters. The object manager maintains a list of all generated reader objects. The reader object is the central program segment that executes the protocol functions and is assigned a connection to the serial interface if the FECOM.DLL is used. Each reader object administrates all settings relevant to its protocol tasks within its local memory. If you integrated the DLL into your project, the DLL is automatically opened at the start of the application program. This gives you immediate acess to all DLL functions. A reader object must be created prior to being used for the first time. This is carried out by the FEISC _NewReader function. In the absence of any errors, the return value contains a handle that is used by the application program as an access number. The generated reader object can only be uniquely identified using this handle. The object list can be called up using the FEISC_GetReaderList function if the self-administration capability is in use. The handles, which this function provides successively, can then be used together with the FEISC_GetReaderPara function to read out all of the settings relevant for this object. It is important that a reader object generated with FEISC_NewReader function be removed from the memory again using the FEISC_DeleteReader function. If an application program is invoked more than once, each program (instance) receives an empty object list when the FEISC_GetReaderList function is called. This prevents the access rights from becoming mixed up between different program instances. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 247 FEISC-DLL programming interface 05/05 The object-oriented inner structure (see Fig. 8-1) has intentionally been realized as a function interface on the outside. This brings with it the advantage of language independence. FECOM.DLL FEISC.DLL Reader object Object manager FEISC_NewReader - List of ReaderHandles - Version number FEISC_DeleteReader FEISC_GetReaderList FEISC_GetDLLVersion - ReaderHandle - PortHandle - Parameters Port object Reader object - ReaderHandle - PortHandle - Parameters FEISC_GetReaderPara FEISC_SetReaderPara FEISC_BuildProtocol FEISC_SplitProtocol FEISC_SendTransparent FEISC_GetLastSendProt FEISC_GetLastRecProt FEISC_GetLastStatus FEISC_0xA0_RdLogin Fig. 8-1: Internal structure of FEISC.DLL Fig. 8-1 illustrates that several reader objects can share a common serial interface in FECOM. Conflicts will not arise as long as access to the port object within a working thread takes place sequentially. By contrast, appropriate precautions must be taken in a multithreading or multi-process environment. These have not been implemented in FECOM or FEISC. Almost every DLL function has a return value which is always negative in the event of an error. 248 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.2 FEISC-DLL programming interface Parameter passing Some functions support the passing of parameters both as null-terminated character strings and as an array of hex numbers. Both data types allow passing of parameters as character type UCHAR. The interpretation of the passed value is specified by the iDataType function parameter. iDataType 0 Parameter passing 0x23, 0x56, 0xFA, 0xA6 Is interpreted as a pointer to Array of UCHAR (internally, 0x23 corresponds to the "#" character; 0x56 corresonds to the "V" character; etc.) 1 "2356FAA6" Null-terminated character string (every two characters are interpreted as a hex value: example: "23" -> 0x23) All other parameters that are to be passed as UCHAR should be specified as hex values (e.g. 0x23). Passing via a character string is not possible! Note UCHAR is an abbreviation (#define) for "unsigned char". In Visual Basic and Delphi, the compatible data type is the byte (see contents of the FEISC.BAS/ FEISC.PAS files). C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 249 FEISC-DLL programming interface 8.3 Event signaling to applications 05/05 1 Event handling measures can be installed for some events. For example, as soon as a send protocol is output via an interface, this event can also be announced to the application, asynchronously to the program procedure. An appropriate function must be available in the application for this to take place. This function is passed a pointer (cast on int) to the protocol string. The function can then, for example, display this string in a window. An event handling measure must be installed using the FEISC_AddEventHandler function. Four different signaling methods are available: message to calling process, message to a window, use of a callback function or signaling with a Windows API event. An installed event handling measure must be removed using the FEISC_DelEventHandler function. The FEISC_EVENT_INIT structure contains the parameters required for signaling: typedef struct _FEISC_EVENT_INIT { UINT uiUse; // Defines the event (e.g. FEISC_PRT_EVENT) UINT uiMsg; // Message code for dwThreadID and hwndWnd (e.g. WM_USER_xyz) UINT uiFlag; // Specifies the use of the union (e.g. FEISC_WND_HWND) union { DWORD dwThreadID // For thread ID HWND hwndWnd; // For window handle void (*cbFct)(int, int); // For callback function HANDLE hEvent; // For event handle }Method2; } FEISC_EVENT_INIT; The core element of the structure is the union, which contains either the ID of a process, the handle of a window, a function pointer or the handle of a Windows API event. The signaling form is selected using the uiFlag parameter. An identifier for the event to which the handling method is to be assigned is stored in the uiUse parameter. The message code must be stored in uiMsg for the message methods. Several handling methods can be installed for one event. However, each dwThreadID, hwndWnd, cbFct or hEvent can only be used once for each event. 1 Useable in Visual Basic projects to a limited extent only 2 The naming of union with method is for C programmers only. C++ programmers access the union directly via the structure. 250 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4 FEISC-DLL programming interface List of functions The support package contains many functions for different tasks. They have been subdivided into groups for the sake of clarity. Please note that most functions can only be used in (direct or indirect) combination with the ID FECOM support package. Administrative functions for reader objects * int FEISC_NewReader( int iPortHnd ) * int FEISC_DeleteReader( int iReaderHnd ) * int FEISC_GetReaderList( int iNext ) * int FEISC_GetReaderPara( int iReaderHnd, char* cPara, char* cValue ) * int FEISC_SetReaderPara( int iReaderHnd, char* cPara, char* cValue ) * void FEISC_GetDLLVersion( char* cVersion ) * int FEISC_GetErrorText( int iErrorCode, char* cErrorText ) * int FEISC_GetStatusText( UCHAR ucStatus, char* cStatusText ) * int FEISC_AddEventHandler( int iReaderHnd, FEISC_EVENT_INIT* pInit ) * int FEISC_DelEventHandler( int iReaderHnd, FEISC_EVENT_INIT* pInit ) Protocol functions * int FEISC_BuildProtocol( int iReaderHnd, UCHAR cBusAdr, UCHAR cCmdByte, UCHAR* cSendData, int iDataLen, UCHAR* cSendProt, int iDataType ) * int FEISC_SplitProtocol( int iReaderHnd, UCHAR* cRecProt, int iRecLen, UCHAR* cBusAdr, UCHAR* cCmdByte, UCHAR* cData, int* iDataLen, int iDataType ) Request functions * int FEISC_GetLastSendProt( int iReaderHnd, UCHAR* cSendProt, int iDataType ) * int FEISC_GetLastRecProt( int iReaderHnd, UCHAR* cRecProt, int iDataType) * int FEISC_GetLastState( int iReaderHnd, char* cStatusText ) * int FEISC_GetLastRecProtLen( int iReaderHnd ) * int FEISC_GetLastError( int iReaderHnd , int* iErrorCode, char* cErrorText ) C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 251 FEISC-DLL programming interface 05/05 General communication functions * int FEISC_SendTransparent( int iReaderHnd, UCHAR* cSendProt, int iSendLen, UCHAR* cRecProt, int iRecLen, int iCheckSum, int iDataType ) * int FEISC_Transmit( int iReaderHnd, UCHAR* cSendProt, int iSendLen, int iCheckSum, int iDataType ) * int FEISC_Receive( int iReaderHnd, UCHAR* cRecProt, int iRecLen, int iCheckSum, iDataType ) Special communication functions * int FEISC_0x1B_ResetQuietBit( int iReaderHnd, UCHAR cBusAdr ) * int FEISC_0x1C_EASRequest( int iReaderHnd, UCHAR cBusAdr ) * int FEISC_0x21_ReadBuffer( int iReaderHnd, UCHAR cBusAdr, UCHAR cSets, UCHAR* cTrData, UCHAR* cRecSets, UCHAR* cRecDataSets, int iDataType ) * int FEISC_0x31_ReadDataBufferInfo( int iReaderHnd, UCHAR cBusAdr, UCHAR* cTabSize, UCHAR* cTabStart, UCHAR* cTabLen, int iDataType ) * int FEISC_0x32_ClearDataBuffer( int iReaderHnd, UCHAR cBusAdr ) * int FEISC_0x33_InitBuffer( int iReaderHnd, UCHAR cBusAdr ) * int FEISC_0x52_GetBaud( int iReaderHnd, UCHAR cBusAdr ) * int FEISC_0x55_StartFlashLoader( int iReaderHnd ) * int FEISC_0x63_CPUReset( int iReaderHnd, UCHAR cBusAdr ) * int FEISC_0x65_SoftVersion( int iReaderHnd, UCHAR cBusAdr, UCHAR* cVersion, int iDataType ) * int FEISC_0x69_RFReset( int iReaderHnd, UCHAR cBusAdr ) * int FEISC_0x6A_RFOnOff( int iReaderHnd, UCHAR cBusAdr, UCHAR cRF ) * int FEISC_0x6B_InitNoiseThreshold( int iReaderHnd, UCHAR cBusAdr ) * int FEISC_0x6C_SetNoiseLevel( int iReaderHnd, UCHAR cBusAdr, UCHAR* cLevel, int iDataType ) * int FEISC_0x6D_GetNoiseLevel( int iReaderHnd, UCHAR cBusAdr, UCHAR* cLevel, int iDataType ) * int FEISC_0x6E_RdDiag( int iReaderHnd, UCHAR cBusAdr, UCHAR cMode, UCHAR* cData ) * int FEISC_0x71_SetOutput( int iReaderHnd, UCHAR cBusAdr, UCHAR cOutput ) * int FEISC_0x74_ReadInput( int iReaderHnd, UCHAR cBusAdr, UCHAR* cInput ) * int FEISC_0x75_AdjAntenna( int iReaderHnd, UCHAR cBusAdr, UCHAR* cLevel, int iDataType ) * int FEISC_0x80_ReadConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR cConfAdr, UCHAR* cConfBlock, int iDataType ) 252 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 FEISC-DLL programming interface * int FEISC_0x81_WriteConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR cConfAdr, UCHAR* cConfBlock, int iDataType ) * int FEISC_0x82_SaveConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR cConfAdr ) * int FEISC_0x83_ResetConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR cConfAdr ) * int FEISC_0x85_SetSysTimer( int iReaderHnd, UCHAR cBusAdr, UCHAR* cTime, int iDataType ) * int FEISC_0x86_GetSysTimer( int iReaderHnd, UCHAR cBusAdr, UCHAR* cTime, int iDataType ) * int FEISC_0xA0_RdLogin( int iReaderHnd, UCHAR cBusAdr, UCHAR* cRd_PW, int iDataType ) * int FEISC_0xB0_ISOCmd( int iReaderHnd, UCHAR cBusAdr, UCHAR* cReqData, int iReqLen, UCHAR* cRspData, int* iRspLen, int iDataType ) * int FEISC_0xB1_ISOCustAndPropCmd( int iReaderHnd, UCHAR cBusAdr, UCHAR cMfr, UCHAR* cReqData, int iReqLen, UCHAR* cRspData, int* iRspLen, int iDataType ) * int FEISC_0xBF_ISOTranspCmd( int iReaderHnd, UCHAR cBusAdr, int iRspLength, int iCmdRspDly, UCHAR* cReqData, int iReqLen, UCHAR* cRspData, int* iRspLen, int iDataType ) C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 253 FEISC-DLL programming interface 8.4.1 05/05 FEISC_NewReader Function Syntax Description Creates a reader object int FEISC_NewReader( int iPortHnd ) A reader object is generated. The protocol functions can only carried out with an object reader. iPortHnd1 is the handle of a device object generated out of the port object that was generated from FECOM.DLL using the FECOM_OpenPort. This handle allows protocols to be passed on to FECOM.DLL directly. Passing a 0 is also permissible. In general, several reader objects can execute their communication via the same serial COM interface. iPortHnd uses the first byte (MSB) of the PortHandle to distinguish between the protocol outputs to FECOM: iPortHnd = 0x0XXXXXXX2results in an output to FECOM.DLL The value of the PortHandle stored in the reader object can be changed later using the FEISC_SetReaderPara function. A reader object generated using FEISC_NewReader must (!) be removed from the memory using the FEISC_DeleteReader function. Otherwise, the memory reserved by the DLL will not be released. Return value A handle (>0) is returned if a reader object could be generated without any errors. In the event of an error, the function returns a value less than zero. The error codes are listed in chap. 8.6.1. Example ... #include "feisc.h" #include "fecom.h" ... ... char cPortNr[4]; itoa( 1, cPortNr, 10 ); // Convert Integer to Char int iPortHnd = FECOM_OpenPort( cPortNr ); // COM:1 is to be opened if( iPortHnd < 0 ) { // Code in the event of an error } else { // Open reader object int iReaderHnd = FEISC_NewReader( iPortHnd ); } 1 Throughout this document, iPortHnd is also subsituted in for iDevHnd . 2 X signifies any hex value 254 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.2 FEISC-DLL programming interface FEISC_DeleteReader Function Syntax Deletes a reader object. int FEISC_DeleteReader( int iReaderHnd ) Description The function deletes the reader object specified by the iReaderHnd parameter and releases the reserved memory. Return value The return value equals 0 if the operation was successful. In the event of an error, the function returns a value less than zero. The error codes are listed in chap. 8.6.1. Example ... #include "feisc.h" ... ... int iErr; int iReaderHnd = FEISC_NewReader( 0 ); if( iReaderHnd < 0 ) { // Code in the event of an error } ... ... ... if( iReaderHnd > 0 ) { iErr = FEISC_DeleteReader( iReaderHnd ); ... } ... ... C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 255 FEISC-DLL programming interface 8.4.3 05/05 FEISC_GetReaderList Function Syntax Determines, dependent on the iNext parameter, the first or the next reader handle from the internal list of generated reader objects. int FEISC_GetReaderList( int iNext ) Description The function returns a reader handle from the internal list of reader handles. If a value of 0 is passed with iNext, the first entry in the list is returned. If a reader handle contained in the list is passed with iNext, the entry that follows the reader handle is determined and returned. Thus, by successively entering the return value, the list can be scrolled through and all entries can be called up. Return value If an entry is located, the reader handle is returned with the return value. If the end of the list is reached, i.e. the passed reader handle has no successor, a value of 0 is returned. If no reader objects have been created, FEISC_ERR_EMPTY_LIST is returned. In the event of an error, the function returns a value less than zero. The error codes are listed in chap. 8.6.1. Example Hint ... #include "feisc.h" ... // Sample function for setting up a list of void ReaderList( void ) { int iNextHnd = FEISC_GetReaderList( 0 ); handle while( iNextHnd > 0 ) {// E.g. code for collecting the handles ... iNextHnd = FEISC_GetReaderList( iNextHnd handle } ... // E.g. code for displaying a list } reader objects // Determine.... the first and reading out parameters ); // Determine the next It is convenient to use a loop, similar to that in the example above, to close all generated reader objects. However, it must be considered that the successor of a deleted reader object can no longer be determined. The following code fragment shows how to delete all generated reader objects in a loop: ... int iNextHnd, iCloseHnd, iError; iNextHnd = FEISC_GetReaderList( 0 ); // Determine the first handle while( iNextHnd > 0 ) { iCloseHnd = iNextHnd; iNextHnd = FEISC_GetReaderList( iNextHnd ); // Determine the next handle iError = FEISC_DeleteReader( iCloseHnd ); } 256 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.4 FEISC-DLL programming interface FEISC_GetDLLVersion Determines the DLL version number. Function void FEISC_GetDLLVersion( char* cVersion ) Syntax Description The function returns the DLL version number. cVersion is an empty, null-terminated character string for retuning a version number. The character string should be able to hold at least 256 characters. In the current version, the character string is filled with "04.01.00". Newer versions could be designed to provide additional information. Return value ... #include "feisc.h" ... ... char cVersion[256]; FEISC_GetDLLVersion( cVersion ); // Code for displaying the version number ... ... Example 8.4.5 without FEISC_GetErrorText Function Syntax Description Determines the error text for the error code int FEISC_GetErrorText( int iErrorCode, char* cErrorText ) The function passes the English error text corresponding to iErrorCode in cErrorText. The buffer for cErrorText should be able to hold 256 characters. Return value Example The function returns a value of zero if there are no errors and a value less than zero if errors did occur. The erorr codes are listed in chap. 8.6.1. ... #include "feisc.h" #include "feiscdef.h" ... ... char cErrorText [256]; ... int iBack = FEISC_GetErrorText(FEISC_ERR_PROTLEN, cErrorText // Code for displaying the text ... ... C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 ) 257 FEISC-DLL programming interface 8.4.6 05/05 FEISC_GetStatusText Function Syntax Description Determines the short text for the status byte int FEISC_GetStatusText( UCHAR ucStatus, char* cStatusText ) The function passes the English short text corresponding to ucStatus in cStatusText. The buffer for cStatusText should be able to hold 128 characters. Return value Example The function returns a value of zero if there are no errors and a value less than zero if errors did occur. The erorr codes are listed in chap. 8.6.1. ... #include "feisc.h" ... ... char cStatusText[128]; ... int iBack = FEISC_GetStatusText(0x01, cStatusText ) // Code for displaying the text ... ... 258 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.7 FEISC-DLL programming interface FEISC_GetReaderPara Function Syntax Description Determines a parameter of a reader object. int FEISC_GetReaderPara( int iReaderHnd, char* cPara, char* cValue ) The function determines the current value of a parameter. cPara is a null-terminated character string that contains the parameter ID. cValue is an empty, null-terminated character string for returning the parameter value. The character string should be able to hold at least 128 characters. iReaderHnd is the reader object handle. Parameter IDs The parameter IDs are: PortHnd1, LogProt, BusyTO, RepCnt, ErrCode, ErrStr, SendStr, RecStr. and IsProtToAppLocked Cross reference Additional information is found in chap. 8.5 Support for multithreading and chap. 8.6.2 List of parameter IDs Return value The function returns a value of zero if there are no errors and a value less than zero if errors did occur. The error codes are listed in chap. 8.6.1. Example 1 ... #include "feisc.h" ... ... char cValue[128]; int iPortHnd; ... if( !FEISC_GetReaderPara( handle, "PortHnd", cValue ) ) { // change from Char to Integer iPortHnd = atoi( cValue ); // E.g. code for using the PortHandle ... } ... ... } Please note the remark regarding the PortHandle in chap. 8.4.1 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 259 FEISC-DLL programming interface 8.4.8 05/05 FEISC_SetReaderPara Function Syntax Description Sets a parameter of a reader object to a new value. int FEISC_SetReaderPara( int iReaderHnd, char* cPara, char* cValue ) The function passes a new parameter to a reader object. The reader object stores the new value and immediately makes it the current parameter. cPara is a null-terminated character string that contains the parameter ID. cValue is a null-terminated character string that contains the new parameter value. iReaderHnd is the reader object handle. Parameter IDs The parameter IDs are: PortHnd1, LogProt, BusyTO, RepCnt, LockProtToApp and UnlockProtToApp Cross reference Additional information is found in chap. 8.5 Support for multithreading and chap. 8.6.2 List of parameter IDs Return value If the reader object with the new parameter value could be initialized without any errors, a value of 0 is returned. In the event of an error, the function returns a value less than zero. The error codes are listed in chap. 8.6.1. Example 1 // The example shows that a new PortHandle can be assigned to a //reader object later on. After the assignment, communication takes place via the new port. ... #include "feisc.h" #include "fecom.h" ... ... int iErr; char cPortHnd[9]; char cPortNr[4]; itoa( 1, cPortNr, 10 ); // Convert Integer to Char ... int iPortHnd = FECOM_OpenPort( cPortNr ); // COM:1 is to be opened if( iPortHnd > 0 ) { itoa( iPortHnd, cPortHnd, 10 );// Convert Integer to Char iErr = FEISC_SetReaderPara( iReaderHnd, "PortHnd", cPortHnd ); // Communication can take place via the new port after this point ... } ... ... Please note the remark regarding the PortHandle in chap. 8.4.1 260 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.9 Function Syntax Description FEISC-DLL programming interface FEISC_AddEventHandler An event handling measure is installed. int FEISC_AddEventHandler( int iReaderHnd, FEISC_EVENT_INIT* pInit ) The function installs one of four possible event handling methods. The installed method is applied when an event takes place for which the method was installed. This makes an asynchronous reaction to events in an application program possible. The event handling method is only set up for the reader object identified with iReaderHnd. This means that this installation must be carried out for each reader object for which it is required. Event Description FEISC_PRT_EVENT One event for the send protocol and one event for the receive protocol1 FEISC_SNDPRT_EVENT Event for send protocol9 FEISC_RECPRT_EVENT Event for receive protocol9 1st method: Message to thread (not for Visual Basic) This method is used to exchange messages between threads2. Using the GetCurrentThreadID() Windows API function, the thread determines the thread identifier and passes it as the dwThreadID parameter in the FEISC_EVENT_INIT structure. The thread must provide a message handling function (MessageMap function) to receive the message that was sent by FEISC using the PostThreadMessage(..) Windows API function. . The message code can be selected as required. The FEISC_EVENT_INIT structure is filled in as follows: uiUse = FEISC_xyz_EVENT // See Defines FEISC.H uiMsg = WM_USER + ... // Freely selectable, but above WM_USER3 uiFlag = FEISC_THREAD_ID dwThreadID = GetCurrentThreadID() The first parameter (WPARAM) passes the MessageMap function in the application the pointer to the string; the second parameter passes the status byte of the receive protocol or an error code. Please note that the pointer to the string is cast with int. Therefore, it must be converted back using the cast operator (LPCTSTR) when assigned to a CString data type or (char*) to a C character string. 2nd method: Message to window (not for Visual Basic) This method is used if a message is to be sent directly to a window. The handle for the corresponding window is determined using the GetWindow(..) Windows API function4 and is passed as the hwndWnd parameter in the FEISC_EVENT_INIT structure. The window must provide a message handling function (MessageMap function) to receive the message sent by FEISC using the PostMessage(..) Windows API function. The message code can be selected as required. 1 The event is only triggered if the LogProt parameter was set to 1 (default: 0) 2 Parallel path of execution independent of application program. The application program is also a thread. 3 See Windows documentation for Platform SDK 4 When using the CWnd MFC class, it is also possible to use the GetSafeHwnd() method. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 261 FEISC-DLL programming interface 05/05 The FEISC_EVENT_INIT structure is filled in as follows: uiUse = FEISC_xyz_EVENT // See Defines FEISC.H uiMsg = WM_USER + ... // Freely selectable, but above WM_USER2 uiFlag = FEISC_WND_HWND hwndWnd = GetWindow(...) The MessageMap function receives the same parameters as that of the first method. 3rd method: Calling a callback function (not for Visual Basic) The callback method is used to install a function pointer for an event. If the event takes place, the function is called by FEISC. The contents of the function can be defined as required. The passed parameters are as described for the first method. The FEISC_EVENT_INIT structure is filled in as follows: uiUse = FEISC_xyz_EVENT // See Defines FEISC.H uiMsg wird nicht benotigt uiFlag = FEISC_CALLBACK cbFct = (void*)&IhrFunctionsName1 4th method: Setting an event The event method is used to install an event handle for an event. If an event occurs, the event is set by FEISC using the SetEvent(...) Windows API function. The application side waits for the event using the WaitForSingleObject(...) Windows API function. Since parameters cannot be received, the required parameter must be requested with a suitable function. The set event must be reset by the application program using the ResetEvent(...) Windows API function. The FEISC_EVENT_INIT structure is filled in as follows: uiUse = FEISC_xyz_EVENT // See Defines FEISC.H uiMsg wird nicht benotigt uiFlag = FEISC_EVENT hEvent = CreateEvent(..) Every installed event handling method must be removed using the FEISC_DelEventHandler function. When a reader object is removed, all event handling methods installed for that object are lost. Cross reference Additional information is found in chap. 8.3 Event signaling to applications and chap. 8.5 Support for multithreading Return value The function returns a value of zero if there are no errors and a value less than zero if errors did occur. The error codes are listed in chap. 8.6.1. 1 The function has the prototype: void IhrFunctionsName(int, int) 262 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.10 FEISC-DLL programming interface FEISC_DelEventHandler Function Syntax Description An event handling measure is removed. int FEISC_DelEventHandler( int iReaderHnd, FEISC_EVENT_INIT* pInit ) The function removes the event handling measure that was previously installed using FEISC_AddEventHandler. The event handling measure to be removed is specified in detail in the FEISC_EVENT_INIT structure. Removing the 1st method: Message to thread (not for Visual Basic) The FEISC_EVENT_INIT structure is filled in as follows: uiUse = FEISC_xyz_EVENT // See Defines in FEISC.H uiMsg wird nicht benotigt uiFlag = FEISC_THREAD_ID dwThreadID = GetCurrentThreadID() Removing the 2nd method: Message to window (not for Visual Basic) The FEISC_EVENT_INIT structure is filled in as follows: uiUse = FEISC_xyz_EVENT // See Defines in FEISC.H uiMsg wird nicht benotigt uiFlag = FEISC_WND_HWND hwndWnd = GetWindow(...) 3rd method: Removing a callback function (not for Visual Basic) The FEISC_EVENT_INIT structure is filled in as follows: uiUse = FEISC_xyz_EVENT // See Defines FEISC.H uiMsg wird nicht benotigt uiFlag = FEISC_CALLBACK cbFct = (void*)&IhrFunctionsName 4th method: Removing an event handle The FEISC_EVENT_INIT structure is filled in as follows: uiUse = FEISC_xyz_EVENT // See Defines FEISC.H uiMsg wird nicht benotigt uiFlag = FEISC_EVENT hEvent = IhrEventHandle; Cross reference Additional information is found in chap. 8.3 Event signaling to applications and chap. 8.5 Support for multithreading Return value The function returns a value of zero if there are no errors and a value less than zero if errors did occur. The error codes are listed in chap. 8.6.1. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 263 FEISC-DLL programming interface 8.4.11 05/05 FEISC_BuildProtocol Function Syntax Description A protocol with a protocol frame is built from the passed parameters and data. int FEISC_BuildProtocol( int iReaderHnd, UCHAR cBusAdr, UCHAR cCmdByte, UCHAR* cSendData, UCHAR cDataLen, UCHAR* cSendProt, int iDataType ) This function builds a complete send protocol with a protocol frame from the following passed parameters: bus address (cBusAdr), control byte (cCmdByte), send data (cSendData) and the information on the length of the send data (cDataLen). The protocol string is stored in cSendProt as a hex array (iDataType=0) or as a character string (iDataType=1). The buffer for cSendProt must be at least one value longer than the expected protocol length, since a NUL character will be appended. More detailed information on the protocol frame is found in the system manual for the ISC reader family. iReaderHnd is the reader object handle. The built protocol is not passed on to FECOM. Therefore, this function is independent of FECOM. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing and chap. 8.4.12 FEISC_SplitProtocol Return value If no errors occur, the return value includes the length of cSendProt. In the event of an error, a negative value is returned. The error codes are listed in chap. 8.6.1. Example ... int BuildTestProtocol( int iReaderHnd ) { int iErr; UCHAR cDataLen, cSendData[32], cSendProt[256]; UCHAR cBusAdr = 0xFF; UCHAR cCmdByte= 0x6A; ... cSendData[0]= 0x01; cSendData[1]= '\0'; cDataLen = 0x01; ... } 264 // Build send protocol iErr = FEISC_BuildProtocol( iReaderHnd, cBusAdr, cCmdByte, cSendData, cDataLen,cSendProt, 0 ); C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.12 Function FEISC-DLL programming interface FEISC_SplitProtocol The passed protocol string is split. Syntax int FEISC_SplitProtocol( int iReaderHnd, UCHAR* cRecProt, UCHAR cRecLen, UCHAR* cBusAdr, UCHAR* cCmdByte, UCHAR* cRecData, UCHAR* cDataLen, int iDataType ) Description This function splits the data contained in cRecProt into bus address (cBusAdr), control byte (cCmdByte), receive data (cRecData) and the information on the length of the receive data (cDataLen). The protocol string in cRecProt must be passed as a hex array (iDataType=0) or a character string (iDataType=1) with the length specified in cRecLen. cRecData is interpreted as a hex array (iDataType=0) or character string (iDataType=1). More detailed information on the protocol frame is found in the system manual for the ISC reader family. iReaderHnd is the reader object handle. This function is independent of FECOM. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing and chap. 8.4.11 FEISC_BuildProtocol Return value If no errors occur, the status byte of the receive protocol is returned. A value larger than 0x00 indicates an exception condition of the reader. The error codes are listed in chap. 8.6.1. Example // The following code fragment requires initialized port and reader objects. #include "feisc.h" #include "fecom.h" ... int iStatus, iRecLen; UCHAR cBusAdr, cCmdByte, cDataLen; UCHAR cSendProt[256], cRecProt[256], cRecData[256]; // Build send protocol FEISC_BuildProtocol( iReaderHnd, cBusAdr, cCmdByte, cSendData, cDataLen, cSendProt, 0 ); // Send and receive protocol iRecLen = FECOM_Transceive( iPortHnd, cSendProt, cSendProt[0], cRecProt, 256 ); if( iRecLen > 0 ) { // Split receive protocol iStatus = FEISC_SplitProtocol( iReaderHnd, cRecProt, (UCHAR)iRecLen, &cBusAdr, &cCmdByte, cRecData, &cDataLen, 0 ); if( iStatus == 0 ) // Statusbyte == 0x00 { // Process receive data ... } } C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 265 FEISC-DLL programming interface 8.4.13 05/05 FEISC_SendTransparent Function Syntax Description A protocol string is output and the receive protocol is returned directly via the interface. int FEISC_SendTransparent( int iReaderHnd, UCHAR* cSendProt, int iSendLen, UCHAR* cRecProt, int iRecLen, int iCheckSum, int iDataType ) This function is suitable for sending protocol strings created by editors to a reader. However, this requires a thorough knowledge of the protocol frame. As an option, the protocol contained in cSendProt with the protocol frame can be supplemented by the checksum (iCheckSum = 1). The receive protocol is stored in cRecProt. Both buffers are interpreted as a hex array (iDataType=0) or character string (iDataType=1). The length of the protocol (number of characters in cSendProt) must be specified in the iSendLen parameter. To be on the safe side, the buffer of the receive protocol should be able to hold 256 characters (iDataType=0) or 512 characters (iDataType=1). This buffer size must be specified in iRecLen. iReaderHnd is the reader object handle. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the number of characters contained in cRecProt is passed. The error codes are listed in chap. 8.6.1. Example 266 int outLen, inLen; UCHAR cSendProt[256]; UCHAR cRecProt[256]; ... // Define send protocol cSendProt[0] = 0x05; // Length byte cSendProt[1] = 0xFF; // Address byte cSendProt[2] = 0x80; // Control byte cSendProt[3] = 0x00; // Reader configuration address cSendProt[4] = 0x00; // Placeholder for checksum cSendProt[5] = '\0'; outLen = 5; ... // Send protocol after calculating and appending checksum inLen = FEISC_SendTransparent( iReaderHnd, cSendProt, outLen, cRecProt, 256, 1, 0 ); if( inLen > 0) { // Code beyond this point for evaluation of receive data ... } C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.14 FEISC-DLL programming interface FEISC_Transmit Function A protocol string is output directly via the interface. Syntax int FEISC_Transmit( int iReaderHnd, UCHAR* cSendProt, int iSendLen, int iCheckSum, int iDataType ) Description This function is suitable for sending protocol strings created by editors to a reader. However, this requires a thorough knowledge of the protocol frame. The program does not wait for a response protocol after sending the cSendProt protocol. As an option, the protocol contained in cSendProt with the protocol frame can be supplemented by the checksum (iCheckSum=1). cSendProt is interpreted as a hex array (iDataType=0) or character string (iDataType=1). The length of the protocol (number of characters in cSendProt) must be specified in the iSendLen parameter. If iDataType=1, then iSendLen is exactly twice as large as when iDataType=0. iReaderHnd is the reader object handle. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value A 0 is passed if no errors occur. The error codes are listed in chap. 8.6.1. Example int outLen; UCHAR cSendProt[256]; ... // Define send protocol cSendProt[0] = 0x05; // Length byte cSendProt[1] = 0xFF; // Address byte cSendProt[2] = 0x80; // Control byte for read configuration cSendProt[3] = 0x00; // Reader configuration address cSendProt[4] = '\0'; outLen = 4; // Send protocol after calculating and appending checksum FEISC_Transmit( iReaderHnd, cSendProt, outLen, 1, 0 ); ... C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 267 FEISC-DLL programming interface 8.4.15 05/05 FEISC_Receive Function Syntax Description A protocol string is read in directly from the interface. int FEISC_Receive( int iReaderHnd, UCHAR* cRecProt, int iRecLen, int iDataType ) This function read out a protocol from the receive buffer and stores it in cRecProt. If a reader has already sent off several protocols, the function reads in all protocols. In this case, cRecProt contains all protocols. A maximum of 256 ASCII characters can be taken up out of the receive buffer. To be on the safe side, the buffer of the receive protocol should be able to hold 256 characters (iDataType=0) or 512 characters (iDataType=1). This buffer size must be specified in iRecLen. iReaderHnd is the reader object handle. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the number of characters contained in cRecProt is passed. If iDataType=1, the number is exactly twice as large as when iDataType=0. The error codes are listed in chap. 8.6.1. Example 268 int inLen; UCHAR cRecProt[256]; ... // Read out protocol inLen = FEISC_Receive( iReaderHnd, cRecProt, 256, 0 ); ... C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.16 FEISC-DLL programming interface FEISC_GetLastSendProt The last protocol string to be sent is returned. Function Syntax int FEISC_GetLastSendProt( int iReaderHnd, UCHAR* cSendProt, int iDataType ) This function can be used to determine the send protocol that was last output from a reader object. All functions that begin with FEISC_0x... as well as the FEISC_SendTransparent function store this protocol in the reader object. Description To be on the safe side, the buffer for the send protocol, cSendProt, should be able to hold at least 256 characters (iDataType=0) or 512 characters (iDataType=1). cSendProt is interpreted as a hex array (iDataType=0) or character string (iDataType=1). iReaderHnd is the reader object handle. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value In the event of an error, the return value contains the character number contained in cSendProt. The error codes are listed in chap. 8.6.1. 8.4.17 FEISC_GetLastRecProt Function Syntax Description The last protocol string to be received is returned. int FEISC_GetLastRecProt( int iReaderHnd, UCHAR* cRecProt, int iDataType ) This function can be used to determine the last receive protocol from a reader object. All functions that begin with FEISC_0x... as well as the FEISC_SendTransparent function store this protocol in the reader object. To be on the safe side, the buffer for the receive protocol, cRecProt, should be able to hold 256 characters (iDataType=0) or 512 characters (iDataType=1). cRecProt is interpreted as a hex array (iDataType=0) or character string (iDataType=1). iReaderHnd is the reader object handle. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the return value contains the character number contained in cRecProt. The error codes are listed in chap. 8.6.1. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 269 FEISC-DLL programming interface 8.4.18 05/05 FEISC_GetLastState Function The status byte contained in the last receive protocol is returned. Syntax int FEISC_GetLastStatus( int iReaderHnd, char* cStatusText ) This function can be used to determine the status byte and a short text for the status byte that are contained in the last receive protocol from the reader object. All functions that begin with FEISC_0x... as well as the FEISC_SendTransparent function store the last status byte in the reader object. Description The buffer for the short text, cStateText, should be able to hold 256 characters. iReaderHnd is the reader object handle. Return value If no errors occur, the return value contains the status byte. The error codes are listed in chap. 8.6.1. 8.4.19 FEISC_GetLastRecProtLen Function Syntax Description The length of the last receive protocol is determined. int FEISC_GetLastRecProtLen( int iReaderHnd ) At times it is useful to be able to use the protocol length to determine the length of data contained in the protocol. This function is used to determine the protocol length. Example: The FEISC_0x21_ReadBuffer returns several data sets of a data structure. While it is possible to determine the total length of data by analyzing the data sets, but it is much easier to take the protocol length, delete 6 bytes for the protocol frame and an additional 2 bytes for the cTrData and cRecDataSets parameters. iReaderHnd is the reader object handle. Return value If no errors occur, the return value contains the protocol length. The error codes are listed in chap. 8.6.1. 270 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.20 FEISC-DLL programming interface FEISC_GetLastError Determines the last error code and passes the error text. Function Syntax int FEISC_GetLastError( int iReaderHnd , int* iErrorCode, char* cErrorText ) The function returns the last error code of the reader object selected with iReaderHnd in iErrorCode and passes the corresponding English error text in cErrorText. Description The buffer for cErrorText should be able to hold at least 256 characters. The last error of the object manager is returned if iReaderHnd is set to 0. Return value The function returns a value of zero if there are no errors and a value less than zero if errors did occur. The error codes are listed in chap. 8.6.1. ... #include "feisc.h" ... ... char cErrorText [256]; int iErrorCode = 0; ... Example int iBack = FEISC_GetLastError( iReaderHnd, &iErrorCode, cErrorText // Code for displaying the text ... ... 8.4.21 ) FEISC_0x1B_ResetQuietBit Function for resetting the Quiet bits. Function Syntax int FEISC_0x1B_ResetQuietBit( int iReaderHnd, UCHAR cBusAdr ) The function resets the Quiet bits in the I-Code transponder type. Description iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 8.4.22 FEISC_0x1C_EASRequest Function Syntax Description Function for sending the EAS request. int FEISC_0x1C_EASRequest( int iReaderHnd, UCHAR cBusAdr ) The function sends an EAS request to the I-Code transponder type. iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 271 FEISC-DLL programming interface 8.4.23 05/05 FEISC_0x21_ReadBuffer Function Syntax Description Function for data transfer with a transponder int FEISC_0x21_ReadBuffer( int iReaderHnd, UCHAR cBusAdr, UCHAR cSets, UCHAR* cTrData, UCHAR* cRecSets, UCHAR* cRecDataSets, int iDataType ) The function reads out the number of data sets, cSets, from the internal data table and stores the data in cRecDataSets. cTrData defines the structure of a data set in cRecDataSets. The number of returned data sets in cRecDataSets is specified in cRecSets. The iDataType parameter specifies whether the receive data in cRecDataSets are to be interpreted as a hex array or character string. cRecSets and cTrData always consist of one hex character. The buffer of cRecDataSets should be sized as follows: * iDataType=0: 256 characters (incl. 1 NUL character) * iDataType=1: 512 character (incl. 1 NUL character) The sequence in which the data contained in cRecDataSets are entered is documented in the system manual of the ISC family. iReaderHnd is the reader object handle. cBusAdr is the bus address set in the multijob reader. Note The function does not perform a data verification in cRecDataSets on the basis of the data structure specified in cTrData. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing and chap. 8.4.26 FEISC_0x33_InitBuffer, chap. 8.4.24 FEISC_0x31_ReadDataBufferInfo, chap. 8.4.25 FEISC_ClearDataBuffer Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 272 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.24 FEISC-DLL programming interface FEISC_0x31_ReadDataBufferInfo Function for determining the table parameters of the internal DataBuffer Function Syntax int FEISC_0x31_ReadDataBufferInfo( int iReaderHnd, UCHAR cBusAdr, UCHAR* cTabSize, UCHAR* cTabStart, UCHAR* cTabLen, int iDataType ) The function reads out the table parameters for the internal buffer table and stores them in cTabSize, cTabStart and cTabLen. Description The iDataType parameter specifies whether the table parameters are interpreted as a hex aray or character string. The buffers of cTabSize, cTabStart and cTabLen must be sized as follows: * iDataType=0: 3 characters (incl. 1 NUL character) * iDataType=1: 5 characters (incl. 1 NUL character) iReaderHnd is the reader object handle. cBusAdr is the bus address set in the multijob reader. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing and chap. 8.4.23 FEISC_0x21_ReadBuffer, chap. 8.4.26 FEISC_0x33_InitBuffer, chap. 8.4.25 FEISC_0x32_ClearDataBuffer, Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 8.4.25 FEISC_0x32_ClearDataBuffer Function Syntax Description Function for clearing the read entries out of the internal DataBuffer int FEISC_0x32_ClearDataBuffer( int iReaderHnd, UCHAR cBusAdr ) The function clears all entries read out using FEISC_0x01_MultiJobPollAndState, FEISC_0x03_MultiJobState or FEISC_0x21_ReadBuffer from the DataBuffer in the reader. iReaderHnd is the reader object handle. cBusAdr is the bus address set in the multijob reader. Cross reference chap. 8.4.23 FEISC_0x21_ReadBuffer, chap. 8.4.26 FEISC_0x33_InitBuffer, chap. 8.4.24 FEISC_0x31_ReadDataBufferInfo, Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 273 FEISC-DLL programming interface 8.4.26 05/05 FEISC_0x33_InitBuffer Function for initializing the data table in the reader Function Syntax int FEISC_0x33_InitBuffer( int iReaderHnd, UCHAR cBusAdr ) The function initializes the internal data table for the Buffered Read Mode. Description iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Cross reference chap. 8.4.23 FEISC_0x21_ReadBuffer, chap. 8.4.24 FEISC_0x31_ReadDataBufferInfo Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 8.4.27 FEISC_0x52_GetBaud Test function for determining baud rate and parity. Function Syntax int FEISC_0x52_GetBaud( int iReaderHnd, UCHAR cBusAdr ) If it is possible to receive the response telegram, the specified baud rate and parity are identical to those of the reader. Description iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 8.4.28 FEISC_0x55_StartFlashLoader Function Syntax Description The function starts the flash loader. int FEISC_0x55_StartFlashLoader( int iReaderHnd ) The function starts the flash loader of the reader. The reader must have bus address 0. iReaderHnd is the reader object handle. Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 274 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.29 FEISC-DLL programming interface FEISC_0x63_CPUReset Function triggers a reset in the reader CPU. Function Syntax int FEISC_0x63_CPUReset( int iReaderHnd, UCHAR cBusAdr ) Function triggers a reset in the reader CPU. Description iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 8.4.30 FEISC_0x65_SoftVersion Function Syntax Description Function reads out the version number of the reader. int FEISC_0x65_SoftVersion( int iReaderHnd, UCHAR cBusAdr, UCHAR* cVersion, int iDataType ) The version number of the reader is determined and stored in cVersion. The iDataType parameter specifies whether the version number in cVersion is interpreted as hex array or character string. The buffer for the version must be able to hold at least 8 bytes (iDataType=0) or 15 bytes (iDataType=1). One byte is provided for the NUL character. iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 275 FEISC-DLL programming interface 8.4.31 05/05 FEISC_0x69_RFReset Function triggers a reset for the reader antenna field. Function Syntax int FEISC_0x69_RFReset( int ReaderHnd, UCHAR cBusAdr ) Function triggers a reset for the reader antenna field. All transponders that were previously switched off using the FEISC_0x1A_Halt function are re-enabled. Description iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 8.4.32 FEISC_0x6A_RFOnOff Function for switching on/off the antenna field. Function Syntax int FEISC_0x6A_RFOnOff( int iReaderHnd, UCHAR cBusAdr, UCHAR cRF ) A value of 0 in cRF switches the antenna field off. Description A value of 1 in cRF switches the antenna field on. iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 8.4.33 FEISC_0x6B_InitNoiseThreshold1 Function Syntax Description Function for initializing the noise threshold. int FEISC_0x6B_InitNoiseThreshold( int iReaderHnd, UCHAR cBusAdr ) iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 1 Not available for SLG D1x 276 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.34 FEISC-DLL programming interface FEISC_0x6C_SetNoiseLevel Function for setting the noise level. Function Syntax int FEISC_0x6C_SetNoiseLevel( int iReaderHnd, UCHAR cBusAdr, UCHAR* cLevel, int iDataType ) cLevel contains 3 level values that are passed as a hex array with a total of 6 bytes (iDataType=0) or as a character string with a total of 12 bytes (iDataType=1). Description iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 8.4.35 FEISC_0x6D_GetNoiseLevel Function Syntax Description Function for reading the noise level. int FEISC_0x6D_GetNoiseLevel( int iReaderHnd, UCHAR cBusAdr, UCHAR* cLevel, int iDataType ) The 3 level values that are read out are stored in cLevel. The buffer for cLevel must be sized as follows: * iDataType=0: 7 bytes (incl. NUL character) * iDataType=1: 13 bytes (incl. NUL character) iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 277 FEISC-DLL programming interface 8.4.36 05/05 FEISC_0x6E_RdDiag Function for reader diagnosis. Function Syntax int FEISC_0x6E_RdDiag( int iReaderHnd, UCHAR cBusAdr, UCHAR cMode, UCHAR* cData ) The function returns diagnosis values for the identifier stored in cMode. Description The receive data buffer, cData, must be of a sufficient size. iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 8.4.37 FEISC_0x75_AdjAntenna1 Function Syntax Description Function for reading the antenna level. int FEISC_0x75_AdjAntenna( int iReaderHnd, UCHAR cBusAdr, UCHAR* cLevel, int iDataType ) The level value that is read out is stored in cLevel. The buffer for cLevel must be sized as follows: * iDataType=0: 3 bytes (incl. NUL character) * iDataType=1: 5 bytes (incl. NUL character) iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 1 not available for SLG D1x 278 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.38 FEISC-DLL programming interface FEISC_0x71_SetOutput Function activates the reader outputs. Function Syntax int FEISC_0x71_SetOutput( int iReaderHnd, UCHAR cBusAdr, int iOS, int iOSF, int iOSTime, int iOutTime ) Description The function activates the reader outputs. All times are multiplied by 100 internally in the reader and the values are given in ms. The value ranges specified in the system manual of the ISC reader family apply. iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 8.4.39 FEISC_0x74_ReadInput Function Function reads the status of the digital inputs. Syntax int FEISC_0x74_ReadInput( int iReaderHnd, UCHAR cBusAdr, UCHAR* cInput ) Description The function reads the digital inputs and stores the status in cInput. The length of cInput is 1. iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 279 FEISC-DLL programming interface 8.4.40 05/05 FEISC_0x80_ReadConfBlock Function reads out a configuration block from the reader. Function Syntax int FEISC_0x80_ReadConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR cConfAdr, UCHAR* cConfBlock, int iDataType ) Description This function can be used to read out a configuration block from the cConfAdr address of the reader. The data in cConfBlock that are read out are interpreted as hex array (iDataType=0) or character string (iDataType=1). The configuration data buffer, cConfBlock, must be sized as follows: * iDataType=0: 15 bytes (incl. 1 NUL character) * iDataType=1: 29 bytes (incl. 1 NUL character) iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 8.4.41 FEISC_0x81_WriteConfBlock Function Syntax Description Function writes a configuration block to the reader. int FEISC_0x81_WriteConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR cConfAdr, UCHAR* cConfBlock, int iDataType ) This function can be used to write a configuration block to the cConfAdr address of the reader. The configuration data must be stored as a hex array (iDataType=0) or character string (iDataType=1) in cConfBlock. The configuration data buffer must contain 14 bytes (iDataType=0) or 28 bytes (iDataType=1). iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 280 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.42 FEISC-DLL programming interface FEISC_0x82_SaveConfBlock Function saves a configuration block in the reader. Function Syntax int FEISC_0x82_SaveConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR cConfAdr ) This function can be used to write a configuration block with address cConfAdr from the RAM memory to the EEPROM memory, thereby saving it permanently. Description iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 8.4.43 FEISC_0x83_ResetConfBlock Function Syntax Description Function loads the factory settings to a configuration block in the reader. int FEISC_0x83_ResetConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR cConfAdr ) This function can be used to load the parameters of the factory settings into a configuration block with the address cConfAdr. iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 281 FEISC-DLL programming interface 8.4.44 05/05 FEISC_0x85_SetSysTimer Sets the system time in the reader. Function Syntax int FEISC_0x85_SetSysTimer( int iReaderHnd, UCHAR cBusAdr, UCHAR* cTime, int iDataType ) The function initializes the system time in the reader. Description The cTime buffer must contain 4 bytes (iDataType=0) or be a character string with 8 characters (iDataType=1). iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 8.4.45 FEISC_0x86_GetSysTimer Function Syntax Description Reads out the system time from the reader int FEISC_0x86_GetSysTimer( int iReaderHnd, UCHAR cBusAdr, UCHAR* cTime, int iDataType ) This function determines the system time of the reader. The buffer for cTime must be sized as follwows: * iDataType=0: 5 characters (incl. 1 NUL character) * iDataType=1: 9 characters (incl. 1 NUL character) iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. 282 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.46 FEISC-DLL programming interface FEISC_0xA0_RdLogin Function Syntax Description Function performs a login in the reader. int FEISC_0xA0_RdLogin( int iReaderHnd, UCHAR cBusAdr, UCHAR* cRd_PW, int iDataType ) The function carries out a reader login with the password cRd_PW. The iDataType parameter specifies whether the password in cRd_PW is interpreted as a hex array or character string. iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the return value contains the status byte of the response protocol. The error codes are listed in chap. 8.6.1. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 283 FEISC-DLL programming interface 8.4.47 05/05 FEISC_0xB0_ISOCmd Function Function initiates data transfer with an ISO15693 transponder. Syntax int FEISC_0xB0_ISOCmd( int iReaderHnd, UCHAR cBusAdr, UCHAR* cReqData, int iReqLen, UCHAR* cRspData, int* iRspLen, int iDataType ) Description The function initiates a data transfer for multiple ISO15693 transponders located in the read field of the ISC reader. The data required for the data transfer are to be stored in cReqData. The number of characters contained in cReqData must be specified in iReqLen. The data read from the ISO15693 transponder are contained in cRspData. iRspLen indicates the number of characters in cRspData. The iDataType parameter specifies whether cReqData and cRspData are interpreted as a hex array or character string. Please note the following: the buffer for the receive data, cRspData, must be sized so that it can store all receive data. If iDataType=1, this means that the size of the buffer, cRspData, is twice as large as when iDataType=0. The length of the send data (number of characters in cReqData) must be specified in the iReqLen parameter. If iDataType=1, iReqLen is exactly twice as large as when iDataType=0. The length specification for the receive buffer (cRspData) is to be determined in the same manner. iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the return value contains the status byte of the response protocol. 284 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.4.48 FEISC-DLL programming interface FEISC_0xB1_ ISOCustAndPropCmd Function Syntax Description Function initiates data transfer with an ISO15693 transponder int FEISC_0xB1_ISOCustAndPropCmd( int iReaderHnd, UCHAR cBusAdr, UCHAR cMfr, UCHAR* cReqData, int iReqLen, UCHAR* cRspData, int* iRspLen, int iDataType ) The function initiates data transfer for multiple ISO15693 transponders located in the read field of the ISC reader. The cMfr parameter contains the manufacturer code and determines the structures of the send data, cReqData, and receive data, cRspData. The data required for the data transfer are to be stored in cReqData. The number of characters contained in cReqData must be specified in iReqLen. The data read from the ISO15693 transponder are contained in cRspData. iRspLen indicates the number of characters in cRspData. The iDataType parameter specifies whether cReqData and cRspData are interpreted as a hex array or character string. Please note the following: the buffer for the receive data, cRspData, must be sized so that it can store all receive data. If iDataType=1, this means that the size of the buffer, cRspData, is twice as large as when iDataType=0. The length of the send data (number of characters in cReqData) must be specified in the iReqLen parameter. If iDataType=1, iReqLen is exactly twice as large as when iDataType=0. The length specification for the receive buffer (cRspData) is to be determined in the same manner. iReaderHnd is the reader object handle. iReaderHnd is the reader object handle. cBusAdr is the bus address set in the reader. Cross reference Additional information on iDataType is found in chap. 8.2 Parameter passing Return value If no errors occur, the return value contains the status byte of the response protocol. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 285 FEISC-DLL programming interface 8.4.49 05/05 FEISC_0xBF_ ISOTranspCmd Function Function initiates data transfer with an ISO15693 transponder Syntax int FEISC_0xBF_ISOTranspCmd( int iReaderHnd, UCHAR cBusAdr, int iRspLength, int iCmdRspDly, UCHAR* cReqData, int iReqLen, UCHAR* cRspData, int* iRspLen, int iDataType ) Description The function initiates a data transfer for multiple ISO15693 transponders located in the read field of the ISC reader. The iRspLength parameter contains the expected length (number of bits) of receive data cRspData. The iCmdRspDly parameter contains the response delay value. The data required for the data transfer are to be stored in cReqData. The number of characters contained in cReqData must be specified in iReqLen. The data read from the ISO15693 transponder are contained in cRspData. iRspLen indicates the number of characters in cRspData. The iDataType parameter specifies whether cReqData and cRspData are interpreted as a hex array or character string. Please note the following: the buffer for the receive data, cRspData, must be dimensioned so that it can store all receive data. If iDataType=1, this means that the size of the buffer, cRspData, is twice as large as when iDataType=0. The length of the send data (number of characters in cReqData) must be specified in the iReqLen parameter. If iDataType=1, iReqLen is exactly twice as large as when iDataType=0. The length specification for the receive buffer (cRspData) is to be determined in the same manner. iReaderHnd is the reader object handle. Cross cBusAdr is the bus address set in the reader. refer- Additional information on iDataType is found in chap. 8.2 Parameter passing ence Return value 286 If no errors occur, the return value contains the status byte of the response protocol. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.5 FEISC-DLL programming interface Support for multithreading The functions in FEISC.DLL are basically thread-safe, meaning that function calls to the DLL from multiple threads are possible, provided that a communications procedure of a thread is never interrupted by a communications procedure of another thread. There are no protective measures within the DLL that prevent the displacing behavior of another thread. A protective mechanism must be implemented at the application level. A problem arises when the event handling method implemented (via the FEISC_AddEventHandler function) passes a protocol string to the application and is displayed in the protocol window. Displaying the string in the window directly from the thread can cause the program to crash (e.g. when using MFC in C++). This can be avoided through intermediate storage in a buffer and sending a Windows message to the window using the SendMessage(..) API function. This uncouples the threads. In such cases, it is preferable to select the message methods of the FEISC_AddEventHandler from the very start. However, closing the window while the protocol is being displayed can also lead to a program crash. The FEISC.DLL offers support by deliberately stopping the protocol output in the DLL in all reader objects. This is initiated by the FEISC_SetReaderPara(0, "LockProtToApp", "") function call. Then the FEISC_GetReaderPara(0, "IsProtToAppLocked", "") function is used to continue checking until all protocol outputs coming from the DLL are completed. If the function returns a 0, protocol output is not yet complete. If a 1 is returned, the window may be closed. Contrary to convention, the return values are selected in such a way that they can undergo a true or false condition test (at least for C). C++ example with MFC: The member function, OnClose, is called if the window (View) is to be closed by clicking the mouse on the close symbol. The FELogChildFrame class derived from CMDIChildWnd is the frame window of the Doc/View pair for the protocol output window. By using a cyclic call-up of a WM_CLOSE message to itself, a time loop is generated giving the FEISC.DLL time to complete the protocol output. The window may only be closed with CMDIChildWnd::OnClose() after the FEISC_GetReaderPara(0, "IsProtToAppLocked", "") function no longer returns a 0. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 287 FEISC-DLL programming interface 05/05 void FELogChildFrame::OnClose() { // Notification of the DLL that any further protocol outputs are to be locked FEISC_SetReaderPara(0, "LockProtToApp", ""); // Query of the DLL whether all protocol outputs have been completed int iBack = FEISC_GetReaderPara(0, "IsProtToAppLocked", ""); if(iBack==0) { // No, i.e. with message to this renewed call of OnClose this->SendMessage(WM_CLOSE, 0, 0); return; } } 288 // When this point is reached, all protocol outputs of the DLL are completed // There is no longer a danger of a crash when closing the Doc/View pair CMDIChildWnd::OnClose(); C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.6 8.6.1 FEISC-DLL programming interface Appendix ID FEISC error codes Error constant Value Description EISC_ERR_NEWREADER_FAILURE -4000 Error when generating a new reader object FEISC_ERR_EMPTY_LIST -4001 Reader handle list is empty (no reader objects created) FEISC_ERR_POINTER_IS_NULL -4002 Pointer to passed parameter is NULL FEISC_ERR_NO_MORE_MEM -4003 Out of memory FEISC_ERR_UNKNOWN_COMM_PORT -4004 Unknown COM port FEISC_ERR_UNSUPPORTED_FUNCTION -4005 Unsupported function FEISC_ERR_OLD_FECOM -4007 Old FECOM.DLL detected FEISC_ERR_UNKNOWN_HND -4020 The passed reader handle is unknown FEISC_ERR_HND_IS_NULL -4021 The passed reader handle is 0 FEISC_ERR_HND_IS_NEGATIVE -4022 The passed reader handle is negative FEISC_ERR_NO_HND_FOUND -4023 No reader handle was found in the reader handle list FEISC_ERR_PORTHND_IS_NEGATIVE -4024 The passed port handle is negative FEISC_ERR_HND_UNVALID -4025 Invalid port handle; the first byte (MSB) in the port handle is invalid FEISC_ERR_PROTLEN -4030 Protocol length error FEISC_ERR_CHECKSUM -4031 Checksum error FEISC_ERR_BUSY_TIMEOUT -4032 Timeout after continuous busy messages FEISC_ERR_UNKNOWN_STATUS -4033 Unknown status byte FEISC_ERR_CMD_BYTE -4035 Incorrect control byte in receive protocol FEISC_ERR_UNKNOWN_PARAMETER -4050 Passed parameter is unknown FEISC_ERR_PARAMETER_OUT_OF_RANGE -4051 Passed parameter is too large or too small FEISC_ERR_ODD_PARAMETERSTRING -4052 The passed character string contains an uneven number of characters FEISC_ERR_UNKNOWN_ERRORCODE -4053 Unknown error code C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 289 FEISC-DLL programming interface 8.6.2 05/05 List of parameter IDs Parameter ID Value range Default Units Description PortHnd1 0 ... 4294967295 0 PortHandle for communication with ID FECOM LogProt 0, 1 0 If 1, then it is possible to pass the protocol strings to the application via event signaling2 BusyTO 0 ... 60 5 S Timeout for continuous busy status of reader SendStr - - - Returns last send protocol with leading date and time RecStr - - - Returns last receive protocol with leading date and time LockProtToApp without - Support for multithreading: Locks the protocol output via event signaling in all reader objects See chap. 8.5 Support for multithreading UnlockProtToApp without - Support for multithreading: Lifts the lock for the protocol output See chap. 8.5 Support for multithreading IsProtToAppLocked without - Support for multithreading: Queries whether all reader objects have finished with the protocol output See chap. 8.5 Support for multithreading The FEISC_GetLastError function should be used in place of the following parameter IDs ErrCode - - - Returns last error code ErrStr - - - Returns text for last error 1 Please note the instructions in chap. 8.4.1 FEISC_NewReader 2 See chap. 8.3 Event signaling to applications and chap. 8.4.9 FEISC_AddEventHandler 290 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 8.6.3 FEISC-DLL programming interface List of constants for the FEISC_EVENT_INIT structure The definitions for the constants are contained in the FEISC.H, FEISC.BAS or FEISC.PAS file. Constant Value Use Description FEISC_THREAD_ID 1 uiFlag Event signaling with thread message FEISC_WND_HWND 2 uiFlag Event signaling with window message FEISC_CALLBACK 3 uiFlag Event signaling with callback function FEISC_EVENT 4 uiFlag Event signaling with Windows API event FEISC_PRT_EVENT 1 uiUse Signaling for send and receive protocols FEISC_SNDPRT_EVENT 2 uiUse Signaling for send protocols FEISC_RECPRT_EVENT 3 uiUse Signaling for receive protocols C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 291 Installing the FECOM-DLL 9 05/05 Installing the FECOM-DLL 9.1 Introduction The ID FECOM support package provides assistance in programming communications-oriented software and supports the ANSI-C, ANSI-C++ and Microsoft Visual Basic programming languages1 and basically any other language that can call C functions. The support package provides a simple function interface for the serial interface of the PC under Windows 95/98/ME/NT2 and 2000. The support package consists of the following components: File Use FECOM.DLL DLL with all functions FECOM.LIB LIB file for linking in C/C++ projects FECOMBOR.LIB LIB file for linking in C/C++ projects with the Borland compiler FECOM.H Header file for C/C++ projects FECOMDEF.H Header file with error codes for C/C++ projects (optional) FECOM.BAS Declare file for Visual Basic projects FECOM.PAS Declare file for Delphi projects 9.2 Installation The installation must be performed manually: * Copy FECOM.DLL to the application program directory or to the Windows system directory. For C/C++ programmers: * Copy FECOM.LIB to the project or LIB directory or add FECOMBOR.LIB to your project * Copy FECOM.H and (optional) FECOMDEF.H to the project or INCLUDE directory For Visual Basic programmers: * Copy FECOM.BAS to the proejct directory For Delphi programmers: * Copy FECOM.PAS to the project directory 1 As of Visual Basic 4.0 2 As of NT Version 3.51 292 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 9.3 Installing the FECOM-DLL Integration into the application program For C/C++ programmers: * All functions can be used immediately once the LIB file has been made known to the development tool. Prerequisite is, of course, that the include instruction is used to declare the DLL functions within each source file that invokes FECOM functions. For Delphi programmers: * Add "FECOM" to the USES Statement in any source file of your project that calls functions from FECOM.DLL. For Visual Basic programmers: * Add the FECOM.BAS file to your project. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 293 FECOM-DLL programming interface 10 10.1 05/05 FECOM-DLL programming interface Overview For the convenience of the programmer, the FECOM-DLL encapsulates all functions and parameters necessary for administrating one or more serial interfaces that are open simultaneously. The object-oriented internal structure (see Fig. 10-1) is intentionally realized as a function interface on the outside. This brings with it the advantage of language independence. The DLL has a self-adminstration capability that frees up the application program from having to provide intermediate storage for any values, settings or other parameters: The driver manager in FECOM.DLL keeps a list of all generated port objects and each port object administrates all settings relevant to its interface within its local memory. Fig.10-1: Internal structure of FECOM.DLL FECOM.DLL Port-Objekt Treiber-Manager FECOM_OpenPort FECOM_ClosePort - Liste der PortHandle - Versionsnummer - PortHandle - Parameter - Event-Handler FECOM_GetDLLVersion COM:1 Treiber COM:2 Treiber COM:n Port-Objekt FECOM_GetPortList FECOM_GetPortHnd Treiber - PortHandle - Parameter - Event-Handler FECOM_GetPortPara FECOM_SetPortPara FECOM_Transceive FECOM_Transmit FECOM_Receive Port-Objekt - PortHandle - Parameter - Event-Handler The DLL is automatically opened at the start of the application program if you have integrated the DLL into your project. This gives you immediate acess to all DLL functions. A port object must be created prior to the first communication procedure. This is automatically carried out by the FECOM_OpenPort function. If this function was carried out without any errors, a return value provides a handle that can be administrated by the application program. The opened port object can only be uniquely identified with this handle. However, the handle or handles do not have to be stored in the application program because the DLL driver manager internally administrates a list of all opened COM ports. This list can be called using the FECOM_GetPortList function. Using the handles that are successively received in this way, all settings that pertain to this port, including the port number, can then be read out using the FECOM_GetPortPara function. 294 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 FECOM-DLL programming interface A port object generated using FECOM_OpenPort absolutely must be removed from the memory using the FECOM_ClosePort function that also closes the COM port. If an application program is called several times, each program (instance) receives an empty port list with the FECOM_GetPortList function call. This prevents access rights from being mixed up between different program instances. However, a COM port can only be opened once since it is actually physically present only once. Each DLL function (exception: FECOM_GetDLLVersion) has a return value that is always negative in the event of an error. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 295 FECOM-DLL programming interface 10.2 05/05 Event signaling for control lines Event handling measures can be installed for the DTR, RTS, CTS, DCD and DSR control lines. They are installed separately for each control line of each open port. As soon as a control line changes its status, the appropriate signaling is carried out. In this way, an application can be notified of the event asynchronously to the program procedure. An event handling measure must be installed using the FECOM_AddEventHandler function. Three different signaling methods are available: message to calling process, message to a window or use of a callback function. An installed event handling measure must be removed using the FECOM_DelEventHandler function. The FECOM_EVENT_INIT structure contains the parameters required for signaling: typedef struct _FECOM_EVENT_INIT { UINT uiUse; // Defines an event (e.g. FECOM_CTS_EVENT) UINT uiMsg; // Message code for dwThreadID and hwndWnd (e.g. WM_USER_xyz) UINT uiFlag; // Specifies the use of the union (e.g. FECOM_WND_HWND) union { DWORD dwThreadID; // For thread ID HWND hwndWnd; // For window handle void (*cbFct)(int, int); // For callback function HANDLE hEvent; // For event handle }Method1; } FECOM_EVENT_INIT; The core element of the structure is the union, which contains either the ID of a process, the handle of a window, a function pointer or the handle of a Windows API event. The uiFlag parameter is used to select the signaling form. The identifier for the control line to which the handling method is to be assigned is stored in the uiUse parameter. For the message methods, the message code must be stored in uiMsg. Several handling methods can be installed for a single control line. But each dwThreadID, hwndWnd , cbFct or hEvent can only be used once per control line and port. The state of each control line can be queried using the FECOM_DoPortCmd function independent of event signaling. 1 The naming of the union with method is for C programmers only. C++ programmers access the union directly via the structure. 296 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 10.3 FECOM-DLL programming interface List of functions Note UCHAR is an abbreviation (#define) for "unsigned char". In Visual Basic and Delphi, the compatible data type is the byte (see contents of FECOM.BAS/FECOM.PAS). * int FECOM_OpenPort( char* cPortNr ) * int FECOM_ClosePort( int iPortHnd ) * int FECOM_GetPortList( int iNext ) * void FECOM_GetDLLVersion( char* cVersion ) * int FECOM_GetErrorText( int iErrorCode, char* cErrorText ) * int FECOM_GetLastError( int iPortHnd , int* iErrorCode, char* cErrorText ) * int FECOM_GetPortHnd( char* cPortNr ) * int FECOM_GetPortPara( int iPortHnd, char* cPara, char* cValue ) * int FECOM_SetPortPara( int iPortHnd, char* cPara, char* cValue ) * int FECOM_DoPortCmd( int iPortHnd, char* cCmd, char* cValue ) * int FECOM_AddEventHandler( int iPortHnd, FECOM_EVENT_INIT* pInit ) * int FECOM_DelEventHandler( int iPortHnd, FECOM_EVENT_INIT* pInit ) * int FECOM_Transceive( int iPortHnd, UCHAR* cSendProt, int iSendLen, UCHAR* cRecProt, int iRecLen ) * int FECOM_Transmit( int iPortHnd, UCHAR* cSendProt, int iSendLen ) * int FECOM_Receive( int iPortHnd, UCHAR* cRecProt, int iRecLen ) C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 297 FECOM-DLL programming interface 10.3.1 05/05 FECOM_OpenPort Function Syntax Description Opens a serial interface for communication with a MOBY D reader. int FECOM_OpenPort( char* cPortNr ) The function opens a serial interface using default parameters and generates an internal interface structure for administrating the parameters. The FECOM_SetPortPara function can be used to subsequently change these parameters. These parameters can be read out using FECOM_GetPortPara. The returned iPortHnd handle identifies the interface on the outside. cPortNr is a null-terminated character string with the address of the serial interface (e.g. "1" for COM:1). Values ranging from "1" to "256" are acceptable. The serial interface opened with FECOM_OpenPort must (!) be closed with the FECOM_ClosePort function. Otherwise, the memory reserved by the DLL will not be released. Return value If the serial interface could be opened without any errors, a handle (>0) is returned. In the event of an error, the function returns a value less than zero. The error codes are listed in chap. 10.4.1. Standard parameters The default parameters of the serial interface are: Example Baud: 9600; Frame: 8E1; Timeout: 600ms ... #include "fecom.h" ... ... char cPortNr[4]; itoa( 1, cPortNr, 10 ); // Convert Integer to Char ... int handle = FECOM_OpenPort( cPortNr ); // COM:1 is opened if( handle < 0 ) { // Code in the event of an error } else { // Communication via COM:1; if successful, the receive data are located in RecBut } 298 // Code for communication or other C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 10.3.2 FECOM-DLL programming interface FECOM_ClosePort Function Syntax Closes a serial interface. int FECOM_ClosePort( int iPortHnd ) Description The function closes the serial interface specified by the iPortHnd parameter and releases the reserved memory. Return value The return value is 0 if the serial interface was closed. In the event of an error, the function returns a value less than zero. The error codes are listed in chap. 10.4.1. Example ... #include "fecom.h" ... ... int Err; char cPortNr[4]; ... itoa( 1, cPortNr, 10 ); // Convert Integer to Char int handle = FECOM_OpenPort( cPortNr ); // COM:1 is opened if( handle < 0 ) { // Code in the event of an error } ... ... ... if( handle > 0 ) { Err = FECOM_ClosePort( handle ); ... } ... ... C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 299 FECOM-DLL programming interface 10.3.3 05/05 FECOM_GetPortList Function Syntax Determines the first or the next PortHandle from the internal list of opened serial interfaces depending on the iNext parameter. int FECOM_GetPortList( int iNext ) Description The function returns a PortHandle from the internal list of PortHandles. If a value of 0 is passed with iNext, the first entry in the list is returned. If a PortHandle from the list is passed with iNext, the entry following the PortHandle is determined and returned. Thus, by successively entering the return value, the list can be worked through from front to back and all entries can be called up. Return value If an entry is found, the PortHandle is provided in the return value. A value of 0 is returned when the end of the internal list is reached, i.e. if the passed PortHandle has no successor. If no port is open, FECOM_ERR_EMPTY_LIST is returned. In the event of an error, the function returns a value less than zero. The error codes are listed in chap. 10.4.1. Example Tip #include "fecom.h" ... // Function determines the settings of all open COM ports void COMList( void ) { int iNextHnd = FECOM_GetPortList( 0 ); // Determine the first handle while( iNextHnd > 0 ) { // E.g. code for reading the COM parameters using FECOM_GetPortPara(...) ... iNextHnd = FECOM_GetPortList( iNextHnd ); // Determine the next handle } ... // E.g. code for displaying the list ... } It is convenient to use a loop, similar to that in the example above, for closing all opened COM ports. However, it must be considered that the successor of a closed port can no longer be determined. The following code fragment shows how to delete all opened ports in a loop: ... iNextHnd = FECOM_GetPortList( 0 ); // Determine the first handle while( iNextHnd > 0 ) { iCloseHnd = iNextHnd; iNextHnd = FECOM_GetPortList( iNextHnd ); // Determine the next handle iError = FECOM_ClosePort( iCloseHnd ); // Now close the port } ... 300 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 10.3.4 FECOM-DLL programming interface FECOM_GetDLLVersion Determines the DLL version number. Function Syntax void FECOM_GetDLLVersion( char* cVersion ) Description The function returns the DLL version number. cVersion is an empty, null-terminated character string for retuning a version number. The character string should be able to hold at least 256 characters. In the current version, the character string is filled with "02.00.01". Newer versions could be designed to provide additional information. Return value ... #include "fecom.h" ... ... char cVersion[256]; FECOM_GetDLLVersion( cVersion ) // Code for displaying version number ... ... Example 10.3.5 without FECOM_GetErrorText Function Syntax Description Determines the error text for the error code int FECOM_GetErrorText( int iErrorCode, char* cErrorText ) The function passes the English error text corresponding to iErrorCode in cErrorText. The buffer for cErrorText should be able to hold at least 256 characters. Return value Example The function returns a value of zero if there are no errors and a value less than zero if errors did occur. The error codes are listed in chap. 10.4.1. ... #include "fecom.h" #include "fecomdef.h" ... ... char cErrorText [256]; ... int iBack = FECOM_GetErrorText(FECOM_ERR_EMPTY_LIST, cErrorText // Code for displaying the text ... ... C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 ) 301 FECOM-DLL programming interface 10.3.6 05/05 FECOM_GetLastError Function Syntax Description Determines the last error code and passes the error text. int FECOM_GetLastError( int iPortHnd , int* iErrorCode, char* cErrorText ) The function returns the last error code of the interface selected with iPortHnd in iErrorCode and passes the matching English error text in cErrorText. The buffer for cErrorText should be able to hold at least 256 characters. Return value Example The function returns a value of zero if there are no errors and a value less than zero if errors did occur. The error codes are listed in chap. 10.4.1. ... #include "fecom.h" ... ... char cErrorText [256]; int iErrorCode = 0; ... int iBack = FECOM_GetLastError( iPortHnd, &iErrorCode, cErrorText // Code for displaying the text ... ... 302 ) C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 10.3.7 FECOM-DLL programming interface FECOM_GetPortHnd Function Syntax Description Determines the port handle of a serial interface opened with FECOM.DLL. int FECOM_GetPortHnd( char* cPortNr ) In general, the number of the COM port is set in the program, while the handle is used internally in the program. This function is a simple method for determining the PortHandle of a serial interface that was previously opened. This function is an "inverse function" of FECOM_GetPortPara( handle, "PortNr", Value ). It determines the number of the COM port associated with the PortHandle. cPortNr is a null-terminated character string with the address of the serial interface (e.g. "1" for COM:1). Values ranging from "1" to "256" are permissible. Return value Example If the serial interface to the passed cPortNr is found, the PortHandle (>0) is returned. If the port number that is being searched for is not found in the port list, a value of 0 is returned. In the event of an error, the function returns a value less than zero. The error codes are listed in chap. 10.4.1. ... #include "fecom.h" ... char cPortNr[4]; ... itoa( 1, cPortNr, 10 ); // Convert Integer to Char int handle = FECOM_OpenPort( cPortNr ); if( handle < 0 ) { // Code in the event of an error } else { // Handle is determined again using the PortNr handle = FECOM_GetPortHnd( cPortNr ); } C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 303 FECOM-DLL programming interface 10.3.8 05/05 FECOM_GetPortPara Function Syntax Description Determines a parameter of the serial interface specified by iPortHnd. int FECOM_GetPortPara( int iPortHnd, char* cPara, char* cValue ) The function determines the current value of a parameter. cPara is a null-terminated character string containing the parameter ID cValue is an empty, null-terminated character string for returning the parameter value. The character string should be able to hold at least 128 characters. Parameter IDs The parameter IDs are: Baud, Frame, Timeout, ErrCode, ErrStr, TxTimeControl, TxDelayTime, CharTimeoutMpy, PortNr. The latter returns the physical number of the serial interface. Return value The function returns a value of zero if there are no errors and a value less than zero if errors did occur. The error codes are listed in chap. 10.4.1. Cross reference Additional information is found in chap. 10.4.2 List of parameter IDs. Example 304 ... #include "fecom.h" ... ... char cValue[128]; ... if( !FECOM_GetPortPara( handle, "Baud", cValue ) ) { // Code for displaying the COM parameter ... } ... ... } C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 10.3.9 FECOM-DLL programming interface FECOM_SetPortPara Function Syntax Description Sets a parameter of a serial interface to a new value. int FECOM_SetPortPara( int iPortHnd, char* cPara, char* cValue ) The function passes a new parameter to the serial interface specified by iPortHnd. This causes the affected serial interface to be reinitialized and the send and receive buffers to be cleared. cPara is a null-terminated character string containing the parameter ID. cValue is a null-terminated character string containing the new parameter value. Parameter ID Value range Default value Units Baud 300...115200 9600 bit/s Frame 7N1, 7E1, 7O1, 8E1 7N2, 7E2, 7O2, 8N1, 8E1, 8O1 Timeout 0...99999 600 TxTimeControl 0, 1 1 TxDelayTime 0...999 5 CharTimeoutMpy 1...10 1 ms ms Return value If it was possible to initialize the serial interface with the new parameter value without any errors, a value of 0 is returned. In the event of an error, the function returns a value less than zero. The error codes are listed in chap. 10.4.1. Cross reference Additional information is found in chap. 10.4.2 List of parameter IDs. Example ... #include "fecom.h" ... ... int Err; char cPortNr[4]; ... itoa( 1, cPortNr, 10 ); // Conver Integer to Char int handle = FECOM_OpenPort( cPortNr ); // COM:1 is opened if( handle > 0 ) { Err = FECOM_SetPortPara( handle, "Baud", "4800" ); ... } ... ... C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 305 FECOM-DLL programming interface 10.3.10 05/05 FECOM_DoPortCmd Function Syntax Description Carries out a command at a serial interface. int FECOM_DoPortCmd( int iPortHnd, char* cCmd, char* cValue ) The function carries out a command at the serial interface specified by iPortHnd. cCmd is a null-terminated character string containing the command ID. cValue is a null-terminated character string that contains the new parameter value or is used for the return value (e.g. status of a control line). If a return value is expected in cValue, the buffer should be able to hold at least 16 characters. Return value Example 1 Example 2l 306 Command Function cValue FlushInQ Input buffer is flushed Unused FlushOutQ Output buffer is flushed Unused SetDTR Sets the DTR line "ON" or "OFF" "ON" or "OFF" SetRTS Sets the RTS line "ON" or "OFF" "ON" or "OFF" GetDTR Determines the DTR status Status {"ON", "OFF"} GetRTS Determines the RTS status Status {"ON", "OFF"} GetCTS Determines the CTS status Status {"ON", "OFF"} GetDCD Determines the DCD status Status {"ON", "OFF"} GetDSR Determines the DSR status Status {"ON", "OFF"} If the command is carried out without any errors, a value of 0 is returned. In the event of an error, the function returns a value less than zero. #include "fecom.h" ... ... int Err; char cPortNr[4]; ... itoa( 1, cPortNr, 10 ); // Convert Integer to Char int handle = FECOM_OpenPort( cPortNr ); if( handle > 0 ) { Err = FECOM_DoPortCmd( handle, "FlushInQ", "" ); ... } ... #include "fecom.h" ... int Err; char cValue[16]; ... Err = FECOM_DoPortCmd( handle, "GetCTS", cValue ); if( strcmp(cValue, NONi)==0) // Comparison of character strings { // CTS is set } ... C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 10.3.11 FECOM-DLL programming interface FECOM_AddEventHandler Function Syntax Description An event handling measure is installed. int FECOM_AddEventHandler( int iPortHnd, FECOM_EVENT_INIT* pInit ) The function installs one of four possible event handling methods. This method is applied when the state of the control line for which the method was installed changes. This makes an asynchronous reaction to events in an application program possible. The event handling method is only set up for the interfaced identified by iPortHnd. This means that this installation must be carried out for each opened interface for which it is required 1st method: Message to thread (not for Visual Basic) This method is used for exchanging messages between threads1. Using the GetCurrentThreadID() API function, the thread determines the thread identifier and passes it as the dwThreadID parameter in the FECOM_EVENT_INIT structure. The thread must provide a message handling function for receiving the message that was sent by FECOM using the PostThreadMessage(..) API function. The message code can be selected as required. The FECOM_EVENT_INIT is filled out as follow: uiUse = FECOM_xyz_EVENT uiMsg = WM_USER + ... // See Defines FECOM.H // Freely selectable but above WM_USER2 uiFlag = FECOM_THREAD_ID dwThreadID = GetCurrentThreadID() The first parameter (WPARAM) passes the port number to the MessageMap function in the application; the second parameter (LPARAM) passes the state of the control line (0 = not set; 1 = set). 2nd method: Message to window (not for Visual Basic) This method is used if a message is to be sent directly to a window. The handle of the respective window is determined using the GetWindow(..) API function 3 and is passed as the hwndWnd parameter in the FECOM_EVENT_INIT structure. The window must provide a message handling function for receiving the message that was sent by FECOM using the API-Function PostMessage(..). The message code can be selected as required. The FECOM_EVENT_INIT is filled out as follow: uiUse = FECOM_xyz_EVENT uiMsg = WM_USER + ... uiFlag = FECOM_WND_HWND // See Defines FECOM.H // Freely selectable, but above 2 WM_USER hwndWnd = GetWindow(...) The first parameter (WPARAM) passes the port number to the MessageMap function in the application; the second parameter (LPARAM) passes the state of the control line (0 = not set; 1 = set). 1 Parallel path of execution independent of application program. The application program is also a thread. 2 See Windows documentation for Platform SDK 3 When using the CWnd MFC class, it is also possible to use the GetSafeHwnd(). C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 307 FECOM-DLL programming interface 05/05 3rd method: Calling a callback function The callback method installs a function pointer for an event. This function must be declared as follows: void IhrFunctionsName(int, int); If a change in state takes place on the respective control line, the function is called by FECOM. The contents of the function can be defined as required. However, the passed parameters are fixed: the port number is passed in the 1st parameter (int) and the state of the control line is passed in the 2nd parameter (int) (0 = not set; 1 = set). The FECOM_EVENT_INIT is filled out as follow: uiUse = FECOM_xyz_EVENT uiMsg wird nicht bentigt uiFlag = FECOM_CALLBACK // See Defines FECOM.H cbFct = (void*)&IhrFunctionsName1 4th method: Setting an event The event method is used to install an event handle for an event. If a change in state takes place at the respective control line, the event is set by FECOM using the SetEvent(...) API function. The application side waits for the event using the WaitForSingleObject(...) API function. Since it is not possible to determine how the state of the respective control line has changed, the state is queried using the FECOM_DoPortCmd function. The set event must be reset by the application program using the ResetEvent(...) API function. The FECOM_EVENT_INIT is filled out as follow: uiUse = FECOM_xyz_EVENT uiMsg wird nicht bentigt uiFlag = FECOM_EVENT hEvent = CreateEvent(...); // See Defines FECOM.H An installed event handling method must be deleted using the FECOM_DelEventHandler function All event handling methods installed for an interface are lost when the interface is closed . Cross reference Additional information is found in chap. 10.2 Event signaling for control lines, chap. 10.3.12 FECOM_DelEventHandler, chap. 10.4.3 List of constants for the FECOM_EVENT_INIT structure. Return value 1 The function returns a value of zero if there are no errors and a value less than zero if errors did occur. The error codes are listed in chap. 10.4.1. The function has the prototype: void IhrFunctionsName(int, int) 308 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 10.3.12 FECOM-DLL programming interface FECOM_DelEventHandler Function Syntax Description An event handling measure is removed. int FECOM_DelEventHandler( int iPortHnd, FECOM_EVENT_INIT* pInit ) The function removes an event handling measure previous installed using FECOM_AddEventHandler. The event handling measure to be removed is specified in detail in the FECOM_EVENT_INIT structure. Removing the 1st method: Message to thread (not for Visual Basic) The FECOM_EVENT_INIT is filled out as follow: uiUse = FECOM_xyz_EVENT // See Defines in FECOM.H uiMsg wird nicht benotigt uiFlag = FECOM_THREAD_ID dwThreadID = GetCurrentThreadID() Removing the 2nd method: Message to window (not for Visual Basic) The FECOM_EVENT_INIT is filled out as follow: uiUse = FECOM_xyz_EVENT // See Defines in FECOM.H uiMsg wird nicht benotigt uiFlag = FECOM_WND_HWND hwndWnd = GetWindow(...) Removing the 3rd method: Call of a callback function The FECOM_EVENT_INIT is filled out as follow: uiUse = FECOM_xyz_EVENT // See Defines FECOM.H uiMsg wird nicht benotigt uiFlag = FECOM_CALLBACK cbFct = (void*)&IhrFunctionsName Removing the 4th method: Setting an event The FECOM_EVENT_INIT is filled out as follow: uiUse = FECOM_xyz_EVENT // See Defines FECOM.H uiMsg wird nicht benotigt uiFlag = FECOM_EVENT hEvent = IhrEventHandle; Querverweis Additional information is found in chap. 10.2 Event signaling for control lines, chap. 10.3.11 FECOM_AddEventHandler, chap. 10.4.3 List of constants for the FECOM_EVENT_INIT structure. Return value The function returns a value of zero if there are no errors and a value less than zero if errors did occur. The error codes are listed in chap. 10.4.1. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 309 FECOM-DLL programming interface 10.3.13 05/05 FECOM_Transceive Function Syntax Description Function for communicating (transmitting and receiving) via the port. int FECOM_Transceive( int iPortHnd, UCHAR* cSendProt, int iSendLen, UCHAR* cRecProt, int iRecLen ) The function transmits the data contained in cSendProt to a connected device via the serial interface and stores the received data in cRecProt. The number of characters must be passed in the iSendLen parameter. The maximum length of the cRecProt buffer must be specified in the iRecLen parameter. If the number of received characters exceeds the value passed in iRecLen, the function is terminated with an error. Characters received prior to termination are stored in cRecProt. The send and receive buffers are cleared prior to communication. Using the TxDelayTime parameter,1 the send protocol can be delayed until the TxDelayTime time period since the last receive protocol has expired. Return value Example The function returns the length of the receive protocol if there are no errors and a value less than zero if errors did occur. The error codes are listed in chap. 10.4.1. #include "fecom.h" ... int iSendLen; int iRecProtLen; char cPortNr[4]; ... itoa( 1, cPortNr, 10 ); UCHAR cSendBuf[256]; the send data UCHAR cRecBuf[256]; the receive data ... int handle = FECOM_OpenPort( // Convert Integer to Char // Buffer size may have to be matched to // Buffer size may have to be matched to cPortNr ); // COM:1 is opened if( handle < 0 ) { // Code in the event of an error } else { // For example, the send protocol is determined using a function and stored in the SendBuf iSendLen = GetSendProtocol( cSendBuf ); // Communication via COM:1; if successful, the receive data are located in RecBuf iRecProtLen = FECOM_Transceive( handle, cSendBuf, iSendLen, cRecBuf, 256 ); if( cRecProtLen < 0 ) { // Communication error } } 1 See chap. 10.3.9 FECOM_SetPortPara 310 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 10.3.14 FECOM-DLL programming interface FECOM_Transmit Function Syntax Description Function for outputting a protocol via the port. int FECOM_Transmit( int iPortHnd, UCHAR* cSendProt, int iSendLen ) The function sends the data contained in cSendProt to a connected device via the serial interface and does not wait for a response protocol. The number of characters must be passed in the iSendLen parameter. The send buffer is cleared before the protocol is sent. Characters still waiting to be output are lost as a consequence. The function only returns after all characters have been output via the interface. Return value Example The function returns a value of 0 if there are no errors and a value less than zero if errors did occur. The error codes are listed in chap. 10.4.1. ... #include "fecom.h" ... ... int iErr; int iSendLen; char cPortNr[4]; ... itoa( 1, cPortNr, 10 ); // Convert Integer to Char UCHAR cSendBuf[256]; // Buffer size may have to be matched to the send data ... int handle = FECOM_OpenPort( cPortNr ); // COM:1 is opened if( handle < 0 ) { // Code in the event of an error } else { // For example, the send protocol is determined using a function and stored in the SendBuf iSendLen = GetSendProtocol( cSendBuf ); // Communication via COM:1 iErr = FECOM_Transmit( handle, cSendBuf, iSendLen ); if( iErr < 0 ) { // Communication error } } C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 311 FECOM-DLL programming interface 10.3.15 05/05 FECOM_Receive Function Syntax Description Function for receiving a protocol via the port. int FECOM_Receive( int iPortHnd, UCHAR* cRecProt, int iRecLen ) The function expects to receive data over the serial interface within the time period Timeout (see chap. 10.4.2 List of parameter IDs), reads them out and stores them in the cRecProt receive buffer. The maximum length of the cRecProt buffer must be specified in the iRecLen parameter. If the number of received characters exceeds the value passed in iRecLen, the function is terminated with an error. Characters received prior to termination are stored in cRecProt. The function does not delete the receive buffer. This ensures that characters that arrived previously are not lost. Return value Example The function returns the length of the receive protocol if there are no errors and a value less than zero if errors did occur. The error codes are listed in chap. 10.4.1. ... #include "fecom.h" #include "fecomdef.h" ... ... int iRecProtLen; char cPortNr[4]; ... itoa( 1, cPortNr, 10 ); // Convert Integer to Char UCHAR cRecBuf[256]; // Buffer size may have to be matched to the receive data ... int handle = FECOM_OpenPort( cPortNr ); // COM:1 is opened if( handle < 0 ) { // Code in the event of an error } else { // Communication via COM:1; if successful, the receive data are located in RecBut } 312 iRecProtLen = FECOM_Receive( handle, cRecBuf, 256 ); if( iRecProtLen < 0 ) { // Communication erorr or buffer overflow if( iRecProtLen == FECOM_ERR_OVL_RECBUF ) { // Buffer overflow: data in RecBuf are valid receive data ... } } C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 10.4 10.4.1 FECOM-DLL programming interface Appendix ID FECOM error codes Error constant Value Description FECOM_ERR_NEWPORT_FAILURE -1000 Error while generating a new port object. May be caused by memory shortage. FECOM_ERR_EMPTY_LIST -1001 Port handle list is empty (no port object generated) FECOM_ERR_POINTER_IS_NULL -1002 A pointer is null and therefore invalid FECOM_ERR_NO_MEMORY -1003 Out of memory FECOM_ERR_UNSUPPORTED_HARDWARE -1004 Unsupported hardware. This error is generated when the hardware in use does not support pointers with a high resolution FECOM_ERR_NO_PORT -1010 Port could not be opened FECOM_ERR_NO_CONNECT -1011 Timeout when opening the port. Port was not opened. FECOM_ERR_LINK_ID -1012 The cPortNr parameter of the FECOM-OpenPort function is defective FECOM_ERR_PORT_IS_OPEN -1013 The port is already open FECOM_ERR_UNKNOWN_HND -1020 The passed port handle is unknown FECOM_ERR_HND_IS_NULL -1021 The passed port handle is 0 FECOM_ERR_HND_IS_NEGATIVE -1022 The passed port handle is negative FECOM_ERR_NO_HND_FOUND -1023 No port handle was found in the port handle list FECOM_ERR_TIMEOUT -1030 Timeout when reading the port FECOM_ERR_NO_SENDPROTOCOL -1031 No send protocol passed FECOM_ERR_RECEIVE_PROCESS -1032 Error in receive process FECOM_ERR_INIT_COMM_PROCESS -1033 Error in initializing the port FECOM_ERR_FLUSH_INPUT_BUFFER -1034 Error flushing receive buffer FECOM_ERR_FLUSH_OUTPUT_BUFFER -1035 Error flushing send buffer FECOM_ERR_CHANGE_PORT_PARA -1036 Error when changing a port parameter FECOM_ERR_TRANSMIT_PROCESS -1037 Error in send process FECOM_ERR_UNKNOWN_PARAMETER -1050 Passed parameter is unknown C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 313 FECOM-DLL programming interface Error constant 05/05 Value Description FECOM_ERR_PARAMETER_OUT_OF_RANGE -1051 Passed parameter is too large or too small FECOM_ERR_ODD_PARAMETERSTRING -1052 An unsupported option was called via the passed parameter FECOM_ERR_PORTNR_OUT_OF_RANGE -1053 The passed port number is outside of the valid range of 1..256 FECOM_ERR_UNKNOWN_ERRORCODE -1054 Unknown error code FECOM_ERR_OVL_RECBUF -1070 Receive buffer overflow 314 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 10.4.2 FECOM-DLL programming interface List of parameter IDs Parameter ID Value range Default Baud 300...115200 9600 Frame 7N1, 7E1, 7O1, 8E1 Units bit/s Description Interface baud rate Character frame (data bits, parity, stop bits) 7N2, 7E2, 7O2, 8N1, 8E1, 8O1 Timeout 0...99999 600 ms Maximum waiting time for receive protocol PortNr 1...256 0 COM port number TxTimeControl 0, 1 1 If set (1), the output of the next send protocol is delayed until at least TxDelayTime (ms) has elapsed since the last receive protocol. If not set (0), the send protocol is always output as fast as possible. TxDelayTime 0...999 5 CharTimeoutMpy 1...10 1 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 ms Minimum time period between the last receive protocol and the next send protocol. Only taken into account if TxTimeControl=1 Since V2.00.00, the character timeout is calculated internally. The character timeout determines how long after receipt of the last character the receive process is ended. Some PCs may experience frequent protocol length errors because the waiting time is too short. In this case, this parameter can be used to multiply the waiting time. 315 FECOM-DLL programming interface 05/05 The FECOM_GetLastError function should be used in place of the following parameter IDs ErrCode - - - Returns last error code ErrStr - - - Returns text for last error CharTimeout 0...99999 20 ms Maximum waiting time for next character in the receive protocol SleepTime 0...999 0 ms Waiting time after the send protocol and before reading in the receive protocol1 PortOpenTimeout 0...99999 5000 ms Maximum waiting time for opening a COM port Obsolete parameters 1 See chap. 10.3.13 FECOM_Transceive 316 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 10.4.3 FECOM-DLL programming interface List of constants for the FECOM_EVENT_INIT structure The definitions of the constants are contained in the FECOM.H, FECOM.BAS or FECOM.PAS file. Constant Value Use Description FECOM_THREAD_ID 1 uiFlag Event signaling with thread message FECOM_WND_HWND 2 uiFlag Event signaling with window message FECOM_CALLBACK 3 uiFlag Event signaling with callback function FECOM_EVENT 4 uiFlag Event signaling with Windows API event FECOM_CTS_EVENT 1 uiUse Signaling for CTS change FECOM_DCD_EVENT 2 uiUse Signaling for DCD change FECOM_DSR_EVENT 3 uiUse Signaling for DSR change FECOM_RTS_EVENT 4 uiUse Signaling for RTS change FECOM_DTR_EVENT 5 uiUse Signaling for DTR change C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 317 Class library overview 11 11.1 05/05 Class library overview Introduction The C++ class library, ID FEDM, is another component provided by MOBY D designed to simplify the development of application programs for our SLG D1x reader. The C++ class library, ID FEDM, support all MOBY D reader families and can be considered to be an additional protocol layer above the MOBY D function library. The C++ class library, ID FEDM, introduces an organizational principle for all MOBY D reader families that makes it possible to generate similar program structures for all MOBY D readers, independent of the readers actually in use. This organizational principle, which was also implemented in the MOBY D function libraries in the form of similar function interfaces, is extended here to include the data container and the control of the data flow and protocol traffic. In spite of the consistent organizational principle, the storable data of the readers and transponders are still handled at a very low level. This means that the programmer is confronted with reader parameters in bits and bytes and that transponder data are only provided as unorganized data quantities. On the one hand, this has the advantage that the programmer is given universal access. On the other hand, multiple operations must be carried out sequentially even if, for example, only a few data are to be written to a transponder. Further simplification by abstracting data flow and actions is reserved for an overlying module layer. For the first time, the C++ class library, ID FEDM, provides a simple method of serializing data1. This makes it possible, for example, to store a complete reader configuration in a file, reload it later and transer it to the reader. The documentation for the C++ class library is presented in two parts: this document only describes the base classes and the shared characteristics of the specialized reader classes. Detailed documentation of the reader classes is contained in separate handbooks. 1 ForMicrosoft Visual C++ only at this time.Currently being developed for the Borland C++ Builder 318 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 11.1.1 Class library overview Overview of all MOBY D components The C++ class library, ID FEDM, builds on other MOBY D components. The overview below shows what other components are required for each reader family and the provided interface. The function libraries are all structured in the form of dynamic link libraries (DLL). FEDM class library FEDM_Base FEDM_DataBase FEDM_ISCReader Function library FEISC FECOM Application level WindowsDrivers Kernel level RS 232 RS 422 The layering of libraries as seen in the overview reflects the degree of specialization in each layer. The lowest (physical) layer with the kernel drivers is responsible for protocol transfer at the hardware level. The overlying protocol transfer layer with FECOM.DLL provides an application with its first function interface to the physical interfaces. The MOBY D reader-specific protocol layer (FEISC.DLL) is located in yet another overlying layer. This layer allows a simple communication with MOBY D readers. In complex applications, organizational structures must be generated for data transferred using the protocols. This is the task of the C++ class library, ID FEDM. It is located one layer above the MOBY D reader-specific protocol layer. It must provide organizational structures for all MOBY D reader families. This goal is realized using base classes, the specialized reader classes and the use of objectoriented methods, such as overloaded functions, abstract base class (FEDM_DataBase) and the use of the Standard Template Library (STL). C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 319 Class library overview 05/05 The C++ class library, ID FEDM, does not have to be integrated in the application in its complete form. Depending on the MOBY D reader family being used, only the specialized reader class, the base classes and the global functions and constants are used. However, the underlying function libraries for the reader class being used are absolutely necessary for the functionality of the reader class within the C++ class library, ID FEDM. 11.1.2 Supported operating systems and development environments * Microsoft Visual C++ under Windows 9x/ME/NT4/2000 * Borland C++Builder under Windows 9x/ME/NT4/2000 320 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 11.2 Class library overview Installation Installation is very simple: Copy all files of the C++ class library to a directory and add this directory to your development environment as an additional INCLUDE directory. The following files are part of the scope of delivery: File Description FEDM.h Contains includes, constants and macros FEDM_Base.h/.cpp Base class FEDM_DataBase.h/.cpp Abstract base class derived from FEDM_Base FEDM_Functions.h/.cpp Global functions FEDM_xyzReader.h/.cpp Specialized reader class derived from FEDM_DataBase (see chap. 15) Any further files if present C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 321 Class library overview 11.3 05/05 Class overview Depending on the requirements of the given situation, the user either needs a base class on which the special reader class can be built, or the existing reader class is used as a component with a defined interface - as a black box object, so to speak. A brief overview of both application types is provided in the following diagrams. 11.3.1 Class structure diagram The structure diagram shows the static structure of the C++ class library. Class tree, FEDM-specific data types and auxiliary classes are shown. The classes shown in the diagram contain only a few important attributes and functions. Static class structure ID FEDM Base class FEDM_Base #SetData() #GetData() Abstract base class Reader class Data type Datentyp FEDM_BYTE_ARRAY FEDM_DataBase +EEData : FEDM_BYTE_ARRAY +RAMData : FEDM_BYTE_ARRAY +TmpData : FEDM_BYTE_ARRAY +MjpData : FEDM_BYTE_ARRAY +SN_Mem : FEDM_BYTE_ARRAY +ID_Mem : FEDM_BYTE_ARRAY +AC_Mem : FEDM_BYTE_ARRAY +SecMem : FEDM_BYTE_ARRAY +ConfMem : FEDM_BYTE_ARRAY +DateMem : FEDM_BYTE_ARRAY +SetData() +GetData() +SendProtocol() Datentyp FEDM_ISCTAB_ARRAY FEDM_ISCReader -m_Table : FEDM_ISCTAB_ARRAY +SendProtocol() +SetPortHnd() +GetPortHnd() +GetErrorText() +GetLastError() +GetLastStatus() Auxiliary class 322 Hilfsklasse FEDM_ISCTable C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 11.3.2 Class library overview Component diagram The component diagram shows the C++ class library, ID FEDM, from a different angle. Only the most important functions are displayed. Attributes are not shown. A detailed and complete component diagram is contained in the documentation of each reader class. Most member functions form a type-independent interface that is consistent for all reader classes. This makes it possible to operate different reader families in one application with the same algorithm. Reader class SendProtocol SetReaderHnd Function library (e.g.FEISC) GetReaderHnd SetPortHnd GetPortHnd SetBusAddress GetBusAddress Serialize Container Container (e.g. RAMData) (e.g. EEData) SetData GetData SetTableData GetTableData Container Table (e.g. TmpData) (e.g. ISCTable) FindTableIndex GetTableSize C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 323 Basic features of the class library 12 05/05 Basic features of the class library 12.1 Internal structure The function of a reader class - to which we can limit our view when using the class library - is clearly illustrated in the following sketch: the vertical axis shows the direction in which data flows as it is moved by the (overloaded) GetData and SetData functions, the GetTableData1 function and SetTableData function. In addition, the serialize function enables data flow between an instance of the reader class and a file. GetData SetData GetTableDat SetTableData SendProtoco Function library (e.g. FEISC) EEData ISCTable TmpData Reader class (e.g. FEDM_ISCReader) Serialize The horizontal axis shows the control flow triggered by the SendProtocol function, which is the only communication function. Before the send protocol is output, the function automatically retrieves all required data from the integrated data containers and also stores the received protocol data back to those locations. Thus, before SendProtocol is called, the application program must write all data required for this protocol to the correct location in the respective data containers. Similarly, the receive data are also stored in specific location in the respective data containers. 1 GetTabelData and SetTableData is not implemented in all reader classes because those classes to not have an integrated table. 324 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Basic features of the class library The keys to the protocol data are so-called access constants. Each reader parameter and all transponder data have their own access constants. From several dozen to a hundred constants can be defined for each reader class. Their structure is identical for all reader classes and is particularly important. It is described in detail in chap. 12.3 Access constants. Since the access constants are of fundamental importance for the entire function of the reader class, they are closely described in the documentation for the various reader classes in that context. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 325 Basic features of the class library 12.2 05/05 Data containers Data containers are responsible for the structured administration of all parameters or transponder data. All data containers are internally organized as byte arrays in Motorola format (Big Endian). This format corresponds to every MOBY D reader. Translation of the format into the Intel format required for Intel-based PCs (Little Endian) is accomplished by the overloaded access functions. The byte arrays are organized in blocks of 16 byte or 4 byte each. This organization also matches that of the reader or transponder. A total of 11 data containers are integrated in the abstract base class, FEDM_DataBase. All have size 0. The size of the required data containers is determined by the derived reader class. Unused data containers remain at size 0. Data container Description EEData For configuration parameters of the reader RAMData For temp. configuration parameters of the reader TmpData For general temp. protocol data MjpData For temp. protocol data of a multijob poll SN_Mem For transponder UID ID_Mem For ID numbers of the transponder AC_Mem For account data of the transponder PubMem For public data blocks of the transponder SecMem For secret data blocks of the transponder ConfMem For configuration data of the transponder DateMem For date data of the transponder Access to the data is primarily possible using the overloaded functions SetData and GetData. With each function call, exactly one parameter that is identified through an access constant can be read or written. Alternatively, the bytes of the data containers can be directly accessed because they have been specified as public in the FEDM_DataBase class. This method should only be used for byte access. 326 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Basic features of the class library The following examples show the use of GetData (SetData analog). Function overloading makes it possible to use the data type required at that time. 1. UCHAR ucBusAdr = 0; int iErr = GetData(FEDM_ISCM_EE_COM_BUSADR, &ucBusAdr); 2. UINT uiBusAdr = 0; int iErr = GetData(FEDM_ISCM_EE_COM_BUSADR, &uiBusAdr); 3. CString sBusAdr; int iErr = GetData(FEDM_ISCM_EE_COM_BUSADR, sBusAdr); 4. UCHAR ucBusAdr = 0; int iMemID = GetMemIDOfID(FEDM_ISCM_EE_COM_BUSADR); int iAdr = GetAdrOfID(FEDM_ISCM_EE_COM_BUSADR); int iErr = GetData(iAdr, &ucBusAdr, iMemID); C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 327 Basic features of the class library 12.3 05/05 Access constants Access constants play a central role in data traffic between the application program and the data container of the class library, and within the class library between the protocol function and the data container. They identify the parameter and, at the same time, contain the code for the storage location in one of the data containers. An access constant is a string and is structured as follows: MM BN BY NB BI Nb #define FEDM_ISCM_EE_COM_BUSADR " 03 00 00 01 00 00" Parameter name Storage type Reader Component name MM BN BY NB BI Nb Storage type (s. FEDM) Block number 1st byte in the block Number of bytes 1st bit in the byte Number of bits 0..99 0..99 0..99 0..99 0..08 0..99 These access constants are solely used with the SetData and GetData functions. The access constant provides no information on the data type of a parameter. The data type is determined solely by the data type of the access function. Thus, the bus address shown in the above example can either be read out as an integer, as a string or as any other plausible data type. Access to data in a table contained in the reader class using the SetTableData and GetTableData functions also takes place via unique constants, but these constants do not represent a string and thus do not contain a location code. 328 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 12.4 Basic features of the class library Protocol traffic Protocol traffic is triggered using the only SendProtocol function. The only parameter it is passed is the control byte of the required protocol. All data required for protocol transfer are taken from the data containers or the tables. Thus, it must be ensured that all protocol data are previously updated. SendProtocol is contained in FEDM_DataBase as an abstract function and is not implemented until it is in the reader class. Most reader families are capable of handling busses and require the bus address in the protocol. This should be set using the SetBusAddress member function of the FEDM_DataBase class. The implementation of SendProtokoll calls DLL functions that always require a reader handle as their first parameter. These reader handles must be initialized using the SetReaderHnd member function before the SendProtocol is called for the first time. 12.5 Serialization The integrated serialization function, serialize, allows the storage of data from the data container in a file or loads data from a file to the data containers. The contents of only one data container can be serialized each time serialize is called. The serialize function is currently only available for Visual C++. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 329 Basic features of the class library 12.6 05/05 Error handling Almost all functions of the class library carry out internal error checks and return a negative value in the event of an error. The error codes of the class library, ID FEDM, and MOBY D function libraries are organized in ranges in such a way that they cannot overlap. The following ranges are reserved for the ID FEDM class library and the MOBY D function libraries: Library ID FEDM Value range for error codes -101 ... -999 ID FECOM -1000...-1099 ID FEISC -4000...-4099 Using the GetErrorText function of the reader class, the English text corresponding to an error code can be called up. The passed error code can also come from the area of a MOBY D function library. The last error code is stored in the TmpData data container and can be called using the GetLastError member function. 330 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 13 Base classes of the class library Base classes of the class library 13.1 FEDM_Base The FEDM_Base base class forms the base class of the C++ class library, ID FEDM. It only contains functions for the derived classes. 13.1.1 Functions (public) Function Description GetData The executing (overloaded) function for reading a parameter value out of the data container. This function can only be used by the derived class, FEDM_DataBase, or from the reader class derived from it. SetData The executing (overloaded) function for writing a parameter value to a data container. This function can only be used by the derived class, FEDM_DataBase, or from the reader class derived from it. 13.1.2 Functions (protected) Function GetErrorText C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 Description Returns the English text for the passed error code. The error code must be taken from the list of FEDM error codes (see chap. 14.2.1). 331 Base classes of the class library 13.2 05/05 FEDM_DataBase The FEDM_DataBase class is a base class derived from FEDM_Base, that provides data containers and overloaded access functions matched to the data types of the data containers. The size of the data container is 0. The size is fixed in the reader class derived from the FEDM_DataBase. Furthermore, the class contains a series of abstract functions that must be implemented in each reader class. Abstract functions allow algorithms to be written independently of the reader type if the functions that are called are those from the FEDM_DataBase rather than those from the reader class of the same name. In this way, a type-independent interface is implemented. 13.2.1 Attributes (protected) Attribute Description m_iReaderHnd Handle of an object library that is created in the function library lying in the protocol layer specific to the MOBY D (FEISC.DLL, ...). Communication is not possible without this handle. m_ucBusAdr Bus address of the reader. Address 255 is used by default because every reader responds with this address. The bus address must be set if the reader has one of 255 different bus addresses. m_sFamId Short string that identifies the reader class as a class from the MOBY D reader family. This string is automatically set by the reader class and should be read only. Valid string is "ISC". 332 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 13.2.2 Base classes of the class library Attributes (public) Attribute Description Reader family Organization FEDM_BYTE_ARRAY EEData For configuration parame- ISC ters of the reader 16 bytes per block FEDM_BYTE_ARRAY RAMData For temporary configuration parameters of the reader ISC 16 bytes per block FEDM_BYTE_ARRAY TmpData For general temporary protocol data ISC 16 bytes per block FEDM_BYTE_ARRAY MjpData For temporary protocol data of a multijob poll ISC 16 bytes per block FEDM_BYTE_ARRAY SN_Mem For transponder UID ISC (ISCM01) 16 bytes per block FEDM_BYTE_ARRAY ID_Mem For ID numbers of the transponder ISC (ISCM01) 16 bytes per block FEDM_BYTE_ARRAY PubMem For public data blocks of the transponder ISC (ISCM01) 4 bytes per block FEDM_BYTE_ARRAY ConfMem For configuration data of the transponder ISC (ISCM01) 4 bytes per block C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 333 Base classes of the class library 13.2.3 05/05 Functions (public) Function Description SetReaderHnd Sets the handle received from the function library (FEISC.DLL,...) that is specific to the MOBY D reader. GetReaderHnd Returns the handle received from the function library (FEISC.DLL,...) that is specific to the MOBY D reader. SetBusAddress Sets the bus address for the protocol traffic. GetBusAddress Determines the bus address of the protocol traffic. GetFamilyCode Determines the short string for the classification of the reader classes. SetData The central (overloaded) function for reading a parameter value from a data container. The call is forwarded to the FEDM_Base base function after the data container type (storage type constant) is determined from the access constant. SetData supports the following data types: bool, BOOL, UCHAR, UCHAR-Array, UINT, __int64, CString or AnsiString, STL-string and C-character string. A second variable allows read access if the exact index and storage type constants are specified. This version supports the following data types: UCHAR, UCHAR-Array, UINT, __int64 and CString or AnsiString. GetData The central (overloaded) function for writing a parameter value to a data container. The call is forwarded to the FEDM_Base base function after the data container type (storage type constant) is determined from the access constant. SetData supports the following data types: bool, BOOL, UCHAR, UCHAR-Array, UINT, __int64, CString or AnsiString, STL-string and C-character string. A second version allows write access if the the exact index and the storage type constant are specified. This version supports the following data types: UCHAR, UCHAR-Array, UINT, __int64 and CString or AnsiString. 334 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Base classes of the class library 13.2.4 Abstract functions (public) Function Description SendProtocol The central communication function. GetLastProt Function for calling up the last send or receive protocol. SetPortHnd Transfers the handle received from the function library (FECOM.DLL, FEUSB.DLL, ...) lying in the protocol transfer layer to the function library (FEISC.DLL,...) lying in the MOBY D reader-specific protocol layer. GetPortHnd Determines the handle received from the function library (FECOM.DLL, FEUSB.DLL, ...) lying in the protocol transfer layer from the function library (FEISC.DLL,...) lying in the MOBY D reader-specific protocol layer. GetLastError Returns the last error code and text. GetLastStatus Returns the status value of the last protocol. GetErrorText Returns the error text corresponding to each error code. GetStatusText Returns the status text corresponding to each status byte. Serialize Allows serialization of the container data in files. GetTableData The central (overloaded) function for reading a parameter value or data blocks out of a table. This version supports the following data types: UCHAR, UCHAR-Array, UINT, __int64 and CString or AnsiString. SetTableData The central (overloaded) function for writing a parameter value or data blocks to a table. This version supports the following data types: UCHAR, UCHAR-Array, UINT, __int64 and CString or AnsiString. FindTableIndex The central (overloaded) function for determining the table index on the basis of a value. This version supports the following data types: UCHAR, UINT, __int64 and CString or AnsiString. GetTableSize Determines the static size of a table. GetTableLength Determines the number of valid table entries ResetTable Resets a table. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 335 Global functions of the class library 14 14.1 05/05 Global functions of the class library FEDM_Functions Function Description FEDM_GetMemIDOfID Determines the storage type constant from the access constant. FEDM_GetAdrOfID Determines the address of a parameter from the access constant. FEDM_GetByteCntOfID Determines the number of bytes in a parameter from the access constant. FEDM_ConvHexStrToInt Converts a hexadecimal string into an integer value. The string may contain a maximum of 8 characters. All characters except 0..9, a..f, A..F are removed first. Example: sIn = "1122F05E" -> iOut = 287502430 FEDM_ConvHexStrToUInt Converts a hexadecimal string into an unsigned integer value. The string may contain a maximum of 8 characters. All characters except 0..9, a..f, A..F are removed first. Example: sIn = "1122F05E" -> uiOut = 287502430 FEDM_ConvHexStrToInt64 Converts a hexadecimal string into a 64-bit integer value. The string may contain a maximum of 16 characters. All characters except 0..9, a..f, A..F are removed first. Example: sIn = "1122F05E1122F05E" -> i64Out = 1234813534658031710 FEDM_ConvHexStrToUChar Converts a hexadecimal string into a C character string. All characters except 0..9, a..f, A..F are removed first. Example: sIn = "1122F05E" --> ucOutBuf = {0x11, 0x22, 0xF0, 0x5E} FEDM_ConvHexUCharToInt Converts a C character string into an integer value. The C character string may have a maximum of 4 characters. Example: ucInBuf = {0x11, 0x22, 0xF0, 0x5E} -> iOut = 287502430 FEDM_ConvHexUCharToUInt Converts a C character string into an unsigned integer value. The C character string may have a maximum of 4 characters. Example: ucInBuf = {0x11, 0x22, 0xF0, 0x5E} -> uiOut = 287502430 FEDM_ConvHexUCharToInt64 Converts a C-character string into a 64-bit integer value. The C-character string may have a maximum of 8 characters. Example: ucInBuf = {0x11, 0x22, 0xF0, 0x5E, 0x11, 0x22, 0xF0, 0x5E } -> iOut = 1234813534658031710 FEDM_ConvHexUCharToHexStr Converts a C character string into a hexadecimal string. Example: ucInBuf = {0x11, 0x22, 0xF0, 0x5E} -> sOut = "1122F05E" FEDM_ConvIntToHexStr Converts an integer value into a hexadecimal string. Example: iIn = 287502430 -> sOut = "1122F05E" FEDM_ConvIntToHexUChar Converts an integer value into a C character string. Example: iIn = 287502430 -> ucOutBuf = {0x11, 0x22, 0xF0, 0x5E} FEDM_ConvUIntToHexStr Converts an unsigned integer value into a hexadecimal string. Example: uiIn = 287502430 -> sOut = "1122F05E" 336 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Global functions of the class library Function FEDM_ConvUIntToHexUChar Description Converts an unsigned integer value into a C character string. Example: uiIn = 287502430 -> ucOutBuf = {0x11, 0x22, 0xF0, 0x5E} FEDM_ConvInt64ToHexStr Converts a 64-bit integer value into a hexadecimal string. Example: i64In = 1234813534658031710 -> sOut = "1122F05E1122F05E" FEDM_ConvInt64ToHexUChar Converts a 64-bit integer value into a C character string. Example: i64In = 1234813534658031710 -> iOutBuf = {0x11, 0x22, 0xF0, 0x5E, 0x11, 0x22, 0xF0, 0x5E } FEDM_ConvTwoAsciiToUChar Builds a char value from two ASCII characters (0..9, a..f, A..F). FEDM_RemNoHexChar Removes all non-ASCII characters from a string and copies the result into a C character string. . FEDM_IsHex Tests string for ASCI characters (0..9, a..f, A..F). C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 337 Global functions of the class library 14.2 14.2.1 05/05 Appendix FEDM error codes Error constant Value Description FEDM_OK 0 No error FEDM_ERROR_BLOCK_SIZE -101 The block size in the access constant is incorrect FEDM_ERROR_BIT_BOUNDARY -102 The bit boundary of the access constant is incorrect FEDM_ERROR_BYTE_BOUNDARY -103 The byte boundary of the access constant is incorrect FEDM_ERROR_ARRAY_BOUNDARY -104 The array boundary of a data container was exceeded FEDM_ERROR_BUFFER_LENGTH -105 The length of the data buffer is too short FEDM_ERROR_PARAMETER -106 A passed parameter is unknown FEDM_ERROR_STRING_LENGTH -107 The passed string is too long FEDM_ERROR_ODD_STRING_LENGTH -108 The passed string contains an odd number of characters FEDM_ERROR_NO_DATA -109 No data in protocol FEDM_ERROR_NO_READER_HANDLE -110 No reader handle set FEDM_ERROR_NO_PORT_HANDLE -111 No port handle set FEDM_ERROR_UNKNOWN_CONTROL_BYTE -112 Unknown control byte FEDM_ERROR_UNKNOWN_MEM_ID -113 Unknown memory ID FEDM_ERROR_UNKNOWN_POLL_MODE -114 Unknown poll mode FEDM_ERROR_NO_TABLE_DATA -115 No data in the table FEDM_ERROR_UNKNOWN_ERROR_CODE -116 Unknown error code FEDM_ERROR_UNKNOWN_COMMAND -117 Unknown command FEDM_ERROR_UNSUPPORTED -118 Function unsupported FEDM_ERROR_NO_MORE_MEM -119 Out of program memory FEDM_ERROR_NO_READER_FOUND -120 No reader found FEDM_ERROR_NULL_POINTER -121 The passed pointer is NULL 338 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 Global functions of the class library 14.2.2 List of storage type constants Storage type constant Value Description FEDM_EEDATA_MEM 3 For configuration parameters of the reader FEDM_RAMDATA_MEM 4 For temporary configuration parameters of the reader FEDM_TMPDATA_MEM 10 For general temporary protocol data FEDM_MJPDATA_MEM 11 For temporary protocol data of a multijob poll FEDM_SN_MEM 20 For transponder UID FEDM_ID_MEM 21 For ID numbers of the transponder FEDM_AC_MEM 22 For account data of the transponder FEDM_PUB_MEM 23 For public data blocks of the transponder FEDM_SEC_MEM 24 For secret data blocks of the transponder FEDM_CONF_MEM 25 For configuration data of the transponder FEDM_DATE_MEM 26 For date data of the transponder 14.2.3 Macros Macro FEDM_CHK1 Description Checks whether the return value of a function is negative. Function can only be used in the reader class. FEDM_CHK2 Checks whether the return value of a function is negative and, if so, sets the global error variable in FEDM_TMPDATA_MEM. Function can only be used in the reader class. FEDM_CHK3 Checks whether a pointer is NULL. FEDM_RETURN Sets the global error variable in FEDM_TMPDATA_MEM. Function can only be used in the reader class. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 339 FEDM_ISCReader reader class of the class library 15 15.1 05/05 FEDM_ISCReader reader class of the class library Overview Support for MOBY D readers consists of the FEDM_ISCReader reader class derived from the FEDM_DataBase base class and a table integrated in this reader class that has been created as an array of classes of the FEDM_ISCTable type. The following files are part of the realization of the reader class: FEDM_ISCReader.cpp, FEDM_ISCReader.h and the collection of constants in FEDM_ISCReaderID.h. The component diagram shows an overview of all functions and data containers as well as of the table. All functions with a colored background and in bold are components of the type-independent interface. Leserklasse SendProtocol FEDM_ISCReader GetLastProt Funktionsbibliothek FindBaudrate ID FEISC SetReaderHnd GetReaderHnd SetPortHnd GetPortHnd SetBusAddress GetBusAddress SetPollAndState GetLastError GetLastStatus GetErrorText GetStatusText GetFamilyCode Container RAMData Container EEData Container MjpData Container SN Mem Container PubMem Container ConfMem Container TmpData Serialize SetData GetData SetTableData SetBrmData GetTableData SetMjpData FindTableIndex SetIsoData GetTableSize GetIsoData FEDM_ISCTable m_Table GetTableLength ResetTable GetTableType The reader class supports all MOBY D readers, which is why not all options of the class are useable with all reader types. 340 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 FEDM_ISCReader reader class of the class library The FEDM_ISCReader reader class and the FEDM_ISCTable table class support the multijob poll as a procedure for the exchange of data with transponders. This protocol type will not be maintained in the future. It will gradually be replaced by the ISO15693 host protocols. The multijob poll should no longer be used for new projects. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 341 FEDM_ISCReader reader class of the class library 15.2 05/05 FEDM_ISCReader The FEDM_ISCReader class is based on the abstract FEDM_DataBase base class and therefore inherits the general, type-independent interface. The abstract interface functions are implemented in FEDM_ISCReader, so that it is possible to work with an instance of this class. Alternatively, a new reader class can be built on the basis of this class and designed in such a way that additional functionalities can be added or functions overwritten in order to implement different behavior. 15.2.1 Implemented data containers Data container Description EEData For configuration parameters of the reader (for all MOBY D reader types) RAMData For temporary configuration parameters of the reader (for all MOBY D reader types) TmpData For general temporary protocol data (for all MOBY D reader types) MjpData For temporary protocol data of a multijob poll (no longer available) SN_Mem For transponder UID (for SLG D11/D12 only) PubMem For public data blocks of the transponder (for SLG D11/D12 only) ConfMem For configuration data of the transponder (for SLG D11/D12 only) The data container size is statically defined in the constructor of the class. All data containers are initialized in the constructor with 0x00. All data containers not listed here stay at length 0 and are not useable. 15.2.2 Attributes (protected) Attribute Description m_bPollAndState If TRUE, the FEISC_0x01MultiJobPollAndState function of the ID FEISC function library is used for a multijob poll. Thus, a multijob state protocol is automatically sent after the multijo poll protocol. m_Table Table with 128 entries for holding transponder data with [0x21] Read Buffer, [0x01] multijob poll or [0xB0] ISO15693 host protocols. The table can only be used for one protocol type at a time. Details on the table are found in chap. 15.3 FEDM_ISCTable. m_iTableType Specifies the table type. The following are possible: FEDM_ISC_NONE_TABLE, FEDM_ISC_BRM_TABLE, FEDM_ISC_MJP_TABLE or FEDM_ISC_ISO15693_TABLE. m_iTableLength Contains the number of valid table entries. 342 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 FEDM_ISCReader reader class of the class library 15.2.3 Functions (public) Function Description SendProtocol The central communications function. A more detailed description is found in chap. 15.2.5 Examples for the use of the SendProtocol function. GetLastProt Function for calling up the last send or receive protocol. sID="SEND" returns the last send protocol sID="SENDSTR" returns the last send protocol with leading date/time sID="REC" returns the last receive protocol sID="RECSTR" returns the last receive protocol with leading date/time FindBaudrate Function searches for a reader at the interface identified by the port handle (stored in FEISC in the reader object) and determines the baud rate and the protocol frame. This function cannot be used with the USB port. SetPortHnd Sets the port handle as a parameter in the reader object in the FEISC.DLL. GetPortHnd Determines the port handle of the reader object in the FEISC.DLL. SetPollAndState Sets m_bPollAndState to TRUE or FALSE. GetLastError Determines the last error code stored at the FEDM_ISC_TMP_LAST_ERROR location in the TmpDat data container. GetLastStatus Determines the status byte of the last protocol stored at the FEDM_ISC_TMP_LAST_STATE location in the TmpData data container. GetErrorText Determines an English text for the passed error code. The error code can also come from the area of the ID FEISC function collection. GetStatusText Determines an English text for the passed status byte. Serialize Allows serialization of the container data in files. Each time serialize is called, the complete contents of a data container can be written to a file or read out of a file. The function is implemented for Microsoft Visual C++ only. SetTableData The central (overloaded) function for reading a parameter value or data blocks out of a table. This version supports the following data types: UCHAR, UCHAR-Array, UINT, __int64 and CString or AnsiString. The function expects a table as a parameter, but this ID is not evaluated here and can always be set to 0. The uiDataID parameter contains an identifier for the value to be written. All access IDs are listed in the FEDM_ISCReaderID.h file. Which access IDs are supported can be seen in the source code. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 343 FEDM_ISCReader reader class of the class library Function GetTableData 05/05 Description The central (overloaded) function for writing a parameter value or data blocks in the m_Table table This version supports the following data types: UCHAR, UCHAR-Array, UINT, __int64 and CString or AnsiString. The function expects a table as a parameter, but this ID is not evaluated here and can always be set to 0. The uiDataID parameter contains an identifier for the value to be read. All access IDs are listed in the FEDM_ISCReaderID.h file. Which access IDs are supported can be seen in the source code. FindTableIndex The central (overloaded) function for determining the table index on the basis of a value beginning with a start index. This version supports the following data types: UCHAR, UINT, __int64 and CString or AnsiString. The function expects a table as a parameter, but this ID is not evaluated here and can always be set to 0. The uiDataID parameter contains an identifier for the value being searched. All access codes are listed in the FEDM_ISCReaderID.h file. Which access IDs are supported can be seen in the source code. GetTableSize Determines the static size of the m_Table table. A value of 128 is returned. GetTableLength Determines the number of valid table entries in m_Table. Values between 0 and 128 are possible. ResetTable Resets the m_Table table. The data in the table are not deleted. Rather, the m_iTableLength variable is set to 0. GetTableType Returns the current table type of m_Table. See m_iTableType 15.2.4 Functions (protected) Function Description SetLastError Sets the internal error variable in FEDM_ISC_TMP_LAST_ERROR. SetBrmTableData Writes all protocol data from a [0x21] Read Buffer to the m_Table table. SetMjpTableData Writes all protocol data from a [0x02] Multijob State to the m_Table table. SetIsoTableData Writes all protocol data from a [0xB0] ISO15693 Command to the m_Table table. GetMjpData Gets the send data for the next multijob poll protocol from the data containers. GetIsoData Gets the send data for the next ISO15693 host protocol from the data containers and the m_Table table. 344 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 15.2.5 FEDM_ISCReader reader class of the class library Examples for the use of the SendProtocol function The SendProtocol function is of central importance for protocol transfer. Therefore, an example is presented here for each control byte to illustrate which data with which access constants are to be stored in data containers prior to each protocol transfer, and which data are available after each protocol transfer. Some protocols allow the transfer of different data. In these cases, a model example is presented. All access constants are listed in the FEDM_ISCReaderID.h file and should be closely studied together with the explanation of the protocol data contained in the reader system manual. For reasons of clarity, we will not discuss the evaluation of the function return value hier. However, it should always be performed in applications. [Control byte] protocol [0x11] Read Serial-No Example UCHAR ucTrType = 0; CString sSerNo; [0x14] Write Data Block SendProtocol(0x11); // Read UID of transponder GetData (FEDM_ISC_SN_TR_TYPE, &ucTrType); // Get transponder type as byte GetData (FEDM_ISC_SN_SER_NO, sSerNo); // Get UID as string UCHAR ucDBAdr = 0; UCHAR ucDBN = 1; CString sData; sData = "0102030405060708090A0B0C0D0E0F"; SetData (FEDM_ISC_TMP_14_DB_ADR, ucDBAdr); // Address SetData (FEDM_ISC_TMP_14_DB_N, ucDBN); // Number of data blocks SetData (FEDM_ISC_PUB_DB0, sData); // Data bytes in DB0 SendProtocol(0x14); // Write data blocks to // transponder C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 345 FEDM_ISCReader reader class of the class library [Control byte] protocol [0x15] Read Data Block 05/05 Example UCHAR ucDBAdr = 0; UCHAR ucDBN = 1; CString sData; [0x16] Write Transponder Configuration SetData (FEDM_ISC_TMP_15_DB_ADR, ucDBAdr); // Address SetData (FEDM_ISC_TMP_15_DB_N, ucDBN); // Number of data blocks SendProtocol(0x15); // Read data blocks of // transponder GetData (FEDM_ISC_PUB_DB0, sData); // Get data bytes from // DB0 as string // CAUTION !! The transponder can be made unserviceable with this protocol. UCHAR ucDBAdr = 0; CString sData; sData = "01020304"; // These are sample // data only. Please do not // use as presented here !! SetData (FEDM_ISC_TMP_16_DB_ADR, ucDBAdr); // Address SetData // Set data bytes in // CB0 (FEDM_ISC_CONF_DB0, sData); SendProtocol(0x16); [0x17] Read Transponder Configuration UCHAR ucDBAdr = 0; Cstring sData; SetData (FEDM_ISC_TMP_17_DB_ADR, ucDBAdr); // Address SendProtocol(0x17); // Read data blocks from // transponder GetData (FEDM_ISC_CONF_DB0, sData); // Data bytes from CB0 [0x1A] Halt SendProtocol(0x1A); [0x1B] Reset QUIET Bit SendProtocol(0x1B); [0x1C] EAS SendProtocol(0x1C); 346 // Write data blocks to // transponder C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 FEDM_ISCReader reader class of the class library [Control byte] protocol [0x21]Read Buffer Example UCHAR ucDataSets = 1; // Number of requested // data sets UCHAR ucTrData = 0; // Data set structure UCHAR ucRecSets = 0; // Number of data sets in // protocol SetData (FEDM_ISCLR_TMP_BRM_SETS, ucDataSets); SendProtocol(0x21); // Read data blocks from // transponder using // Buffered Read Mode GetData (FEDM_ISCLR_TMP_BRM_TRDATA, &ucTrData); GetData (FEDM_ISCLR_BRM_RECSETS, &ucRecSets); // All other transponder data are contained in m_Table. Example of data access in // chap. 15.3 // FEDM_ISCTable [0x31] Read Data Buffer Info UCHAR ucTabSize = 0; // Data buffer size UCHAR ucTabStart = 0; // Start address for first // data set UCHAR ucTabLen = 0; // Number of data sets in // data buffer SendProtocol(0x31); GetData(FEDM_ISCLR_TMP_TAB_SIZE, &ucTabSize); GetData(FEDM_ISCLR_TMP_TAB_START, &ucTabStart); GetData(FEDM_ISCLR_TMP_TAB_LEN, &ucTabLen); [0x32] Clear Data Buffer SendProtocol(0x32); [0x33] Initialize Buffer SendProtocol(0x33); [0x52] Baud Rate Detection SendProtocol(0x52); [0x55] Start Flash Loader SendProtocol(0x55); [0x63] CPU Reset SendProtocol(0x63); [0x65] Get Software Version Cstring sSoftVer; // Software version as // string SendProtocol(0x65); GetData(FEDM_ISC_TMP_SOFTVER, sSoftVer); [0x69] RF Reset [0x6A] RF ON/OFF SendProtocol(0x69); UCHAR ucRF = 1; // RF ON SetData(FEDM_ISC_TMP_RF_ONOFF, ucRF); SendProtocol(0x6A); [0x6B] Init Noise Level SendProtocol(0x6B); C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 347 FEDM_ISCReader reader class of the class library [Control byte] protocol [0x6C] Set Noise Level 05/05 Example UINT uiNLMin = 500; // Minimum noise level UINT uiNLAvg = 1000; // Medium noise level UINT uiNLMax = 1500; // Maximum noise level SetData(FEDM_ISC_TMP_NOISE_LEVEL_MIN, uiNLMin); SetData(FEDM_ISC_TMP_NOISE_LEVEL_AVG, uiNLAvg); SetData(FEDM_ISC_TMP_NOISE_LEVEL_MAX, uiNLMax); SendProtocol(0x6C); [0x6D] Get Noise Level UINT uiNLMin = 0; // Minimum noise level UINT uiNLAvg = 0; // Medium noise level UINT uiNLMax = 0; // Maximum noise level SendProtocol(0x6D); GetData(FEDM_ISC_TMP_NOISE_LEVEL_MIN, &uiNLMin); GetData(FEDM_ISC_TMP_NOISE_LEVEL_AVG, &uiNLAvg); GetData(FEDM_ISC_TMP_NOISE_LEVEL_MAX, &uiNLMax); [0x6E] Reader Diagnostic UCHAR ucDiagMode = 1; // Diagnosis mode SetData(FEDM_ISCLR_TMP_DIAG_MODE, ucDiagMode); SendProtocol(0x6E); [0x71] Set Output // Example of SLG D10 SetData (FEDM_ISCM_TMP_OUT_OS, 0); // Reset OS bytes SetData (FEDM_ISCM_TMP_OUT_OS_OUT1, (UCHAR)0x01); // Enable output 1 SetData (FEDM_ISCM_TMP_OUT_OS_ LED_G, (UCHAR)0x10); // Green LED off SetData (FEDM_ISCM_TMP_OUT_OS_ LED_R, (UCHAR)0x01); // Red LED on SetData // Beeper on intermittently (FEDM_ISCM_TMP_OUT_OS_ BEEPER, (UCHAR)0x11); SetData (FEDM_ISCM_TMP_OUT_OSF, 0); // Reset OSF bytes SetData // Beeper at 4Hz (FEDM_ISCM_TMP_OUT_OSF_BEEPER, (UCHAR)0x01); SetData beeper (FEDM_ISCM_TMP_OUT_OSTIME, 5); // 500ms active time, // and LEDs SetData (FEDM_ISCM_TMP_OUT_OUTTIME, 3); // Output 1, active 300ms SendProtocol(0x71); 348 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 FEDM_ISCReader reader class of the class library [Control byte] protocol [0x74] Get Input Example // Example of SLG D10 BOOL bIn1 = FALSE; // Input 1 BOOL bIn2 = FALSE; // Input 2 BOOL bDip1 = FALSE; // DIP switch 1 BOOL bDip2 = FALSE; // DIP switch 2 BOOL bDip3 = FALSE; // DIP switch 3 BOOL bDip4 = FALSE; // DIP switch 4 SendProtocol(0x74); GetData(FEDM_ISC_TMP_ INP_STATE_IN1, &bIn1); GetData(FEDM_ISC_TMP_ INP_STATE_IN2, &bIn2); GetData(FEDM_ISC_TMP_ INP_STATE_DIP1, &bDip1); GetData(FEDM_ISC_TMP_ INP_STATE_DIP2, &bDip2); GetData(FEDM_ISC_TMP_ INP_STATE_DIP3, &bDip3); GetData(FEDM_ISC_TMP_ INP_STATE_DIP4, &bDip4); [0x75] Adjust antenna UINT uiAntValue = 0; // Antenna voltage SendProtocol(0x75); GetData(FEDM_ISCM_TMP_ ANTENNA_VALUE, &uiAntValue); [0x80] Read Configuration // This example shows how a reader configuration block is read and written back. and UCHAR ucCfgAdr = 2; // Address of the // configuration block BOOL bEEProm = TRUE; // Configuration data // out of / into EEPROM of // reader UCHAR ucBusAdress; ISC.LR- // Bus address of the // reader from block 2 SetData (FEDM_ISC_TMP_READ_CFG, 0); // Reset all SetData (FEDM_ISC_TMP_READ_CFG_ADR, ucCfgAdr); // Set address SetData (FEDM_ISC_TMP_READ_CFG_LOC, bEEProm); // Set storage location to // EEPROM SendProtocol(0x80); // Read configuration // data GetData (FEDM_ISCLR_EE_COM_BUSADR, &ucBusAdr); // E.g. use bus // address SetData (FEDM_ISC_TMP_WRITE_CFG, 0); // Reset all SetData (FEDM_ISC_TMP_WRITE_CFG_ADR, ucCfgAdr); // Set address SetData (FEDM_ISC_TMP_WRITE_CFG_LOC, bEEProm); // Set storage location to // EEPROM SendProtocol(0x81); // Write configuration data // back SetData // Reset all [0x81] Write Configuration [0x82] Save Configuration C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 349 FEDM_ISCReader reader class of the class library [Control byte] protocol 05/05 Example (FEDM_ISC_TMP_SAVE_CFG, 0); [0x83] Set Default Configuration [0x85] Set System Timer [0x86] Get System Timer [0xA0] Reader Login [0xB0] ISO15693 Mandatory and Optional Commands SetData (FEDM_ISC_TMP_SAVE_CFG_ADR, (UCHAR)0x00); // Set address SetData (FEDM_ISC_TMP_SAVE_CFG_MODE, TRUE); // Save all blocks SendProtocol(0x82); from // Save configuration data // RAM to EEPROM SetData (FEDM_ISC_TMP_RESET_CFG, 0); // Reset all SetData (FEDM_ISC_TMP_RESET_CFG_ADR, (UCHAR)0x02); // Set address SetData (FEDM_ISC_TMP_RESET_CFG_LOC, FALSE); // Select RAM SetData (FEDM_ISC_TMP_RESET_CFG_MODE, FALSE); // Default, block 2 only SendProtocol(0x83); // Set configuration data of // block 2 in RAM to // default SetData(FEDM_ISCLR_TMP_TIME_H, (UINT)16); // 16 hours SetData(FEDM_ISCLR_TMP_TIME_M, (UINT)20); // 20 minutes SetData(FEDM_ISCLR_TMP_TIME_MS, (UINT)2000); // 2000 milliseconds SendProtocol(0x85); // Set timer UINT uiHour = 0; // Hours UINT uiMinute = 0; // Minutes UINT uiMilliSec = 0; // Milliseconds SendProtocol(0x86); // Read out timer GetData(FEDM_ISCLR_TMP_TIME_H, &uiHour); // Take over hours GetData(FEDM_ISCLR_TMP_TIME_M, &uiMinute); // Take over minutes GetData(FEDM_ISCLR_TMP_TIME_MS, &uiMilliSec); // Take over // milliseconds UCHAR ucPW[] = {0x00, 0x00, 0x00, 0x00}; // Password SetData(FEDM_ISCLR_TMP_READER_PW, ucPW, 4); // Set password SendProtocol(0xA0); // Send password to // reader // This example shows the [0x01] Inventory SetData(FEDM_ISC_TMP_B0_CMD, (UCHAR)0x01); // Inventory SetData(FEDM_ISC_TMP_B0_MODE, (UCHAR)0x00); // No More flag SendProtocol(0xB0); // The inventory data are found in m_Table. Example of data access in chap. 15.3 // FEDM_ISCTable 350 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 15.3 FEDM_ISCReader reader class of the class library FEDM_ISCTable The [0x02] multijob-State, [0x21] Read Buffer and [0xB0] ISO15693-Command protocols can provide transponder data from multiple transponders. For the structured storage of these transponder data, a table (protected) is provided within the FEDM_ISCReader reader class that administrates the protocol data of a transponder as a table entry. For example, if data from three transponders come in with a protocol, three new table entries are created. The table has a static size of 128 entries. Data are always inserted beginning with index 0. The m_iTableLength variable of the reader class provides information on the number of valid entries. The [0x02] multijob-State and [0x21] Read Buffer protocols destroy the old data before inserting new data. Thus, the table is of a temporary nature. An application program must read out the table data prior to the next protocol. For [0x0B] ISO15693-Command, a distinction must be made between the various commands: the [0x01] Inventory command enters new transponder data. Almost all other commands, especially [0x23] Read Multiple Blocks and [0x24] Write Multiple Blocks, use the table for data exchange with an application program. At this time, the FEDM_ISCTable table can only be used for the ISO15693Command in the addressed mode. Implementation of the unaddressed mode and selected mode is planned for the future. Access to the table data is always indirect via the GetTableData and SetTableData functions of the FEDM_ISCReader reader class. The FindTableIndex function is available for finding certain table entries, e.g. using the UID. Other query functions are: GetTableType, GetTableSize and GetTableLength. ResetTable deletes the table. All functions mentioned here are described in chap. 15.2 on the FEDM_ISCReader reader class. Separate data buffers are integrated in the table for data blocks from receive protocols and data blocks from send protocols. This makes it easy to verify written data blocks with read data blocks. C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 351 FEDM_ISCReader reader class of the class library 15.3.1 05/05 Examples for the use of the table The following examples demonstrate the data exchange with the FEDM_ISCTable table. For reasons of clarity, we do not present the evaluation of the return values of the functions. However, it should always be performed in applications. [Control byte] protocol [0x21] Read Buffer Example // This example shows how data sets are read with UID, data block and timer value. UCHAR ucDataSets = 1; // Number of requested // data sets UCHAR ucRecSets = 0; // Number of data sets in // protocol UCHAR ucDB[4]; // Buffer for one // data block UINT uiTimer = 0; // For timer value __int64 i64Snr = 0; // For UID BOOL bSNR = FALSE; // Flag for UID // in data set BOOL bDB = FALSE; // Flag for data block in // data set BOOL bTIMER = FALSE; // Flag for timer in // data set SetData(FEDM_ISCLR_TMP_BRM_SETS, ucDataSets); SendProtocol(0x21); // Read data blocks from // transponder using // Buffered Read Mode GetData(FEDM_ISCLR_TMP_BRM_TRDATA_UID, &bSNR); GetData(FEDM_ISCLR_TMP_BRM_TRDATA_DB, &bDB); GetData(FEDM_ISCLR_TMP_BRM_TRDATA_TIMER, &bTIMER); GetData(FEDM_ISCLR_BRM_RECSETS, &ucRecSets); // All transponder data are contained in the table. For(int iCnt=0; iCnt=0) // Reader recognized? { iBack = FEISC_0x80_ReadConfBlock(iRHnd,255,0x82,cConfBlock,0); itoa(cConfBlock[0],buffer,10); // Convert to characstrcpy(Meldung,baud[j]); // Build message text strcat(Meldung,i, N); strcat(Meldung,frame[i]); strcat(Meldung,i\nReader-Adr.:i); strcat(Meldung,buffer); } } j=8; // Artificial loop end i=3; BaudOk=1; } if(BaudOk) { m_sText1.Format(i%si,Meldung); m_iStatus = FEISC_0x80_ReadConfBlock(iRHnd,255,0x8a,xCFG,0); if(!(xCFG[0] & 0x01)) { m_sText1 = iSLG no in Buffered Read Mode!i; m_bBRM = FALSE; // Checkbox not clicked m_cStartButton.EnableWindow(FALSE); // Disable start button m_cInitButton.EnableWindow(FALSE); // Init button i } else { 360 m_bBRM = TRUE; //checkbox clicked m_cStartButton.EnableWindow(TRUE); // Enable start button m_cInitButton.EnableWindow(TRUE); // Init button i C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 05/05 First steps in programming MOBY D } } else { } m_cCom1Button.EnableWindow(FALSE); m_cSetModeButton.EnableWindow(TRUE); // Disable button // Enable button m_sText1 = ino SLG found!i; // Close all open ports iNextHnd = FECOM_GetPortList(0); while (iNextHnd > 0) { iCloseHnd = iNextHnd; iNextHnd = FECOM_GetPortList(iNextHnd); FECOM_ClosePort(iCloseHnd); } } ErrMsg(iBack); // Output message Read, change and write CFG10 void Cmultitag_DDlg::OnSetMode() { unsigned char xCFG[15]; int iBack=0; m_iStatus = FEISC_0x80_ReadConfBlock(iRHnd,255,0x8a,xCFG,0);// read CFG10 xCFG[0] = xCFG[0] | 0x01; // Set bit 0 m_iStatus = FEISC_0x81_WriteConfBlock(iRHnd,255,0x8a,xCFG,0); // Write CFG10 if(m_iStatus != 0) iBack = m_iStatus; m_cStartButton.EnableWindow(TRUE); // Enable start button m_cInitButton.EnableWindow(TRUE); // Init button i m_sText1 = ii; ErrMsg(iBack); // Output message m_iStatus = FEISC_0x63_CPUReset(iRHnd,255); if(m_iStatus != 0) iBack = m_iStatus; } ErrMsg(iBack); C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618 // Execute CPU reset // Output message 361 Abbreviations 05/05 Abbreviations ADR Address Address ASK Amplitude Shift Keying Amplitudenumtastung CB Config Block Konfigurationsblock CFG Configuration Parameter Block Konfigurations-Parameterblock CRC Cyclic Redundancy Check zyklischer Redundanztest DB Data Block Datenblock DIP Dual Inline Plastic Dual Inline Plastikgehause EAS Electronic Article Surveillance Elektronische Artikeluberwachung FIFO First in First out First in First out frq Frequency Frequenz FSK Frequency Shift Keying Frequenzumtastung h Hour Stunde Hz Hertz Hertz ID Identification Kennung IN Input Eingabe LEN Length Lange LOC Location Position LSB Least Significant Byte niederwertigstes Byte min Minutes Minuten ms Milliseconds Millisekunden MSB Most Significant Byte hochstwertiges Byte N Number Nummer OUT Output Ausgabe R/W Read / Write Access Lese- / Schreibzugriff RD READ Lesen REL Relay Relais RF Radio Frequency Hochfrequenz RSSI Received Signal Strength Indicator Anzeige der Empfangs-Signalstarke RTC Real Time Clock Echtzeit-Uhrenbaustein SLG Read / Write Devices Schreib- / Lesegerat UID UID Seriennummer (=UID) TAB Table Tabelle TR Transponder Transponder TS Timeslot Zeitschlitz UID Unique Identifier eindeutige Kennung WO Write Only Access Nur-Lese-Zugriff WR Write Schreiben 362 C/C++ MDWAPI (4)J31069-D0138-U001-A3-7618