MOBY D
C/C++ MDWAPI
Programming instructions
General information
Table of Contents
SLG D10
Overview 1
Configuration parameters 2
Description of protocols 3
SLG D11/D12
Overview 4
Configuration parameters 5
Description of protocols 6
Software support for
MOBY D Reader Family
ID FEISC
Installation 7
Programming interface 8
Software support for
ID FECOM serial interface
Installation 9
Programming interface 10
C++ Class Library
ID FEDM
Overview 11
Basic features 12
Base classes 13
Global functions 14
Reader class 15
First steps in programming
MOBY D A
Abbreviations
Published in May 2005
Safety instructions This manual contains notes that should be o bserve d to ensure your per-
sonal safety and to protect the product and connected equipment from dam-
age. These notes are highlighted in the manual by a warnin g 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
indicates an imminently hazardous situation which, if not avoided, may
result in death, serious injury or considerable property damage.
!
Caution
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 caref ul attention.
Qualified personnel
The equipment may be commissioned an d 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® is a registered trademark of SIEMENS AG.
Microsoft®, Windows®, Visual C++® and Visual Bas ic® are registered
trademarks of the Microsoft Corporation.
Borland®, C++Builder® and Delphi® are registered trademarks of the In-
prise 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 © Siemens AG 2001, 2002, 2003, 2005 All rights reserved
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.
Siemens AG
Automation & Drives
Special Products, Automotive Industry Projects, Training
P.O.Box 4848, D-90713 Nuremberg
Exclusion of liability
We have checked the contents of this Manual to ensure that they match
the hardware and software described herein. However, because devia-
tions 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 subse-
quent editions. We are thankful for any recommendations or sugges-
tions.
We reserve the right to make technical changes.
Siemens-Aktiengesellschaft Order no. (4)J31069-D0138-U001-A3-7618
05/05 General information
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 1
General information
These programming instructions describe a software library that is also avail-
able to you in the form of an annotated source cod e. For this rea son , we shall
refrain here from documenting any more than absolutely necessary to give you
a basic understanding of the function alit y 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 a s sistance of this documentation, the
header files and the inserted comments.
Appendix A contains a Getting Started section that in cludes decision-m aking
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 purp oses. These bits may not be modified. Doing so
may cause the reader to m alfunctio n.
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 de vices SLG D10/SLG D11/SLG D12.
No connections led out for digital input/output signals
No LEDs available for status indications or diagno ses
The SLG D11 and SLG D12 do not have buzze rs.
Table of Contents 05/05
C/C++ MDWAPI
2 (4)J31069-D0138-U001-A3-7618
Table of Contents
General information......................................................................................... 1
1 SLG D10 overview.................................................................................. 10
1.1 lntroduction ........................................................................................................ 10
1.1.1 MOBY D SLG D10............................................................................................. 10
1.1.2 Data safety......................................................................................................... 10
1.2 Data transmission between MOBY D SLG D10 and the host........................... 11
1.2.1 Configuration commands and control commands.............................................11
1.2.2 ISO15693 host commands................................................................................ 12
1.2.3 Buffered Read Mode.......................................................................................... 15
1.2.4 Scan mode......................................................................................................... 16
1.2.5 Reader Multiplex Mode...................................................................................... 18
1.3 Asynchronous interface..................................................................................... 19
1.3.1 Data format and protocol frames....................................................................... 19
1.3.2 CRC16 calculation algorithm............................................................................. 21
2 SLG D10 configuration parameters (CFG)........................................... 22
2.1 Reader parameters............................................................................................ 24
2.1.1 CFG0: Passwords.............................................................................................. 24
2.1.2 CFG1: General inputs and outputs.................................................................... 25
2.1.3 CFG2: COM interface........................................................................................ 27
2.1.4 CFG3: HF interface I.......................................................................................... 31
2.1.5 CFG4: HF interface II......................................................................................... 34
2.1.6 CFG5: HF interface III........................................................................................ 35
2.1.7 CFG6: Reserved................................................................................................ 35
2.1.8 CFG7: Reserved................................................................................................ 36
2.2 Transponder parameters................................................................................... 37
2.2.1 CFG8: General transponder parameters........................................................... 37
2.2.2 CFG9: Reserved................................................................................................ 42
2.3 System parameters............................................................................................ 43
2.3.1 CFG10: General system parameters................................................................. 43
2.3.2 CFG11: Buffered Read Mode............................................................................ 45
2.3.3 CFG12: Scan Mode........................................................................................... 55
2.3.4 CFG13: Anticollision.......................................................................................... 63
2.3.5 CFG14: Reserved.............................................................................................. 66
2.3.6 CFG15: Reserved.............................................................................................. 66
3 Description of protocols for SLG D10.................................................. 67
3.1 Protocols for configuring the reader .................................................................. 67
3.1.1 [0xA0] Reader Login.......................................................................................... 67
05/05 Table of Contents
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 3
3.1.2 [0x80] Read Configuration................................................................................. 68
3.1.3 [0x81] Write Configuration................................................................................. 69
3.1.4 [0x82] Save Configuration to EEPROM............................................................. 70
3.1.5 [0x83] Set Default Configuration........................................................................ 71
3.1.6 [0x85] Set System Timer ................................................................................... 72
3.1.7 [0x86] Get System Timer................................................................................... 73
3.2 Protocols for controlling the reader.................................................................... 74
3.2.1 [0x52] Baud Rate Detection............................................................................... 74
3.2.2 [0x55] Start Flash Loader .................................................................................. 74
3.2.3 [0x63] CPU Reset.............................................................................................. 75
3.2.4 [0x65] Get Software Version.............................................................................. 75
3.2.5 [0x69] RF Reset................................................................................................. 77
3.2.6 [0x6A] RF ON/OFF............................................................................................ 78
3.2.7 [0x6C] Set Noise Level...................................................................................... 79
3.2.8 [0x6D] Get Noise Level...................................................................................... 80
3.2.9 [0x6E] Reader Diagnostic.................................................................................. 81
3.2.10 [0x6F] Basic antenna tuning.............................................................................. 83
3.2.11 [0x71] Set Output............................................................................................... 84
3.2.12 [0x74] Get Input................................................................................................. 86
3.3 Special commands ............................................................................................ 87
3.3.1 [0x1B] Reset QUIET Bit (I-CODE1 transponders only)..................................... 87
3.3.2 [0x1C] EAS (I-CODE1 transponders only) ........................................................ 87
3.4 Protocols for ISO15693 host commands........................................................... 88
3.4.1 Supported ISO15693 host commands for ISO15693 transponders.................. 88
3.4.1.1 Infineon (my-d)................................................................................................... 88
3.4.1.2 Philips (I-Code SLI)............................................................................................ 89
3.4.1.3 STMicroelectronics (LRI512)............................................................................. 90
3.4.1.4 Texas Instruments (Tag-it HFI).......................................................................... 91
3.4.2 Supported ISO15693 host commands for I-Code1 Transponders.................... 92
3.4.3 Supported ISO15693 host commands for Tag-it HF Transponders.................. 93
3.4.4 [0xB0] Host commands for ISO15693: required and optional commands........ 94
3.4.4.1 [0x01] Inventory................................................................................................. 95
3.4.4.2 [0x02] Stay Quiet............................................................................................... 97
3.4.4.3 [0x22] Lock Multiple Blocks ............................................................................... 98
3.4.4.4 [0x23] Read Multiple Blocks............................................................................ 100
3.4.4.5 [0x24] Write Multiple Blocks ............................................................................ 103
3.4.4.6 [0x25] Select.................................................................................................... 105
3.4.4.7 [0x26] Reset to Ready..................................................................................... 106
3.4.4.8 [0x27] Write AFI............................................................................................... 107
3.4.4.9 [0x28] Lock AFI................................................................................................ 108
3.4.4.10 [0x29] Write DSFID.......................................................................................... 109
3.4.4.11 [0x2A] Lock DSFID.......................................................................................... 110
3.4.4.12 [0x2B] Get System Information........................................................................ 111
3.4.4.13 [0x2C] Get Multiple Block Security Status....................................................... 113
Table of Contents 05/05
C/C++ MDWAPI
4 (4)J31069-D0138-U001-A3-7618
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 manufacturer-
specific commands.......................................................................................... 117
3.4.6 [0xBF] ISO15693 transparent command......................................................... 118
3.5 Protocols for the Buffered Read Mode............................................................ 121
3.5.1 Processes in the Buffered Read Mode............................................................ 121
3.5.2 Transponder access in the Buffered Read Mode............................................ 122
3.5.3 [0x21] Read Buffer........................................................................................... 123
3.5.4 [0x31] Read Data Buffer Info........................................................................... 125
3.5.5 [0x32] Clear Data Buffer.................................................................................. 126
3.5.6 [0x33] Initialize Buffer ...................................................................................... 126
3.6 Appendix.......................................................................................................... 127
3.6.1 Codes for transponder types ........................................................................... 127
3.6.2 Time response of the asynchronous interface................................................. 128
3.6.3 Time response of the ISO15693 host commands........................................... 129
3.6.4 Index of status bytes........................................................................................ 138
3.6.5 Index of control bytes....................................................................................... 141
3.6.6 Index of configuration parameters................................................................... 142
3.6.7 Memory model for I-CODE1 transponders...................................................... 143
3.6.8 Examples of Reading Data.............................................................................. 147
4 SLG D11/D12 overview........................................................................ 151
4.1 Data transmission between MOBY D SLG D11/D12 and the host ................. 151
4.1.1 Configuration commands and control commands........................................... 151
4.1.2 ISO15693 host commands.............................................................................. 152
4.1.3 Scan mode....................................................................................................... 155
4.2 Asynchronous interface................................................................................... 157
4.2.1 Data format und protocol frame....................................................................... 157
4.2.2 CRC16 calculation algorithm........................................................................... 159
5 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
05/05 Table of Contents
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 5
6 Description of protocols for SLG D11/D12 ........................................ 180
6.1 Protocols for configuring the reader ................................................................ 180
6.1.1 [0x80] Read Configuration............................................................................... 180
6.1.2 [0x81] Write Configuration............................................................................... 181
6.1.3 [0x82] Save Configuration ............................................................................... 182
6.1.4 [0x83] Set Default Configuration...................................................................... 183
6.2 Protocols for controlling the reader.................................................................. 184
6.2.1 [0x52] Baud Rate Detection............................................................................. 184
6.2.2 [0x55] Start Flash Loader ................................................................................ 184
6.2.3 [0x63] CPU Reset............................................................................................ 185
6.2.4 [0x65] Get Software Version............................................................................ 186
6.2.5 [0x69] RF Reset............................................................................................... 187
6.2.6 [0x6A] RF ON/OFF.......................................................................................... 187
6.2.7 [0x71] Set Output............................................................................................. 188
6.3 Special commands .......................................................................................... 190
6.3.1 [0x1B] Reset QUIET Bit (I-CODE1 transponders only)................................... 190
6.4 Protocols for ISO15693 host commands......................................................... 191
6.4.1 Supported ISO15693 host commands for ISO15693 transponders................ 191
6.4.1.1 Infineon (my-d)................................................................................................. 191
6.4.1.2 Philips (I-Code SLI).......................................................................................... 192
6.4.1.3 STMicroelectronics (LRI512)........................................................................... 193
6.4.1.4 Texas Instruments (Tag-it HFI)........................................................................ 194
6.4.2 Supported ISO15693 host commands for I-Code1 Transponders.................. 195
6.4.3 Supported ISO15693 host commands for Tag-it HF Transponders................ 196
6.4.4 [0xB0] Host commands for ISO15693: required an d optional commands...... 197
6.4.4.1 [0x01] Inventory............................................................................................... 198
6.4.4.2 [0x02] Stay Quiet............................................................................................. 200
6.4.4.3 [0x22] Lock Multiple Blocks ............................................................................. 201
6.4.4.4 [0x23] Read Multiple Blocks............................................................................ 203
6.4.4.5 [0x24] Write Multiple Blocks ............................................................................ 206
6.4.4.6 [0x25] Select.................................................................................................... 209
6.4.4.7 [0x26] Reset to Ready..................................................................................... 210
6.4.4.8 [0x27] Write AFI............................................................................................... 211
6.4.4.9 [0x28] Lock AFI................................................................................................ 212
6.4.4.10 [0x29] Write DSFID.......................................................................................... 213
6.4.4.11 [0x2A] Lock DSFID.......................................................................................... 214
6.4.4.12 [0x2B] Get System Information........................................................................ 215
6.4.4.13 [0x2C] Get Multiple Block Security Status....................................................... 217
6.4.4.14 [0xA0] Read Config Block................................................................................ 219
6.4.4.15 [0xA1] Write Config Block................................................................................ 220
6.4.5 [0xB1] Host commands for ISO15693: user-specific and manufacturer-
specific commands.......................................................................................... 222
6.4.6 [0xBF] ISO15693 transparent command......................................................... 223
Table of Contents 05/05
C/C++ MDWAPI
6 (4)J31069-D0138-U001-A3-7618
6.5 Appendix.......................................................................................................... 226
6.5.1 Codes for transponder types ........................................................................... 226
6.5.2 Time response of the asynchronous interface................................................. 227
6.5.3 Time response of the ISO15693 host commands........................................... 228
6.5.4 Index of status bytes........................................................................................ 236
6.5.5 Index of control bytes....................................................................................... 239
6.5.6 Index of configuration parameters................................................................... 239
6.5.7 Storage model for I-CODE1 transponders ...................................................... 240
6.5.8 Examples of Reading Data.............................................................................. 243
7 Installing the FEISC-DLL..................................................................... 245
7.1 Introduction...................................................................................................... 245
7.2 Installation........................................................................................................ 246
7.3 Integration into the application program.......................................................... 246
8 FEISC-DLL programming interface.................................................... 247
8.1 Overview.......................................................................................................... 247
8.2 Parameter passing........................................................................................... 249
8.3 Event signaling to applications........................................................................ 250
8.4 List of functions................................................................................................ 251
8.4.1 FEISC_NewReader......................................................................................... 254
8.4.2 FEISC_DeleteReader...................................................................................... 255
8.4.3 FEISC_GetReaderList..................................................................................... 256
8.4.4 FEISC_GetDLLVersion.................................................................................... 257
8.4.5 FEISC_GetErrorText ....................................................................................... 257
8.4.6 FEISC_GetStatusText..................................................................................... 258
8.4.7 FEISC_GetReaderPara................................................................................... 259
8.4.8 FEISC_SetReaderPara ................................................................................... 260
8.4.9 FEISC_AddEventHandler................................................................................ 261
8.4.10 FEISC_DelEventHandler................................................................................. 263
8.4.11 FEISC_BuildProtocol....................................................................................... 264
8.4.12 FEISC_SplitProtocol........................................................................................ 265
8.4.13 FEISC_SendTransparent ................................................................................ 266
8.4.14 FEISC_Transmit.............................................................................................. 267
8.4.15 FEISC_Receive ............................................................................................... 268
8.4.16 FEISC_GetLastSendProt................................................................................. 269
8.4.17 FEISC_GetLastRecProt................................................................................... 269
8.4.18 FEISC_GetLastState....................................................................................... 270
8.4.19 FEISC_GetLastRecProtLen ............................................................................ 270
8.4.20 FEISC_GetLastError........................................................................................ 271
8.4.21 FEISC_0x1B_ResetQuietBit............................................................................ 271
8.4.22 FEISC_0x1C_EASRequest............................................................................. 271
8.4.23 FEISC_0x21_ReadBuffer................................................................................ 272
05/05 Table of Contents
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 7
8.4.24 FEISC_0x31_ReadDataBufferInfo .................................................................. 273
8.4.25 FEISC_0x32_ClearDataBuffer ........................................................................ 273
8.4.26 FEISC_0x33_InitBuffer.................................................................................... 274
8.4.27 FEISC_0x52_GetBaud.................................................................................... 274
8.4.28 FEISC_0x55_StartFlashLoader....................................................................... 274
8.4.29 FEISC_0x63_CPUReset ................................................................................. 275
8.4.30 FEISC_0x65_SoftVersion................................................................................ 275
8.4.31 FEISC_0x69_RFReset.................................................................................... 276
8.4.32 FEISC_0x6A_RFOnOff.................................................................................... 276
8.4.33 FEISC_0x6B_InitNoiseThreshold.................................................................... 276
8.4.34 FEISC_0x6C_SetNoiseLevel .......................................................................... 277
8.4.35 FEISC_0x6D_GetNoiseLevel.......................................................................... 277
8.4.36 FEISC_0x6E_RdDiag...................................................................................... 278
8.4.37 FEISC_0x75_AdjAntenna................................................................................ 278
8.4.38 FEISC_0x71_SetOutput.................................................................................. 279
8.4.39 FEISC_0x74_ReadInput.................................................................................. 279
8.4.40 FEISC_0x80_ReadConfBlock ......................................................................... 280
8.4.41 FEISC_0x81_WriteConfBlock ......................................................................... 280
8.4.42 FEISC_0x82_SaveConfBlock.......................................................................... 281
8.4.43 FEISC_0x83_ResetConfBlock ........................................................................ 281
8.4.44 FEISC_0x85_SetSysTimer.............................................................................. 282
8.4.45 FEISC_0x86_GetSysTimer ............................................................................. 282
8.4.46 FEISC_0xA0_RdLogin..................................................................................... 283
8.4.47 FEISC_0xB0_ISOCmd.................................................................................... 284
8.4.48 FEISC_0xB1_ ISOCustAndPropCmd.............................................................. 285
8.4.49 FEISC_0xBF_ ISOTranspCmd........................................................................ 286
8.5 Support for multithreading ............................................................................... 287
8.6 Appendix.......................................................................................................... 289
8.6.1 ID FEISC error codes ...................................................................................... 289
8.6.2 List of parameter IDs ....................................................................................... 290
8.6.3 List of constants for the FEISC_EVENT_INIT structure.................................. 291
9 Installing the FECOM-DLL................................................................... 292
9.1 Introduction...................................................................................................... 292
9.2 Installation........................................................................................................ 292
9.3 Integration into the application program.......................................................... 293
10 FECOM-DLL programming interface.................................................. 294
10.1 Overview.......................................................................................................... 294
10.2 Event signaling for control lines....................................................................... 296
10.3 List of functions................................................................................................ 297
10.3.1 FECOM_OpenPort .......................................................................................... 298
10.3.2 FECOM_ClosePort.......................................................................................... 299
Table of Contents 05/05
C/C++ MDWAPI
8 (4)J31069-D0138-U001-A3-7618
10.3.3 FECOM_GetPortList........................................................................................ 300
10.3.4 FECOM_GetDLLVersion................................................................................. 301
10.3.5 FECOM_GetErrorText..................................................................................... 301
10.3.6 FECOM_GetLastError..................................................................................... 302
10.3.7 FECOM_GetPortHnd....................................................................................... 303
10.3.8 FECOM_GetPortPara...................................................................................... 304
10.3.9 FECOM_SetPortPara...................................................................................... 305
10.3.10 FECOM_DoPortCmd....................................................................................... 306
10.3.11 FECOM_AddEventHandler ............................................................................. 307
10.3.12 FECOM_DelEventHandler............................................................................... 309
10.3.13 FECOM_Transceive........................................................................................ 310
10.3.14 FECOM_Transmit............................................................................................ 311
10.3.15 FECOM_Receive............................................................................................. 312
10.4 Appendix.......................................................................................................... 313
10.4.1 ID FECOM error codes.................................................................................... 313
10.4.2 List of parameter IDs ....................................................................................... 315
10.4.3 List of constants for the FECOM_EVENT_INIT structure ............................... 317
11 Class library overview......................................................................... 318
11.1 Introduction...................................................................................................... 318
11.1.1 Overview of all MOBY D components............................................................. 319
11.1.2 Supported operating systems and development environments ...................... 320
11.2 Installation........................................................................................................ 321
11.3 Class overview................................................................................................. 322
11.3.1 Class structure diagram................................................................................... 322
11.3.2 Component diagram........................................................................................ 323
12 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
13 Base classes of the class library........................................................ 331
13.1 FEDM_Base .................................................................................................... 331
13.1.1 Functions (public) ............................................................................................ 331
13.1.2 Functions (protected)....................................................................................... 331
13.2 FEDM_DataBase............................................................................................. 332
13.2.1 Attributes (protected)....................................................................................... 332
13.2.2 Attributes (public)............................................................................................. 333
05/05 Table of Contents
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 9
13.2.3 Functions (public) ............................................................................................ 334
13.2.4 Abstract functions (public) ............................................................................... 335
14 Global functions of the class library.................................................. 336
14.1 FEDM_Functions............................................................................................. 336
14.2 Appendix.......................................................................................................... 338
14.2.1 FEDM error codes ........................................................................................... 338
14.2.2 List of storage type constants.......................................................................... 339
14.2.3 Macros............................................................................................................. 339
15 FEDM_ISCReader reader class of the class library .......................... 340
15.1 Overview.......................................................................................................... 340
15.2 FEDM_ISCReader........................................................................................... 342
15.2.1 Implemented data containers.......................................................................... 342
15.2.2 Attributes (protected)....................................................................................... 342
15.2.3 Functions (public) ............................................................................................ 343
15.2.4 Functions (protected)....................................................................................... 344
15.2.5 Examples for the use of the SendProtocol function ........................................ 345
15.3 FEDM_ISCTable.............................................................................................. 351
15.3.1 Examples for the use of the table.................................................................... 352
15.4 List of constants............................................................................................... 355
A 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
SLG D10 overview 05/05
C/C++ MDWAPI
10 (4)J31069-D0138-U001-A3-7618
1 SLG D10 overview
1.1 lntroduction
1.1.1 MOBY D SLG D10
The SLG D10 are the long range readers of the MOBY D family. The MOBY D fam-
ily covers the complete spectrum of reader range s. It includes proximity, midrange
and long range device s, wh ich differ in their maximum write/read ranges.
MOBY D readers of different types can be used together since the readers ha ve
the same communication interface. Each reader is equipped with a bidire ctional
asynchronous interface (RS 232 or RS 422).
The multitag function is still another adva ntage. The readers use this function to
read and write to different tran sponder types and to handle multiple tran sponders
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 mo st extensive configuration options and the largest
command set. However, their basic command set and functions are still fully com -
patible with the commands of the other MOBY D family members. Thanks to their
extensive configurability, the SLG D10 can be readily adapted to any indi vidual ap-
plication by configuring their hardware and software.
1.1.2 Data safety
Since it must be possible to safeguard your data against unauthori zed 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 reade r is protected by a 32-bit
password known as the "Reade r 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 comman d,
provided that a password has been defin ed.
05/05 SLG D10 overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 11
1.2 Data transmission between MOBY D SLG D10 and the
host
There are five different kinds of data transmi s sion 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 an d
the host. Configuration commands and control commands are u sed fo r match-
ing the reader parameters to various applications. The following table shows what
interfaces are supported by the variou s kinds of data transmission:
Asynchronous interface
(RS 232 / RS 422)
Configuration commands
Reader control commands
ISO15693 host commands
Buffered Read Mode
Scan mode
1.2.1 Configuration commands and control commands
This type of data transmission is suitable for reader configuration and diagnosis via
the asynchronous interface.
The reader configuration param eters 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 i s sh ut off. When the device is switched back on, the reader
reads out the configuration from the EEPROM.
Reader control diagnosis i s executed immediately. The reader respo nse contains
status or data information of the command.
Host (terminal / PC / ....) Reader
Parameter command / control
command Parameters received and saved / control
command processed
Yes No
Status /
date Error status
SLG D10 overview 05/05
C/C++ MDWAPI
12 (4)J31069-D0138-U001-A3-7618
1.2.2 ISO15693 host commands
The ISO15693 host commands provide a way for host and transponders to ex-
change data with the aid of the reader. The transp onders must remain within the
recognition field of the reader.
Note
When you write data to a transponder, you must ensure that the transponder re-
mains 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 p roce-
dure, data will be lost.
The reader distingui shes 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] Inven-
tory. When a transponder is located in the reco gnition field of the reader at this
moment, it replies with its UID. The transponder must then be addressed with the
correct UID during all su bsequent read and write commands.
The following flowchart shows the step s required for communicati on with a trans-
ponder in addressed mode.
Host (Terminal / PC / ....) Reader
“Inventory” to query the UID Transponder in antenna fiel d?
Yes No
Status/number of
selected trans-
ponders/UIDs
Status = no trans-
ponders
Read data with UID from the
transponder Transponder with correct UID in the
antenna field?
Yes No
Status/read
transponder data Status = no trans-
ponder in reader
field
Write data with UID to the trans-
ponder Transponder with correct UID in the
antenna field?
Yes No
Status OK Status = no trans-
ponder in read field
05/05 SLG D10 overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 13
Not addressed mode
In not addressed mode, you do not need to know the UID of the transp onder. This
mode is recommended wh en only one transponder is located in the recognition
field of the reader.
The following flowchart shows the step s required for communicati on with one
transponder in not addre ssed mode.
Host (Terminal / PC / ....) Reader
Read data Transponder in antenna fiel d?
Yes No
Status/read
transponder data Status = no trans-
ponder in reader
field
Write data Transponder in antenna fiel d?
Yes No
Status OK Status = no trans-
ponder in reader
field
SLG D10 overview 05/05
C/C++ MDWAPI
14 (4)J31069-D0138-U001-A3-7618
Selected:
In this mode, the reader only communicates with one selected tran sponder.
Before you can read or write in sele ct mode, the UID of the transpo nder must be
known. You will learn the UID when you send the protocol [0x01] Invento ry. In a
second step, the transponder must be selected with the comm and [0x25] Select.
This must contain the UID of the transponder.
The following flowchart shows the step s required for communicati on with a trans-
ponder in select mode.
Host (Terminal / PC / ....) Reader
“Inventory” for query of UID Transponder in antenna fiel d?
Yes No
Status/number of
selected trans-
ponders/UIDs
Status = no trans-
ponders
Select transponder with UID Transponder with correct UID in the
antenna field?
Yes No
Status/read
transponder data Status = no trans-
ponder in reader
field
Read data Selected transponder in antenna field?
Yes No
Status/read
transponder data Status = no trans-
ponder in reader
field
Write data Selected transponder in antenna field?
Yes No
Status OK Status = no trans-
ponder in reader
field
05/05 SLG D10 overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 15
1.2.3 Buffered Read Mode
The Buffered Read Mode is a high-level operating mode that tracks down trans-
ponders in the detection range of the re ade r. This operating mode is especially
suitable for those applicatio n that use the transponder for object identification. The
Buffered Read Mode processes all data read from the transponders and filters op-
erations to make the user interface transparent to transponder data and to keep
data traffic between the reader and the h ost 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 de-
tection 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 we re 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 retrie ve the next data set from the buffer us-
ing 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 af ter
it is switched on. The Buffered Read Mode ca n be reinitialized using the Fehler!
Verweisquelle konnte nicht gefunden werden. command.
In the Buffered Read Mode, the reader responds to each valid messag e with a
data or status protocol. The response also contains the control byte received by
the reader.
Host (terminal / PC / ....) Reader
Read data 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
SLG D10 overview 05/05
C/C++ MDWAPI
16 (4)J31069-D0138-U001-A3-7618
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 togeth er with Reader Multiplex Mode. 1
1.2.4 Scan mode
In this operating mode the reader a utomatically sends data to the host as soo n as
a transponder moves into it s field and valid data could be read.
In scan mode the content s 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 o utputting the protocol block as soon as all required data have
been read correctly from the tran sponder. If the reader is unable to read the data of
a protocol block completely and correctly, it does not output any data. If, for in-
stance, the address of the data block i s invalid, the UID of the transponder is not
sent.
Scan mode with the asynchronous interface
The data are output as shown bel ow 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 d ata block are to be
read.
Example 2:
Three transponders are lo cated in the recognition field. Only the UID is to be rea d.
PR UID1 EZ UID2 EZ UID3 EZ
1 Not possible with SLG D10
05/05 SLG D10 overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 17
Example 3:
Three transponders are lo cated 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 UID1 TZ Data1 EZ UID2 TZ Data2 EZ
PR: Communication prefix (o ptional)
UID: Serial number (fixed)
Data: Data blocks (can be programmed as de sired)
TZ: Separator character (optional)
EZ: End character (optional )
ts: SCAN-LOCK-TIME
tr: Time until the next new read acce ss of the transponder
Note
If configuration protocols are to be sent to the reader whe n scan mode is active,
we recommend that no transponder b e located in the field of the reader during
this time.
Only read operations a re p ossible in scan mode.
Scan mode is only available whe n buffered re ad mode is deactivated.
Scan mode can be used together with Reader Multiplex Mode.
SLG D10 overview 05/05
C/C++ MDWAPI
18 (4)J31069-D0138-U001-A3-7618
1.2.5 Reader Multiplex Mode
The HF operations of the readers must be multiplexe d to prevent the readers from
interfering with each other and to pe rmit operation of several readers close to-
gether.
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 exe-
cuted by a single host, since it is control l ed at reader level.
To set up multiplex mode, buffered rea d mode or scan mode must be activated in
configuration block CFG10: General system parameters (se e chap.2.3.1). In addi-
tion, 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 configura-
tion 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 sig-
nal output and to power them via external direct current.
05/05 SLG D10 overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 19
1.3 Asynchronous interface
1.3.1 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 g overned by fixed protocols. These
are designed for data bu sses and contain a bus address.
When data is transmitted via the asynchronous interfa ce, the re ader 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 4...(n-2) (n-1) n
LENGTH=
n COM-ADR CONTRO
L BYTE PROTOCOL
DATA MSB
CRC16 LSB
CRC16
Host Reader
1 2 3 4 (5...(n-2)) (n-1) n
LENGTH =
n COM-ADR CON-
TROL
BYTE
STATUS1 (PROTOCOL
DATA) MSB
CRC16 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.
SLG D10 overview 05/05
C/C++ MDWAPI
20 (4)J31069-D0138-U001-A3-7618
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 ho st
command mode (see al so chapter 3.6.8 Examples of Reading Data).
CRC16:
Cyclic redundancy che ck of protocol bytes from 1 to (n-2), as indi cated 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 .. ..
Õ 5...n ms Ö Õ5 ms min.Ö
Host reader:
.. .. ..
Data timout
The individual characters within a p roto col mu st follow in intervals of not more
than 12 ms.
Õ12 ms max. Ö Õ12 ms max. Ö Õ 12 ms max. Ö
Host reader: Character n Character
n+1 Character
n+2 ..
05/05 SLG D10 overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 21
1.3.2 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);
}
}
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
22 (4)J31069-D0138-U001-A3-7618
2 SLG D10 configuration parameters (CFG)
The configuration memory of the reader is divided into configuration blocks of
16 bytes each. Each block consist s of 14 byte s of configuration parameters and a
2-byte CRC16 checksum. Each config uration 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 13 14 15
Contents PARAMETERS CRC16
The parameters are stored in two se parate locations within the configuration mem-
ory:
Reader RAM
Storage EEPROM (for storing pa rameters when the device is switched off)
You can address multiple locations in th e config uration memory via the value of the
CFG-ADR parameter describe d in chap. 3.1 Protocols for configuring the reader.
CFG-ADR:
CFGn: Memory address of the required co nfiguration block
LOC: Location of the configuration block (RAM / EEPROM)
MODE: Specifies whether one or all configuration blo cks a re to be accessed
Bit: 7 6 5 4 3 2 1 0
Function LOC MODE CFGn: Configuration block address
The configuration blocks in the EEPROM are protected by a 16-bit CRC checksum.
These checksums are checked eve ry 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 activate d. 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 com-
mand). The reader then switches to the configured operating state if the checksum
of all data records is correc t.
1 Not available for SLG D10
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 23
Note
Malfunctions may occur if parameters a re configured outside of their permissi-
ble range or if unspecified parameters a re chan ged!
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 1 2 ......n
Contents Concerns
RAM Concerns
EEPROM -
Reserved .....
Any changes to this
parameter become effec-
tive only after this con-
figuration block has been
written to / stored in the
EEPROM and the
reader has been reset.
Any changes to this
parameter become ef-
fective immediately after
this configuration block
is written to or stored in
the RAM.
These bits or bytes are
reserved for future exten-
sions or for internal test-
ing and production pur-
poses. They must not be
modified, as this may
lead to faulty reader op-
eration.
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
24 (4)J31069-D0138-U001-A3-7618
2.1 Reader parameters
2.1.1 CFG0: Passwords
The parameters of configuration bl ock CFG0 contain i dentificatio n codes for the
personalization of the reader. In this way, you can prevent unauthorized access to
some reader f unct i ons. For security reasons, the data of this configuration blo ck
cannot be read by the host. Access is write access only. The [0x83] Set Default
Configuration command is also not available.
Byte 0 1 2 3 4 5 6
Contents READER ID 0x00 0x00 0x00
Default 0x00000000
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
READER-ID:
Password the host uses to log into the reader to read and write configuration pa-
rameter 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 whe n the reader is reset.
The [0x82] Save Configuration to EEPROM and [0x 83] Set Default Configu-
ration 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.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 25
Configuration protection
Access to the configuration parameters stored on the reader is protected by a 32-
bit password called the READER ID. This means that the config uration 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 bl ock CFG1 contain the digital input and output
settings.
Byte 0 1 2 3 4 5 6
Contents IDLE-MODE FLASH-IDLE IN-ACTIVE 0x00 REL-TIME
MSB
Default 0xA800 0xFC00 0x00 0x00
Byte 7 8 9 10 11 12 13
Contents REL-TIME
LSB OUT2- TIME 0x00 0x00 0x00 0x00
Default 0x00 0x00 0x00
IDLE-MODE:
Defines the status of the signal tra nsmit ters (OUT1, OUT2 and REL) during idle
mode.
Bit: 15 14 13 12 11 10 9 8
Function: 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
b 0 0 UNCHANGED Status of signal transmitter unchanged
b 0 1 ON Signal transmitter on
b 1 0 OFF Sign al transmitter off
b 1 1 FLASHING Signal transmitter alternately on and off
1 Not available for SLG D10
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
26 (4)J31069-D0138-U001-A3-7618
FLASH-IDLE:
Assigns a separate flash frequency to each output.
Bit: 15 14 13 12 11 10 9 8
Function: 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
b 1 1
b 1 0
b 0 1
b 0 0
1 Hz
2 Hz
4 Hz
8 Hz
IN-ACTIVE:
Specifies whether the input is active o n 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 re-
sponse, 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 re sponse,
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.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 27
2.1.3 CFG2: COM interface
The parameters of configuration bl ock CFG2 contain the data transmission set-
tings.
Byte 0 1 2 3 4 5 6
Con-
tents COM-ADR 0x00 BAUD TRANS-
FORM FLASH-
LOADER-
BAUD
0x00 TR-
RESPONSE-
TIME
Default 0x00 0x08 0x01 0x08 0x00
0x00 38400
baud e,8,1 38400
baud
Byte 7 8 9 10 11 12 13
Con-
tents TR-
RESPONSE-
TIME
0x00 0x00 0x00 0x00 0x00 0x00
Default 0x64
10 sec
COM-ADR1:
Reader bus address (0 .. 254) for communication via the asynchronous interface;
intended for bus applications (not SLG D10).
Note
Address 255 may not be configu red.
The reader can be accessed via COM a ddress 255 in the send protocol at any
time. It then responds with the defined address.
For COM address 0, the reade r 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 comman d.
1 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the
reader responds with STATUS = {0x11}.
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
28 (4)J31069-D0138-U001-A3-7618
BAUD1:
The baud rate of the asynchronous interface is set here.
BAUD Baud rate
0x05
0x06
0x07
0x08
0x09
0x0A
4800 baud
9600 baud
19200 baud
38400 baud
57600 baud
115200 baud
Note
A change to the baud rate becomes effective only afte r configuration block CFG2
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}.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 29
TRANS-FORM1:
This byte is used to define various parameters describing the data tran smission
format of the asynchronous interface.
Bit: 7 6 5 4 3 2 1 0
Function: 0 0 0 0 S D P
P:
Parity
P Parity
b00
b01
b10
b11
None
Even
Uneven
Do not use.
D:
Data bits
D Data bits
b0
b1 8
Do not use.
S:
Stop bits
S Stop bits
b0
b1 1
Do not use.
Note
Any changes to TRANS-FORM becom e ef fective only after configuration block
CFG2 has been written to / stored in the EEPROM and the reader has been re-
set.
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}.
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
30 (4)J31069-D0138-U001-A3-7618
FLASH-LOADER-BAUD1:
The baud rate of the flash loader is set here.2
BAUD Baud rate
0x06
0x07
0x08
9600 baud
19200 baud
38400 baud
TR-RESPONSE-TIME:
This byte allows you to specify the maximum response time for transp onder com-
mands.
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-RESPONSE-
TIME. In this case, execution of current command s between reader and trans-
ponder are terminated. If this time is too short, the interface status [0x83] “HF com-
munication 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
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 31
2.1.4 CFG3: HF interface I
The parameters of configuration bl ock CFG3 contain global settings for the trans-
ponder driver and the reader.
Byte 0 1 2 3 4 5 6
Contents TAG-DRV1 HF-
POWER1 EAS-
LEVEL FSK-RX-
CHN1 0x00 0x00
Default 0x000B 0x90 0xFF 0x02
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
TAG-DRV1:
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 disabl ed.
b1 Driver for this transponder type is enabled.
.A: Driver for I-CODE1
.B: Driver for Tag-it HF
.D: Driver for ISO15693
In general, you should only enable tho se transponder drivers that you
require for a particular application. This will reduce reader response
time to transponder read/write operation s 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}.
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
32 (4)J31069-D0138-U001-A3-7618
HF-POWER1:
Specifies the HF output powe r
Bit: 7 6 5 4 3 2 1 0
Function MUL 0 LEVEL
MUL
Defines the multiplier for LEVEL
MUL
b0
b1 HF OUTPUT= LEVEL * 1 W
HF OUTPUT= LEVEL * ¼ 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 contin uously checked by a monit oring 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 A plausibility test is performed when this parameter is stored in the read erIf an error occurs, the reader
responds with STATUS = {0x11}.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 33
EAS-LEVEL: (I-CODE1 transponders only)
Specifies the number of correct bits for the EAS com mand.
FSK-RX-CHN1: (FSK transponders only)
Specifies the type of receiv er 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}.
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
34 (4)J31069-D0138-U001-A3-7618
2.1.5 CFG4: HF interface II
The parameters of configuration bl ock CFG4 contain the values for noise-level se t-
tings.
Byte 0 1 2 3 4 5 6
Contents NOISE-MIN NOISE-AVG NOISE-MAX NL-MODE
Default 0x0000 0x0000 0x0000 0x00
Byte 7 8 9 10 11 12 13
Contents IGNORE-
WEAK-
COLL
0x00 0x00 0x00 0x00 0x00 0x00
Default 0x01
NOISE-MIN:
Minimum noise level in mV
NOISE-AVG:
Average noise level in mV
NOISE-MAX:
Maximum noise level in m V
NL-MODE:
NL-MODE Noise level is set as follows
0 automatically
1 using the parameters specified under NOISE-MIN, NOISE-
AVG and
NOISE-MAX or using the [0x6C] Set Noise Level command
Note
When NL-MODE = {0}, the rea der measures the noise level s continuously and
stores them under NOISE-MIN, NOISE-AVG and NOISE-MAX.
To preserve the settings stored under NOISE-MIN, NOISE-AVG and NOISE-
MAX even after the device is switched off and after a [0x63] CP U Reset com-
mand, you must store this configuration block in the EEPROM using the
[0x82] Save Configuration to EEPROM command.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 35
IGNORE-WEAK-COLL: (only I-Code1 transponder)
Specifies whether or not a weak colli sion provides valid data.
IGNORE-
WEAK-COLL
0 Valid data in case of weak collision
1 Invalid data in case of weak collision; data
ignored
2.1.6 CFG5: HF interface III
The parameters for configuration block CFG5 contai n time settings for the trans-
ponder interface.
Byte 0 1 2 3 4 5 6
Contents 0x00 0x00 0x00 0x00 0x00 0x00 RF-MOD
Default 0x0F
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Default
RF-MOD:
HF modulation in 16% mode
The adjustable range is 1 0% to 30% (0x0A ... 0x1E).
0x0A: 10% modulation
... ...
0x1E: 30% modulation
2.1.7 CFG6: Reserved
Configuration block CFG6 is re served for future use.
Byte 0 1 2 3 4 5 6
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
36 (4)J31069-D0138-U001-A3-7618
2.1.8 CFG7: Reserved
Configuration block CFG7 is re served for future use.
Byte 0 1 2 3 4 5 6
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 37
2.2 Transponder parameters
2.2.1 CFG8: General transponder parameters
The parameters of configuration bl ock CFG8 contain general transponder settin gs.
Byte 0 1 2 3 4 5 6
Contents I-CODE-
MODE FAM-
CODE APP-ID 0x80 ISO15693-
MODE ISO15693-
AFI ISO15693-
OPTION
Default 0x01 0x00 0x00 0x0B 0x00 0x00
Byte 7 8 9 10 11 12 13
Contents ISO15693-
CMD-
OPTION
0x00 ISO15693-
TAGIT-
OPTION
0x00 0x00 0x00 0x00
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 transpon der
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
38 (4)J31069-D0138-U001-A3-7618
APP-ID: (I-CODE1 transponders only)
Application ID for selecting a transpond er
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 DATA-
RATE SUB-
CARRIER MOD DATA-
CODING
DATACODING
DATACODING
b0 Normal mode (1 / 256)
b1 Fast mode (1 / 4)
MOD
MOD
b0 100%
This option increases the modula-
tion 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 operatio n can the number of time slots be set to 1 to accelerate
communication in FSK mode.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 39
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 AS K
subcarrier mode.
AFI
AFI
b0 Disabled
b1 Enabled
ISO15693-AFI:
Identifier for the application family for selecting a transp onder
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
40 (4)J31069-D0138-U001-A3-7618
ISO15693-OPTION:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 WR-OPTION 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 trans-
ponder is used, WR-OPTION must be set to 1.
For more details on the co rrect 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 0
Function 0 0 0 0 0 0 BREAK
BREAK
BREAK
b10 Pause time slot for “NO transponder”
(Pause is always a 100% modulated
EOF)
This option accelerates the anticol-
lision process but also increases
the modulation bandwidth.
b11 Total length of time slot for “NO trans-
ponder”
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 41
ISO15693-TAGIT-OPTION:
Manufacturer-specific options
Bit: 7 6 5 4 3 2 1 0
Function EN 0 0 0 0 0 INV-
READ 0
INV-READ
INV-READ
b0
b1 Read the inventory is deactivated.
Read the inventory is activated.
Note
This mode may only be used with buffered read mode.
EN
EN
b0
b1 Tag-it options deactivated
Tag-it options activated
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
42 (4)J31069-D0138-U001-A3-7618
2.2.2 CFG9: Reserved
Configuration block CFG9 is re served for future use.
Byte 0 1 2 3 4 5 6
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 43
2.3 System parameters
2.3.1 CFG10: General system parameters
The parameters of configuration bl ock CFG10 contain general system settings.
Byte 0 1 2 3 4 5 6
Contents SYS-
MODE 0x00 0x00 0x00 0x00 0x00 0x00
Default 0x04
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
SYS-MODE:
The SYS-MODE register is used to set the various reader operating modes.
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ACOLL OP Mode
OP ode:
OP Mode Function
b00
b01
b10
ISO15693 host mode
Buffered read mode
Scan mode
ISO15693 host mode:
You can use this bit combination to activate ISO15693 host mo de. 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 buffe red
read mode is activated, no ISO15693 host commands can be used.
Scan mode:
You can use this bit combination to activate scan mod e. In scan mode the reader
automatically sends the transpond er data after it is detected. When scan mode is
activated, ISO15693 host commands cannot be u se d.
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
44 (4)J31069-D0138-U001-A3-7618
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 transponder-
specific communication parameters when in the anticollision mode.
ACOLL Function
b0
b1 Disab led (default)
Enabled
Note
When the anticollision m ode is disabled, the reader does not perform anticolli-
sion procedures for transponders located within the antenna field. See the de-
scription of the parameters in CFG13: Anticollision.
When anti-collision mode is off, no Stay Quiet command is sent to the trans-
ponder.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 45
2.3.2 CFG11: Buffered Read Mode
The parameters of configuration bl ock CFG11 contain the Buffered Read Mode
settings. To activate this mode, set the BRM bit in the SYS-MODE register of con-
figuration block CFG10: General system parameters. If a large or unknown num-
ber of transponders is located within th e antenna range, it is advisable to enable
the anticollision mode.
Buffered read mode can be used with the multiplex mode of the re ader. The pa-
rameters for this function must be configured a s de scribed in this chapter.
Byte 0 1 2 3 4 5 6
Contents TR-DATA1 DB-ADR DB-N1 TR-ID1 VALID-TIME READ
Default 0x01 0x05 0x01 0x85 0x00 0x0A 0x80
Byte 7 8 9 10 11 12 13
Contents SYNC SYNC-TIMEOUT 0x00 0x00 0x00 0x00
Default 0x00 0x03E8
TR-DATA1:
Selects the data types for reade r operations
Bit: 7 6 5 4 3 2 1 0
Function Byte
order 0 TIMER 0 0 EAS DB UID
UID
UID Function
b0
b1 UID is not stored.
UID is stored.
DB
Data Block Function
b0
b1 Data bl ock is not stored.
Data block is stored.
1 A plausibility test is carried out when this p ara meter is stored in the reader. If an error occurs, the
reader responds with STATUS = {0x11}.
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
46 (4)J31069-D0138-U001-A3-7618
EAS (only I-CODE1)
EAS Function
b0
b1 No EAS function.
EAS command is executed.
TIMER
TIMER Function
b0
b1 No internal system timer.
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 accura cy cannot be guaranteed.
Byte order
Specifies the order of the bytes within the protocol frame.
Byte Order Function
b0
b1 MSB first.
LSB first.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 47
DB-ADR:
Address of the first data block. Range: 0x00...0xFF.
For valid addresses see: chap. 3.6.7 Memory model for I-CODE1 transponde rs and
chap. 3.4.1 Supported ISO15693 ho st comman ds for ISO15693 transponders.
Bit: 7 6 5 4 3 2 1 0
Function DB-ADR
Note
A change to DB-ADR becomes effective onl y after configuration block CFG11 has
been written to / stored in the EEPROM and the reader has been reset.
DB-N1:
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 mod el for I-CODE1 transponders
and chap. 3.4.1 Supported ISO15693 host commands for ISO15693 transponde rs.
Bit: 7 6 5 4 3 2 1 0
Function 0 0 DB-N
Note
A change to DB-ADR becomes effective onl y 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}.
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
48 (4)J31069-D0138-U001-A3-7618
TR-ID1:
The TR-ID register sets the parameters for transponder id entification.
If the content of the addressed data block is the same for several transponde rs,
only one data record is generate d.
Bit: 7 6 5 4 3 2 1 0
Function ID-
SOURCE DB-ADR
DB-ADR:
Sets the data block address for transponder identification. If ID-SOURCE use s 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
b1 Data block
UID
Note
A change to the TR-ID becomes effective only afte r 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 ra nge 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 A plausibility test is performed when this parameter is stored in the reader. If an error occurs, the
reader responds with STATUS = {0x11}.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 49
VALID-TIME:
Minimum time period within whi ch a tra nsp onder 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 co nfiguration 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 transp onder, the
missing data blocks should be re-read re peatedly until VALID-TIME has expired.
This setting is intended for reading transpond ers under poor reading con ditions
(noise, motion, poor location, etc.).
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 RE-READ
RE-READ:
Indicates how often data blocks should b e re- re ad after a read error.
RE-READ Function
b0000
...
b1111
No new read
...
15x new read
RE-READ = 0 means that the reader forces a read access whe n an error occurs
during the first read access but does not read again.
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
50 (4)J31069-D0138-U001-A3-7618
SYNC:
Sets the synchronization parameters
Bit: 7 6 5 4 3 2 1 0
Function RFOFF 0 0 0 0 MASTER MODE
MODE:
MODE Function
b00
b11 Multiplex mode OFF
Multiplex mode ON
MASTER:
MASTER Function
b0
b1 Slave
Master
RFOFF:
b0: When the reader has con cluded 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 con cluded 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 pulse s.
Note
When the reader does not detect a synchronization p ulse on “IN1” within the
SYNC-TIMEOUT time, it automatically generates a synchroni zation pulse on
“OUT1” after SYNC-TIMEOUT expires.
In addition, the error message [0x85] for synchronization erro r appears.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 51
Example 1
Only one transponde r is located in the antenna field. The transpon der requires one
second to pass by the antenna. The antenna field is uniform and h as no “HF
holes”. The application data are locate d in data blo cks 1 and 2. The internal system
time is needed to determine when the transponder ha s passed by the antenna.
CFG10: General system parameters
Byte 0 1 2 3 4 5 6
Contents 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
CFG11: Buffered Read Mode
Byte 0 1 2 3 4 5 6
Contents TR-DATA DB-ADR DB-N TR-ID VALID-TIME READ
Settings 0x22 0x01 0x02 0x01 0x0014 0x00
Byte 7 8 9 10 11 12 13
Contents SYNC SYNC-TIMEOUT - - - -
Settings 0x00 0x00 0x00 0x00 0x00 0x00 0x00
CFG13: Anticollision
Byte 0 1 2 3 4 5 6
Contents TIMESLOTS DIFF-
HASH MIN-
HASH MAX-
HASH 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
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
52 (4)J31069-D0138-U001-A3-7618
CFG10: General system parameters
Buffered Read Mode is enabled
Anticollision mode is disabled
CFG11: Buffered Read Mode
Data blocks 1 and 2 with time informatio n
Data block 1 is used to identify the transponder
Each transponder must pass b y the antenna in two seconds.
CFG13: Anticollision (disabled)
I-CODE1 transponders are read with a time slot and a hash valu e = 0.
I-CODE1 and Tag-it HF transponders are read without the anticollision proce-
dure.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 53
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 h oles”. The application data are located in d ata
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
CFG11: Buffered Read Mode
Byte 0 1 2 3 4 5 6
Contents TR-DATA DB-ADR DB-N TR-ID VALID-TIME READ
Settings 0x02 0x01 0x02 0x01 0x0028 0x80
Byte 7 8 9 10 11 12 13
Contents SYNC SYNC-TIMEOUT - - - -
Settings 0x00 0x00 0x00 0x00 0x00 0x00 0x00
CFG13: Anticollision
Byte 0 1 2 3 4 5 6
Contents TIMESLOTS DIFF-
HASH MIN-HASH MAX-
HASH COLLISIONS -
Settings 0x53 0x00 0x00 0x00 0x2222 0x00
Byte 7 8 9 10 11 12 13
Contents - - - - ONT - -
Settings 0x00 0x00 0x00 0x00 0x01 0x00 0x00
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
54 (4)J31069-D0138-U001-A3-7618
CFG10: General system parameters
Buffered Read Mode is enabled
Anticollision mode is enab l ed
CFG11: Buffered Read Mode
Data blocks 1 and 2 with time information are read b y the transponders
Data block 1 is used for identifying the transponders
Each transponder must pass b y 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 transponde rs are read with 16 to 64 time slots and a h ash value = 0
using the anticollision procedure.
I-Code1 and Tag-it HF transp onders are read without the anticollision proce-
dure.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 55
2.3.3 CFG12: Scan Mode
The parameters of configuration bl ock CFG12 contain the settings for scan mode.
To activate scan mode, set the SCAN-MODE bit in the SYS-MODE register of con-
figuration block CFG 10: General System Parameters. See chapter 2.3.1. Scan
mode can be used with multiplex mode of the reader. The param eters for this fu nc-
tion must be configured in CFG11: Buffered Read Mode (see chap. 2.3.2).
Byte 0 1 2 3 4 5 6
Contents SCANNER-
MODE 0x00 0x00 SCAN-
DATA DB-ADR D-LGT SCAN-
LOCK-
TIME
Default 0x02 0x01 0x05 0x04 0x00
Byte 7 8 9 10 11 12 13
Contents SCAN-
LOCK-TIME D-START DB-USE SEP-
CHAR SEP-USR END-
CHAR END-USR
Default 0x0A 0x00 0x02 0x20 0x00 0x01 0x00
10 seconds ASCII Comma CR+LF
SCANNER MODE:
Specifies the type of scan procedure.
Bit: 7 6 5 4 3 2 1 0
Function Trigger 0 0 0 0 Mode
Mode:
Mode Function
b000
b010 Read once
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 alwa ys the same transponders or different ones. This mode
is primarily suitable for dem onstrative and diagnostic purposes. The reader
automatically forces an HF reset betwee n two read procedures.
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
56 (4)J31069-D0138-U001-A3-7618
Trigger:
Trigger Function
b0
b1 Trigger deactivated
Trigger activated
Trigger deactivated:
The reader scans continuously. This mode increases power consumption, how-
ever.
Trigger activated:
The reader begins scanning when the trigger is activa ted.
The digital input IN2 can be used as the trigger signal to start the scan proce-
dure.
The trigger pulse must last at least 100 msec.
SCAN-DATA:
Selects the data types to be sent in scan mode
Bit: 7 6 5 4 3 2 1 0
Function Byte
order 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
b1 No outp ut of the UID
Output of the UID
DB (data block)
When this bit is set, a specified data field is output.
DB Function
b0
b1 No outp ut of a data field
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 Function
b0
b1 No output of the internal system timer
Output of the internal system timer
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 57
COM prefix:
When this option is set, the reader transfers the COM-ADR before each data re-
cord.
COM prefix Function
b0
b1 COM-ADR of the rea der is not transferred.
COM-ADR of the reader is transferred.
Byte order:
Specifies the order of the bytes within the protocol framework.
Byte order Function
b0
b1 MSB first
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 t ransponders
and chapter 3.4.1 Supported ISO15693 host commands for ISO15693 transpond-
ers.
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 includi ng UID, time and so on can be transferred with the
interface. If more than 254 bytes are sent, the last bytes are cut off.
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
58 (4)J31069-D0138-U001-A3-7618
SCAN-LOCK-TIME: (1 ... 65535 * 100 msec = 100 msec ... 6553.5 sec)
SCAN-LOCK-TIME specifies the time durin g which the reader does not send the
transponder data a seco nd time after the first send procedure. It makes no differ-
ence whether or not the transponder is in the recognition field of the reader during
SCAN-LOCK-TIME. SCAN-LOCK-TIME begins after the data a re sent from the
transponder to the reader.
tr: Time for reading the transponder data
to: Data transmission from reader to host
ts: 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.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 59
DB-USE:
Specifies the data format
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 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 conve rted 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
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
60 (4)J31069-D0138-U001-A3-7618
SEP-CHAR/END-CHAR:
Specifies the separator chara cter/end character between two data t ype s for the
sending data
Bit: 7 6 5 4 3 2 1 0
Function USER ‘ ‘,’ ‘;’ TAB CR LF CR+LF
ASCII Hex
CR+LF 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 sel ected.
SEP-USR:
User-defined separation character
END-USR:
User-defined end character
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 61
Scan read mode, examples
The diagram below shows the function of the four different settings of scan mode .
The examples assume us e of only one transponder in the antenna field.
Read once, trigger deactivated
Transponder
outside
the field
Transponder
outside
the field
Trigger (IN2)
Scan Lock Time
HF communication
Host
communication
Read-
access
okay
Read-
access
bad
Read-
access
okay
Read-
access
bad
Read-
access
okay
Read once, trigger activated
Transponder
outside
the field
Transponder
outside
the field
Trigger (IN2)
Scan Lock Time
HF communication
Host commun ication
Start
Lesen
ok. Read-
access
okay
Read-
access
okay
Read-
access
okay
Read-
access
bad
Start Start
In “read once” mode the reader only sends data to the host when new transpond-
ers were detected or the transponders l eft the antenn a field during SCAN-LOCK-
TIME and reentered the field later.
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
62 (4)J31069-D0138-U001-A3-7618
Read continuously, trigger deactivated
Trigger (IN2)
Scan Lock Time
HF communication
Host commun ication
Read-
access
okay
Read-
access
okay
Read-
access
okay
Read-
access
okay
RF reset RF reset RF reset RF reset
Read continuously, trigger activated
Trigger (IN2)
Scan Lock Time
HF communication
Host commun ication
Lesen
ok.
RF
reset
Read-
access
okay
Read-
access
okay
Read-
access
okay
Read-
access
okay
Read-
access
okay
RF
reset RF
reset RF
reset RF
reset
In “read continuously” mode the reader sends data to the host when new trans-
ponders were detected or SCAN-LO CK-TIME for the transponders is over.
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 63
2.3.4 CFG13: Anticollision
The parameters of configuration bl ock CFG13 contai n anticolli sion settings. To
enable the anticollision mode, set the ACOLL bit in the SYS-MODE register in con-
figuration block CFG10: General system parameters.
Byte 0 1 2 3 4 5 6
Contents TIMESLOTS DIFF-
HASH MIN-HASH MAX-
HASH COLLISIONS 0x00
Default 0x11 0x04 0x00 0x9F 0x2222
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 ONT 0x00 0x00
Default 0x01
TIMESLOTS: (I-CODE1 transponders only)
Number of time slots with which the transponders are read.
Bit: 7 6 5 4 3 2 1 0
Function 0 MAX-TS 0 MIN-TS
MIN-TS:
Minimum number of time slots
MAX-TS:
Maximum number of times slots
MIN-TS /
MAX-TS Number of time slots
b111
b110
b101
b100
b011
b010
b001
b000
256
128
64
32
16
8
4
1
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
64 (4)J31069-D0138-U001-A3-7618
Each I-CODE1 transpo nder 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 ca n be selected simultaneously. To o 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 co rresponding 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 co nfiguration block CFG10: General sys tem
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 transpond er selections.
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 DIFF-HASH
MIN-HASH: (I-CODE1 transponders only)
Minimum hash value.
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 MIN-HASH
MAX-HASH: (I-CODE1 transponders only)
Maximum hash value.
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 MAX-HASH
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 in-
creased by DIFF-HASH after each transpond er selection. If the hash value ex-
ceeds 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-HAS H
must contain the required hash value. DIFF-HASH is then ignored.
Hash values 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
05/05 SLG D10 conf iguration parameters (CFG)
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 65
Note
If the anticollision mode is disabled, the reader uses the hash value = 0 for trans-
ponder 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 * (we ak collisions * TR-WEAK + strong collisions * TR-COLL +
checksum err or * TR-CRC)
The calculated number of time slots is rounded up to a valid value between MIN-TS
and MAX-TS.
Byte 4 5
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Function TS-TR TR-WEAK TR-COLL TR-CRC
TS-TR:
Number of time slots per suspected transponder at the common a ir interface
TR-WEAK:
Number of transpond ers per weak collision at the common air interface
TR-COLL:
Number of transpond ers per collision at the common air interface.
TR-CRC:
Number of transpond ers per checksum error at the common air interface
ONT:
Specifies which transponder data a re sent to the host
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 0 0 ONT
ONT:
ONT Function
b0 The data of all transponders in the field are sent to the host.
The reader carries out an RF reset prior to each comma nd that
reads an UID.
b1 Only the data of the newly selected transponders are sent to the
host.
SLG D10 configuration parameters (CFG) 05/05
C/C++ MDWAPI
66 (4)J31069-D0138-U001-A3-7618
2.3.5 CFG14: Reserved
The configuration block CFG14 is reserved for later use.
Byte 0 1 2 3 4 5 6
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
2.3.6 CFG15: Reserved
The configuration block CFG15 is reserved for later use.
Byte 0 1 2 3 4 5 6
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 67
3 Description of protocols for SLG D10
3.1 Protocols for configuring the reader
Using the reader configuration protocols, the reader can be adapte d 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 unauthori zed access, the reader is pro-
vided with the following protection routin e.
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 per-
formed every time the device is switched on or the [0x63] CPU Reset comm and is
carried out.
Host reader:
1 2 3 4...7 8,9
9 COM-ADR [0xA0] READER-ID CRC16
Host reader
1 2 3 4 5,6
6 COM-ADR [0xA0] STATUS1 CRC16
READER-ID:
The READER-ID is a password that protects the configuration parameters from all
read and write acce ss. READER-IDs can be changed in configuration block CFG0:
Passwords.
Note
Logging in with an incorrect READER-ID can cause you to become “logge d
out.”
You can log out using the [0x63] CPU Reset command.
1 See chap. 3.6.4 Index of status bytes
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
68 (4)J31069-D0138-U001-A3-7618
3.1.2 [0x80] Read Configuration
"Read Configuration“ lets you determine the current configuration of the rea der.
The configuration is read in blocks of 14 bytes each and addre ssed 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
CFG-ADR2:
Bit: 7 6 5 4 3 2 1 0
Function LOC 0 CFGn: Configu r ation block address
CFGn: Memory address of the required configuration block
LOC: Configuration block location
LOC Block location
b0
b1 RAM
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. Other-
wise, error code 0x13 will be output.
An attempt to read reserved configuration blocks leads to error cod e 0x15.
1 See chap. 3.6.4 Index of status bytes
2 See chap. 2 SLG D10 configuration parameters (CFG)
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 69
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 b yte. A description of the parame-
ters is found in chap. 2 SLG D10 configuration para meters (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 6 5 4 3 2 1 0
Function LOC 0 CFGn: Configuration block address
CFGn: Memory address of the required configuration block
LOC: Configuration block location
LOC Block location
b0
b1 RAM
EEPROM
CFG-REC:
Configuration block with a length of 14 bytes that is store d in the re ader configura-
tion 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)
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
70 (4)J31069-D0138-U001-A3-7618
3.1.4 [0x82] Save Configuration to EEPROM
This command lets you write the configuration block (CFG-A DR ) in the RAM con-
figuration memory to the EEPROM configuration memory of the reader.
Host reader
1 2 3 4 5,6
6 COM-ADR [0x82] CFG-ADR CRC16
Host reader
1 2 3 4 5,6
6 COM-ADR [0x82] STATUS1 CRC16
CFG-ADR2:
Bit: 7 6 5 4 3 2 1 0
Function 0 MODE CFGn: Configuration block address
CFGn: Memory address of the required configuration block
MODE: Specifies whether one or all configuration blocks a re affected
MODE Mode
b0
b1 Configuration block defined by CFGs
All configuration blocks
Note
Configuration block CFG0: Password s 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)
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 71
3.1.5 [0x83] Set Default Configuration
The “Set Default Configuration” command lets you re set ea ch configuration block
to the manufacturer default settings.
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] STATUS1 CRC16
CFG-ADR2:
Bit: 7 6 5 4 3 2 1 0
Function LOC MODE CFGn: Configur ation block address
CFGn: Memory address of the required co nfiguration block
LOC: Configuration block location
LOC Block location
b0
b1 RAM
RAM and EEPROM
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.
Note
Configuration block CFG0: Password s is onl y reset to default settings if
MODE = 0.
To protect the configuration in the RAM from being lost when the d evice 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. Oth-
erwise, error code 0x13 will be output.
If you attempt to set the default configuration for reserved co nfiguration 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)
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
72 (4)J31069-D0138-U001-A3-7618
3.1.6 [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
Host reader
1 2 3 4 5,6
6 COM-ADR [0x85] STATUS1 CRC16
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 de-
gree of accuracy cannot be guaranteed .
1 See chap. 3.6.4 Index of status bytes
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 73
3.1.7 [0x86] Get System Timer
The “Get System Timer” command reads the interna l 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 de-
gree of accuracy cannot be guaranteed .
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
74 (4)J31069-D0138-U001-A3-7618
3.2 Protocols for controlling the reader
3.2.1 [0x52] Baud Rate Detection
This protocol is used to determine the baud rate set for the asynchronous interfa ce
of the reader.
Host reader
1 2 3 4 5,6
6 COM-ADR [0x52] 0x00 CRC16
Host reader
1 2 3 4 5,6
6 COM-ADR [0x52] 0x00 CRC16
Note
The response proto col is o nly 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
Host reader
1 2 3 4 5,6
6 0x00 [0x55] 0x00 CRC16
Note
This command is onl y 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 in-
terface.
1 See chap. 2.1.3 CFG2: COM interface
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 75
3.2.3 [0x63] CPU Reset
This protocol lets you reset the reader CPU.
Host reader
1 2 3 4,5
5 COM-ADR [0x63] CRC16
Host reader
1 2 3 4 5,6
6 COM-ADR [0x63] STATUS1 CRC16
3.2.4 [0x65] Get Software Version
This protocol lets you deter mine the software version of the reader, the reader type
and the transponder types suppo rted b y 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
ª HW-TYPE SW-TYPE TR-TYPE CRC16
SW-REV:
Firmware version
Byte 5 6
Bit: 7 .. 4 3 .. 0 7 .. 0
Function: Decoder
firmware Main controller firmware
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
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
76 (4)J31069-D0138-U001-A3-7618
HW-TYPE:
Reader hardware type
Bit: 7 6 5 4 3 2 1 0
Function: 0 0 0 0 SLG
D10 FSK ASK CHN
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 Reader type
0x29 SLG D10
TR-TYPE:
Shows the transponders su pported by the software.
Bit: 15 14 13 12 11 10 9 8
Function: 0 0 0 0 0 0 0 0
Bit: 7 6 5 4 3 2 1 0
Function: 0 0 0 0 ISO15693 0 Tag-it
HF I-CODE1
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 77
3.2.5 [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
Host reader
1 2 3 4 5,6
6 COM-ADR [0x69] STATUS1 CRC16
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 Re set” command causes the
data table to become initialized.
The response of this command is sent after the reset has b een executed.
1 See chap. 3.6.4 Index of status bytes
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
78 (4)J31069-D0138-U001-A3-7618
3.2.6 [0x6A] RF ON/OFF
The “RF ON/OFF” command switch es the HF field of the reader antenna ON or
OFF.
Host reader
1 2 3 4 5,6
6 COM-ADR [0x6A] RF CRC16
Host reader
1 2 3 4 5,6
6 COM-ADR [0x6A] STATUS1 CRC16
RF:
RF HF field of reader antenna
0x00 OFF
0x01 ON
Note
An enabled Buffered Read Mode is interrupted for a s l ong as the HF is switched
off.
1 See chap. 3.6.4 Index of status bytes
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 79
3.2.7 [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
Host reader
1 2 3 4 5,6
6 COM-ADR [0x6C] STATUS1 CRC16
NOISE-LEVEL:
Byte 4,5 6,7 8,9
NOISE-LEVEL Minimum noise
level 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
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
80 (4)J31069-D0138-U001-A3-7618
3.2.8 [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 NOISE-
LEVEL CRC16
NOISE-LEVEL:
Byte 5,6 7,8 9,10
NOISE-LEVEL Minimum noise
level Average noise
level Maximum noise
level
1 See chap. 3.6.4 Index of status bytes
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 81
3.2.9 [0x6E] Reader Diagnostic
The “Reader Diagnostic” comman d executes a series of hardware diagnosis func-
tions 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 5 4 3 2 1 0
Function: TEMP-
ALARM - TEMP-
WARN CONTROL |Z|> |Z|< NOISE RF-
HW
TEMP-ALARM = Maximum permissible temperature of
output stage exceeded
TEMP-WARN = Temperature of output stage too high
CONTROL = HF power outside cont rol range
|Z|> = Impedance value >> 50 Ohm
|Z|< = Impedance value << 50 Ohm
NOISE = Ambient noise too high or incorrect antenna setting
RF-HW = HF hardware not functioning / HF power cannot be
initialized
1 See chap. 3.6.4 Index of status bytes
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
82 (4)J31069-D0138-U001-A3-7618
Error conditions:
Error Set condition Delete condition HF power LED 51
TEMP-ALARM Temp. alarm value
120 °C Temp. < alarm value 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 /
error while initializing
HF power
CPU reset 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 Not visible on the outside
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 83
3.2.10 [0x6F] Basic antenna tuning
This protocol is used to tune the basic antenna with the MOBY D tuning controller.
Host reader
1 2 3 4...5
5 COM-ADR [0xF9] CRC16
Host reader
1 2 3 4 5...6
7 COM-ADR [0xF9] STATUS1 CRC16
Note
Only use this command to tune the basic antenna. Never use it to tune the sup-
plemental 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 trans-
ponders. 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 co mmand [0x63]
CPU Reset.
1 See chap. 3.6.4 Index of status bytes
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
84 (4)J31069-D0138-U001-A3-7618
3.2.11 [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 receiv es 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 4,5 6,7
13 COM-ADR [0x71] OS OSF
°
8,9 10,11 12,13
ª 0x00 OUT-TIME CRC16
Host reader
1 2 3 4 5,6
6 COM-ADR [0x71] STATUS2 CRC16
OS:
The OS word (“Output State”) spe cifie s the state of the signal transmitters (OUT1,
OUT2 and REL) during the time perio d indicated in OUT-TIME. The signal tansmit-
ters can be selected individually or as a group.
Bit: 15 14 13 12 11 10 9 8
Function: 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
b 0 0 UNCHANGED OUT-TIME does not change the state of the signal transmitter
b 0 1 ON Signal transmitter during OUT-TIME = enabled
b 1 0 OFF Signal transmitter during OUT-TIME = disabl ed
b 1 1 FLASHING Signal transmitter during OUT-TIME = alternates with OSF
1 Connections have not been led out in S LG D10
2 See chap. 3.6.4 Index of status bytes
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 85
Note
If you are using read synchronization, you cannot use output OUT1 for general
tasks.
OSF:
The OSF word (“Output State Flash,” output flashing f req uency) lets you assign a
separate flashing frequency to each output.
Bit: 15 14 13 12 11 10 9 8
Function: 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
b 1 1
b 1 0
b 0 1
b 0 0
1 Hz
2 Hz
4 Hz
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
0 1...65534 x 100 msec
(100 ms...1:49:13 hr) 65535
(0xFFFF)
OUT-TIME State
unchanged Output enabled during “Time” 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 re set after a reset procedure or power failure.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
86 (4)J31069-D0138-U001-A3-7618
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 10 00 msec without influencing the other si gnal transmit-
ters.
OS OSF OUT-TIME
0x4000 0x0000 0x000A
3.2.12 [0x74] Get Input1
This protocol is used to query the curr ent state of digital inputs IN1 ... IN2 and
DIP1 ... DIP4 at any time.
Host reader
1 2 3 4,5
5 COM-ADR [0x74] CRC16
Host reader
1 2 3 4 5 6,7
7 COM-ADR [0x74] STATUS2 INPUTS CRC16
INPUTS:
Bit: 7 6 5 4 3 2 1 0
Function: DIP4 DIP3 DIP2 DIP1 0 0 IN2 IN1
1 Digital input = enabled3
Note
If reader synchronization is used, input IN1 cannot be used for gen eral 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
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 87
3.3 Special commands
3.3.1 [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, tran sponders that were previously in the resting
mode are re-enabled. chap. 3.6.7 Memory model for I-CODE1 transponders de-
scribes how to enabl e the resting mode for I-CODE1 transponders.
Host reader
1 2 3 4,5
5 COM-ADR 0x1B CRC16
Host reader
1 2 3 4 5,6
6 COM-ADR 0x1B STATUS1 CRC16
3.3.2 [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 respo nds 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 2 3 4 5,6
6 COM-ADR 0x1C STATUS1 CRC16
1 See chap. 3.6.4 Index of status bytes
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
88 (4)J31069-D0138-U001-A3-7618
3.4 Protocols for ISO15693 host commands
3.4.1 Supported ISO15693 host commands for ISO15693 transpond-
ers
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 Remarks
Not Addressed Addressed Selected
0x01 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 - - - -
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.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 89
3.4.1.2 Philips (I-Code SLI)
IC manufacturer's ID: 0x04
Memory organization: 32 x 4 bytes = 1 Kbit
No. of blocks 32 (user ra nge: 0 to 27)
Block length 4 bytes
Command
Code Command Mode Remarks
Not Ad-
dressed Ad-
dressed Se-
lected
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.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
90 (4)J31069-D0138-U001-A3-7618
3.4.1.3 STMicroelectronics (LRI512)
IC manufacturer's ID: 0x02
Memory organization: 16 x 4 bytes = 512 bits
No. of blocks 16 (user ra nge: 0 to 15)
Block length 4 bytes
Command
Code Command Mode Remarks
Not Ad-
dressed Ad-
dressed Se-
lected
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 CFG8 is
set to “00:automatically set.” See chapter 2.2.1 CFG8: General transponder parameters.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 91
3.4.1.4 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 ra nge: 0 to 63)
Block length 4 bytes
Command
Code Command Mode Remarks
Not Ad-
dressed Ad-
dressed Se-
lected
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 use s the co mmands “Write_2_Blocks” and
“Lock_2_Blocks.” This only takes effect when the blo ck address starts with an
even-number address.
The command “Write_2_Blocks” / “Lock_2_Blo cks” is combined with the com-
mand “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.”
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
92 (4)J31069-D0138-U001-A3-7618
3.4.2 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 ra nge: 0 to 11)
Block length 4 bytes
Command
Code Command Mode Remarks
Not Ad-
dressed Ad-
dressed Se-
lected
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 C onfig Block - -
0xA1 Wr ite Config Block - -
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 93
3.4.3 Supported ISO15693 host commands for Tag-it HF Transpond-
ers
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 Ad-
dressed Ad-
dressed Se-
lected
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 C onfig Block - - - -
0xA1 Write Config Block - - - -
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
94 (4)J31069-D0138-U001-A3-7618
3.4.4 [0xB0] Host commands for ISO15693: required and optional
commands
This command sends RF commands as defined by ISO15693 to the tran sponder.
Host reader
1 2 3 4...(n-2) (n-1),n
n COM-ADR [0xB0] REQUEST-
DATA CRC16
Host reader
1 2 3 4 5...(n-2) (n-1),n
n COM-ADR [0xB0] STATUS1 RESPONSE-
DATA CRC16
REQUEST-DATA:
Command-specific request
RESPONSE-DATA:
Command-sp ecific re spo nse
Note
Data are only transmitted if STATUS = {0x0 0, 0x83, 0x84, 0x93, 0x94, 0x95}.
The command does not function if Buffered Rea d Mo de or Scan mode is en-
abled.
1 See chap. 3.6.4 Index of status bytes
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 95
3.4.4.1 [0x01] Inventory
This command reads the UIDs of all transponders in the antenna field.
When the reader detects a new transponder, it automat ically switches the trans-
ponder to the idle state. In this state the transpo nder 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 configura t ion 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 6 5 4 3 2 1 0
Function MORE 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 avail-
able with status [0x94].
DATA-SETS:
Number of transponder data sets to be transmitted in this reader response.
TR-TYPE:
Transponder type.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
96 (4)J31069-D0138-U001-A3-7618
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 executio n of the “Inventory” command.
If ONT = {b0}, an RF Reset is exe cuted to read the UIDs of all transponders in
the antenna field.
If the STATUS byte in the protocol frame has the val ue {0x94}, additional UIDs
can be read out from the reade r with MORE = {b1}.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 97
3.4.4.2 [0x02] Stay Quiet
This command sets the transp onder into the quiet state.
Only needed when anticollision mode is disabled.
REQUEST-DATA
4 5 6...13
0x02 MODE UID
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b001 addressed
UID:
Transponder UID (read-only access)
Note
This command only functio ns for ISO15693 transponders.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
98 (4)J31069-D0138-U001-A3-7618
3.4.4.3 [0x22] Lock Multiple Blocks
This command locks one or more data blocks.
Different ISO15693 host commands a re supported depending on th e ISO15693
transponder type. These are describe d in cha pter 3.4.1 Supported ISO15693 host
commands for ISO15693 transponders.
Note
This command only functio ns for ISO15693 transponders and Tag-it HF.
The write protection cannot be can cel ed 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
ISO15693-
ERROR DB-ADR-E
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Unaddressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 99
DB-ADR:
Number of the first block t o be locked. The first block number can lie between 0
and 255.
DB-N:
Number of data blocks to be locked, beg inning with DB-ADR. The maximum value
of DB-N depends on the block si ze. The maximum number of bytes is 128.
DB-Size Max. DB-N
4
8
x
0x20 = 32
0x10 = 16
= 128 / x
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse. This byte is only available if
STATUS = {0x95}.
DB-ADR-E:
Block number in which the error occurred
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
100 (4)J31069-D0138-U001-A3-7618
3.4.4.4 [0x23] Read Multiple Blocks
This command reads one or more data blocks.
Different ISO15693 host commands a re supported depending on the ISO15693
transponder type. These are describe d in cha pter 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
ISO15693-
ERROR
RESPONSE-DATA
5 6 7 8…n
DB-N DB-SIZE SEC-STATUS DB
DB-N repeated
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 SEC ADR
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 addre ssed
mode.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 101
DB-ADR:
Number of the first block t o 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 numbe r of
bytes is 128.
DB-Size Max. DB-N
4
8
x
0x20 = 32
0x10 = 16
= 128 / x
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse.
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 secu rity status of followed data block.
If not in use, this value returns {0x00 }.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
102 (4)J31069-D0138-U001-A3-7618
DB:
Requested data block. The block size is specified in DB-S I Z E.
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 suppo rt commands for reading multiple blocks, multi-
ple blocks are read out of the transpo nder individually.
Only one transponde r 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 acce ss of an I-Code1 transponder eve n when the
UID is known.
If the transponder was already selected with an Inventory command, a non-
addressed read access of I-Code1 transponders is not possible. The selection
must be canceled with the command [0x69] RF Reset.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 103
3.4.4.5 [0x24] Write Multiple Blocks
This command writes on e or several data blocks.
Different ISO15693 host commands a re supported depending on the ISO15693
transponder type. These are describe d in cha pter 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
ISO15693-
ERROR DB-ADR-E
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Unaddressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
DB-ADR:
Address of the first block to be written to the transpo nder. The first block number
can lie between 0 and 255.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
104 (4)J31069-D0138-U001-A3-7618
DB-N:
Number of data blocks to be written to the tran sponder, beginning with DB-ADR.
The maximum value of DB-N depen ds on the block size. The maximum numb er of
bytes is 128.
DB-Size Max. DB-N
4
8
x
0x20 = 32
0x10 = 16
= 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 requi red block size is defined
in DB-SIZE. The number of expected b yt e s is DB-N * DB-SIZE.
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse.
This byte is only available if STATUS = {0x95}.
DB-ADR-E:
Number of the block in which the erro r occured
Note
A write procedure to a block sends the comman d for writing a single block to the
transponder. The reader handles this internally.
If a transponder does not suppo rt 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 sele cted mode.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 105
3.4.4.6 [0x25] Select
This command sets a transponder to the “selected” state. Only one ISO15693
transponder can be selecte d at any one time. A transponder that has already bee n
selected is automatically se t to the ready state.
REQUEST-DATA
4 5 6...13
0x25 MODE UID
RESPONSE-DATA (STATUS = {0x95})
5
ISO15693-
ERROR
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b001 Addressed
UID:
Transponder UID (read-only access)
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse.
This byte is only available if STATUS = {0x95}.
Note
This command only functio ns for ISO15693 transponders.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
106 (4)J31069-D0138-U001-A3-7618
3.4.4.7 [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
ISO15693-
ERROR
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Unaddressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse.
This byte is only available if STATUS = {0x95}.
Note
This command only functio ns for ISO15693 transponders.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 107
3.4.4.8 [0x27] Write AFI
This command writes a new AFI code to one or more transpo nders.
Different ISO15693 host commands a re supported depending on the ISO15693
transponder type. These are describe d in cha pter 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
ISO15693-
ERROR
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Unaddressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
AFI:
Application Family Identifier of the transponder
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse.
This byte is only available if STATUS = {0x95}.
Note
This command only functio ns for ISO15693 transponders.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
108 (4)J31069-D0138-U001-A3-7618
3.4.4.9 [0x28] Lock AFI
This command locks the A F I register in one or more transponders.
Different ISO15693 host commands a re supported depending on the ISO15693
transponder type. These are describe d in cha pter 3.4.1 Supported ISO15693 host
commands for ISO15693 transponders.
REQUEST-DATA
4 5 (6...13)
0x28 MODE UID
RESPONSE-DATA (STATUS = {0x95})
5
ISO15693-
ERROR
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Unaddressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse.
This byte is only available if STATUS = {0x95}.
Note
This command only functio ns for ISO15693 transponders.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 109
3.4.4.10 [0x29] Write DSFID
This command writes the DSFID to one or mo re transponders.
Different ISO15693 host commands a re supported depending on the ISO15693
transponder type. These are describe d in cha pter 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
ISO15693-
ERROR
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Unaddressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
DSFID:
Data Storage Format Identifier of the transponder
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse.
This byte is only available if STATUS = {0x95}.
Note
This command only functio ns for ISO15693 transponders.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
110 (4)J31069-D0138-U001-A3-7618
3.4.4.11 [0x2A] Lock DSFID
This command locks the DSFID register in one or more transponders.
Different ISO15693 host commands a re supported depending on the ISO15693
transponder type. These are describe d in cha pter 3.4.1 Supported ISO15693 host
commands for ISO15693 transponders.
REQUEST-DATA
4 5 (6...13)
0x2A MODE UID
RESPONSE-DATA (STATUS = {0x95})
5
ISO15693-
ERROR
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Unaddressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse.
This byte is only available if STATUS = {0x95}.
Note
This command only functio ns for ISO15693 transponders.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 111
3.4.4.12 [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
ISO15693-
ERROR
RESPONSE-DATA
5 6...13 14 15,16 17
DSFID UID AFI MEM-SIZE IC-REF ISO15693
‘0’ Only LSB
(32 bits) valid Manufacturer
Code MEM-SIZE Chip V ersion Tag-it HF
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Unaddressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse.
This byte is only available if STATUS = {0x95}.
DSFID:
Data Storage Format Identifier of the transponder
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
112 (4)J31069-D0138-U001-A3-7618
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 15 16
Bit 7...5 4...0 7...0
Content 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 trans-
ponders.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 113
3.4.4.13 [0x2C] Get Multiple Block Security Status
This command rea d s out the securit y st atus for public blocks from a transpon der.
REQUEST-DATA
4 5 (6...13) 6 / (14) 7 / (15)
0x2C MODE UID DB-ADR DB-N
RESPONSE-DATA (STATUS = {0x95})
5
ISO15693-
ERROR
RESPONSE-DATA
5 6
DB-N SEC-STATUS
DB-N
repeated
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Unaddressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
DB-ADR:
Number of the first block whose security status is requested. Valid values range
from 0 and 255.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
114 (4)J31069-D0138-U001-A3-7618
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
8
x
0x20 = 32
0x10 = 16
= 128 / x
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse.
This byte is only available if STATUS = {0x95}.
SEC-STATUS:
Block secu rity status.
Note
This command only functio ns for ISO15693 transponders.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 115
3.4.4.14 [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:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
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 functio ns for I-CODE1 transponders.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
116 (4)J31069-D0138-U001-A3-7618
3.4.4.15 [0xA1] Write Config Block
This command writes a co nfiguration 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:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
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 transpond er.
Note
This command only functio ns for I-CODE1 transponders.
Example of write-accessing configuration block 0 of a tag-it HF transponder
Configuration block 0 activates prote ctive 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 mu st be
used.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 117
3.4.5 [0xB1] Host commands for ISO15693: user-specific and manu-
facturer-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 REQUEST-
DATA CRC16
Host reader
1 2 3 4 5...(n-2) (n-1),n
n COM-ADR [0xB1] STATUS1 RESPONSE-
DATA CRC16
MFR:
Manufacturer code
MFR
0xXX
REQUEST-DATA:
Manufacturer-specific request
RESPONSE-DATA:
Manufacturer-specific response
Note
Data are only transmitted if STATUS = {0x0 0, 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
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
118 (4)J31069-D0138-U001-A3-7618
3.4.6 [0xBF] ISO15693 transparent command
This command sends user-transparent commands to the transp onder.
Host reader
1 2 3 4 5,6
n COM-ADR [0xBF] MODE RSP-
LENGTH ©
MODE 1+2 7,8 9...(n-2) (n-1),n
ª CMD-RSP-
DELAY REQUEST-
DATA CRC16
MODE 3+4 7,8 9,10 11...(n-2) (n-1),n
ª CMD-RSP-
DELAY EOF-PULSE-
DELAY REQUEST-
DATA CRC16
MODE 5 7,8 9,10 11...(n-2) (n-1),n
ª CMD-RSP-
DELAY MULTIPLE
302 GRIDS REQUEST-
DATA CRC16
Host reader
1 2 3 4 5...(n-2) (n-1),n
n COM-ADR [0xBF] STATUS1 RESPONSE-
DATA CRC16
MODE:
Request options
0x01 = Read request
Response is requested accordi ng to CMD-RSP-DELAY
0x02 = Write request with option “0”
The reader attempts to re ceive 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] ba ck.
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 EOF-
PULSE-DELAY and attempts to receive a response after CMD-RSP-
DELAY.
1 See chap. 3.6.4 Index of status bytes
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 119
0x04 = Inventory request
The reader attempts to re ceive 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 CMD-
RSP_DELAY). This procedure i s rep eated 16 times.
In this case, RSP-LENGTH specifies the response length in a
time slot. Transponder response s 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 whe re in the transponder data the erro r oc-
curred.
“1” The reader sends the received data back.
0x05 = Request with grid position of the response
The reader attempts to rea d a re sponse 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 G RIDS. If it receives no repl y, 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 re sponse 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 (ISO156 93: T1)
e.g. ISO15693 average value: {0x021 F} * 590 nsec = 320.4 µsec
EOF-PULSE-DELAY:
The EOF pulse delay is used in write procedu re s 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
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
120 (4)J31069-D0138-U001-A3-7618
REQUEST-DATA:
Complete transponder request without SOF, CRC16 and EOF
Note
The FLAGS for the read and write options in REQUEST-DATA must corresp ond to
the MODE byte in the request protocol. The reader al ways forces a command ac -
cording to the method specified in the MODE b yte of the re quest protocol.
RESPONSE-DATA:
Complete transponder respon se without SOF and EOF. The reader perform s a
CRC16 checksum test. However, it is the CRC16 of the transponder that is trans-
mitted with the response data.
Note
Data are only transmitted if STATUS = {0x0 0, 0x02, 0x83, 0x84, 0x94}.
The response data always consist of the number of data bytes specified in
RSP-LENGTH.
Note
This command only functio ns for ISO15693 transponders.
This command does not function if Buffered Read Mode or Scan mode is
enabled.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 121
3.5 Protocols for the Buffered Read Mode
3.5.1 Processes in the Buffered Read Mode
In the Buffered Read Mode, the reader itself reads out data from each transpon der
within the antenna field. This operating mode must b e enabled in configuration
block CFG10: General system parameters and configured in configuration block
CFG11: Buffered Read Mode.
The requested transpo nder data sets are stored in a FIFO buffer. The Buffered
Read Mode operates indep endently of any host command s and begins immedi-
ately after the device is swit ched 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 ba sic processes in the Buffered Read Mo de.
Host reader [0x21]
Read Buffer
Command to the reader
to read out data
Ø typ. 6 ms
Host reader Status, e.g. = {0x92}
no valid data
There are no data sets in the data buffer.
Ù .
Ù .
Ù .
Ù .
Host reader [0x21]
Read Buffer
Command to the reader
to read out data
Ø typ. 6 ms
Host reader Status, e.g. = OK
and n data sets
The data buffer contains data sets.
n data sets are transmitted to the host.
Ù .
Ù .
Ù .
Ù .
Host reader [0x32]
Clear Data Buffer
Command to the reader
to clear data sets that have already been
read
Ø typ. 6 ms
Host reader Status, e.g. = OK The n data sets that had already been
read
were deleted from the buffer.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
122 (4)J31069-D0138-U001-A3-7618
Ø: The host waits for a response from the reader
Ù: The host can perform other tasks, e.g. communicate with othe r readers.
You can obtain additional information regarding the capacity of the data buffer us-
ing the [0x31] Read Data Buffer Info command.
Note
When the HF supply is turned off with comman d [0x6A] RF ON/OFF and reader
synchronization is used, an arri ving 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 CFG 13: Anti -
collision and enable it in configuration block CFG10: General sys tem parame-
ters.
All transponder types set in config uration block CFG3: HF interface I are used in
the Buffered Read Mode.
After the device is switche d on or after the [0x63] CPU Reset command, the Buff-
ered Read Mode starts with transponder type D.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 123
3.5.3 [0x21] Read Buffer
The "Read Buffer“ command re ads out a number of data sets from the data buffer.
Host reader
1 2 3 4 5,6
6 COM-ADR [0x21] DATA-
SETS CRC16
Host reader
1 2 3 4 (5) (6)
6 / (n) COM-ADR [0x21] STATUS1 TR-DATA DATA-
SETS ©
(7...(n-2)) 5,6 / ((n-1),n)
ª DATA CRC16
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 transmit-
ted and an error will be output. If the response protocol reaches the maximum
length of 256 bytes, the reader reduces the num ber of data sets.
TR-DATA:
Selects the data types for the re ad procedure.
Bit: 7 6 5 4 3 2 1 0
Function - - TIMER - - - DB UID
UID = UID
DB = Data block
TIMER = Internal system timer
(For detail s, see chap. 3.1.6 [0x 85] Set System Timer.)
1 See chap. 3.6.4 Index of status bytes
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
124 (4)J31069-D0138-U001-A3-7618
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 CFG 11: Buffered
Read Mode.
Every data set has the following structure:
Data type DATA
UID Byte number. 1 2...9
TR-TYP UID
Data blocks Byte number. 1 2 3...6 to 3...130
DB-ADR DB-N DB
TIMER Byte number. 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 d ata 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 functio ns in the Buffered Read Mode.
Data are only transmitted if STATUS = {0x0 0, 0x83, 0x84, 0x93, 0x94}.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 125
3.5.4 [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 TAB-
START ©
9,10 11,12
ª TAB-LEN CRC16
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 antenn a
field before all requested data blocks ha ve 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
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
126 (4)J31069-D0138-U001-A3-7618
3.5.5 [0x32] Clear Data Buffer
The “Clear Data Buffer” command clears those data sets from the data buffer th at
you have already read usi ng the [0x21] Read Buffer command.
Host reader
1 2 3 4,5
5 COM-ADR [0x32] CRC16
Host reader
1 2 3 4 5,6
6 COM-ADR [0x32] STATUS1 CRC16
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
Host reader
1 2 3 4 5,6
6 COM-ADR [0x33] STATUS1 CRC16
1 See chap. 3.6.4 Index of status bytes
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 127
3.6 Appendix
3.6.1 Codes for transponder types
Value Transponder type
0x00 Philips I-CODE1
0x01 Texas Instruments Tag-it HF
0x03 ISO15693 transponder
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
128 (4)J31069-D0138-U001-A3-7618
3.6.2 Time response of the asynchronous interface
The reaction times of the asynchrono us interface depend on the following
factors:
Quantity of data to be read or written
Type and number of transpond ers supp orted by the reader
Location of the transponder at the time of the reque st
Any existing electromagnetic interference
Success or failure of the request
Minimum Typical Maximum Units
I-CODE1 Tag-it HF
EE parameter change
1 block (16 bytes)
all (16) blocks
5
22
340
300
600
msec
msec
msec
[0x1B] Reset QUIET Bit 5 9 ... 45 - 300 msec
[0x1C] EAS 5 15 ... 56 - 300 msec
[0x69] RF Reset 15 msec
[0xB0] Host commands
for ISO15693: required
and optional commands
5 1 2
msec
[0xB1] Host commands
for ISO15693: user-
specific and manufac-
turer-specific com-
mands
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
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 129
3.6.3 Time response of the ISO15693 host commands
The reaction time to the ISO15693 host command s 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 reque st
Any existing electromagnetic interference
Time reaction of the I-CODE1 and Tag-it HF transponders (only execution time)
Typical Units
I-CODE1 I-CODE1 Tag-it HF
(normal)1 (fast)1
Inventory with 1 transponder:
1 time slot
16 time slots
256 time slots
-
97
276
3137
-
21
132
1905
50
-
-
-
msec
msec
msec
msec
Read multiple blocks:
1 block, unaddressed
1 block, addressed
4 blocks, unaddressed
4 blocks, addressed
See table below
13
18
44
66
msec
msec
msec
msec
Write multiple blocks:
1 block, unaddressed
4 blocks, unaddressed
-
-
-
-
27
104
msec
msec
Write multiple blocks
(1 block, addressed):
1 time slot
16 time slots
256 time slots
-
149
361
3744
-
27
170
2465
33
-
-
-
msec
msec
msec
msec
Write multiple blocks
(4 blocks, addressed):
1 time slot
16 time slots
256 time slots
-
311
960
11360
-
67
444
6491
126
-
-
-
msec
msec
msec
msec
1 See chap. 2.2.1 CFG8: General transponder parameters
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
130 (4)J31069-D0138-U001-A3-7618
Read out multiple blocks (I-CODE1 tran sponders)
Time slots
1 16 256
Number of
blocks Unad-
dressed Ad-
dressed Unad-
dressed Ad-
dressed Unad-
dressed Ad-
dressed Typical
1 (4 bytes)
7,5
48 14
96 40
81 98
180 564
605 1435
1518 (fast)1 msec
(normal)1 msec
1 (4 bytes)
with SEC-
STATUS2
11
52 18
100 98
140 156
238 1493
1534 2364
2446 (fast)1 msec
(normal)1 msec
4 (16 bytes) 11
52 18
100 98
140 156
238 1493
1534 2364
2446 (fast)1 msec
(normal)1 msec
4 (16 bytes)
with SEC-
STATUS2
15
56 22
104 157
198 214
297 2421
2462 3293
3374 (fast)1 msec
(normal)1 msec
Time reactions of the ISO15693 transponders
All times refer to the following parameters. ISO15693-MODE = 0x0B (see chap-
ter 2.2.1 CFG8: General transponder parameters).
Fast mode (1 / 4)
High data speed
AFI deactivated
Only ISO15693 transpond er driver active
Modulation and subcarrier have almo st 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
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 131
Time reactions for [0x01] Inventory
The following diagram shows ave ra ge values for time reactions based on the nu m-
ber 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 in ventory timing is primar-
ily determined by anticollision, the com munication time can be disregarded.
Receive
Send
Communication time
+
=
Execution time
Tx
Rx
The measuring scenario for averag e 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 fro m the antenna.
Only ASK or a single subcarrier can be used for configuration with a time slot.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
132 (4)J31069-D0138-U001-A3-7618
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 incr eases 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 de-
pends on the application. Thirty tra nsponders is an average value. It may be higher
or lower for certain applica t ions.
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 sam e distance to the antenna.
Transponders are very close to the antenna.
The timing diagram with 16 time slots and one to 150 transponders shows the in-
ventory time reactions including communication time. Buffered read mode was
used.
Zeit [ms]
Zeit-
schlitze
Daten-
codierung
Subcarrier
Trans
p
onder
16 1 von 4 -
Remember that the time reaction of the Inventory (0xB0 0x01) co mmand 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 Inventor y command,
communication time is affected by the speed of the host system.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 133
Communicatio n time
+
=
Execution time More data requested
Host
Send
Tx
Receive
Rx
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
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
Get Multiple
Block Security
Status 32 blocks 19.5 16.5 5.4 4.6
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
134 (4)J31069-D0138-U001-A3-7618
Time reactions of read functions
Infineon my-d
Execution time (msec) Communication time at
115 kBaud (msec)
Without security block With security block
Read
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) Communication time at
115 kBaud (msec)
Without security block With security block
Read
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) Communication time at
115 kBaud (msec)
Without security block With security block
Read
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
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 135
STMicroelectronics (LRI512)
Execution time (msec) Communication time at
115 kBaud (msec)
Without security block With security block
Read
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
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
136 (4)J31069-D0138-U001-A3-7618
Time reactions of write functions
Infineon my-d
WR-Option = 0
Execution time (msec) Commun ication time at 115 kBaud (msec)
Write data block Lock data b lock Write data block Lock data bloc k
Write
Addres-
sed Selected Addres-
sed Selected Addres-
sed Selected Addres-
sed 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
Execution time (msec) Commun ication time at 115 kBaud (msec)
Write data block Lock data b lock Write data block Lock data bloc k
Write
Addres-
sed Selected Addres-
sed Selected Addres-
sed Selected Addres-
sed 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
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 137
Texas Instruments Tag-it HFI
WR-Option = 1
Execution time (msec) Commun ication time at 115 kBaud (msec)
Write data block Lock data b lock Write data block Lock data bloc k
Write
Addres-
sed Selected Addres-
sed Selected Addres-
sed Selected Addres-
sed 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
Execution time (msec) Commun ication time at 115 kBaud (msec)
Write data block Lock data b lock Write data block Lock data bloc k
Write
Addres-
sed Selected Addres-
sed Selected Addres-
sed Selected Addres-
sed Selected
1 block
4 bytes 36.5 31 2.7 1.9 2.2 1.5
2 blocks
8 bytes 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
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
138 (4)J31069-D0138-U001-A3-7618
3.6.4 Index of status bytes
Hexadecimal
value General information
0x00 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 switch ed to silent
Interference in communication between read er and transponder. The
reader can no longer recogniz e 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 trans-
ponders)
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 trans-
ponder.
The address is outside of the config ured address range of the trans-
ponder.
0x05 Incorrect transponder type:
This command is not supported by this transponder:
A specific command is not supported by the transpo nder.
Hexadecimal
value 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
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 139
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 rea der
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 b etween 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 handli ng was interrupted before no more colli-
sion 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 Diagnos-
tic command.
Incorrect configuration of the antenna; check antenna cable and an-
tenna setting.
Ambient noise too high
HF power does not match the configured valu e
Excessive temperature of the HF output stage; HF power can be re-
duced or switched off altogether.
Defective HF hardware
0x85 Synchronization error:
A timeout has occurred on the synchronizati on input. During the
SYNC-TIMEOUT time, no synchronization pulse was detec ted (see
chap. 2.3.2 CFG11: Buffered Read Mode). Increase the SYNC-
TIMEOUT time of the readers.
At least one reader in the chain is being used with synchronization
mode switched off.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
140 (4)J31069-D0138-U001-A3-7618
Hexadecimal
value 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 transpond ers was sent with the
response data
1 See chap. 2.3.2 CFG11: Buffered Read Mode
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 141
3.6.5 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-
turer-specific commands 117
[0xBF] [0xBF] ISO15693 transparent command 118
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
142 (4)J31069-D0138-U001-A3-7618
3.6.6 Index of configuration parameters
CFGn Description Access1 Page
Reader parameters
0 CFG0: Passwords WO 24
1 Configuration protection
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 l ogged in with
the command [0xA0] Reader Login with a valid
reader ID
CFG1: General inputs and outputs
R/W 25
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
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
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 143
3.6.7 Memory model for I-CODE1 transponders
For access, the memory is subdivided in to 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 Cond itions for write
access
3 C1 Special functions
(EAS, QUIET bit)
4 C2 Family code /
application ID
Read / write
Can be set to "read
only“
5 D0 User User memory
6 D1
7 D2
8 D3
9 D4
10 D5
11 D6
12 D7
Read / write
Can be set to "read
only“
13 D8
14 D9
15 D10
Note
When writing data to a transponde r, it must be en sured 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.
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
144 (4)J31069-D0138-U001-A3-7618
UID:
This block contains a unique, 64-bit transpond er UID (read -only acce ss).
Bit Byte Function
0...7 0 UID, MSB
8...15 1
16...23 2
24...31 3
32...39 4
40...47 5
48...55 6
56...63 7 UID, LSB
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 145
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 enable d
write protection for block C0, you cannot enable any additional protective functions
(hardware write prote ction).
Bit Byte Function2 Procedure
I-Scan block I-CODE1 block
0 0 “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
8 1 “1” = r/w, “0” = ro D8 13
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 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 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
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
146 (4)J31069-D0138-U001-A3-7618
Configuration block 1:
This block is used to enable special functions (EAS / QUIET mode).
If the EAS mode ("Electronic Article Surveillance“) i s enabled, all transponders re-
spond 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. Th e I-CODE1 transponder re-
sponds to no command other than the E AS.
Bit Byte Function
0 0 “1”: enable EAS
“0”: disable EAS
1 “1”: enab le 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 applicatio n 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.
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 147
3.6.8 Examples of Reading Data
Different values must be used for the DB-N factor regardless of whether you are
using ISO15693 Host Mod e or Buffered Read Mode.
Depending on DB-SIZE of the transponder, they are not 4 bytes. Make su re that
the data block always has 4 byte s in Buffered Read Mode (BRM). Use DB-N=2
(2 x 4 bytes) in buffered Re ad 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 (B RM) (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)
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
148 (4)J31069-D0138-U001-A3-7618
Buffered Read Mode (BRM) (DB-SIZE of transponder = 4 bytes)
05/05 Description of protocols for SLG D1 0
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 149
ISO15693 host command (DB-SIZE of transponder = 8 bytes)
Description of protocols for SLG D1 0 05/05
C/C++ MDWAPI
150 (4)J31069-D0138-U001-A3-7618
Buffered Read Mode (BRM) (DB-SIZE of transponder = 8 bytes)
05/05 SLG D11/D12 overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 151
4 SLG D11/D12 overview
4.1 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 vario us applications. The following table shows what inte r-
faces are supported by the various kind s of data transmission:
Asynchronous interface
(RS 232 / RS 422)
Configuration commands
Control commands
ISO15693 host commands
Scan mode
4.1.1 Configuration commands and control commands
This kind of data transmission is used fo r configuring the reader and for diagnosis
via the asynchronous interface or the USB interface.
The reader configuration param eters are stored in the reader memory. To protect
the current configuration from being lost when the device is swit ched 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 re sponse contains status
or data information of the control command.
Host (terminal / PC / ....) Reader
Parameter command /
control command Parameters received and saved /
control command processed
Yes No
Status /
data Error status
SLG D11/D12 overview 05/05
C/C++ MDWAPI
152 (4)J31069-D0138-U001-A3-7618
4.1.2 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 re main within the
detection field of the reader for this purpose.
Note
When writing data to a transponde r, you must ensure that the transponde r remains
completely within the recognition field of the reader during the entire write proce-
dure. Data will be lost if the transponder leaves the detection ran ge 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] Inven-
tory. When a transponder is located in the reco gnition field of the reader at this
moment, it replies with its UID. The transponder must then be addressed with the
correct UID during all su bsequent read and write commands.
The following flowchart shows the step s required for communicati on with a trans-
ponder in addressed mode.
Host (terminal / PC / ....) Reader
“Inventory” tu query the UID Transponder in the antenna fi eld?
Yes No
Status /
number of se-
lected transpond-
ers / UID
Status = no trans-
ponder
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 trans-
ponder in reader
field
Write data with UID to the trans-
ponder Transponder with correct UID in the
antenna field?
Yes No
Status OK Status = no trans-
ponder in reader
field
05/05 SLG D11/D12 overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 153
Not addressed mode:
In not addressed mode, you do not need to know the UID of the transp onder. This
mode is recommended wh en only one transponder is located in the recognition
field of the reader.
The following flowchart shows the step s required for communicati on with one
transponder in not addre ssed mode.
Host (terminal / PC / ....) Reader
Read data Transponder in the antenna fi eld ?
Yes No
Status /
transponder data
that have been
read
Status = no trans-
ponder in reader
field
Write data Transponder in the antenna fi eld ?
Yes No
Status OK Status = no trans-
ponder in reader
field
SLG D11/D12 overview 05/05
C/C++ MDWAPI
154 (4)J31069-D0138-U001-A3-7618
Selected:
In this mode, the reader only communicates with one selected tran sponder.
Before you can read or write in sele ct mode, the UID of the transpo nder 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 comm and [0x25] Select.
This must contain the UID of the transponder.
The following flowchart shows the step s required for communicati on with a trans-
ponder in select mode.
Host (Terminal / PC / ....) Reader
“Inventory” for query of UID Transponder in antenna fiel d?
Yes No
Status/number of
selected trans-
ponders/UIDs
Status = no trans-
ponders
Select transponder with UID Transponder with correct UID in the
antenna field?
Yes No
Status/read
transponder data Status = no trans-
ponder in reader
field
Read data Selected transponder in antenna field?
Yes No
Status/read
transponder data Status = no trans-
ponder in reader
field
Write data Selected transponder in antenna fie ld?
Yes No
Status OK Status = no trans-
ponder in reader
field
05/05 SLG D11/D12 overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 155
4.1.3 Scan mode
In this mode, the reader automatically sends data to the host as soon as a trans-
ponder 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 asynchro-
nous interface.
The reader begins with the output of the protocol block as soon as all req uired data
have been correctly read from the transponder. If the reader is u nable to read all
data of a protocol block completely and correctly, it outputs no data. If, for example,
the address of the data block i s invalid, the UID of the transponder is not sent.
Scan mode with the asynchronous interface
The data are output as shown bel ow 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 d ata block are to be
read:
Example 2:
Three transponders are lo cated in the recognition field. Only the UID is to be rea d.
PR UID1 EZ UID2 EZ UID3 EZ
Example 3:
Three transponders are lo cated in the recognition field. Only the data block is to be
read.
PR Data1 EZ Data2 EZ Data3 EZ
SLG D11/D12 overview 05/05
C/C++ MDWAPI
156 (4)J31069-D0138-U001-A3-7618
Example 4:
Two transponders are located in the recognition field. UID and data block are to be
read.
PR UID1 TZ Data1 EZ UID2 TZ Data2 EZ
PR: Communication prefix (o ptional)
UID: Serial number (fixed)
Data: Data blocks (can be programmed as de sired)
TZ: Separator character (optional)
EZ: End character (optional )
ts: SCAN-LOCK-TIME
tr: Time until the next new read acce ss of the transponder
Note
When configuration protocols are to be sent to the reader when scan mode is
active, no transponder sho uld be located in the recognition field of the reader
during this time.
Only read operations a re p ossible in scan mode.
05/05 SLG D11/D12 overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 157
4.2 Asynchronous interface
4.2.1 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 conne cted host (terminal, PC, etc.) is governed by fixed protocols.
These are designed for data busse s 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 2 3 4...(n-2) (n-1) n
LENGTH =
n
COM-
ADR
CONTRO
L BYTE
PROTOCOL
DATA
MSB
CRC16
LSB
CRC16
Host reader
1 2 3 4 (5...(n-2)) (n-1) n
LENGTH =
n
COM-
ADR
CON-
TROL
BYTE
STATUS1(PROTOCOL
DATA)
MSB
CRC16
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 be en provided with a point-to-point co nnection (RS 232,
RS 422 upon request) (no RS 485)!
1 See chap. 6.5.4 Index of status bytes
SLG D11/D12 overview 05/05
C/C++ MDWAPI
158 (4)J31069-D0138-U001-A3-7618
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 ho st
command mode (see al so 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 .. ..
Õ 5...n ms Ö Õ5 ms min.Ö
Host reader: .. .. ..
Data timeout:
The individual characters within a p roto col mu st occur in intervals of not more than
12 ms.
Õ12 ms max. Ö Õ12 ms max. Ö Õ12 ms max. Ö
Host reader: Character n Character n+1 Character n+2 ..
05/05 SLG D11/D12 overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 159
4.2.2 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);
}
}
SLG D11/D12 configuratio n parameters (CFG) 05/05
C/C++ MDWAPI
160 (4)J31069-D0138-U001-A3-7618
5 SLG D11/D12 configuration parameters (CFG)
The reader configuration memo ry is subdivided into configuration blocks of
16 bytes each. Each block consist s of 14 byte s of configuration parameters and a
2-byte CRC16 checksum. Each config uration 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 13 14 15
Contents PARAMETERS CRC16
The parameters are stored in two se parate locations within the configuration mem-
ory:
Reader RAM
Storage EEPROM (for storing pa rameters when the device is switched off)
You can address multiple locations in th e config uration memory via the value of the
CFG-ADR parameter describe d in chap. 6.1 Protocols for configuring the reader.
CFG-ADR:
CFGn: Memory address of the required configuration block
LOC: Configuration block location (RAM / EEPROM)
MODE: Specifies whether one or all configuration blocks should be accessed
Bit: 7 6 5 4 3 2 1 0
Function LOC MODE CFGn: Configur ation block address
The configuration blocks in the EEPROM are protected by a 16-bit CRC checksum.
These checksums are checked e ve ry time the reader is reset. If an false checksum
is discovered, the reader enters into the "EE Init Mode“ error status and resets th e
defective configuration block back to its default values.
The LED1 flashes alternately red and green. The reader re sponds to external com-
mands with the “0x10 EEPROM Error” status. You can exit EE-Init mode by an-
other 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 a re configured outside of their permissi-
ble range or if unspecified parameters a re chan ged.
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
05/05 SLG D11/D12 configuration parameters (CFG )
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 161
Description of configuration parameter structure
Byte 0 1 2 ......n
Contents concerns
RAM concerns
EEPROM -
reserved .....
Any changes to this
parameter become effec-
tive only after this con-
figuration block has been
written to / stored in the
EEPROM and the
reader has been reset.
Any changes to this
parameter become ef-
fective immediately after
this configuration block
is written to or stored in
the RAM.
These bits or bytes are
reserved for future exten-
sions or for internal test-
ing and production pur-
poses. They must not be
modified, as this may
lead to faulty reader op-
eration.
SLG D11/D12 configuratio n parameters (CFG) 05/05
C/C++ MDWAPI
162 (4)J31069-D0138-U001-A3-7618
5.1 CFG0: Reserved
The configuration block CFG0 is reserved for later u se.
Byte 0 1 2 3 4 5 6
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
5.2 CFG1: Interface
The parameters of configuration bl ock CFG1 contain the data transmission set-
tings.
Byte 0 1 2 3 4 5 6
Con-
tents COM-ADR 0x00 BAUD1 TRANS-
FORM1 0x00 0x00 TR-
RESPONSE-
TIME
Default 0x00 0x08 0x01 0x00
0x00 38400 baud e,8,1
Byte 7 8 9 10 11 12 13
Con-
tents TR-
RESPONSE-
TIME
0x00 0x00 0x00 0x00 0x00 READER-
MODE
Default 0x1E 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}
05/05 SLG D11/D12 configuration parameters (CFG )
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 163
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 a ddress 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
6
7
8
4800 baud
9600 baud
19200 baud
38400 baud
Note
A change in baud rate does not take effect until after the CFG1 con f iguration
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 ha s
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}
SLG D11/D12 configuratio n parameters (CFG) 05/05
C/C++ MDWAPI
164 (4)J31069-D0138-U001-A3-7618
TRANS-FORM1:
This byte is used to define various pa rameters of the data transmission format of
the asynchronous interface.
Bit: 7 6 5 4 3 2 1 0
Function: 0 0 0 0 S D P
P:
Parity
P Parity
b00
b01
b02
b11
None
Even
Uneven
Do not use.
D:
Data bits
D Data bits
b0
b1 8
Do not use.
S:
Stop bits
S Stop bits
b0
b1 1
Do not use.
Note
Any changes to TRANS-FORM become effective only after config uration 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}
05/05 SLG D11/D12 configuration parameters (CFG )
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 165
TR-RESPONSE-TIME:
This parameter can be use d to specify the maximum response duration for trans-
ponder 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-RESPONSE-
TIME. In this case, execution of current command s between reader and trans-
ponder are terminated. If this time is too short, the interface status [0x83] “HF
communication erro r” 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 protocol s 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)
SLG D11/D12 configuratio n parameters (CFG) 05/05
C/C++ MDWAPI
166 (4)J31069-D0138-U001-A3-7618
5.3 CFG2: General inputs/outputs1
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 ar e performed using these bytes as shown belo w. In addi-
tion, different LED flashing frequencies and buzzer intervals can be assigned to
“enabled” and “silent.” Thu s, the LED is used to indicate the operating mode.
Byte 0 1 2 3 4 5 6
Contents 0x00 0x00 0x00 IDLE-
STATE IDLE-
FLASH 0x00 0x00
Default 0xA9 0x00
Byte 7 8 9 10 11 12 13
Contents ACTIVE-
STATE ACTIVE-
FLASH ACTIVE-
GRN-TIME ACTIVE-
RED-TIME ACTIVE-
BUZZER-
TIME
0x00 0x00
Default 0x26 0x00 0x0A 0x0A 0x0A
1 second 1 second 1 second
Note
The readers are equipped with a two-color LED (red / gre en). By combining the two
basic colors, the color oran ge may also be produced.
LED color: Red Green
Red 1 0
Green 0 1
Orange 1 1
1 Not available for SLG D11/D12
05/05 SLG D11/D12 configuration parameters (CFG )
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 167
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 sign al transmitter.
Bit: 7 6 5 4 3 2 1 0
Function: Buzzer /
LED
(turn on)
0 Buzzer
RED 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 opera-
tional. After the reader is reset by the software, both LEDs light up for two sec-
onds.
GRN / RED / buzze r
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 trans-
mitter to different flashing frequencies for "idle" and "enable d".
Bit: 7 6 5 4 3 2 1 0
Function: 0 0 Buzzer RED GRN
Bit combination Flashing frequency
b11
b10
b01
b00
1 Hz
2 Hz
4 Hz
8 Hz
ACTIVE-xxx-TIME
If a transponder has been d etected, you can set the signal transmitter and duration
using the “ACTIVE-STATE” and “ACTIVE-FLASH” bytes. Each signal transmitte r
(LED, buzzer) can be en abled 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
SLG D11/D12 configuratio n parameters (CFG) 05/05
C/C++ MDWAPI
168 (4)J31069-D0138-U001-A3-7618
5.4 CFG3: HF interface
The parameters of configuration bl ock CFG3 contain global settings for the trans-
ponder driver and the reader.
Byte 0 1 2 3 4 5 6
Contents TAG-DRV1 0x00 0x00 0x00 0x00 0x00
Default 0x000B
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
TAG-DRV1:
Specifies the transponder types to be processed 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 disabl ed
b1 Driver for this transponder type is enabled
.A: Driver for I-CODE1
.B: Driver for Tag-it HF
.D: Driver for ISO15693
In general, you should only enable tho se transponder drivers that you
require for a particular application. This will reduce reader response
time to transponder read/write operation s and rule out the possibility of
“parasitic” transponder a ccess 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}.
05/05 SLG D11/D12 configuration parameters (CFG )
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 169
5.5 CFG4: Transponder parameters
The parameters of configuration bl ock CFG4 contain general transponder settin gs.
Byte 0 1 2 3 4 5 6
Contents I-CODE-
MODE FAM-
CODE APP-ID 0x00 ISO15693-
MODE ISO15693-
AFI ISO15693-
OPTION
Default 0x00 0x00 0x00 0x0F 0x00 0x0C
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
I-CODE-MODE: (I-CODE1 transponders only)
Bit: 7 6 5 4 3 2 1 0
Function: Mapping 0 0 0 0 0 0 0
Mapping:
Mapping
b0
b1 Reserved
I-Code1 memory model
Note
If mapping is set to “I-Code1 memory model,” ho st commands [0xA0] Read Con-
fig 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 transpon der
SLG D11/D12 configuratio n parameters (CFG) 05/05
C/C++ MDWAPI
170 (4)J31069-D0138-U001-A3-7618
APP-ID: (I-CODE1 transponders only)
Application ID for selecting a transpond er
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 DATA-
RATE SUB-
CARRIER MOD DATA-
CODING
DATA-CODING
DATA-CODING
b0
b1 Do not use.
Fast mode (1 / 4)
MOD
MOD
b0
b1 Do not use.
10%
SUB-CARRIER
SUB-CARRIER
b0
b1 ASK (1 subcarrier)
FSK (2 subcarriers)
DATA-RATE
DATA-RATE
b0
b1 Do not use.
High
NO-TS
NO-TS
b0
b1 16 time slots
1 time slot
05/05 SLG D11/D12 configuration parameters (CFG )
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 171
AFI
AFI
b0
b1 Disabled
Enabled
ISO15693-AFI:
Code for the application family for sele cting a transponder
ISO15693-OPTION:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 WR-OPTION 0 0
WR-OPTION (supported as of firmware 2.04)
WR-OPTION
b00
b10
b11
Set automatically
Transponder option = 0
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 m ode. If a Tag-it HF trans-
ponder is used, WR-OPTION must be set to 1.
For more details on the co rrect WR-OPTION, see chapter 6.4.1 Supported
ISO15693 host commands for ISO15693 transponders.
SLG D11/D12 configuratio n parameters (CFG) 05/05
C/C++ MDWAPI
172 (4)J31069-D0138-U001-A3-7618
5.6 CFG5: Anticollision
The parameters of configuration bl ock CFG5 contain anticollision settings.
Byte 0 1 2 3 4 5 6
Contents TIMESLOTS1 0x00 0x00 0x00 0x00 0x00 0x00
Default 0x02
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x0F ONT 0x00 0x00
Default 0x01
TIMESLOTS1: (I-CODE1 transponders only)
Number of time slots with which the transponders are read.
TIMESLOTS Number of time slots
0x03
0x02
0x01
0x00
16
8
4
1
Each I-CODE1 transpo nder 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 ca n be selected simultaneously. To o 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}.
05/05 SLG D11/D12 configuration parameters (CFG )
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 173
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 Function
b0 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 Only the data of the newly selected transponders are sent to the
host.
SLG D11/D12 configuratio n parameters (CFG) 05/05
C/C++ MDWAPI
174 (4)J31069-D0138-U001-A3-7618
5.7 CFG6: Scan mode 1
The parameters of configuration bl ock CFG6 contain the settings for the scan
mode. You can activate the scan mode by setting the SCAN-MODE bit in configu-
ration block 1 (see chap. 5.1).
Byte 0 1 2 3 4 5 6
Contents SCANNER-
MODE 0x00 0x00 SCAN-
DATA 0x00 0x00 SCAN-
LOCK-
TIME
Standard
SLG
D11/D12
0x02 0x01 0x00
Byte 7 8 9 10 11 12 13
Contents SCAN-
LOCK-TIME 0x00 0x00 0x00 DB-ADR D-LGT D-START
Standard
SLG
D11/D12
0x0A
1 second
0x00 0x04 0x00
SCANNER-MODE:
Specifies the type of scan procedure.
Bit: 7 6 5 4 3 2 1 0
Function Trigger 0 0 0 0 mode
MODE:
Bit combination Mode
b000
b010 Read once
Read continuously
Read once:
(enabled during the read procedure – ends after reading was sucessful)
The reader ends the scan procedure as soon as all transpon ders in the recogni-
tion field have been decoded. Transpon ders 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 transponde rs. This operating mode is
primarily suitable for demonstration and diagnosis purposes.
05/05 SLG D11/D12 configuration parameters (CFG )
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 175
Trigger:
Trigger Function
b0
b1 Trigger deactivated
Trigger activated
Trigger deactivated:
The reader scans continuously. This mode increases power consumption, how-
ever.
Trigger activated:
The reader begins scanning when the trigger is activated by the external switch.
Note
When trigger is enabled a nd not activated by the external switch, the HF field is off.
SCAN-DATA:
Selects the data types to be sent in the scan mode.
Bit: 7 6 5 4 3 2 1 0
Function Byte
Order COM-
Prefix 0 0 0 0 DB UID
UID
When this bit is set, the UID is output.
UID Function
b0
b1 No outp ut of the UID
Output of the UID
DB (data block)
When this bit is set, a specified data field is output.
DB Function
b0
b1 No outp ut of a data field
Output of a data field
COM prefix:
When this option is set, the reader transfers the COM-ADR before each data re-
cord.
COM prefix Function
b0
b1 COM-ADR of the rea der is not transferred.
COM-ADR of the reader is transferred.
SLG D11/D12 configuratio n parameters (CFG) 05/05
C/C++ MDWAPI
176 (4)J31069-D0138-U001-A3-7618
Byte order:
Specifies the order of the bytes within the protocol frame
Byte order Function
b0
b1 MSB first
LSB first
SCAN-LOCK-TIME: (1 ... 65535 * 10 msec = 10 msec ... 10.9 min)
SCAN-LOCK-TIME specifies the time durin g which the reader does not send the
transponder data a seco nd time after the first send procedure. It makes no differ-
ence whether or not the transponder is in the recognition field of the reader during
SCAN-LOCK-TIME. SCAN-LOCK-TIME begins after the data a re sent from the
transponder to the reader.
tr: Time for reading the transponder data
to: Data transmission from reader to host
ts: 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 comma nds for ISO15693 transpond-
ers.
05/05 SLG D11/D12 configuration parameters (CFG )
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 177
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 includi ng UID, time and so on can be transferred with the
interface. If more than 254 bytes are sent, the last bytes a re 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.
SLG D11/D12 configuratio n parameters (CFG) 05/05
C/C++ MDWAPI
178 (4)J31069-D0138-U001-A3-7618
5.8 CFG7: Scan mode 2
Byte 0 1 2 3 4 5 6
Contents DB-USE SEP-CHAR SEP-USR END-
CHAR END-USR 0x00 0x00
Default 0x02 0x20 0x2C 0x01 0x0D
Byte 7 8 9 10 11 12 13
Contents 0x00 0x00 0x00 0x00 0x00 0x00 0x00
DB-USE:
Specifies the format of the data and their value
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 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 recei ved fro m the transponder are converted here to
ASCII code before being sent. The data bytes a re 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
05/05 SLG D11/D12 configuration parameters (CFG )
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 179
SEP-CHAR / END-CHAR:
Specifies the separation chara cter/end c haracter between two data types for send
data.
Bit: 7 6 5 4 3 2 1 0
Function USER ‘ ’ ‘,’ ‘;’ TAB CR LF CR+LF
ASCII Hex
CR+LF 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 sel ected.
SEP-USR:
User-defined separation character
END-USR:
User-defined end character
0xC b1100 ’C’ 0x43
0xD b1101 ’D’ 0x44
0xE b1110 ’E’ 0x45
0xF b1111 ’F’ 0x46
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
180 (4)J31069-D0138-U001-A3-7618
6 Description of protocols for SLG D11/D12
6.1 Protocols for configuring the reader
Using the reader configuration protocols, the reader can be adapte d 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 addre ssed 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
CFG-ADR2:
Bit: 7 6 5 4 3 2 1 0
Function LOC 0 CFGn: Configuration block address
CFGn: Memory address of the required configuration block
LOC: Configuration block location
LOC Block location
0
1 RAM
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)
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 181
6.1.2 [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 parame-
ters is found in chap. 5 SLG D10 configuration para meters (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 6 5 4 3 2 1 0
Function LOC 0 CFGn: Configuration block address
CFGn: Memory address of the required configuration block
LOC: Configuration block location
LOC Block location
b0
b1 RAM
EEPROM
CFG-REC:
Configuration block with a length of 14 bytes that is store d in the re ader configura-
tion 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)
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
182 (4)J31069-D0138-U001-A3-7618
6.1.3 [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
Host reader
1 2 3 4 5,6
6 COM-ADR [0x82] STATUS1 CRC16
CFG-ADR2:
Bit: 7 6 5 4 3 2 1 0
Function 0 MODE CFGn: Configuration block address
CFGn: Memory address of the required configuration block
MODE: 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 d evice 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)
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 183
6.1.4 [0x83] Set Default Configuration
The “Set Default Configuration” command lets you re set ea ch 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 6 5 4 3 2 1 0
Function LOC MODE CFGn: Configuration block address
CFGn: Memory address of the required co nfiguration 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 d evice is
switched off, use [0x82] Save Configuration.
A “Set Default Configuration”with reserved co nfiguration blocks will cause an
error code.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
184 (4)J31069-D0138-U001-A3-7618
6.2 Protocols for controlling the reader
6.2.1 [0x52] Baud Rate Detection
This protocol is used to determine the baud rate set for the asynchronous interfa ce
of the reader.
Host reader
1 2 3 4 5,6
6 COM-ADR [0x52] 0x00 CRC16
Host reader
1 2 3 4 5,6
6 COM-ADR [0x52] 0x00 CRC16
Note
The response proto col is o nly 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
Host reader
1 2 3 4 5,6
6 0x00 [0x55] 0x00 CRC16
Note
This command is onl y available if the COM-ADR of the reader is set to “0.”
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 185
6.2.3 [0x63] CPU Reset
This protocol lets you reset the reader CPU.
Host reader
1 2 3 4,5
5 COM-ADR [0x63] CRC16
Host reader
1 2 3 4 5,6
6 COM-ADR [0x63] STATUS1 CRC16
Note
After a “CPU Reset,” the HF field is off.
1 See chap. 6.5.4 Index of status bytes
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
186 (4)J31069-D0138-U001-A3-7618
6.2.4 [0x65] Get Software Version
This protocol lets you deter mine 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
SW-REV:
Firmware version
D-REV:
Version of development firmware. D-REV is set to "0" for customized firmware ver-
sions.
SW-TYPE:
Reader firmware type
SW-TYPE Reader type
0x4A SLG D11/D12
TR-TYPE:
Shows the transponders su pported by the software.
Bit: 15 14 13 12 11 10 9 8
Function: 0 0 0 0 0 0 0 0
Bit: 7 6 5 4 3 2 1 0
Function: 0 0 0 0 ISO
15693 0 Tag-it
HF I-
CODE1
1 See chap. 6.5.4 Index of status bytes
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 187
6.2.5 [0x69] RF Reset
The HF field of the reader antenna can be switched off for trf = 15 ms using the “RF
Reset” command. This re sets 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
Host reader
1 2 3 4 5,6
6 COM-ADR [0x69] STATUS1 CRC16
Note
After the “RF Reset” command, the reader cannot receive new transponders
before time trf has expired.
After the “RF Reset” comm and, transponders that are located within the an-
tenna 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“ comm and switches the HF field of the read er antenna ON or
OFF.
Host reader
1 2 3 4 5,6
6 COM-ADR [0x6A] RF CRC16
Host reader
1 2 3 4 5,6
6 COM-ADR [0x6A] STATUS1 CRC16
RF:
RF HF field of reader antenna
0x00 OFF
0x01 ON
1 See chap. 6.5.4 Index of status bytes
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
188 (4)J31069-D0138-U001-A3-7618
6.2.7 [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 specifi ed 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 co ntained 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
Host reader
1 2 3 4 5,6
6 COM-ADR [0x71] STATUS2 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.
Bit: 15 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 Red LED mode Green LED
mode
Mode Function
b00 UNCHANGED OS-Time does not change the state of the signal trans-
mitter
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
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 189
OSF:
The OSF word ("Output State Flash“, output flashing frequency) lets you assign a
separate flashing or pulse frequ ency to each LED and buzzer.
Bit: 15 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) Red LED freq. Green LED freq.
Freq. Frequency
b11
b10
b01
b00
1 Hz
2 Hz
4 Hz
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 State of LEDs/Buzzer
0x0000
0x0001
...
0xFFFE
0xFFFF
Unchanged
1 x 100 msec 100 msec active
65534 x 100 msec 1:49:13 h active
Always active
Note
To reset a signal transmitter than is enabled continuosly, sen d the reader a
value of 1 for "OS-Time". The reader then switches to the idle state after 100
ms.
A continuously enabled sig nal transmitter is reset as a result of a reset proce-
dure or power failure.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
190 (4)J31069-D0138-U001-A3-7618
6.3 Special commands
6.3.1 [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, tran sponders that were previously in the resting
mode are re-enabled. chap. 3.6.7 Memory model for I-CODE1 transponders de-
scribes how to enabl e the resting mode for I-CODE1 transponders.
Host reader
1 2 3 4,5
5 COM-ADR 0x1B CRC16
Host reader
1 2 3 4 5,6
6 COM-ADR 0x1B STATUS1 CRC16
1 See chap. 6.5.4 Index of status bytes
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 191
6.4 Protocols for ISO15693 host commands
6.4.1 Supported ISO15693 host commands for ISO15693 transpond-
ers
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 Remarks
Not Addressed Addressed Selected
0x01 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 Rea dy 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 - - - -
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.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
192 (4)J31069-D0138-U001-A3-7618
6.4.1.2 Philips (I-Code SLI)
IC manufacturer's ID: 0x04
Memory organization: 32 x 4 bytes = 1 Kbit
No. of blocks 32 (user ra nge: 0 to 27)
Block length 4 bytes
Command
Code Command Mode Remarks
Not Ad-
dressed Ad-
dressed Se-
lected
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 parame t ers.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 193
6.4.1.3 STMicroelectronics (LRI512)
IC manufacturer's ID: 0x02
Memory organization: 16 x 4 bytes = 512 bits
No. of blocks 16 (user ra nge: 0 to 15)
Block length 4 bytes
Command
Code Command Mode Remarks
Not Ad-
dressed Ad-
dressed Se-
lected
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 parame t ers.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
194 (4)J31069-D0138-U001-A3-7618
6.4.1.4 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 ra nge: 0 to 63)
Block length 4 bytes
Command
Code Command Mode Remarks
Not Ad-
dressed Ad-
dressed Se-
lected
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 use s the co mmands “Write_2_Blocks” and
“Lock_2_Blocks.” This only takes effect when the blo ck address starts with an
even-number address.
The command “Write_2_Blocks” / “Lock_2_Blo cks” is combined with the com-
mand “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 parame t ers.
In “not addressed” mode, the WR-OPTION must be set by hand to “WR-OPTION = 1.”
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 195
6.4.2 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 ra nge: 0 to 11)
Block length 4 bytes
Command
Code Command Mode Remarks
Not Ad-
dressed Addres-
sed Selec-
ted
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 C onfig Block - -
0xA1 Wr ite Config Block - -
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
196 (4)J31069-D0138-U001-A3-7618
6.4.3 Supported ISO15693 host commands for Tag-it HF Transpond-
ers
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
Addres-
sed
Addres-
sed Selec-
ted
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 C onfig Block - - - -
0xA1 Write Config Block - - - -
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 197
6.4.4 [0xB0] Host commands for ISO15693: required and optional
commands
This command sends RF commands as defined by ISO15693 to the tran sponder.
Host reader
1 2 3 4...(n-2) (n-1),n
n COM-ADR [0xB0] REQUEST-
DATA CRC16
Host reader
1 2 3 4 5...(n-2) (n-1),n
n COM-ADR [0xB0] STATUS RESPONSE-
DATA CRC16
REQUEST-DATA:
Command-specific request
RESPONSE-DATA:
Command-sp ecific re spo nse
Note
Data are only transmitted if STATUS = {0x0 0, 0x83, 0x94, 0x95}.
The commands will not function when Scan m ode is activated.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
198 (4)J31069-D0138-U001-A3-7618
6.4.4.1 [0x01] Inventory
This command reads the UIDs of all transponders in the antenna field.
When the reader detects a new transponder, it automat ically switches the trans-
ponder to the idle state. In this state the transpo nder 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 configura t ion 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 6 5 4 3 2 1 0
Function MORE 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 avail-
able 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.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 199
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 executio n of the "Inve ntory" command.
If ONT = {b0}, an RF Reset is exe cuted to read the UIDs of all transponders in
the antenna field.
If the STATUS byte in the protocol frame has the val ue {0x94}, additional UIDs
can be read out from the reade r with MORE = {b1}.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
200 (4)J31069-D0138-U001-A3-7618
6.4.4.2 [0x02] Stay Quiet
This command sets the transp onder into the quiet state.
REQUEST-DATA
4 5 6...13
0x02 MODE UID
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b001 Addressed
UID:
Transponder UID (read-only access)
Note
This command only functions for ISO15693 transponders.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 201
6.4.4.3 [0x22] Lock Multiple Blocks
This command locks one or more data blocks.
Different ISO15693 host commands a re supported depending on th e ISO15693
transponder type. These are describe d in cha pter 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
ISO15693-
ERROR DB-ADR-E
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Unaddressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
202 (4)J31069-D0138-U001-A3-7618
DB-ADR:
Number of the first block t o be locked. The first block number can lie between 0
and 255.
DB-N:
Number of data blocks to be locked, beg inning with DB-ADR. The maximum value
of DB-N depends on the block si ze. The maximum number of bytes is 128.
DB-Size Max. DB-N
4
8
x
0x20 = 32
0x10 = 16
= 128 / x
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse. This byte is only available if
STATUS = {0x95}.
DB-ADR-E:
Block number in which the error occured.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 203
6.4.4.4 [0x23] Read Multiple Blocks
This command reads one or more data blocks.
Different ISO15693 host commands a re supported depending on th e ISO15693
transponder type. These are describe d in cha pter 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
ISO15693-
ERROR
RESPONSE-DATA
5 6 7 8...n
DB-N DB-SIZE SEC-STATUS DB
DB-N repeated
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 SEC ADR
ADR:
ADR
b000 Unaddressed
b001 Addressed
b010 Selected
SEC:
SEC
b0 SEC-STATUS always = {0x00}
b1 Security status of followed block in SEC-STATUS
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
204 (4)J31069-D0138-U001-A3-7618
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
DB-ADR:
Number of first block to be read. The first block number can lie be tween 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 numbe r of
bytes is 128.
DB-Size Max. DB-N
4
8
x
0x20 = 32
0x10 = 16
= 128 / x
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse. 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 secu rity status of the last data block if supported by ISO15693 transponder.
I-CODE1 transponders do not support this function.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 205
DB:
Requested data block. The block size is specified in DB-S I Z E.
Note
A read procedure from a block se nds the command for readin g out a single
block to the transponder. The reader ha ndles this internally.
If a transponder does not suppo rt commands for reading multiple blocks, mulit-
ple blocks are read out of the transpo nder individually.
Only one transponde r can be read in the inaddressed mode.
I-CODE1 and Tag-it HF transponders cannot be read in the selecte d mode.
The command [0x01] Inventory must be executed to select the transponder
before an addressed read acce ss of an I-Code1 transponder eve n when the
UID is known.
If the transponder was already selected with an Inventory command, a non-
addressed read access of I-Code1 transponders is not possible. The selection
must be canceled with the command [0x69] RF Reset.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
206 (4)J31069-D0138-U001-A3-7618
6.4.4.5 [0x24] Write Multiple Blocks
This command writes on e or several data blocks.
Different ISO15693 host commands a re supported depending on the ISO15693
transponder type. These are describe d in cha pter 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 re-
peated
RESPONSE-DATA (STATUS = {0x03})
5
DB-ADR-E
RESPONSE-DATA (STATUS = {0x95})
5 6
ISO15693-
ERROR DB-ADR-E
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Unaddressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
DB-ADR:
Address of the first block to be written to the transpo nder. The first block number
can lie between 0 and 255.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 207
DB-N:
Number of data blocks to be written to the tran sponder, beginning with DB-ADR.
The maximum value of DB-N depen ds on the block size. The maximum numb er of
bytes is 128.
DB-Size Max. DB-N
4
8
x
0x20 = 32
0x10 = 16
= 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 requi red block size is defined
in DB-SIZE. The number of expected b yt e s is DB-N * DB-SIZE.
ISO15693-ERROR: (ISO transponders only)
ISO15693 error code of the transponder re sponse. This byte is only available if
STATUS = {0x95}.
DB-ADR-E:
Block number in which the error occured.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
208 (4)J31069-D0138-U001-A3-7618
Note
A write procedure to a block sends the comman d for writing a single block to the
transponder.
If a transponder does not suppo rt commands for writing multiple blocks, multiple
blocks are written into the transponder individ ually.
In I-CODE1 transponders, writin g is only possible in the addressed mode.
In Tag-it HF transponders, writin g 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: Trans-
ponder parameters), the origi nal I-Code 1 addresses must be used in DB-A DR.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 209
6.4.4.6 [0x25] Select
This command sets a transponder to the “selected” state. Only one ISO15693
transponder can be selecte d at any one time. A transponder that has already bee n
selected is automatically se t to the “ready” state.
REQUEST-DATA
4 5 6...13
0x25 MODE UID
RESPONSE-DATA (STATUS = {0x95})
5
ISO15693-
ERROR
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b001 Addressed
UID:
Transponder UID (read-only access)
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse. This byte is only available if
STATUS = {0x95}.
Note
This command only functions for ISO15693 transponders.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
210 (4)J31069-D0138-U001-A3-7618
6.4.4.7 [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
ISO15693-
ERROR
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Not addressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse. This byte is only available if
STATUS = {0x95}.
Note
This command only functions for ISO15693 transponders.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 211
6.4.4.8 [0x27] Write AFI
This command writes a new AFI code to one or more transpo nders.
Different ISO15693 host commands a re supported depending on the ISO15693
transponder type. These are describe d in cha pter 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
ISO15693-
ERROR
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Not addressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
AFI:
Application Family Identifier of the transponder
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse. This byte is only available if
STATUS = {0x95}.
Note
This command only functions for ISO15693 transponders.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
212 (4)J31069-D0138-U001-A3-7618
6.4.4.9 [0x28] Lock AFI
This command locks the A F I register in one or more transponders.
Different ISO15693 host commands a re supported depending on the ISO15693
transponder type. These are describe d in cha pter 6.4.1 Supported ISO15693 host
commands for ISO15693 transponders.
REQUEST-DATA
4 5 (6...13)
0x28 MODE UID
RESPONSE-DATA (STATUS = {0x95})
5
ISO15693-
ERROR
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Not addressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse. This byte is only available if
STATUS = {0x95}.
Note
This command only functions for ISO15693 transponders.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 213
6.4.4.10 [0x29] Write DSFID
This command writes the DSFID to one or mo re transponders.
Different ISO15693 host commands a re supported depending on the ISO15693
transponder type. These are describe d in cha pter 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
ISO15693-
ERROR
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Not addressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
DSFID:
Data Storage Format Identifier of the transponder
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse. This byte is only available if
STATUS = {0x95}.
Note
This command only functions for ISO15693 transponders.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
214 (4)J31069-D0138-U001-A3-7618
6.4.4.11 [0x2A] Lock DSFID
This command locks the DSFID register in one or more transponders.
Different ISO15693 host commands a re supported depending on the ISO15693
transponder type. These are describe d in cha pter 6.4.1 Supported ISO15693 host
commands for ISO15693 transponders.
REQUEST-DATA
4 5 (6...13)
0x2A MODE UID
RESPONSE-DATA (STATUS = {0x95})
5
ISO15693-
ERROR
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Not addressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse. This byte is only available if
STATUS = {0x95}.
Note
This command only functions for ISO15693 transponders.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 215
6.4.4.12 [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
ISO15693-
ERROR
RESPONSE-DATA
5 6...13 14 15,16 17
DSFID UID AFI MEM-SIZE IC-REF ISO15693
‘0’ Only LSB
(32 bits) valid Manufacturer
Code MEM-SIZE Chip V ersion Tag-it HF
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Not addressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse.
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.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
216 (4)J31069-D0138-U001-A3-7618
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 tran sponder types)
MEM-SIZE:
Memory size of the transponder.
If not supported by the transponder, this value is {0x00}.
Byte 15 16
Bit 7...4 3...0 7...0
Contents In res. Block size in
bytes Number of
blocks
IC-REF:
IC reference (version) of the transpo nder.
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 trans-
ponders.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 217
6.4.4.13 [0x2C] Get Multiple Block Security Status
This command rea d s out the securit y st atus for public blocks from a transpon der.
REQUEST-DATA
4 5 (6...13) 6 / (14) 7 / (15)
0x2C MODE UID DB-ADR DB-N
RESPONSE-DATA (STATUS = {0x95})
5
ISO15693-
ERROR
RESPONSE-DATA
5 6
DB-N SEC-STATUS
DB-N re-
peated
MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
ADR:
ADR
b000 Not addressed
b001 Addressed
b010 Selected
UID:
Transponder UID (read-only access). The UID is only required in the addre ssed
mode.
DB-ADR:
Number of the first block whose security status is requested. Valid values range
from 0 and 255.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
218 (4)J31069-D0138-U001-A3-7618
DB-N:
The number of security data blocks to be read starting with DB-ADR. The maxi-
mum value of DB-N depends on the block size.
DB-Size Max. DB-N
4
8
x
0x20 = 32
0x10 = 16
= 128 / x
ISO15693-ERROR:
ISO15693 error code of the transponder re sponse.
This byte is only available if STATUS = {0x95}.
SEC-STATUS:
Block secu rity status.
Note
This command only functions for ISO15693 transponders.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 219
6.4.4.14 [0xA0] Read Config Block
This command reads a configuration block from the M OBY 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:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
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 functio ns 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: Transpo nder parameters, I-CODE-MODE). Con -
figuration blocks 0, 1, 2 can now be read with the command [0x23] Read Mul-
tiple Blocks from I-Code1 address 2, 3, 4.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
220 (4)J31069-D0138-U001-A3-7618
6.4.4.15 [0xA1] Write Config Block
This command writes a co nfiguration 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:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 ADR
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 transpond er.
Note
This command only functio ns 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: Transpo nder parameters, I-CODE-MODE). Con -
figuration blocks 0, 1, 2 can now be written with the command [0x 24] Write
Multiple Blocks to I-Code1 address 2, 3, 4.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 221
Example of write-accessing configuration block 0 of a tag-it HF transponder
Configuration block 0 activates prote ctive 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 mu st be
used.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
222 (4)J31069-D0138-U001-A3-7618
6.4.5 [0xB1] Host commands for ISO15693: user-specific and manu-
facturer-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 REQUEST-
DATA CRC16
Host reader
1 2 3 4 5...(n-2) (n-1),n
n COM-ADR [0xB1] STATUS RESPONSE-
DATA CRC16
MFR:
Manufacturer code
MFR
0xXX
REQUEST-DATA:
Manufacturer-specific request
RESPONSE-DATA:
Manufacturer-specific response
Note
Data are only transmitted if STATUS = {0x0 0, 0x83, 0x94, 0x95}.
This command does not function if the scan mode is enabled.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 223
6.4.6 [0xBF] ISO15693 transparent command
This command sends user-transparent commands to the transp onder.
Host reader
1 2 3 4 5,6
n COM-ADR [0xBF] MODE RSP-
LENGTH ©
MODE 1+2 7,8 9...(n-2) (n-1),n
ª Reserved REQUEST-
DATA CRC16
MODE 3+4 7,8 9,10 11...(n-2) (n-1),n
ª Reserved EOF-PULSE-
DELAY REQUEST-
DATA CRC16
MODE 5 7,8 9,10 11...(n-2) (n-1),n
ª Reserved MULTIPLE
302 GRIDS REQUEST-
DATA CRC16
Host reader
1 2 3 4 5...(n-2) (n-1),n
n COM-ADR [0xBF] STATUS RESPONSE-
DATA CRC16
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 rep ly, the reader
scans again after 302 µsec). When a reply does not arrive within 20
msec, the command returns the statu s “no transponder” [0x01]. De-
pending on the error flag in the trans ponder 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 re ceive 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.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
224 (4)J31069-D0138-U001-A3-7618
0x04 = Inventory request
The reader attempts to re ceive a response after ISO15693-3 T1
(318.6 µsec to 323.3 µsec). Executio n depends on the “Nb_slot_flag”
flag in accordance with ISO15693 as follows:
“0” The reader sends an EOF after EOF-P ULSE-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 pro-
cedure 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 whe re in the transponder data the erro r
occurred.
“1” The reader sends the rece ived data back.
0x05 = Write scan with option “0” and ti me 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 in-
tervals specified in MULTIPLE 302µsec GRIDS. If no response arri ves,
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 re sponse length in bits without SOF and EOF
With write operations, RSP-LENGTH depen ds 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 shoul d equal the re-
sponse delay of the transponde r response (ISO15693: T1) and should, for exam-
ple, have the ISO15693 average value: {0x021F} * 590 ns = 320.9 µs
EOF-PULSE-DELAY:
The EOF pulse delay is used in write procedure s with ISO15693 write option “1.” It
is used to specify the response delay of the transponder response (ISO156 93: T1).
E.g. ISO15693 maximum value: {0x846A } * 590 ns = 20 ms
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 225
REQUEST-DATA:
Complete transponder request without SOF, CRC16 and EOF
Note
The FLAGS for the read and write options in REQUEST-DATA must corresp ond to
the MODE byte in the request protocol. The reader al ways forces a command ac -
cording to the method specified in the MODE b yte of the re quest protocol.
RESPONSE-DATA:
Complete transponder respon se without SOF and EOF. The reader perform s a
CRC16 checksum test. However, it is the CRC16 of the transponder that is trans-
mitted with the response data.
Note
Data are only transmitted if STATUS = {0x0 0, 0x83, 0x94, 0x95}.
The response data always consist of the number of data bytes specified in
RSP-LENGTH.
Note
This command only functio ns for ISO15693 transponders.
This command does not function if the scan mode is enabled.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
226 (4)J31069-D0138-U001-A3-7618
6.5 Appendix
6.5.1 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 .
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 227
6.5.2 Time response of the asynchronous interface
The reaction times of the asynchrono us interface depend on the following
factors:
Quantity of data to be read or written
Type and number of transpond ers supp orted by the reader
Location of the transponder at the time of the reque st
Any existing electromagnetic interference
Success or failure of the request
Minimum Typical Maximum Units
I-CODE1 Tag-it HF
EE parameter change
1 block (16 bytes)
all ( 8 ) blocks
5
22.5
180
300
600
msec
msec
msec
[0x1B] Reset QUIET Bit
(only I-Code1 trans-
ponder)
5 5.1 - 300 msec
[0x69] RF Reset 5.1 msec
[0xB0] Host commands
for ISO15693: required
and optional commands
5 1 2
msec
[0xB1] Host commands
for ISO15693: user-
specific and manufac-
turer-specific com-
mands
5 1 2
msec
[0xBF] ISO15693 trans-
parent 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
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
228 (4)J31069-D0138-U001-A3-7618
6.5.3 Time response of the ISO15693 host commands
The reaction time to the ISO15693 host command s 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 reque st
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: Trans-
ponder parameters and chap. 5.6 CF G5: Anticollision.
ISO15693-MODE = 0x0B
Only the transponder driver bein g used is active.
ONT = only the data of the newl y selected transponder are sent to the host.
Typical Units
I-CODE1 Tag-it HF
Inventory with 1 transponder:
1 time slot
16 time slots
-
15
123
62
-
-
msec
msec
msec
Read multiple blocks:
1 block, unaddressed
1 block, addressed
4 blocks, unaddressed
4 blocks, addressed
See table below
11.5
17.5
42
65
msec
msec
msec
msec
Write multiple blocks:
1 block, unaddressed
4 blocks, unaddressed
-
-
26.5
103
msec
msec
Write multiple blocks
(1 block, addressed):
1 time slot
16 time slots
-
25
153
32
-
-
msec
msec
msec
Write multiple blocks
(4 blocks, addressed):
1 time slot
16 time slots
-
65
435
124
-
-
msec
msec
msec
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 229
Read multiple blocks (I-CODE1 transponder)
Time Slots
1 16
Number of
Blocks
Not
Addressed 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: Trans-
ponder parameters and chap. 5.6 CF G5: Anticollision.
ISO15693-MODE = 0x0B
AFI deactivated
16 time slots
Only ISO15693 transponder drivers active
ONT = only the data of new tran sponders are sent to the host.
Modulation and subcarrier have almo st no measurable effect on the reaction time.
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
230 (4)J31069-D0138-U001-A3-7618
Time behavior for [0x01] Inventory
The following diagrams show a ve rage values for time behavior based on the num-
ber of transponders. With certain UIDs, the times may be greater or less tha n those
shown below.
Time behavior is measure d including communication time at 38.4 kbaud. Other
baud rates increase the times slightly. Since inventory timing is primaril y based on
anticollision, communication time can be disregarded .
Receive
Send
Communication time
+
=
Execution time
Tx
Rx
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 exceed s 16.
This means that, if MORE-Bit is set by the reader as the respo nse to the Inventory
command, communication time will be affected by the speed of the host system.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 231
Communicatio n time
+
=
Execution time More data requested
Host
Send
Tx
Receive
Rx
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
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
Get Multiple
Block Security
Status 32 blocks 21 17.3 16 13.7
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
232 (4)J31069-D0138-U001-A3-7618
Time reactions of read functions
All times are based on 1 time slot.
Infineon my-d
Execution time (msec) Communication time at
38.4 kBaud (msec)
Without security block With security block
Read
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) Communication time at
38.4 kBaud (msec)
Without security block With security block
Read
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) Communication time at
38.4 kBaud (msec)
Without security block With security block
Read
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
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 233
STMicroelectronics (LRI512)
Execution time (msec) Communication time at
38.4 kBaud (msec)
Without security block With security block
Read
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
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
234 (4)J31069-D0138-U001-A3-7618
Time reactions of write functions
All times are based on 1 time slot.
Infineon my-d
WR-Option = 0
Execution time (msec) Communication time at 38.4 kBaud (msec)
Write data block Lock data b lock Write data block Lock data bloc k
Write
Addres-
sed Selected Addres-
sed Selected Addres-
sed Selected Addres-
sed 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
Execution time (msec) Communication time at 38.4 kBaud (msec)
Write data block Lock data b lock Write data block Lock data bloc k
Write
Addres-
sed Selected Addres-
sed Selected Addres-
sed Selected Addres-
sed 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
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 235
Texas Instruments Tag-it HFI
WR-Option = 1
Execution time (msec) Communication time at 38.4 kBaud (msec)
Write data block Lock data b lock Write data block Lock data bloc k
Write
Addres-
sed Selected Addres-
sed Selected Addres-
sed Selected Addres-
sed 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
Execution time (msec) Communication time at 38.4 kBaud (msec)
Write data block Lock data b lock Write data block Lock data bloc k
Write
Addres-
sed Selected Addres-
sed Selected Addres-
sed Selected Addres-
sed Selected
1 block
4 bytes 39 32.5 8 5.8
2 blocks
8 bytes 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 - -
- -
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
236 (4)J31069-D0138-U001-A3-7618
6.5.4 Index of status bytes
Hexadecimal
value General information
0x00 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 switch ed to silent
Interference in communication between read er and transponder. The
reader can no longer recogniz e 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 er ror:
The requested data are outsid e of the logical or physical addressing
range of transponder:
The address is outside of the maximum address range of the trans-
ponder.
The address is outside of the config ured address range of the trans-
ponder.
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 transpo nder.
Hexadecimal
value 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
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 237
Hexadecimal
value Interface status
0x80 Unknown command:
Selected function not supported by rea der
0x81 Length error:
Protocol is too short or too long
0x82 Command not possible
0x83 HF communication error:
An error occurred in the communication b etween the transponder and
reader. Possible causes:
Algorithm for collision handli ng was interrupted before no more colli-
sion were detected. Causes for the interrupti on:
Timeout during communication with the host
0x94 Additional data:
More transponder data sets were requested than the transponder
protocol can transmit simultaneously.
0x95 ISO15693 erro r:
Additional error code for ISO15693 transpo nders was sent with the
response data
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
238 (4)J31069-D0138-U001-A3-7618
Error codes for ISO15693 transponders
Hexadecimal
value 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 sup ported
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 modifi ed
0x13 Attempt to program the specified block failed
0x14 Attempt to lock the specified b lock failed
0xA0 ... 0xDF Error codes for user-specific commands
All other Reserved for future use
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 239
6.5.5 Index of control bytes
Control
byte Description Page
[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
6.5.6 Index of configuration parameters
CFGn Description Access1 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
1 WO = write only; R/W = read and write access; ‘RP/W P’ = no access
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
240 (4)J31069-D0138-U001-A3-7618
6.5.7 Storage model for I-CODE1 transponders
For access, the memory is subdivided in to 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 Configura-
tion Conditio ns for write
access
3 C1 Special functions
(EAS, QUIET bit)
4 C2 Family code /
application ID
Read / write
Can be set to "read
only“
5 D0 User User memory
6 D1
7 D2
8 D3
9 D4
10 D5
11 D6
12 D7
13 D8
14 D9
15 D10
Read / write
Can be set to "read
only“
Note
When writing data to a transponder, it must be ensured that the transponder re-
mains completely inside the antenna field while writing is taking pla ce.
UID:
This block contains a unique, 64-bit transpond er UID (read -only acce ss).
Bit Byte Function
0...7 0 UID, MSB
8...15 1
16...23 2
24...31 3
32...39 4
40...47 5
48...55 6
56...63 7 UID, LSB
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 241
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 enable d
write protection for block C0, you cannot enable any additional protective functions
(hardware write protection)
Procedure Bit Byte Function1 I-Scan block I-CODE1 block
0 0 “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
8 1 “1” = r/w, “0” = ro D8 13
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 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
1 ro = read only; r/w = read and write access
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
242 (4)J31069-D0138-U001-A3-7618
Configuration block 1:
This block is used to enable special functions (QUIET mode).
If the QUIET node is enabled, the transponde r is permanently disabled. It can be
re-enabled using the "Reset QUIET Bit“ command. Th e I-CODE1 transponder re-
sponds to no command.
Bit Byte Function
0 0 Reserved
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 applicatio n 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.
05/05 Description of protocols for SLG D1 1/D12
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 243
6.5.8 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)
Description of protocols for SLG D1 1/D12 05/05
C/C++ MDWAPI
244 (4)J31069-D0138-U001-A3-7618
ISO15693 host command (DB-SIZE of transponder = 8 bytes)
05/05 Installing the FEISC-DLL
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 245
7 Installing the FEISC-DLL
7.1 Introduction
The ID FEISC support package pro vid es assistance in programming application
sofware that integrates MOBY D readers and supports the ANSI-C, ANSI-C++ an d
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 proto-
col described in the system manual of the MOBY D reader family has a separate
function. The ID FECOM support packa ge 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 wh o
wish to use their own interface functions can take advantage of the function collec-
tion of the ID FEISC for building and split ting 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 wit h 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
Installing the FEISC-DLL 05/05
C/C++ MDWAPI
246 (4)J31069-D0138-U001-A3-7618
7.2 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++ pr ogrammers:
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 di rectory or the IN-
CLUDE direct ory
For Visual Basic p rogrammers:
Copy the FEISC.BAS to the project directory
For Delphi programmers:
Copy FEISC.PAS to the project directory
7.3 Integration into the application program
For C/C++ pr ogrammers:
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 function s 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.
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 247
8 FEISC-DLL programming interface
8.1 Overview
For the convenience of the programmer, t he 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 co ntained in the system manual
for the MOBY D reader family.
The functions in the FEISC are only resp onsible for internal admini s tration, protocol
building, protocol splitting and any required error outputs. Commun ication with a
MOBY D reader cannot be carried o ut using only the FEISC-DLL. However, it is
possible to initiate a protocol output and to commu nicate with a MOBY D reader via
an asynchronous serial interface u sing FECOM.DLL. Other interface drivers are
not supported. Where it is neces sary to use other asynchronous serial interface
drivers, the scope of useable functions of the FEISC.DLL is severely re stricted and
any protocol traffic via the asyn chronous serial interface must be coded by the pro-
grammer. 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 gener-
ated during runtime.
The object manager has a self-administration capability that free s up an application
program from having to provide intermediate storage for an y values, settings or
other parameters. The obje ct manager maintains a list of all generat ed reader ob-
jects. The reader object is the ce ntral 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 automati call y open ed at the
start of the application program. This gives you immediate acess to all DLL fun c -
tions.
A reader object must be created p rior 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 uniquel y 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 pro-
vides successively, can then be used to gether 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) re-
ceives an empty object list when the FEISC_GetReaderList function is called. This
prevents the access rights from becoming mixe d up between different program in-
stances.
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
248 (4)J31069-D0138-U001-A3-7618
The object-oriented inner structure (see Fig. 8-1 ) ha s intentionally been realized as
a function interface on the outside. This brings with it the advantage of languag e
independence.
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 co ntrast, appropriate precautions must
be taken in a multithreading or multi-proce ss 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.
Object manager
FEISC_DeleteReader
FEISC_GetReaderList
FEISC_BuildProtocol
FEISC_SplitProtocol
FEISC_GetReaderPara
FEISC_SetReaderPara
FEISC.DLL
FEISC_NewReader
FEISC_GetDLLVersion
FEISC_SendTransparent
Reader object
- ReaderHandle
- Port Han dle
- Param e ters
Port object
- List of ReaderHandles
- Version number
FECOM.DLL
FEISC_GetLastSendProt
FEISC_GetLastRecProt
FEISC_0xA0_RdLogin
FEISC_GetLastStatus
Reader object
- ReaderHandle
- PortHandle
- Parameters
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 249
8.2 Parameter passing
Some functions support the passing of parameters both as null-terminated charac-
ter strings and as an array of hex numbers. Both data types allow p assing of pa -
rameters as character type UCHAR. The interpretation of the passed value is
specified by the iDataType function parameter.
iDataType Parameter passing Is interpreted as a pointer to
0 0x23, 0x56, 0xFA, 0xA6
(internally, 0x23 corresponds to the "#"
character; 0x56 corresonds to the "V"
character; etc.)
Array of UCHAR
1 "2356FAA6"
(every two characters are interpreted as
a hex value: example: "23" -> 0x23)
Null-terminated character string
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 cha r". In Visual Basic and Del-
phi, the compatible data type is the byte (see contents of the FEISC.BAS/
FEISC.PAS files).
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
250 (4)J31069-D0138-U001-A3-7618
8.3 Event signaling to applications1
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 proce dure. 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, dis-
play this string in a window.
An event handling measure must be installed usi ng the FEISC_AddEventHandler
function. Four different signaling methods are available: message to calling proc-
ess, message to a window, use of a callback fun ction 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 pa-
rameter. 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 di-
rectly via the structure.
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 251
8.4 List of functions
The support package contains m any functions for different tasks. They have been
subdivided into gro ups for the sake of clarity. Please note that most functions ca n
only be used in (direct or indirect) combination with the ID FECOM support pack-
age.
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 iDat aLen, UCHAR* cSendProt, int
iDataType )
int FEISC_SplitProtocol( int iReaderHnd, UCHAR* cRecP rot, int iRe cLen,
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, cha r* cS tatusText )
int FEISC_GetLastRecProtLen( int iReaderHnd )
int FEISC_GetLastError( int iReaderHnd , int* iErrorCode, char* cErrorText )
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
252 (4)J31069-D0138-U001-A3-7618
General communication function s
int FEISC_SendTransparent( int iReaderHnd, UCHAR* cSendProt, int iS-
endLen, 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 fu nctions
int FEISC_0x1B_ResetQuietBit( int iReaderHnd, UCHAR cBusAdr )
int FEISC_0x1C_EASRequest( int iReaderHnd, UCHAR cBusAdr )
int FEISC_0x21_ReadBuffer( int iReaderHnd, UCHA R cBusAdr, UCHAR
cSets, UCHAR* cTrData, UCHAR* cRecSets, UCHAR* cRecDataSets, int
iDataType )
int FEISC_0x31_ReadDataBufferInfo( int iReaderHnd, UCHAR cBusAdr,
UCHAR* cTabSize, UCHAR* cT abStart, 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_0x 63_CPUReset( int iReaderHnd, UCHAR cBusAdr )
int FEISC_0x65_SoftV ersion( int iReaderHnd, UCHAR cBusAdr, UCHAR*
cVersion, int iDataType )
int FEISC_0x 69_RFReset( int iReaderHnd, UCHA R 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 cBusAd r, UCHAR cMode,
UCHAR* cDa ta )
int FEISC_0x71_SetOutput( int iReaderHnd, UCHAR cBusAdr, UCHAR cOut-
put )
int FEISC_0x74_ReadInput( int iReaderHnd, UCHAR cBusAdr, UCHA R* cIn-
put )
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 )
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 253
int FEISC_0x81_WriteConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR
cConfAdr, UCHAR* cConfBlock, int iDataType )
int FEISC_0x82_Save ConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR
cConfAdr )
int FEISC_0x83_ResetConfBlock( int iReaderHnd, UCHAR cBus Adr, UCHAR
cConfAdr )
int FEISC_0x85_SetSysTimer( int iReaderHnd, UCHAR cBusAdr, UCHAR*
cTime, int iDataType )
int FEISC_0x86_GetSysTim er( 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 cBusAd r, 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* iR-
spLen, int iDataType )
int FEISC_0xBF_ISOTranspCmd( int iReaderHnd, UCHAR cBu s Adr, int iR-
spLength, int iCmdRspDly, UCHA R* cRe qData, int iRe qLen, UCHAR*
cRspData, int* iRspLen, int iDataType )
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
254 (4)J31069-D0138-U001-A3-7618
8.4.1 FEISC_NewReader
Function Creates a reader object
Syntax int FEISC_NewReader( int iPortHnd )
Description 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 obj ect that was
generated from FECOM.DLL using the FECOM_OpenPort. This handle allows proto-
cols to be passed on to FECOM.DLL directly. Passing a 0 is also p ermissible.
In general, several reader obj ects can execute their communication via the same serial
COM interface.
iPortHnd uses the first byte (MSB) of the PortHandle to distinguish between the proto-
col outputs to FECOM:
iPortHnd = 0x0XXXXXXX2results in an output to FECOM.DLL
The value of the PortHandle stored in the rea der object can be changed later using the
FEISC_SetReaderPara function.
A reader object generated usi ng 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 generat ed 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
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 255
8.4.2 FEISC_DeleteReader
Function Deletes a reader object.
Syntax 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 oper ation 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 );
...
}
...
...
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
256 (4)J31069-D0138-U001-A3-7618
8.4.3 FEISC_GetReaderList
Function Determines, dependent on the iNext parameter, the first or the next reader handle from
the internal list of generated reader o bjects.
Syntax 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 con-
tained in the list is passed with iNext, the entry that follows the reader handle is deter-
mined 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 re-
turned. 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 ...
#include "feisc.h"
...
// Sample function for setting up a list of reader objects
void ReaderList( void )
{ int iNextHnd = FEISC_GetReaderList( 0 ); // Determine.... the first
handle
while( iNextHnd > 0 )
{// E.g. code for collecting the handles and reading out parameters
...
iNextHnd = FEISC_GetReaderList( iNextHnd ); // Determine the next
handle
}
...
// E.g. code for displaying a list
}
Hint It is convenient to use a loop, similar to that in the example above, to close all ge ner-
ated 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 );
}
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 257
8.4.4 FEISC_GetDLLVersion
Function Determines the DLL version number.
Syntax void FEISC_GetDLLVersion( char* cVersion )
Description The function returns the DLL version number.
cVersion is an empty, null-terminate d chara cter 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 prov ide additional information.
Return value without
Example ...
#include "feisc.h"
...
...
char cVersion[256];
FEISC_GetDLLVersion( cVersion );
// Code for displaying the version number
...
...
8.4.5 FEISC_GetErrorText
Function Determines the error text for the error code
Syntax int FEISC_GetErrorText( int iErrorCode, char* cErrorText )
Description The function passes the English error text corresponding to iErrorCode in cErrorText.
The buffer for cErrorText should be able to hold 256 char acters.
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 erorr codes are listed in chap. 8.6.1.
Example ...
#include "feisc.h"
#include "feiscdef.h"
...
...
char cErrorText [256];
...
int iBack = FEISC_GetErrorText(FEISC_ERR_PROTLEN, cErrorText )
// Code for displaying the text
...
...
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
258 (4)J31069-D0138-U001-A3-7618
8.4.6 FEISC_GetStatusText
Function Determines the short text for the status byte
Syntax int FEISC_GetStatusText( UCHAR ucStatus, char* cStatusText )
Description 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 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.
Example ...
#include "feisc.h"
...
...
char cStatusText[128];
...
int iBack = FEISC_GetStatusText(0x01, cStatusText )
// Code for displaying the text
...
...
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 259
8.4.7 FEISC_GetReaderPara
Function Determines a parameter of a reader object.
Syntax int FEISC_GetReaderPara( int iReaderHnd, char* cPara, char* cValue )
Description The function d etermines 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 obj ect handle.
Parameter IDs The parameter IDs are: PortHnd1, LogProt, BusyTO, RepCnt, ErrCode, ErrStr, SendStr,
RecStr. and IsProtToAppLocked
Cross refer-
ence 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 ther e are no errors and a value less than zero if
errors did occur.
The error codes are listed in chap. 8.6.1.
Example ...
#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
...
}
...
...
}
1 Please note the remark regarding the PortHandle in chap. 8.4.1
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
260 (4)J31069-D0138-U001-A3-7618
8.4.8 FEISC_SetReaderPara
Function Sets a parameter of a reader object to a new value.
Syntax int FEISC_SetReaderPara( int iReaderHnd, char* cPara, char* cValue )
Description The function p asses 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 obj ect handle.
Parameter IDs The parameter IDs are: PortHnd1, LogProt, BusyTO, RepCnt, LockProtToApp and
UnlockProtToApp
Cross refer-
ence 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 paramet er value c ould 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
// 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
...
}
...
...
1 Please note the remark regarding the PortHandle in chap. 8.4.1
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 261
8.4.9 FEISC_AddEventHandler
Function An event handling measure is installed.
Syntax int FEISC_AddEventHandler( int iReaderHnd, FEISC_EVENT_INIT* pInit )
Description 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 iRead-
erHnd. 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 eve nt 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 GetCurrent-
ThreadID() 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 re-
ceive 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 f unction in the application the
pointer to the string; the second parameter passes the status byte of the receive proto-
col 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 ha ndling 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 applicat ion 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() metho d.
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
262 (4)J31069-D0138-U001-A3-7618
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 callbac k function (not for Visual Basic)
The callback method is used t o 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 benötigt
uiFlag = FEISC_CALLBACK
cbFct = (void*)&IhrFunctionsName1
4th method: Setting an event
The event method is used to install a n 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 receiv ed, the required parameter must be requested with a suit-
able function. The set event must be reset by the application program using the Re-
setEvent(...) Windows API function.
The FEISC_EVENT_INIT structure is filled in as follows:
uiUse = FEISC_xyz_EVENT // See Defines FEISC.H
uiMsg wird nicht benötigt
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 refer-
ence Additional information is found in chap. 8.3 Event sign aling 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)
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 263
8.4.10 FEISC_DelEventHandler
Function An event handling measure is removed.
Syntax int FEISC_DelEventHandler( int iReaderHnd, FEISC_EVENT_INIT* pInit )
Description 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 benötigt
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 benötigt
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 benötigt
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 benötigt
uiFlag = FEISC_EVENT
hEvent = IhrEventHandle;
Cross refer-
ence 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.
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
264 (4)J31069-D0138-U001-A3-7618
8.4.11 FEISC_BuildProtocol
Function A protocol with a protocol frame is built from the passed parameters and data.
Syntax int FEISC_BuildProtocol( int iReaderHnd, UCHAR cBusAdr, UCHAR cCmdByte,
UCHAR* cSendData, UCHAR cDataLen, UCHAR* cSendProt, int iDataType )
Description This function b uilds a complete send protocol with a protocol frame from the follow ing
passed parameters: bus address (cBusAdr), control byte (cCmdByte), send data
(cSendData) and the information on the length of the send data (cDataLen). The proto-
col 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 ch aracter will be appended.
More detailed information on the protoc ol fra m e is found in the system manual for the
ISC reader family.
iReaderHnd is the reader obj ect handle.
The built protocol is not passed on to FECOM. Therefore, this function is inde pendent
of FECOM.
Cross refer-
ence Additional information o n 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 t he 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;
// Build send protocol
iErr = FEISC_BuildProtocol( iReaderHnd, cBusAdr, cCmdByte, cSendData,
cDataLen,cSendProt, 0 );
...
}
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 265
8.4.12 FEISC_SplitProtocol
Function 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 leng th of the re-
ceive 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 protoc ol fr ame is found in the system manual for the
ISC reader family.
iReaderHnd is the reader obj ect handle.
This function is independent of FECOM.
Cross refer-
ence 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 ob-
jects.
#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
...
}
}
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
266 (4)J31069-D0138-U001-A3-7618
8.4.13 FEISC_SendTransparent
Function A protocol string is output and the receive protocol is returned directly via the interface.
Syntax int FEISC_SendTransparent( int iReaderHnd, UCHAR* cSendProt, int iSendLen,
UCHAR* cRecProt, int iRecL en, int iCheckSum, int iDataType )
Description This function is suitable for sending protocol strings created by editors to a reader.
However, this requires a thorough knowledg e of the protocol frame.
As an option, the protocol contained in cSendProt with the protocol frame can be sup-
plemented 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 obj ect handle.
Cross refer-
ence Additional information o n iDataType is found in chap. 8.2 Parameter passing
Return value If no errors occur, the number of characters contai ned in cRecProt is passed.
The error codes are listed in chap. 8.6.1.
Example 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
...
}
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 267
8.4.14 FEISC_Transmit
Function A protocol string is output directly via the interface.
Syntax int FEISC_Transmit( int iReaderHnd, UCHAR* cSendProt, int iSendLen, int i-
CheckSum, int iDataType )
Description This function is suitable for sending protocol strings created by editors to a reader.
However, this requires a thorough knowledg e of the protocol frame.
The program does not wait for a response protocol after sending the cSendProt proto-
col.
As an option, the protocol contained in cSendProt with the protocol frame can be sup-
plemented 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 obj ect handle.
Cross refer-
ence Additional information o n 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 );
...
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
268 (4)J31069-D0138-U001-A3-7618
8.4.15 FEISC_Receive
Function A protocol string is read in directly from the interface.
Syntax int FEISC_Receive( int iReaderHnd, UCHAR* cRecProt, int iRecLen, int iDataType )
Description 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 obj ect handle.
Cross refer-
ence 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 int inLen;
UCHAR cRecProt[256];
...
// Read out protocol
inLen = FEISC_Receive( iReaderHnd, cRecProt, 256, 0 );
...
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 269
8.4.16 FEISC_GetLastSendProt
Function The last protocol string to be sent is returned.
Syntax int FEISC_GetLastSendProt( int iReaderHnd, UCHAR* cSendProt, int iDataType )
Description 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 i n the read er object.
To be on the safe side, the buffer for the send protocol, cSendProt, shoul d be able to
hold at least 256 characters (iDataType=0) or 512 char acters (iDataType=1). cSend-
Prot is interpreted as a hex array (iDataType=0) or character string (iDataType=1).
iReaderHnd is the reader obj ect handle.
Cross refer-
ence Additional information o n 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 The last protocol string to be received is returned.
Syntax int FEISC_GetLastRecProt( int iReaderHnd, UCHAR* cRecProt, int iDataType )
Description 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 func-
tion store this protocol in the reader object.
To be on the safe side, the buffer for the receive protocol, cRecProt, shoul d be able to
hold 256 characters (iDataType=0) or 512 characters (iDataType=1). cRecProt is in-
terpreted as a hex array (iDataType=0) or character string (iDataType=1).
iReaderHnd is the reader obj ect handle.
Cross refer-
ence Additional information o n 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.
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
270 (4)J31069-D0138-U001-A3-7618
8.4.18 FEISC_GetLastState
Function The status byte contained in the last receive protocol is returned.
Syntax int FEISC_GetLastStatus( int iReaderHnd, char* cStatusText )
Description 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_SendTranspare nt functio n store the
last status byte in the reader object.
The buffer for the short text, cStateText, should be able to hold 256 charac ters.
iReaderHnd is the reader obj ect 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 The length of the last receive protocol is determined.
Syntax int FEISC_GetLastRecProtLen( int iReaderHnd )
Description At times it is useful to be a ble to use the protocol length to determine the length of data
contained in the protocol. This function is used to determi ne 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 obj ect handle.
Return value If no errors occur, the return value contains the protocol le ngth.
The error codes are listed in chap. 8.6.1.
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 271
8.4.20 FEISC_GetLastError
Function Determines the last error code and passes the error text.
Syntax int FEISC_GetLastError( int iReaderHnd , int* iErrorCode, char* cErrorText )
Description The function re turns the last error code of the reader object selected with iReaderHnd
in iErrorCode and passes the corresponding English error text in cErrorText.
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 ther e are no errors and a value less than zero if
errors did occur. The error codes are listed in chap. 8.6.1.
Example ...
#include "feisc.h"
...
...
char cErrorText [256];
int iErrorCode = 0;
...
int iBack = FEISC_GetLastError( iReaderHnd, &iErrorCode, cErrorText )
// Code for displaying the text
...
...
8.4.21 FEISC_0x1B_ResetQuietBit
Function Function for resetting the Quiet bits.
Syntax int FEISC_0x1B_ResetQuietBit( int iReaderHnd, UCHAR cBusAdr )
Description The function re sets the Quiet bits in the I-Code transponder type.
iReaderHnd is the reader obj ect 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 Function for sending the EAS request.
Syntax int FEISC_0x1C_EASRequest( int iReaderHnd, UCHAR cBusAdr )
Description The function sends an EAS request to the I-Code transponder type.
iReaderHnd is the reader obj ect 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.
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
272 (4)J31069-D0138-U001-A3-7618
8.4.23 FEISC_0x21_ReadBuffer
Function Function for data transfer with a transponder
Syntax int FEISC_0x21_ReadBuffer( int iReaderHnd, UCHAR cBusAdr, UCHAR cSets,
UCHAR* cTrData, UCHAR* cRec Sets, UCHAR* cRecDataSets, int iDataType )
Description The function re ads out the n umber 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 str ing. 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 char acter)
The sequence in which the data contained in cRecDataSets are entered is docum ented
in the system manual of the ISC family.
iReaderHnd is the reader obj ect 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 refer-
ence Additional information o n 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.
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 273
8.4.24 FEISC_0x31_ReadDataBufferInfo
Function Function for determining the table parameters of the internal DataBuffer
Syntax int FEISC_0x31_ReadDataBufferInfo( int iReaderHnd, UCHAR cBusAdr, UCHAR*
cTabSize, UCHAR* cTabStart, UCHAR* cTabLen, int iDataType )
Description The function re ads out the table parameters for the internal buffer table and stores
them in cTabSize, cTabStart and cTabLen.
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 obj ect handle.
cBusAdr is the bus address set in the multijob reader.
Cross refer-
ence Additional information o n 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 Function for clearing the read entries out of the internal DataBuffer
Syntax int FEISC_0x32_ClearDataBuffer( int iReaderHnd, UCHAR cBusAdr )
Description 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 obj ect handle.
cBusAdr is the bus address set in the multijob reader.
Cross refer-
ence 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.
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
274 (4)J31069-D0138-U001-A3-7618
8.4.26 FEISC_0x33_InitBuffer
Function Function for initializing the data table in the read er
Syntax int FEISC_0x33_InitBuffer( int iReaderHnd, UCHAR cBusAdr )
Description The function initializes the internal data table for the Buffered Read Mode.
iReaderHnd is the reader obj ect handle.
cBusAdr is the bus address set in the reader.
Cross refer-
ence chap. 8.4.23 FEISC_0x21_ReadBuffer,
chap. 8.4.24 FEISC_0x31_ReadDataBufferI nfo
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
Function Test function for determining baud rate and parity.
Syntax int FEISC_0x52_GetBaud( int iReaderHnd, UCHAR cBusAdr )
Description If it is possible to receive the response telegram, the specified ba ud rate and parity are
identical to those of the reader.
iReaderHnd is the reader obj ect 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 The function starts the flash loader.
Syntax int FEISC_0x55_StartFlashLoader( int iReaderHnd )
Description The function starts the flash loader of the reader. The reader must have bus address 0.
iReaderHnd is the reader obj ect 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.
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 275
8.4.29 FEISC_0x63_CPUReset
Function Function triggers a reset in the reader CPU.
Syntax int FEISC_0x63_CPUReset( int iReaderHnd, UCHAR cBusAdr )
Description Function trig gers a reset in the reader CPU.
iReaderHnd is the reader obj ect 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 Function reads out the version number of the reader.
Syntax int FEISC_0x65_SoftVersion( int iReaderHnd, UCHAR cBusAdr, UCHAR* cVer-
sion, int iDataType )
Description The versio n number of the reader is determined and stored in cVersion.
The iDataType parameter specifies whether the version number in cVersion is inter-
preted 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 obj ect handle.
cBusAdr is the bus address set in the reader.
Cross refer-
ence Additional information o n 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.
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
276 (4)J31069-D0138-U001-A3-7618
8.4.31 FEISC_0x69_RFReset
Function Function triggers a reset for the reader antenna field.
Syntax int FEISC_0x69_RFReset( int ReaderHnd, UCHAR cBusAdr )
Description Function trig gers a reset for the reader antenna field. All transponders that were previ-
ously switched off using the FEISC_0x1A_Halt function are re-enabled.
iReaderHnd is the reader obj ect 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 Function for switching on/off the antenna field.
Syntax int FEISC_0x6A_RFOnOff( int iReaderHnd, UCHAR cBusAdr, UCHAR cRF )
Description A value of 0 in cRF switches the antenna field off.
A value of 1 in cRF switches the antenna field on.
iReaderHnd is the reader obj ect 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 Function for initializing the noise threshold.
Syntax int FEISC_0x6B_InitNoiseThreshold( int iReaderHnd, UCHAR cBusAdr )
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.
1 Not available for SLG D1x
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 277
8.4.34 FEISC_0x6C_SetNoiseLevel
Function Function for setting the noise level.
Syntax int FEISC_0x6C_SetNoiseLevel( int iReaderHnd, UCHAR cBusAdr, UCHAR*
cLevel, int iDataType )
Description 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 byte s (iDataType=1).
iReaderHnd is the reader obj ect handle.
cBusAdr is the bus address set in the reader.
Cross refer-
ence Additional information o n 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 Function for reading the noise level.
Syntax int FEISC_0x6D_GetNoiseLevel( int iReaderHnd, UCHAR cBusAdr, UCHAR*
cLevel, int iDataType )
Description The 3 leve l 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 obj ect handle.
cBusAdr is the bus address set in the reader.
Cross refer-
ence Additional information o n 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.
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
278 (4)J31069-D0138-U001-A3-7618
8.4.36 FEISC_0x6E_RdDiag
Function Function for reader diagnosis.
Syntax int FEISC_0x6E_RdDiag( int iReaderHnd, UCHAR cBusAdr, UCHAR cMode,
UCHAR* cData )
Description The function re turns diagnosis values for the identifier stored in cMode.
The receive data buffer, cData, must be of a sufficient size.
iReaderHnd is the reader obj ect handle.
cBusAdr is the bus address set in the reader.
Cross refer-
ence Additional information o n 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 Function for reading the antenna level.
Syntax int FEISC_0x75_AdjAntenna( int iReaderHnd, UCHAR cBusAdr, UCHAR* cLevel,
int iDataType )
Description The leve l 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 obj ect handle.
cBusAdr is the bus address set in the reader.
Cross refer-
ence Additional information o n 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
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 279
8.4.38 FEISC_0x71_SetOutput
Function Function activates the reader outputs.
Syntax int FEISC_0x71_SetOutput( int iReaderHnd, UCHAR cBusAdr, int iOS, int iOSF,
int iOSTime, int iOutTime )
Description The function a c tivates 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 obj ect 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 re ads the digital inputs and stores the status in cInput. The length of cIn-
put is 1.
iReaderHnd is the reader obj ect 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.
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
280 (4)J31069-D0138-U001-A3-7618
8.4.40 FEISC_0x80_ReadConfBlock
Function Function reads out a configuration block from the reader.
Syntax int FEISC_0x80_ReadConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR cCon-
fAdr, UCHAR* cConfBlock, int iDataType )
Description This function can be used to read out a configuration block from the cConfAdr addr ess
of the reader. The data in cConfBlock that are read out are interprete d 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 obj ect handle.
cBusAdr is the bus address set in the reader.
Cross refer-
ence Additional information o n 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 Function writes a configuration block to the reader.
Syntax int FEISC_0x81_WriteConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR
cConfAdr, UCHAR* cConfBlock, int iDataType )
Description 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 charac-
ter string (iDataType=1) in cConfBlock.
The configuration data buffer must contain 14 bytes (iDataType=0) or 28 bytes
(iDataType=1).
iReaderHnd is the reader obj ect handle.
cBusAdr is the bus address set in the reader.
Cross refer-
ence Additional information o n 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.
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 281
8.4.42 FEISC_0x82_SaveConfBlock
Function Function saves a configuration block in the reader.
Syntax int FEISC_0x82_SaveConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR
cConfAdr )
Description 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.
iReaderHnd is the reader obj ect 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 Function loads the factory settings to a configuration block in the reader.
Syntax int FEISC_0x83_ResetConfBlock( int iReaderHnd, UCHAR cBusAdr, UCHAR
cConfAdr )
Description This function can be used to load the parameters of the factory settings into a configu-
ration block with the address cConfAdr.
iReaderHnd is the reader obj ect 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.
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
282 (4)J31069-D0138-U001-A3-7618
8.4.44 FEISC_0x85_SetSysTimer
Function Sets the system time in the reader.
Syntax int FEISC_0x85_SetSysTimer( int iReaderHnd, UCHAR cBusAdr, UCHAR* cTime,
int iDataType )
Description The function initializes the system time in the reader.
The cTime buffer must contain 4 bytes (iDataType=0) or be a character string with 8
characters (iDataType=1).
iReaderHnd is the reader obj ect handle.
cBusAdr is the bus address set in the reader.
Cross refer-
ence Additional information o n 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 Reads out the system time from the reader
Syntax int FEISC_0x86_GetSysTimer( int iReaderHnd, UCHAR cBusAdr, UCHAR* cTime,
int iDataType )
Description 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 refer-
ence Additional information o n 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.
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 283
8.4.46 FEISC_0xA0_RdLogin
Function Function performs a login in the reader.
Syntax int FEISC_0xA0_RdLogin( int iReaderHnd, UCHAR cBus Adr, UCHAR* cRd_PW,
int iDataType )
Description The function carries out a reader login with the password cRd_PW.
The iDataType parameter specifies whet her the password in cRd_PW is interpreted as
a hex array or character string.
iReaderHnd is the reader obj ect handle.
cBusAdr is the bus address set in the reader.
Cross refer-
ence Additional information o n 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.
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
284 (4)J31069-D0138-U001-A3-7618
8.4.47 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 (num-
ber 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 obj ect handle.
cBusAdr is the bus address set in the reader.
Cross refer-
ence Additional information o n 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.
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 285
8.4.48 FEISC_0xB1_ ISOCustAndPropCmd
Function Function initiates data transfer with an ISO15693 transponder
Syntax int FEISC_0xB1_ISOCustAndPropCmd( int iReaderHnd, UCHAR cBusAdr, UCHAR
cMfr, UCHAR* cReqData, int iReqLen, UCHAR* cRspData, int* iRspLen, int
iDataType )
Description The function initiates data transfer for multiple ISO15693 transponders l ocated 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 (num-
ber 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 obj ect handle.
iReaderHnd is the reader obj ect handle.
cBusAdr is the bus address set in the reader.
Cross refer-
ence Additional information o n 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.
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
286 (4)J31069-D0138-U001-A3-7618
8.4.49 FEISC_0xBF_ ISOTranspCmd
Function Function initiates data transfer with an ISO1569 3 transponder
Syntax int FEISC_0xBF_ISOTranspCmd( int iReaderHnd, UCHAR cBusAdr, int iR-
spLength, 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 param eter 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 dimen-
sioned 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 le ngth
specification for the receive buffer (cRspData) is to be determined in the same manner.
iReaderHnd is the reader obj ect handle.
cBusAdr is the bus address set in the reader.
Cross refer-
ence 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 protoco l.
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 287
8.5 Support for multithreading
The functions in FEISC.DLL are basi cally thread-safe, meaning that function calls
to the DLL from multiple threads are possible, provide d that a communications pro-
cedure 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 be-
havior of another thread. A protective mechanism must be implemented at the ap-
plication 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 windo w. Displaying the string in the window directly
from the thread can cause the prog ram to crash (e.g. when using MFC in C++).
This can be avoided through intermediate storage in a buffer and sending a Win-
dows message to the window using the SendMessage(..) API function. This un-
couples the threads. In such c ases, 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 pr oto-
col output in the DLL in all reader objects. This is initiated by the
FEISC_SetReaderPara(0, "LockProtToApp“, "“) funct ion 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 func-
tion 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 FELo gChildFrame class derived from
CMDIChildWnd is the frame wind ow of the Do c/View pair for the protocol output
window. By using a cyclic call-up of a WM_CLOSE messag e 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.
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
288 (4)J31069-D0138-U001-A3-7618
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;
}
// 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();
}
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 289
8.6 Appendix
8.6.1 ID FEISC error codes
Error constant Value Description
EISC_ERR_NEWREADER_FAILURE -400 0 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 un-
known
FEISC_ERR_HND_IS_NULL -4021 The passed reader handle is 0
FEISC_ERR_HND_IS_NEGATIVE -4022 The passed reader hand le is nega-
tive
FEISC_ERR_NO_HND_FOUND -4023 No rea der handle was found in the
reader handle list
FEISC_ERR_PORTHND_IS_NEGATIVE -4024 The passed port handle is ne ga-
tive
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 con-
tains an uneven number of charac-
ters
FEISC_ERR_UNKNOWN_ERRORCODE -4053 Unknown error code
FEISC-DLL programming interfa ce 05/05
C/C++ MDWAPI
290 (4)J31069-D0138-U001-A3-7618
8.6.2 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 pro-
tocol strings to the application via eve nt
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 lea d-
ing date and time
LockProtToApp without - Support for multithreading:
Locks the protocol output via event
signaling in all read er objects
See chap. 8.5 Support for multithread-
ing
UnlockProtToApp without - Support for multithreading:
Lifts the lock for the protocol output
See chap. 8.5 Support for multithread-
ing
IsProtToAppLocked without - Support for multithreadin g:
Queries whether all reader objects
have finished with the protocol output
See chap. 8.5 Support for multithread-
ing
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_NewRea der
2 See chap. 8.3 Event signali ng to applications and chap. 8.4.9 FEISC_AddEventHandler
05/05 FEISC-DLL programming interfa ce
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 291
8.6.3 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 protoco ls
FEISC_SNDPRT_EVENT 2 uiUse Signaling for send protocols
FEISC_RECPRT_EVENT 3 uiUse Signaling for receive protocols
Installing the FECOM-DLL 05/05
C/C++ MDWAPI
292 (4)J31069-D0138-U001-A3-7618
9 Installing the FECOM-DLL
9.1 Introduction
The ID FECOM support package pro vid es assistance in programming communica-
tions-oriented software and supports the ANSI-C,
ANSI-C++ and Microsoft Visual Basic programming languages1 and basically an y
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 Head er 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 ma nually:
Copy FECOM.DLL to the application program directory or to the Windows sys-
tem directory.
For C/C++ pr ogrammers:
Copy FECOM.LIB to the project or LIB directory or add FECOMBOR.LIB to yo ur
project
Copy FECOM.H and (optional) FECOM DEF.H to the project or
INCLUDE directory
For Visual Basic p rogrammers:
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
05/05 Installing the FECOM-DLL
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 293
9.3 Integration into the application program
For C/C++ pr ogrammers:
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 function s 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 p rogrammers:
Add the FECOM.BAS file to your project.
FECOM-DLL programming interface 05/05
C/C++ MDWAPI
294 (4)J31069-D0138-U001-A3-7618
10 FECOM-DLL programming interface
10.1 Overview
For the convenience of the programmer, the FECOM-DLL encapsulates all func-
tions and parameters necessary for ad ministrating one or more serial interfaces
that are open simultaneously. Th e 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 indepen dence.
The DLL has a self-adminstration capability that frees up the applic ation program
from having to provide inte rmediate storage for any value s, setting s or oth er pa -
rameters: The driver manager in FECOM.DLL keeps a list of all generated port ob-
jects and each port object administrates all settings relevant to its interface within
its local memory.
Fig.10-1: Internal structure of FECOM.DLL
The DLL is automatically opened at the start of the application prog ram 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 communicatio n 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 admin-
istrated by the application pro gram. The opened port object can on l y be uniquely
identified with this handle. Howeve r, the handle or ha ndles do not have to be
stored in the application program because the DLL driver manager internally ad-
ministrates a list of all opened COM port s. This list can be called using the FE-
COM_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.
Treiber-Manager
FECOM_ClosePort
FECOM_GetPortList
FECOM_Transceive
FECOM_Transmit
FECOM_GetPortPara
FECOM_SetPortPara
FECOM.DLL
FECOM_OpenPort
FECOM_GetPortHnd
FECOM_GetDLLVersion
FECOM_Receive
Port-Objekt
Treiber
- PortHandle
- Parameter
- Event-Handler
COM:1
COM:n
- Liste der PortHandle
- Versionsnummer
Port-Objekt
Treiber
- PortHandle
- Parameter
- Event-Handler
Port-Objekt
Treiber
- PortHandle
- Parameter
- Event-Handler
COM:2
05/05 FECOM-DLL programming interface
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 295
A port object generated using FECOM_OpenPort absolutely must be rem oved
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) recei ve s
an empty port list with the FECOM_GetPortList function call. This prevents access
rights from being mixed up betwe en different program inst ances. 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.
FECOM-DLL programming interface 05/05
C/C++ MDWAPI
296 (4)J31069-D0138-U001-A3-7618
10.2 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 ope n 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 procedu re.
An event handling measure must be installed usi ng the
FECOM_AddEventHandler function. Three different signaling methods are avail-
able: message to calling process, message to a window or use of a callback func-
tion.
An installed event handling measure must be removed using the
FECOM_DelEventHandler function.
The FECOM_EVENT_INIT structure contains the parameters required for signal-
ing:
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 u se d 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 singl e 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 th e FECOM_DoPortCmd func-
tion 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.
05/05 FECOM-DLL programming interface
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 297
10.3 List of functions
Note
UCHAR is an abbreviation (#define) for "unsigned cha r". In Visual Basic and Del-
phi, 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* cPo rtNr )
int FECOM_GetPortPara( int iPortHnd, char* cPara, char* cValue )
int FECOM_SetPortPara( int iPortHnd, char* cPara, char* cValue )
int FECOM_DoPortCm d( 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_Recei ve( int iPortHnd, UCHAR* cRecProt, int iRecLen )
FECOM-DLL programming interface 05/05
C/C++ MDWAPI
298 (4)J31069-D0138-U001-A3-7618
10.3.1 FECOM_OpenPort
Function Opens a serial interface for communication with a MOBY D reader.
Syntax int FECOM_OpenPort( char* cPortNr )
Description The function opens a serial interface using default parameters and generates an
internal interface structure for administrating the parameters . The FE-
COM_SetPortPara functi on 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 ac ceptable.
The serial interface opene d with FECOM_OpenPort must (!) be closed with the FE-
COM_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 pa-
rameters The default parameters of the serial interface are:
Baud: 9600; Frame: 8E1; Timeout: 600ms
Example ...
#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
// Code for communication or other
}
05/05 FECOM-DLL programming interface
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 299
10.3.2 FECOM_ClosePort
Function Closes a serial interface.
Syntax int FECOM_ClosePort( int iPortHnd )
Description The function closes the serial interface specified by the iPortHnd p arameter and re-
leases 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 );
...
}
...
...
FECOM-DLL programming interface 05/05
C/C++ MDWAPI
300 (4)J31069-D0138-U001-A3-7618
10.3.3 FECOM_GetPortList
Function Determines the first or the next PortHandle from the internal list of opened serial inter-
faces depending on the iNext parameter.
Syntax 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 #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
...
}
Tip It is convenient to use a loop, similar to that i n 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
}
...
05/05 FECOM-DLL programming interface
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 301
10.3.4 FECOM_GetDLLVersion
Function Determines the DLL version number.
Syntax void FECOM_GetDLLVersion( char* cVersion )
Description The function returns the DLL version number.
cVersion is an empty, null-terminate d chara cter 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 prov ide additional information.
Return value without
Example ...
#include "fecom.h"
...
...
char cVersion[256];
FECOM_GetDLLVersion( cVersion )
// Code for displaying version number
...
...
10.3.5 FECOM_GetErrorText
Function Determines the error text for the error code
Syntax int FECOM_GetErrorText( int iErrorCode, char* cErrorText )
Description 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 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.
Example ...
#include "fecom.h"
#include "fecomdef.h"
...
...
char cErrorText [256];
...
int iBack = FECOM_GetErrorText(FECOM_ERR_EMPTY_LIST, cErrorText )
// Code for displaying the text
...
...
FECOM-DLL programming interface 05/05
C/C++ MDWAPI
302 (4)J31069-D0138-U001-A3-7618
10.3.6 FECOM_GetLastError
Function Determines the last error code and passes the error text.
Syntax int FECOM_GetLastError( int iPortHnd , int* iErrorCode, char* cErrorText )
Description The function returns the last error code of the interface selected with iPortHnd in iEr-
rorCode and passes the matching Engl ish error text in cErrorText.
The buffer for cErrorText should be able to hold at least 256 characters.
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.
Example ...
#include "fecom.h"
...
...
char cErrorText [256];
int iErrorCode = 0;
...
int iBack = FECOM_GetLastError( iPortHnd, &iErrorCode, cErrorText )
// Code for displaying the text
...
...
05/05 FECOM-DLL programming interface
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 303
10.3.7 FECOM_GetPortHnd
Function Determines the port handle of a serial interfac e opened with FECOM.DLL.
Syntax int FECOM_GetPortHnd( char* cPortNr )
Description 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 determin ing the Port-
Handle of a serial interface tha t 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 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.
Example ...
#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 );
}
FECOM-DLL programming interface 05/05
C/C++ MDWAPI
304 (4)J31069-D0138-U001-A3-7618
10.3.8 FECOM_GetPortPara
Function Determines a parameter of the serial interface specified by iPortHnd.
Syntax int FECOM_GetPortPara( int iPortHnd, char* cPara, char* cValue )
Description 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 n umber 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 ...
#include "fecom.h"
...
...
char cValue[128];
...
if( !FECOM_GetPortPara( handle, "Baud", cValue ) )
{
// Code for displaying the COM parameter
...
}
...
...
}
05/05 FECOM-DLL programming interface
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 305
10.3.9 FECOM_SetPortPara
Function Sets a paramet er of a serial interface to a new value.
Syntax int FECOM_SetPortPara( int iPortHnd, char* cPara, char* cValue )
Description The function passes a new parameter to the serial interface specified by iPortHnd.
This causes the affected serial interface to be reinitial ized 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,
7N2, 7E2, 7O2,
8N1, 8E1, 8O1
8E1
Timeout 0...99999 600 ms
TxTimeControl 0, 1 1
TxDelayTime 0...999 5 ms
CharTimeoutMpy 1...10 1
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 refer-
ence 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" );
...
}
...
...
FECOM-DLL programming interface 05/05
C/C++ MDWAPI
306 (4)J31069-D0138-U001-A3-7618
10.3.10 FECOM_DoPortCmd
Function Carries out a command at a serial interface.
Syntax int FECOM_DoPortCmd( int iPortHnd, char* cCmd, char* cValue )
Description 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 t hat 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.
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“}
Return value 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.
Example 1 #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", "" );
...
}
...
Example 2l #include "fecom.h"
...
int Err;
char cValue[16];
...
Err = FECOM_DoPortCmd( handle, "GetCTS", cValue );
if( strcmp(cValue, ÑONì)==0) // Comparison of character strings
{
// CTS is set
}
...
05/05 FECOM-DLL programming interface
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 307
10.3.11 FECOM_AddEventHandler
Function An event handling measure is installed.
Syntax int FECOM_AddEventHandler( int iPortHnd, FECOM_EVENT_INIT* pInit )
Description The function installs one of four possible event handling methods. This me thod is
applied when the state of the control line for which the method was installed changes.
This makes an asynchronous reaction to eve nts 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 o ut for each ope ned 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 GetCur-
rentThreadID() 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 // See Defines FECOM.H
uiMsg = WM_USER + ... // Freely selectable
but above WM_USER2
uiFlag = FECOM_THREAD_ID
dwThreadID = GetCurrentThreadID()
The first parameter (WPARAM) passes the port number to the MessageM ap 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 par ameter in the FECOM_EVENT_INIT structure. The win-
dow must provide a message handling function for receiving the message that was
sent by FECOM using the API-Function PostMessage(..). The message co de can be
selected as required.
The FECOM_EVENT_INIT is filled out as follow:
uiUse = FECOM_xyz_EVENT // See Defines FECOM.H
uiMsg = WM_USER + ... // Freely selectable, but above
WM_USER2
uiFlag = FECOM_WND_HWND
hwndWnd = GetWindow(...)
The first parameter (WPARAM) passes the port number to the MessageM ap 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 applicat ion program is also a
thread.
2 See Windows documentation for Platform SDK
3 When using the CWnd MFC class, it is also possib le to use the GetSafeHwnd().
FECOM-DLL programming interface 05/05
C/C++ MDWAPI
308 (4)J31069-D0138-U001-A3-7618
3rd method: Calling a callbac k 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 li ne, the function is called by
FECOM. The contents of the function can be defined as required. However, the
passed parameters are fixed: the port numb er is passed in the 1st parameter (int) and
the state of the control line is passed in the 2 nd parameter (int) (0 = not set;
1 = set).
The FECOM_EVENT_INIT is filled out as follow:
uiUse = FECOM_xyz_EVENT // See Defines FECOM.H
uiMsg wird nicht benˆtigt
uiFlag = FECOM_CALLBACK
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 SetE-
vent(...) API function. The application side waits for the event using the Wait-
ForSingleObject(...) 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 FE-
COM_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 // See Defines FECOM.H
uiMsg wird nicht benˆtigt
uiFlag = FECOM_EVENT
hEvent = CreateEvent(...);
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 interf ace is
closed
.
Cross reference Additional information is found in chap. 10.2 Event signaling for control line s ,
chap. 10.3.12 FECOM_DelEventHa ndler,
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.
1 The function has the prototype: void IhrFunctionsName(int, int)
05/05 FECOM-DLL programming interface
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 309
10.3.12 FECOM_DelEventHandler
Function An event handling measure is removed.
Syntax int FECOM_DelEventHandler( int iPortHnd, FECOM_EVENT_INIT* pInit )
Description The function removes an event handling measure previous installed using FE-
COM_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 benötigt
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 benötigt
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 benötigt
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 benötigt
uiFlag = FECOM_EVENT
hEvent = IhrEventHandle;
Querverweis Additional information is found in chap. 10.2 Event signaling for control line s ,
chap. 10.3.11 FECOM_AddEventHa ndler,
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.
FECOM-DLL programming interface 05/05
C/C++ MDWAPI
310 (4)J31069-D0138-U001-A3-7618
10.3.13 FECOM_Transceive
Function Function for communicating (transmitting and receivi ng) via the port.
Syntax int FECOM_Transceive( int iPortHnd, UCHAR* cSendProt, int iSendLen,
UCHAR* cRecProt, int iRecLen )
Description 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 pa-
rameter. 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 TxDe-
layTime time period since the last receive pro tocol has expired.
Return value 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.
Example #include "fecom.h"
...
int iSendLen;
int iRecProtLen;
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
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
{
// 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
05/05 FECOM-DLL programming interface
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 311
10.3.14 FECOM_Transmit
Function Function for outputting a protocol via the port.
Syntax int FECOM_Transmit( int iPortHnd, UCHAR* cSendProt, int iSendLen )
Description The function sends the data contained in cSendProt to a conn ected 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 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.
Example ...
#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
}
}
FECOM-DLL programming interface 05/05
C/C++ MDWAPI
312 (4)J31069-D0138-U001-A3-7618
10.3.15 FECOM_Receive
Function Function for receiving a protocol via the port.
Syntax int FECOM_Receive( int iPortHnd, UCHAR* cRecProt, int iRecLen )
Description 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 pa-
rameter. 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 receiv e buffer. This ensures that characters that
arrived previously are not lost.
Return value 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.
Example ...
#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
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
...
}
}
}
05/05 FECOM-DLL programming interface
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 313
10.4 Appendix
10.4.1 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 inva-
lid
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 FE-
COM-OpenPort function is defec-
tive
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 handl e 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 pa-
rameter
FECOM_ERR_TRANSMIT_PROCESS -1037 Error in send process
FECOM_ERR_UNKNOWN_PARAMETER -1050 Passed parameter is unknown
FECOM-DLL programming interface 05/05
C/C++ MDWAPI
314 (4)J31069-D0138-U001-A3-7618
Error constant 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
05/05 FECOM-DLL programming interface
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 315
10.4.2 List of parameter IDs
Parameter ID Value range Default Units Description
Baud 300...115200 9600 bit/s Interface baud rate
Frame 7N1, 7E1, 7O1,
7N2, 7E2, 7O2,
8N1, 8E1, 8O1
8E1 Character frame (data bits, parity, stop
bits)
Timeout 0...99999 600 ms Maximum waiting time for receive pr otocol
PortNr 1...256 0 COM port number
TxTimeControl 0, 1 1 If set (1), the output of the next send pro-
tocol 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 ms Minimum time period between the last
receive protocol and the next send proto-
col. Only taken into account if
TxTimeControl=1
CharTimeoutMpy 1...10 1 Since V2.00.00, the character timeout is
calculated internally. The character time-
out determines how long after receipt of
the last character the receive process is
ended. Some PCs may experience fre-
quent protocol length errors b ecause the
waiting time is too short. In this case, this
parameter can be used to multiply the
waiting time.
FECOM-DLL programming interface 05/05
C/C++ MDWAPI
316 (4)J31069-D0138-U001-A3-7618
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
Obsolete parameters
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 p rotocol1
PortOpenTimeout 0...99999 5000 ms Maximum waiting time for opening a COM
port
1 See chap. 10.3.13 FECOM_Transceive
05/05 FECOM-DLL programming interface
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 317
10.4.3 List of constants for the FECOM_EVENT_INIT structure
The definitions of the constants are contained in the FE COM.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
Class library overview 05/05
C/C++ MDWAPI
318 (4)J31069-D0138-U001-A3-7618
11 Class library overview
11.1 Introduction
The C++ class library, ID FEDM, is another component provided by MOBY D de-
signed to simplify the development of application programs for our SLG D1 x
reader.
The C++ class library, ID FEDM, support all MOBY D reader familie s and can be
considered to be an additional protocol layer above the MOBY D function lib rary.
The C++ class library, ID FEDM, introduces an orga nizational principle for all
MOBY D reader families that makes it possible to gene rate similar program struc-
tures for all MOBY D readers, ind ependent of the readers actually in use. This or-
ganizational principle, which was also implemented in the MOBY D functio n librar-
ies in the form of similar function interface s, is e xten ded 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 d ata of the read ers
and transponders are still handled at a very low level. This means that the pro-
grammer is confronted with rea der parameters in bits and bytes and that trans-
ponder 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. Fu rther simplification by ab-
stracting data flow and actions i s re served for an overlying module layer.
For the first time, the C++ class library, ID FEDM, pro vides a si mple method of se-
rializing data1. This makes it possible, for example, to store a complete rea der con-
figuration in a file, reload it later and transe r it to the reader.
The documentation for the C++ cl ass library is presented in two part s: this docu-
ment only describes the base classes and the shared characteristics of the special-
ized reader classes. Detailed docum ent ation of the re ader classes is contained in
separate handbooks.
1 ForMicrosoft Visual C++ only at this time.Currently being developed for the Borland C++ Builder
05/05 Class library overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 319
11.1.1 Overview of all MOBY D components
The C++ class library, ID FEDM, builds on other MO BY D components. The over-
view below shows what other components are req uired for each reader family and
the provided interface. The function lib raries are all structured in the form of dy-
namic link libraries (DLL).
The layering of librari es as seen in the overview reflects the degree of specializa-
tion 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 a n application with its first function interface to the physical
interfaces. The MOBY D reader-specific prot ocol 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 mu st be generated for data
transferred using the protocols. This is the task of the C++ clas s library, ID FEDM.
It is located one layer above the MOBY D re ader-specific protocol layer. It must
provide organizational structure s for all MOBY D reader families. This goal is real-
ized using base classe s, the specialized reader classes and the use of object-
oriented methods, such as overlo aded functions, abstract base class
(FEDM_DataBase) and the use of the Standard Template Library (STL).
FECOM
FEISC
Windows-
Drivers
RS 232 RS 422
Kernel level
A
pp
lication level
FEDM_Base
FEDM_ISCReader
FEDM_DataBase
FEDM class librar
y
Function li brar
y
Class library overview 05/05
C/C++ MDWAPI
320 (4)J31069-D0138-U001-A3-7618
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 classe s and the global functions and constants
are used. Howeve r, the underlying function libraries for the reader class being used
are absolutely necessary for the fun ctionality 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
05/05 Class library overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 321
11.2 Installation
Installation is ve ry simple:
Copy all files of the C++ class library to a directory an d add this directory to your
development environment as an additional INCLUDE dire ctory.
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
Class library overview 05/05
C/C++ MDWAPI
322 (4)J31069-D0138-U001-A3-7618
11.3 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 cla s s is
used as a component with a defined interface – as a black box object, so to sp eak.
A brief overview of both applicatio n 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 fun c-
tions.
Static class structure ID FEDM
#SetData()
#GetData()
FEDM_Base
FEDM_DataBase
«Datentyp»
FEDM_BYTE_ARRAY
Abstract base class
«Datentyp»
FEDM_ISCTAB_ARRAY
Base class
Reader class
Auxiliary class
«Hilfsklasse»
FEDM_ISCTable
+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()
FEDM_ISCReader
-m_Table : FEDM_ISCTAB_ARRAY
+SendProtocol()
+SetPortHnd()
+GetPortHnd()
+GetErrorText()
+GetLastError()
+GetLastStatus()
Data type
05/05 Class library overview
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 323
11.3.2 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 de-
tailed and complete component diagram is contained in the documentation of each
reader class.
Most member functions form a type-independent interface that is consi stent for all
reader classes. This makes it possible to operate different reader families in one
application with the same algorithm.
Reader class
SendProtocol
SetPortHnd
GetPortHnd
GetData
Function library
(e.g.FEISC)
Table
(e.g. ISCTable)
SetReaderHnd
GetReaderHnd
Serialize
SetData
SetBusAddress
GetBusAddress Container
(e.g. EEData)
Container
(e.g. TmpData)
Container
(e.g. RAMData)
GetTableData
SetTableData
GetTableSize
FindTableIndex
Basic features of the class library 05/05
C/C++ MDWAPI
324 (4)J31069-D0138-U001-A3-7618
12 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 a s it is moved by the (overloaded) GetData and
SetData functions, the GetTableData1 function and Se tTableData function. In addi-
tion, the serialize function enable s data fl ow between an instance of the reader
class and a file.
The horizontal axis show s the control flow triggered by the SendProtocol function,
which is the only communication function. Before the send protocol is output, the
function automatically ret rieves all required data from the integrated data contain-
ers and also stores the received protocol data back to those locations. Thus, be-
fore SendProtocol is calle d, 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.
Reader class (e.g. FEDM_ISCReader)
SendProtoco
GetData
Function library
(e.g. FEISC)
Serialize
SetData
EEData
GetTableDat SetTableData
TmpData ISCTable
05/05 Basic features of the class library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 325
The keys to the protocol data are so-called access constants. Each reader parame-
ter and all transponder data have their o wn a ccess co nstants. From several dozen
to a hundred constants can be defined for each reader class. Their structure is
identical for all reader classes and is particularl y important. It is described in detail
in chap. 12.3 Access constants. Since the access constants a re of funda mental
importance for the entire function of the reader class, they are closely describ ed in
the documentation for the various reader classe s in that context.
Basic features of the class library 05/05
C/C++ MDWAPI
326 (4)J31069-D0138-U001-A3-7618
12.2 Data containers
Data containers are responsible for the structured administration of all paramete rs
or transponder data. All data containers are internally organized as byte a rrays 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 overloade d access functions.
The byte arrays are organized in blocks of 16 byte or 4 byte each. This o rga niza-
tion 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 d e-
termined 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 o verloaded 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 becau se
they have been specifie d as public in the FEDM_DataBase class. This method
should only be used for byte access.
05/05 Basic features of the class library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 327
The following examples sh ow the use of GetData (SetData analog). Function over-
loading makes it possible to use the d ata 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);
Basic features of the class library 05/05
C/C++ MDWAPI
328 (4)J31069-D0138-U001-A3-7618
12.3 Access constants
Access constants play a central role in data traffic between the applicatio n program
and the data container of the clas s 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:
These access constants are solely use d with the SetData an d GetData functions.
The access constant provides no information on the data type of a paramete r. The
data type is determined solely by the data type of the access function. Thus, the
bus address sho wn in the above example can eith er 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 pl ace via unique constants, but these constants
do not represent a string and thus do not contain a location code.
#define FEDM_ISCM_EE_COM_BUSADR
Com
p
onent name
Reader
03 00 00 01 00 00
MM BN BY NB BI Nb
Stora
g
e t
yp
e
Parameter name
MM Storage type (s. FEDM) 0..99
BN Block number 0..99
BY 1st byte in the block 0..99
NB Number of bytes 0..99
BI 1st bit in the byte 0..08
Nb Number of bits 0..99
05/05 Basic features of the class library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 329
12.4 Protocol traffic
Protocol traffic is triggered using the only SendProtocol function. The only pa rame-
ter it is passed is the control byte of the required protocol. All data required for pro-
tocol transfer are taken from the data containers or the tables. Thus, it must be en-
sured that all protocol data are pre viou sly upd ated. 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 functio n of
the FEDM_DataBase class.
The implementation of SendProtokoll calls DLL fun ctions that always require a
reader handle as thei r first parameter. These reade r handles must be initialized us-
ing 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 seriali ze is called.
The serialize function is curre ntly only available for Visual C++.
Basic features of the class library 05/05
C/C++ MDWAPI
330 (4)J31069-D0138-U001-A3-7618
12.6 Error handling
Almost all functions of the class libra ry carry out internal error checks a nd 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 ar e reserved for t he ID FEDM class li-
brary and the MOBY D function librari es:
Library Value range for error codes
ID FEDM -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 containe r and can be called us-
ing the GetLastError member function.
05/05 Base classes of the class library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 331
13 Base classes of the class library
13.1 FEDM_Base
The FEDM_Base base cla ss 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 con-
tainer. 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 Description
GetErrorText 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).
Base classes of the class library 05/05
C/C++ MDWAPI
332 (4)J31069-D0138-U001-A3-7618
13.2 FEDM_DataBase
The FEDM_DataBase class is a base class derived from FEDM _Base, that pro-
vides data containers and overloaded access functions matched to the data types
of the data containers. The size of the data container i s 0. The size is fixed in the
reader class derived from the FEDM_DataBase.
Furthermore, the class contains a serie s of abstract functions that must be imple-
mented in each reader cla ss. Abstract functions allow algorithm s to be written i n-
dependently of the reader type if the functions that are called are those from the
FEDM_DataBase rather than those from the read er 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 proto-
col 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”.
05/05 Base classes of the class library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 333
13.2.2 Attributes (public)
Attribute Description Reader family Organization
FEDM_BYTE_ARRAY EEData For configuration parame-
ters of the reader ISC 16 bytes per block
FEDM_BYTE_ARRAY RAMData For temporary configura-
tion 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
Base classes of the class library 05/05
C/C++ MDWAPI
334 (4)J31069-D0138-U001-A3-7618
13.2.3 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 spe-
cific 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 con-
stants 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 con-
tainer. 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.
05/05 Base classes of the class library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 335
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.
Global functions of the class library 05/05
C/C++ MDWAPI
336 (4)J31069-D0138-U001-A3-7618
14 Global functions of the class library
14.1 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"
05/05 Global functions of the class library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 337
Function Description
FEDM_ConvUIntToHexUChar 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).
Global functions of the class library 05/05
C/C++ MDWAPI
338 (4)J31069-D0138-U001-A3-7618
14.2 Appendix
14.2.1 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 incor-
rect
FEDM_ERROR_BYTE_BOUNDARY -103 The byte boundary of the access constant is incor-
rect
FEDM_ERROR_ARRAY_BOUNDARY -104 The array boundary of a data container was ex-
ceeded
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
05/05 Global functions of the class library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 339
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 Description
FEDM_CHK1 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.
FEDM_ISCReader reader class of the class library 05/05
C/C++ MDWAPI
340 (4)J31069-D0138-U001-A3-7618
15 FEDM_ISCReader reader class of the class library
15.1 Overview
Support for MOBY D readers consists of the FEDM_ISCReader reader class d e-
rived from the FEDM_DataBase base cl as s 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 contain ers as
well as of the table. All functions with a colored background and in bold are com-
ponents of the type-independent inte rface.
The reader class supports all MOBY D readers, which is why not all options of the
class are useable with all reader types.
Leserklasse
FEDM_ISCReader
SendProtocol
SetPortHnd
GetPortHnd
GetData
Funktionsbibliothek
ID FEISC
SetReaderHnd
GetReaderHnd
Serialize
SetData
SetBusAddress
GetBusAddress
Container
EEData
Container
Tm
p
Data
Container
RAMData
GetTableData
SetTableData
GetTableSize
FindTableIndex
Container
M
jp
Data
Container
SN Me
Container
PubMe
m
Container
ConfMe
m
GetLastProt
FEDM_ISCTable
m_Table
SetBrmData
SetM
jp
Data
SetIsoData
GetIsoData
GetTableLength
ResetTable
GetTableType
GetLastError
GetLastStatus
GetErrorText
FindBaudrate
SetPollAndState
GetFamilyCode
GetStatusText
05/05 FEDM_ISCReader reader class of the cl ass library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 341
The FEDM_ISCReader reader class and the FEDM_ISCTable tabl e 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 pro-
jects.
FEDM_ISCReader reader class of the class library 05/05
C/C++ MDWAPI
342 (4)J31069-D0138-U001-A3-7618
15.2 FEDM_ISCReader
The FEDM_ISCReader class is ba sed on the abstract FEDM_DataBase base class
and therefore inherits the general, type-independent interface. The abstract inter-
face functions are implemented in FEDM_ISCReade r, so that it is possibl e 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 impleme nt 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 si ze is statically defined in the constructor of the class. All data
containers are initialize d in the constructor with 0x00.
All data containers not listed here stay at length 0 and are not use able.
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.
05/05 FEDM_ISCReader reader class of the cl ass library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 343
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.
FEDM_ISCReader reader class of the class library 05/05
C/C++ MDWAPI
344 (4)J31069-D0138-U001-A3-7618
Function Description
GetTableData 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.
05/05 FEDM_ISCReader reader class of the cl ass library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 345
15.2.5 Examples for the use of the SendProtocol function
The SendProtocol function is of central importance for proto col 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 ar e available after each protocol transfer. Some protocols
allow the transfer of different data. In these cases, a model examp l e is presente d.
All access constants are listed in the FEDM_ISCRe aderID.h file and should be
closely studied together with the explanation of the prot ocol 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 pe rformed in applications.
[Control byte] protocol Example
[0x11] Read Serial-No UCHAR ucTrType = 0;
CString sSerNo;
SendProtocol(0x11); // Read UID of transponder
GetData // Get transponder type as byte
(FEDM_ISC_SN_TR_TYPE, &ucTrType);
GetData // Get UID as string
(FEDM_ISC_SN_SER_NO, sSerNo);
[0x14] Write Data Block UCHAR ucDBAdr = 0;
UCHAR ucDBN = 1;
CString sData;
sData = “0102030405060708090A0B0C0D0E0F”;
SetData // Address
(FEDM_ISC_TMP_14_DB_ADR, ucDBAdr);
SetData // Number of data blocks
(FEDM_ISC_TMP_14_DB_N, ucDBN);
SetData // Data bytes in DB0
(FEDM_ISC_PUB_DB0, sData);
SendProtocol(0x14); // Write data blocks to
// transponder
FEDM_ISCReader reader class of the class library 05/05
C/C++ MDWAPI
346 (4)J31069-D0138-U001-A3-7618
[Control byte] protocol Example
[0x15] Read Data Block UCHAR ucDBAdr = 0;
UCHAR ucDBN = 1;
CString sData;
SetData // Address
(FEDM_ISC_TMP_15_DB_ADR, ucDBAdr);
SetData // Number of data blocks
(FEDM_ISC_TMP_15_DB_N, ucDBN);
SendProtocol(0x15); // Read data blocks of
// transponder
GetData // Get data bytes from
(FEDM_ISC_PUB_DB0, sData); // DB0 as string
[0x16] Write Transponder
Configuration // 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 // Address
(FEDM_ISC_TMP_16_DB_ADR, ucDBAdr);
SetData // Set data bytes in
// CB0
(FEDM_ISC_CONF_DB0, sData);
SendProtocol(0x16); // Write data blocks to
// transponder
[0x17] Read Transponder
Configuration UCHAR ucDBAdr = 0;
Cstring sData;
SetData // Address
(FEDM_ISC_TMP_17_DB_ADR, ucDBAdr);
SendProtocol(0x17); // Read data blocks from
// transponder
GetData // Data bytes from CB0
(FEDM_ISC_CONF_DB0, sData);
[0x1A] Halt SendProtocol(0x1A);
[0x1B] Reset QUIET Bit SendProtocol(0x1B);
[0x1C] EAS SendProtocol(0x1C);
05/05 FEDM_ISCReader reader class of the cl ass library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 347
[Control byte] protocol Example
[0x21]Read Buffer 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 SendProtocol(0x69);
[0x6A] RF ON/OFF UCHAR ucRF = 1; // RF ON
SetData(FEDM_ISC_TMP_RF_ONOFF, ucRF);
SendProtocol(0x6A);
[0x6B] Init Noise Level SendProtocol(0x6B);
FEDM_ISCReader reader class of the class library 05/05
C/C++ MDWAPI
348 (4)J31069-D0138-U001-A3-7618
[Control byte] protocol Example
[0x6C] Set Noise Level 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_NOIS E_LEVEL_MIN, &ui NLMi n);
GetData(FEDM_ISC_TMP_NOIS E_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 // Reset OS bytes
(FEDM_ISCM_TMP_OUT_OS, 0);
SetData // Enable output 1
(FEDM_ISCM_TMP_OUT_OS_OUT1, (UCHAR)0x01);
SetData // Green LED off
(FEDM_ISCM_TMP_OUT_OS_ LED_G, (UCHAR)0x10);
SetData // Red LED on
(FEDM_ISCM_TMP_OUT_OS_ LED_R, (UCHAR)0x01);
SetData // Beeper on intermittently
(FEDM_ISCM_TMP_OUT_OS_ BEEPER, (UCHAR)0x11);
SetData // Reset O SF bytes
(FEDM_ISCM_TMP_OUT_OSF, 0);
SetData // Beeper at 4Hz
(FEDM_ISCM_TMP_OUT_OSF_BEEPER, (UCHAR)0x01);
SetData // 500ms active time,
beeper (FEDM_ISCM_TMP_OUT_OSTIME, 5); // and LEDs
SetData // Output 1, active 300ms
(FEDM_ISCM_TMP_OUT_OUTTIME, 3);
SendProtocol(0x71);
05/05 FEDM_ISCReader reader class of the cl ass library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 349
[Control byte] protocol Example
[0x74] Get Input // 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
and
[0x81] Write Configuration
// This example shows how a reader configuration block is read and written back.
UCHAR ucCfgAdr = 2; // Address of the
// configuration block
BOOL bEEProm = TRUE; // Configuration data
// out of / into EEPROM of
// reader
UCHAR ucBusAdress; // Bus address of the
ISC.LR- // reader from block 2
SetData // Reset all
(FEDM_ISC_TMP_READ_CFG, 0);
SetData // Set address
(FEDM_ISC_TMP_READ_CFG_ADR, ucCfgAdr);
SetData // Set storage location to
(FEDM_ISC_TMP_READ_CFG_LOC, bEEProm); // EEPROM
SendProtocol(0x80); // Read configuration
// data
GetData // E.g. use bus
(FEDM_ISCLR_EE_COM_BUSADR, &ucBusAdr); // address
SetData // Reset all
(FEDM_ISC_TMP_WRITE_CFG, 0);
SetData // Set address
(FEDM_ISC_TMP_WRITE_CFG_ADR, ucCfgAdr);
SetData // Set storage location to
(FEDM_ISC_TMP_WRITE_CFG_LOC, bEEProm); // EEPROM
SendProtocol(0x81); // Write configuration data
// back
[0x82] Save Configuration SetData // Reset all
FEDM_ISCReader reader class of the class library 05/05
C/C++ MDWAPI
350 (4)J31069-D0138-U001-A3-7618
[Control byte] protocol Example
(FEDM_ISC_TMP_SAVE_CFG, 0);
SetData // Set address
(FEDM_ISC_TMP_SAVE_CFG_ADR, (UCHAR)0x00);
SetData // Save all blocks
(FEDM_ISC_TMP_SAVE_CFG_MODE, TRUE);
SendProtocol(0x82); // Save configuration data
from // RAM to EEPROM
[0x83] Set Default Configu-
ration SetData // Reset all
(FEDM_ISC_TMP_RESET_CFG, 0);
SetData // Set address
(FEDM_ISC_TMP_RESET_CFG_ADR, (UCHAR)0x02);
SetData // Select RAM
(FEDM_ISC_TMP_RESET_CFG_LOC, FALSE);
SetData // Default, block 2 only
(FEDM_ISC_TMP_RESET_CFG_MODE, FALSE);
SendProtocol(0x83); // Set configuration data of
// block 2 in RAM to
// default
[0x85] Set System Timer 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)2 000); // 2000 milliseconds
SendProtocol(0x85); // Set timer
[0x86] Get System 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
[0xA0] Reader Login UCHAR ucPW[] = {0x00, 0x00, 0x00, 0x00}; // Password
SetData(FEDM_ISCLR_TMP_READER_PW, ucPW, 4); // Set password
SendProtocol(0xA0); // Send password to
// reader
[0xB0] ISO15693 Mandatory
and Optional Commands // 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
05/05 FEDM_ISCReader reader class of the cl ass library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 351
15.3 FEDM_ISCTable
The [0x02] multijob-State, [0x21] Read Buffer and [0xB0] ISO15693-Command pro-
tocols can provide transp onder data from multiple transponders. For the structured
storage of these transponder data, a table (protected) is provided wi thin the
FEDM_ISCReader reader class that administrates the protocol data of a trans-
ponder 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 reade r class provides information on
the number of valid entries.
The [0x02] multijob-State and [0x21] Read Buffer protocol s destroy the old data be-
fore inserting new data. Thus, the table is of a temporary nature. An application
program must read out the table data prior to the ne xt proto col.
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, espe cially [0x23] Read Multiple Blocks and [0x24] Write Multiple
Blocks, use the table for data exchange with an application p rogram.
At this time, the FEDM_ISCTable table can only be used for the ISO15693-
Command in the addressed mode. Implementatio n 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 e ntries, 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_ISCRead er reader class.
Separate data buffers are integrated in the table for data blocks from receive pro-
tocols and data blocks from send protocols. This makes it easy to verify written
data blocks with read data blocks.
FEDM_ISCReader reader class of the class library 05/05
C/C++ MDWAPI
352 (4)J31069-D0138-U001-A3-7618
15.3.1 Examples for the use of the table
The following examples de monstrate the data exchange with the FEDM_ISCT able
table. For reasons of clarity, we do not present the evaluation of the return values
of the functions. However, it should al ways be performed in applications.
[Control byte] protocol Example
[0x21] Read Buffer // 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<GetTableLength(0); iCnt++)
{
if(bSNR) // Get UID
GetTableData(iCnt, 0, FEDM_ISC_DATA_UID, &i64Snr);
if(bDB) // Get data block 1
GetTableData(iCnt, 0, FEDM_ISC_DATA_RxDB, 1, ucDB, 4);
if(bTIMER) // Get timer value
GetTableData(iCnt, 0, FEDM_ISC_DATA_TIMER, uiTimer);
}
05/05 FEDM_ISCReader reader class of the cl ass library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 353
[Control byte] protocol Example
[0xB0] ISO15693 Mandatory
and Optional Commands
[0x01] Inventory
// This example shows the [0x01] Inventory.
UCHAR ucTrType = 0; // For transponder type
Cstring sSnr; // For UID
SetData(FEDM_ISC_TMP_B0_CMD, (UCHAR)0x01); // Inventory
SetData(FEDM_ISC_TMP_B0_MODE, (UCHAR)0x00); // No More flag
SendProtocol(0xB0); // Communication with
// reader/transponder
// All transponder data are contained in the table.
For(int iCnt=0; iCnt<GetTableLength(0); iCnt++)
{
GetTableData(iCnt, 0, FEDM_ISC_DATA_UID, sSnr);
// Get UID as string
// ... Do something with the UID
GetTableData(iCnt, 0, FEDM_ISC_DATA_TRTYPE, &ucTrType);
// Get transponder type
// ... Do something with the transponder type
}
[0xB0] ISO15693 Mandatory
and Optional Commands
[0x23] Read Multiple Blocks
// This example shows the [0x23] Read Multiple Blocks. A [0x01] Inventory must be
carried out // first.
UCHAR ucDB[32]; // Buffer for a
// data block (max.
// block size 32)
UCHAR ucDBAdr = 5; // Data block address 5
Cstring sSnr; // For UID
// ... Get UID, e.g. from text field
// Set UID for addressed mode
SetData(FEDM_ISC_TMP_B0_REQ_UID, sSnr);
SetData(FEDM_ISC_TMP_B0_CMD, (UCHAR)0x23); // Read Multiple Blocks
SetData(FEDM_ISC_TMP_B0_MODE, (UCHAR)0x00); // Reset mode byte
SetData // Addressed mode
(FEDM_ISC_TMP_B0_MODE_ADR, (UCHAR)0x01);
SetData // Read data block
(FEDM_ISC_TMP_B0_REQ_DBN, (UCHAR)0x01);
SetData // Set data block-
(FEDM_ISC_TMP_B0_REQ_DB_ADR, ucDBAdr); // address
SendProtocol(0xB0); // Communication with
// reader/transponder
// All transponder data are contained in the table.
// First determine table index of UID
int iIdx = FindTableIndex(0, 0, FEDM_ISC_DATA_UID, sSnr);
// Get the data block size (block size)
GetTableData(iIdx, 0, FEDM_ISC_DATA_BLOCKSIZE, &ucBlockSize);
// ... Do something with the block size
FEDM_ISCReader reader class of the class library 05/05
C/C++ MDWAPI
354 (4)J31069-D0138-U001-A3-7618
[Control byte] protocol Example
// Get a data blo ck (ucDB will contain only ucBlockSize data by tes)
GetTableData(iIdx, 0, FEDM_ISC_DATA_RxDB, ucDBAdr, ucDB, 32);
// ... Do something with the data block
[0xB0] ISO15693 Mandatory
and Optional Commands
[0x24] Write Multiple Blocks
/* This example shows the [0x24] Write Multiple Blocks. A [0x01] Inventory must be
carried out first. Attention: If a [0x23] Read Multiple Blocks has not been carried out yet,
the block size is preset to 4. However, if the transponder in the reader field supports a
different block size, it must first be set in the table for this transponder. !! GetTable-
Data(.., FEDM_ISC_DATA_IS_BLOCK_SIZE_SET, ..) can be used to query whether
the block size has already been read using [0x23] Read Multiple Blocks.
*/
UCHAR ucDB[32]; // Buffer for a
// data block (max.
// block size 32)
UCHAR ucDBAdr = 5; // Data block address 5
Cstring sSnr; // For UID
// ... Get UID, e.g. from the text field, and store in sSnr
// ... Get data block, e.g. from a text field, and store in ucDB[]
// Determine table index of UID
int iIdx = FindTableIndex(0, 0, FEDM_ISC_DATA_UID, sSnr);
// Set UID for addressed mode
SetData(FEDM_ISC_TMP_B0_REQ_UID, sSnr);
SetData(FEDM_ISC_TMP_B0_CMD, (UCHAR)0x24); // Read Multiple Blocks
SetData(FEDM_ISC_TMP_B0_MODE, (UCHAR)0x00); // Reset mode byte
SetData // Addressed mode
(FEDM_ISC_TMP_B0_MODE_ADR, (UCHAR)0x01);
SetData // One data block
(FEDM_ISC_TMP_B0_REQ_DBN, (UCHAR)0x01); // write
SetData // Set data block-
(FEDM_ISC_TMP_B0_REQ_DB_ADR, ucDBAdr); // address
SetTableData // Set block size to 8
(iIdx, 0, FEDM_ISC_DATA_BLOCK_SIZE, 8);
// Write a data block to the table
SetTableData
(iIdx, 0, FEDM_ISC_DATA_TxDB, ucDBAdr, ucDB, 8);
SendProtocol(0xB0); // Communication with
// reader/transponder
05/05 FEDM_ISCReader reader class of the cl ass library
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 355
15.4 List of constants
All constants listed here are defined in FEDM_ISCReader.h.
Constant Description
FEDM_ISC_MAX_EEDATA_MEM Size of data container EEData
FEDM_ISC_MAX_RAMDATA_MEM Size of data container RAMData
FEDM_ISC_MAX_TMPDATA_MEM Size of data container TmpData
FEDM_ISC_MAX_MJPDATA_MEM Size of data container MjpData
FEDM_ISC_MAX_SN_MEM Size of data container SN_Mem
FEDM_ISC_MAX_PUBLIC_MEM Size of data container PubMem
FEDM_ISC_MAX_CONFIG_MEM Size of data container ConfMem
FEDM_ISC_MAX_TABSIZE Size of m_Table table in FEDM_ISCReader
FEDM_ISC_TABLE_TxDB_SIZE Size of data buffer for transmit data blocks
FEDM_ISC_TABLE_RxDB_SIZE Size of data buffer for receive data blocks
FEDM_ISC_DATA_TRTYPE Transponder type
FEDM_ISC_DATA_UID UID
FEDM_ISC_DATA_RxDB Data blocks from receive protocol
FEDM_ISC_DATA_TxDB Data blocks for send protocol
FEDM_ISC_DATA_TIMER Timer value from recieve protocol [0x21] Read Buffer or [0x02]
multijob state
FEDM_ISC_DATA_RxCB Configuration data block from receive protocol
FEDM_ISC_DATA_TxCB Configuration data block for send protocol
FEDM_ISC_DATA_AFI AFI from 0] [0x2B] Get System Information
FEDM_ISC_DATA_DSFID DSFID from receive data [0xB0] [0x01] Inventory
FEDM_ISC_DATA_SEC_STATUS Security status from receive data [0xB0] [0x23] Read Multiple Blocks
FEDM_ISC_DATA_BLOCK_SIZE Block size from receive data [0xB0] [0x23] Read Multiple Blocks
FEDM_ISC_DATA_TAB_ADR Table address from [0x02] multijob poll
FEDM_ISC_DATA_ MEM_SIZE Memory size from [0xB0] [0x2B] Get System Information
FEDM_ISC_DATA_ IC_REF IC reference from [0xB0] [0x2B] Get System Information
FEDM_ISC_DATA_ IS_BLOCK_SIZE_SET Flag, whether block size set with [0xB0] [0x23] Read Multiple Blocks
FEDM_ISC_NONE_TABLE Table type undefined
FEDM_ISC_BRM_TABLE Table contains data from [0x21] Read Buffer
FEDM_ISC_MJP_TABLE Table contains data from [0x02] multijob poll
FEDM_ISC_ISO15693_TABLE Table contains data from [0xB0] ISO15693 Host Commands
First steps in programming MOBY D 05/05
C/C++ MDWAPI
356 (4)J31069-D0138-U001-A3-7618
A First steps in programming MOBY D
A series of settings (parameterization of host and SLG) must be made before work
with a MOBY D-SLG and transponders can begin:
Configuration of the serial interface of host (PC) and SLG (both identical)
Setting of the required SLG mode
Further configuration of the SLG (RF power, anticollision, transponder types, ...)
A.1 Available SLG modes
SLG D10
(long range) SLG D11/D12
(proximity)
Buffered Read Mode x
ISO15693 host commands x x
Scan mode x x
Buffered Read Mode
Advantages:
Data areas (UID, data blocks) of transponders enteri ng the HF field that were
previously defined once are automatically read by the SLG. The host does not
have to control the read procedure. The read data sets are collected in a FIFO
data buffer and can be retrieved by the SLG at any time.
This requires very little programming.
Disadvantages:
Transponders can only be read but not written to.
The Buffered Read Mode is only su pported by the long range type (D10).
The Buffered Read Mode is particularly suited for the identification of objects: a lar-
ger number of transponders can be handled easil y.
05/05 First steps in programming MOBY D
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 357
ISO15693 host commands
Advantages:
Trasponders can be read and written to.
ISO15693 host commands are supported by both reader types.
Disadvantages:
More programming is require d than for the Buffered Read Mode if data blocks
are to be read in addition to UIDs.
Scan mode
Advantage:
The SLG automatically sends p re vio usly-defined data areas of a transponder to
the host (PC) as soon as the transponder enters the HF field. The read proce -
dure does not have to be controll ed.
Disadvantages:
Only reading is possible.
The scan mode is only supporte d by the proximity type (D12).
The host must always be ready for rece ption.
First steps in programming MOBY D 05/05
C/C++ MDWAPI
358 (4)J31069-D0138-U001-A3-7618
A.2 Serial interface settings
Communication between h ost (PC) and SLG is handled via an asynchro nous serial
interface (RS 232 or RS 422 on request).
The same interface parameters (ba ud, parit y, stop bits) must be set on both sides.
The DLL-Function,
FECOM_SetPortPara, is used for host settings. Prior to that the respective COM
port must be opened using FECOM_OpenPort. The factory settings of the SLG are
38400, 8, e, 1. These settings usually do not need to b e changed. If another value
is required, configuration block CFG2 (COM-Interface ) for SLG D10, or configura-
tion block CFG2 (COM-Interface) for SLG D11/D12, must be written to the
EEPROM of the SLG using DLL function FEISC_0x81_WriteConfBlock. Subse-
quently, a CPU reset (DLL function FEISC_0x63_CPUReset) must be executed.
However, this requires that communication between the host and SLG is already
taking place (= matching interface parameters).
05/05 First steps in programming MOBY D
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 359
A.3 Parameterization of the SLG
After communication between the host and SLG is working, the SLG can be fully
parameterized via the communication interface.
First, a reader object must be gen erated using the DLL function,
FEISC_NewReader function, which returns a handle to the reader (SLG). This
handle is required for nearly all reader functions.
The bus address required for the reader functions (“cBusAdr“) must be fixed at 255
(0xFF), since connections for all MOBY D-SLGs are point-to-point connections
(only one SLG per COM port).
For parameterization, the SLG has a two-part memory area (RAM and EEPROM)
into which the parameter data sets a re written. The RAM contents is lost after the
power supply is switched off which is why all required changes to the parameteriza-
tion must be written to the EEPROM memory area.
After any changes to the parameter data sets, a CPU reset must be executed to
activate the changes.
For SLG D10, the parameter data set consists of 16 blocks (CFG0...CFG1 5) at
14 bytes each (CFGx[0]...CFGx[13]). Only some of the blocks are required; the re-
mainder is reserved (RFU). SLG D11/D12 has only 7 parameter blocks.
Please note that the parameter blocks have different meanings in SLG D10 and
D12.
Parameter blocks: 16x14 bytes (SLG D10)
DLL function FEISC_0x81_WriteConfBlock is for writing a parameter block;
FEISC_0x80_ReadConfBlock is for reading a parameter block.
First steps in programming MOBY D 05/05
C/C++ MDWAPI
360 (4)J31069-D0138-U001-A3-7618
Examples
Open COM port and create reader object
(The section for determining the baud rate can be omit ted for known interface pa-
rameters.)
void Cmultitag_DDlg::OnButCom1()
{
int i, j, BaudOk=0, iBack, iNextHnd, iCloseHnd;
char* baud[] = {ì1200î,î2400î,î4800î,î9600î,î19200î,î38400î,
ì57600î,î115200î};
char* frame[] = {ì8E1î,î81î,î8N1î};
char Meldung[256], buffer[5];
unsigned char cConfBlock[256], xCFG[15];
iSHnd = FECOM_OpenPort(ì1î); // Open COM1 interface
if(iSHnd <= 0)
MessageBox(ìInterface-Open Errorî,îMOBY Dî,MB_ICONSTOP);
// Find reader communication
// Test whether a port is opened
if(FECOM_GetPortList(0) <= 0)
{
MessageBox(ìPlease open a port!î,îMOBY Dî,MB_ICONWARNING);
return; // Function left prematurely
}
m_sText1 = ìfind reader...î;
UpdateData(FALSE);
iRHnd = FEISC_NewReader(iSHnd); // Generate a reader object
for (i=0; i<3; i++) // Test all frames
{
iBack = FECOM_SetPortPara(iSHnd,îFrameî,frame[i]);
for (j=0; j<8; j++)
{
iBack = FECOM_SetPortPara(iSHnd,îBaudî,baud[j]);
if(FEISC_0x52_GetBaud(iRHnd,255) >=0) // Reader recognized?
{
iBack = FEISC_0x80_ReadConfBlock(iRHnd,255,0x82,cConfBlock,0);
itoa(cConfBlock[0],buffer,10); // Convert to charac-
ters
strcpy(Meldung,baud[j]); // Build message text
strcat(Meldung,ì, Ñ);
strcat(Meldung,frame[i]);
strcat(Meldung,ì\nReader-Adr.:ì);
strcat(Meldung,buffer);
j=8; // Artificial loop end
i=3;
BaudOk=1;
}
}
}
if(BaudOk)
{
m_sText1.Format(ì%sî,Meldung);
m_iStatus = FEISC_0x80_ReadConfBlock(iRHnd,255,0x8a,xCFG,0);
if(!(xCFG[0] & 0x01))
{
m_sText1 = ìSLG no in Buffered Read Mode!î;
m_bBRM = FALSE; // Checkbox not clicked
m_cStartButton.EnableWindow(FALSE); // Disable start button
m_cInitButton.EnableWindow(FALSE); // Init button ì
}
else
{
m_bBRM = TRUE; //checkbox clicked
m_cStartButton.EnableWindow(TRUE); // Enable start button
m_cInitButton.EnableWindow(TRUE); // Init button ì
05/05 First steps in programming MOBY D
C/C++ MDWAPI
(4)J31069-D0138-U001-A3-7618 361
}
m_cCom1Button.EnableWindow(FALSE); // Disable button
m_cSetModeButton.EnableWindow(TRUE); // Enable button
}
else
{
m_sText1 = ìno SLG found!î;
// 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 ì
m_sText1 = ìî;
ErrMsg(iBack); // Output message
m_iStatus = FEISC_0x63_CPUReset(iRHnd,255); // Execute CPU reset
if(m_iStatus != 0)
iBack = m_iStatus;
ErrMsg(iBack); // Output message
}
Abbreviations 05/05
C/C++ MDWAPI
362 (4)J31069-D0138-U001-A3-7618
Abbreviations
ADR Address Address
ASK Amplitude Shift Keying Amplitudenumtastung
CB Config Block Konfigurationsblock
CFG Configuration Parameter Block Konfigurations-Parameterblock
CRC Cyclic Redundancy Check zyklischer R edundanztest
DB Data Block Datenblock
DIP Dual Inline Plastic Dual Inline Plastikgehäuse
EAS Electronic Article Surveillance Elektronische Artikelüberwachung
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 Länge
LOC Location Position
LSB Least Significant Byte niederwertigstes Byte
min Minutes Minuten
ms Milliseconds Millisekunden
MSB Most Significant Byte höchstwertiges 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 Em pfangs-Signalstärke
RTC Real Time Clock Echtzeit-Uhrenbaustein
SLG Read / Write Devices Schreib- / Lesegerät
UID UID Seriennummer (=UID)
TAB Table Tabelle
TR Transponder Transponder
TS Timeslot Zeitschlitz
UID Unique Identifier eindeutige Kennun g
WO Write Only Access Nur-Lese-Zugriff
WR Write Schreiben