You are on page 1of 73

Help Manual for Chip Reading Programming Desktop V 1.1.

9 or higher
Revision A, 03/21/2007

Help Manual for Chip Reading Programming Desktop

1 Programming Desktop........................................................................................................................... 4
1.1 Introduction .................................................................................................................................... 4
1.2 Quick Start ..................................................................................................................................... 5
1.3 Operation ....................................................................................................................................... 6
1.3.1 Navigation ............................................................................................................................... 6
1.3.2 Edit Modes .............................................................................................................................. 7
1.3.2.1 Standard Mode ................................................................................................................ 7
1.3.2.2 Advanced Mode............................................................................................................... 7
1.3.2.3 Edit Configuration File manually...................................................................................... 7
1.3.3 Command Description ............................................................................................................ 7
1.3.4 Representation of Command Lines ........................................................................................ 8
1.3.5 Command Dialogues .............................................................................................................. 8
1.4 Command Groups.......................................................................................................................... 9
1.4.1 Sync Command ...................................................................................................................... 9
1.4.2 Init Command.......................................................................................................................... 9
1.4.3 Start Command....................................................................................................................... 9
1.4.4 Format Command................................................................................................................. 10
1.4.4.1 Conversion Methods...................................................................................................... 10
1.4.4.1.1 No Conversion ........................................................................................................... 10
1.4.4.1.2 Swap Nibbles and convert BCD to ASCII.................................................................. 10
1.4.4.1.3 Convert Nibbles BCD to ASCII .................................................................................. 10
1.4.4.1.4 Swap Nibbles............................................................................................................. 11
1.4.4.1.5 Convert 1 Byte Hex to 2 Digits decimal ASCII .......................................................... 11
1.4.4.1.6 Convert 1 Byte Hex to 3 Digits decimal ASCII .......................................................... 11
1.4.4.1.7 Convert each Nibble Hex to 2 Digits decimal ASCII.................................................. 11
1.4.4.1.8 Convert 2 Byte Hex to 4 Digits decimal ASCII .......................................................... 11
1.4.4.1.9 Convert 2 ASCII digits to 1 Byte Hex......................................................................... 12
1.4.4.1.10 Swap each Pair of Bytes ......................................................................................... 12
1.4.4.1.11 Swap Nibbles and convert Hex to ASCII................................................................. 12
1.4.4.1.12 Convert Nibbles Hex to ASCII ................................................................................. 12
1.4.4.1.13 User defined Conversion ......................................................................................... 12
1.5 Command Types.......................................................................................................................... 12
1.5.1 Reader Command ................................................................................................................ 12
1.5.2 Chip Card Command ............................................................................................................ 12
1.5.3 Component Command.......................................................................................................... 12
2 Chip Card Basics................................................................................................................................. 13
2.1 Introduction .................................................................................................................................. 13
2.1.1 Definition of Chip Cards ........................................................................................................ 13
2.1.2 Applications for Chip Cards .................................................................................................. 13
2.1.3 Advantages of Chip Cards.................................................................................................... 13
2.1.4 Types of Chip Cards ............................................................................................................. 14
2.1.5 Data Exchange ..................................................................................................................... 15
2.1.6 Protective Measures ............................................................................................................. 15
2.2 Details .......................................................................................................................................... 16
2.2.1 General ................................................................................................................................. 16
2.2.1.1 Memory.......................................................................................................................... 16
2.2.1.1.1 Memory Types ........................................................................................................... 17
2.2.1.1.2 Size Comparison of Memory Types .......................................................................... 17
2.2.1.2 Architecture.................................................................................................................... 18
2.2.1.2.1 Operating System ...................................................................................................... 18
2.2.1.2.2 Command Set............................................................................................................ 18
2.2.1.2.3 Data Structures.......................................................................................................... 18
2.2.1.2.4 File Types .................................................................................................................. 19
2.2.1.2.5 Data Security ............................................................................................................. 19
2.2.2 Contact Chip Cards .............................................................................................................. 20
2.2.2.1 Standards ...................................................................................................................... 20
2.2.2.2 Mechanical Specifications ............................................................................................. 20
2.2.2.3 Electrical Specifications................................................................................................. 21
2.2.2.4 Communication.............................................................................................................. 22
Page 1 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.2.3 Contactless Chip Cards ........................................................................................................ 24


2.2.3.1 Distance Ranges ........................................................................................................... 24
2.2.3.2 Application Examples .................................................................................................... 24
2.2.3.3 Advantages over Contact Chip Cards ........................................................................... 25
2.2.3.4 Standards ...................................................................................................................... 26
2.2.3.5 Mechanical Specifications ............................................................................................. 27
2.2.3.6 Electrical Specifications................................................................................................. 27
2.2.3.7 Communication.............................................................................................................. 28
3 Chip Reading Form ............................................................................................................................. 29
4 Chip Card Reader ............................................................................................................................... 30
4.1 CREAM130 .................................................................................................................................. 30
4.1.1 General Information .............................................................................................................. 30
4.1.2 Commands............................................................................................................................ 30
4.1.2.1 Response Status Code.................................................................................................. 31
4.1.2.2 Reader Commands ....................................................................................................... 31
4.1.2.2.1 Get Version................................................................................................................ 32
4.1.2.2.2 Reset Macro Buffer.................................................................................................... 32
4.1.2.2.3 End of Macro ............................................................................................................. 32
4.1.2.2.4 Activate Macro ........................................................................................................... 32
4.1.2.2.5 Start Chip Card Reading ........................................................................................... 32
4.1.2.3 Chip Card Commands ................................................................................................... 32
4.1.2.3.1 Select Protocol / Select Chip Type ............................................................................ 33
4.1.2.3.2 Processor Cards ........................................................................................................ 33
4.1.2.3.2.1 Get Chip Card Frequency ................................................................................... 33
4.1.2.3.2.2 Select Chip Card Frequency............................................................................... 33
4.1.2.3.2.3 Power On ............................................................................................................ 34
4.1.2.3.2.4 Power Off ............................................................................................................ 34
4.1.2.3.2.5 Reset Chip Card Frequency ............................................................................... 34
4.1.2.3.2.6 Protocol Parameter Selection (PPS) .................................................................. 35
4.1.2.3.2.7 Protocol T=0........................................................................................................ 36
4.1.2.3.2.7.1 Runtime Return Code................................................................................... 36
4.1.2.3.2.7.2 Set Chip Card Communication Parameters ................................................. 37
4.1.2.3.2.7.3 APDU Command.......................................................................................... 38
4.1.2.3.2.8 Protocol T=1........................................................................................................ 39
4.1.2.3.2.8.1 Runtime Return Code................................................................................... 39
4.1.2.3.2.8.2 Set Chip Card Communication Parameters ................................................. 40
4.1.2.3.2.8.3 Protocol Commands..................................................................................... 40
4.1.2.3.2.8.3.1 Change Information Field Length .......................................................... 40
4.1.2.3.2.8.3.2 User Defined Protocol Command.......................................................... 41
4.1.2.3.2.8.4 APDU Command.......................................................................................... 42
4.1.2.3.3 Memory Cards ........................................................................................................... 42
4.1.2.3.3.1 Power Off ............................................................................................................ 42
4.1.2.3.3.2 SLE 4404/4406 ................................................................................................... 43
4.1.2.3.3.2.1 Runtime Return-Code .................................................................................. 43
4.1.2.3.3.2.2 Read Card Data ........................................................................................... 43
4.1.2.3.3.3 SLE 4418/4428 ................................................................................................... 43
4.1.2.3.3.3.1 Runtime Return-Code .................................................................................. 43
4.1.2.3.3.3.2 Read Data .................................................................................................... 44
4.1.2.3.3.4 SLE 4432/4442 ................................................................................................... 44
4.1.2.3.3.4.1 Runtime Return-Code .................................................................................. 44
4.1.2.3.3.4.2 Read 128 Bytes Card Data .......................................................................... 44
4.1.2.3.3.5 SLE 4436 ............................................................................................................ 45
4.1.2.3.3.5.1 Runtime Return-Code .................................................................................. 45
4.1.2.3.3.5.2 Read 16 Bytes Identity Data......................................................................... 45
4.1.2.3.3.5.3 Read 8 Bytes User Data............................................................................... 45
4.1.2.3.3.5.4 Read Card Data ........................................................................................... 45
4.1.2.3.3.6 I2C....................................................................................................................... 46
4.1.2.3.3.6.1 Runtime Return-Code .................................................................................. 46
4.1.2.3.3.6.2 Deactivate Automatic Power Off .................................................................. 46
4.1.2.3.3.6.3 Get I2C Memory Size ................................................................................... 46
4.1.2.3.3.6.4 Select I2C Memory Size............................................................................... 47

Page 2 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.3.6.5 Select Chip Address..................................................................................... 47


4.1.2.3.3.6.6 Select Page .................................................................................................. 47
4.1.2.3.3.6.7 Read Number of Bytes ................................................................................. 48
4.1.2.3.3.6.8 Read 16 Bytes .............................................................................................. 48
4.1.2.3.4 User defined Chip Card Command ........................................................................... 49
4.1.2.4 Control Commands........................................................................................................ 50
4.1.2.4.1 Extract Commands .................................................................................................... 50
4.1.2.4.1.1 Extract with Offset and Length............................................................................ 51
4.1.2.4.1.2 Extract with Tag Search...................................................................................... 51
4.1.2.4.1.3 Extract explicitly selected Data Bytes ................................................................. 52
4.1.2.4.1.4 Clear Extract Buffer............................................................................................. 52
4.1.2.4.2 Skip Commands ........................................................................................................ 53
4.1.2.4.2.1 Skip if equal......................................................................................................... 53
4.1.2.4.2.2 Skip if not equal................................................................................................... 53
4.1.2.4.2.3 Skip unconditionally ............................................................................................ 54
4.1.2.4.3 Stop Commands ........................................................................................................ 54
4.1.2.4.3.1 Stop if equal ........................................................................................................ 54
4.1.2.4.3.2 Stop if not equal .................................................................................................. 55
4.1.2.4.3.3 Stop with Error Code........................................................................................... 55
4.1.2.4.3.4 Stop with Return Code of last Chip Card Command .......................................... 55
4.1.2.4.4 User defined Control Command ................................................................................ 56
4.1.2.5 User defined Command................................................................................................. 56
4.1.3 Configuration Examples........................................................................................................ 57
4.1.3.1 T=0 ................................................................................................................................ 57
4.1.3.2 T=1 ................................................................................................................................ 59
4.1.3.3 SLE 4404/4406.............................................................................................................. 61
4.1.3.4 SLE 4418/4428.............................................................................................................. 62
4.1.3.5 SLE 4432/4442.............................................................................................................. 64
4.1.3.6 SLE 4436 ....................................................................................................................... 66
4.1.3.7 I²C .................................................................................................................................. 68
4.1.4 Trouble Shooting................................................................................................................... 70
4.1.4.1 Preparation .................................................................................................................... 70
4.1.4.2 Execution ....................................................................................................................... 71
4.1.4.2.1 Processor Card.......................................................................................................... 71
4.1.4.2.1.1 Test ATR ............................................................................................................. 71
4.1.4.2.1.2 Test APDU Command ........................................................................................ 72
4.1.4.2.2 Memory Card ............................................................................................................. 72
4.1.4.3 Conclusion ..................................................................................................................... 73

Page 3 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

1 PROGRAMMING DESKTOP

1.1 Introduction
The programming desktop offers a comfortable possibility for programming the chip reading in the card
channel 7711.
In most cases profound chip card know-how is not necessary. Modest Chip Card Basics, however,
facilitates the comprehension for working with the programming desktop. For more profound knowledge
refer to the relevant specialized literature and standards (e.g.: ISO/IEC 7816 for contact chip cards).

Generally the chip card reading is programmed via configuration files which contain all necessary
commands. These configuration files carry the ending CCR (Configure Chip card Reader). On principle
they can be edited with any text editor. For the manual creation and editing, however, a very specific and
comprehensive expert knowledge is necessary regarding chip cards, chip card reader, and component
7711. In this documentation no expert knowledge will be imparted. However, by using the programming
desktop no expert knowledge is necessary.
The programming desktop automatically generates a configuration file based on a few clearly structured
user inputs. BICOS sends the configuration file data in converted form to the component 7711. The latter
interprets these data and operates the chip card reader accordingly.

The programming desktop leads the user through the creation of a new configuration by means of an
assistant (also refer to chapters Quick Start and Operation). In this process basic absolutely necessary
information is asked for concerning the chip card to be read. Afterwards, the user programs the chip card
reading on his own by using suitable chip card commands or control commands. The available command
set depends on the Chip Card Reader.

Page 4 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

1.2 Quick Start


In a few steps you can program a new chip card reading:
1. Clarify the following questions first:
- Which type of chip cards are to be read (contact / contactless, processor card / memory card,
protocol / chip type, ...)
- Where are the data located at (memory address, file structure, file name, ...)
- How must the data be read (linear, record-oriented, special APDU command, ...)
- How large is the data set
- How are data coded (ASCII, packed in nibbles, hexadecimal, ...)
The Chip Reading Form may serve as a help.
2. Start the programming desktop. Also refer to chapter Operation.
3. Via <F12> Menu select „Create new configuration“. Now, an assistant leads you through the
necessary statements.
You may select an already existing configuration - then you are done now.
Or you may create a completely new configuration.
4. Follow the assistant. Default values you would not like to change knowingly should simply be ignored.
After „Finish“ the essential commands generated so far are shown.
5. With „New command“ you may now create the commands for the chip card reading. New commands
are automatically inserted behind the currently marked line at the next sensible position. The
available command set depends on the chip card reader.
• CREAM130:
- Firmware revision BOEWE-CREAM V3.0a or higher is required.
- First create the necessary chip card commands for reading the chip card.
- For memory cards there are specific read commands. For I2C cards it may be sensible to
additionally set the chip address or memory page.
- For processor cards the commands are given in the form of standardized APDUs
(Application Protocol Data Units); typically Select File first, directly followed by Read Binary
respectively Read Record.
The pre-adjusted chip card communication parameters, the pre-adjusted T=1 information
field length, as well as the pre-adjusted ATR timing should only be altered in special
circumstances.
For details refer to chapter Chip Card Commands.
- Complete all dialog fields correctly. It is possible to select some data directly from lists.
Simply ignore those default values you would not like to change knowingly.
- In the first step the read chip card data are only present within the CREAM130. In order to
select specific data for transfer to the component 7711 create a command Extract with Offset
and Length. Within this data selection you may use further Extract Commands, for example to
search for a certain tag character or to select individual data bytes.
- By using further Control Commands it is possible to control the chip card reading sequence
conditioned on certain data or to react to errors. Normally, however, this is not necessary.
- Some prepared Configuration Examples illustrate the programming.
• Other readers:
At present there are no further readers implemented into the programming desktop. Configuration
files must be created manually by experts.
6. Adapt the Format Command. Here you define which data the component 7711 has to convert in
which manner. This is necessary because the data inside the chip card are often packed or coded, or
because the chip card reader delivers the data in a certain format.

Page 5 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

1.3 Operation

1.3.1 Navigation
For navigating within the programming desktop there are several possibilities according Windows
standard:
- Clicking with the left mouse button or double-clicking, respectively.
- With Tabulator key go to the next button, with Shift/Tabulator go back to the previous button,
respectively.
- Space bar enables/disables check boxes.
- Arrow keys navigate within pop-up windows.
- Execute/accept with Enter key.
- Abort with Escape key.

Additionally there are the following functions available:


- Insert key: insert a new command line after the marked line.
- Double-click or Enter key: opens the marked command line.
- Delete key: deletes the marked command line downward.
- Backspace key: deletes the marked command line upward.

Page 6 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

1.3.2 Edit Modes


The programming desktop can be operated in different edit modes. They offer different operator
convenience and can be selected via <F12> Menu.

1.3.2.1 Standard Mode


Generally the programming desktop starts in the standard mode. This mode offers a maximum of
operator convenience and logical control.
• Only useful possible commands are offered.
• New commands are inserted automatically into the next possible position behind the currently marked
line.
• Commands may be shifted only within useful limits.
• Command parameters depending on previous commands are automatically set in a correct way.
• Certain offsets in some commands are corrected automatically, so that the operator must only focus
on the actual chip card data to be read.
• On deleting one command line also the dependent command lines are additionally deleted
automatically.
• Certain command fields are protected from unnecessary or inadvertent change.
If the standard mode is not sufficient for creating a configuration you may switch to the Advanced Mode
via <F12> Menu.

Note: Configurations created in the advanced mode or created manually should only be displayed but
should not be edited in the standard mode. Otherwise, the standard automatisms could lead to
inadvertent changes. In order to prevent this the opened command dialogues should be quit with the
Escape key instead of the Enter key.

1.3.2.2 Advanced Mode


The advanced mode can be selected by the operator via <F12> Menu. It should be used only by
experienced operators for the creation of configurations for which the Standard Mode is not suitable. The
advanced mode offers as much leeway as possible for the configuration design. Only mandatory logical
controls and limitations are effective. Only mandatory automatisms are executed. To a large extent the
operator himself is responsible for the correctness!

1.3.2.3 Edit Configuration File manually


It is possible to completely create or edit the configuration file manually in a text editor. Within the
programming desktop this can be explicitly select via <F12> Menu, “Edit configuration file manually”. The
operator has unrestricted access. However, he is fully responsible for his manual interventions. This
option should be utilized exclusively by proven experts in exceptional cases because it is error-prone!

1.3.3 Command Description


In all Edit Modes the description of every command line is automatically generated. In case of user
defined commands that are not clearly detected by the programming desktop it is possible to enter a user
defined description. With commands that are clearly detected by the programming desktop a possibly
manually created description is replaced by the automatically generated description. A manual creation of
a command description is only possible by selecting Edit Configuration File manually.

Page 7 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

1.3.4 Representation of Command Lines


• Green colored lines can neither be deleted nor shifted. These are indispensable commands
automatically generated by the programming desktop. Parameters of some commands can be
changed.
• Black colored lines can be deleted and shifted within certain useful limits. These are commands that
are created by the user.
• Blue colored lines should be adapted manually. This applies to indispensable commands,
automatically generated by the programming desktop, that can neither be shifted nor deleted but, as
a rule, have to be adapted (e.g. Format Command).
• Violet colored lines should be checked or corrected manually. These are user defined commands
that are not clearly detected by the programming desktop. The user himself is responsible for the
correctness.

1.3.5 Command Dialogues


On principle all command dialogues are uniformly set up and structured:
• Command string:
the command string is automatically generated by the programming desktop based on the user
inputs. Only serves for information or inspection. It cannot be changed.
• Command description:
Command Description in a comprehensible plain text. Normally generated automatically.
• Command parameters:
type and scope varies depending on command.
• Expected command response:
the component 7711 can control the chip card reader’s command response with the following
particulars:
- Offset:
data offset within the command response.
- Response:
expected response data. May be input as ASCII string or hex bytes. A mixture is also possible by
marking the individual hex bytes with a preceding $ character within an ASCII string.
- Response time:
within this time the chip card reader must respond to the command.
• Command delay time:
after receipt of the previous command response the component 7711 fits in a certain delay time prior
to sending the new command to the chip card reader.
Expected command response and command delay time are normally generated automatically depending
on the Chip Card Reader. However, they can be modified in the Advanced Mode.

Page 8 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

1.4 Command Groups


On principle the component 7711 is independent of the chip card reader. The communication with the
chip card reader is controlled only by certain command groups. The chip card reader’s specific command
data are transparently sent to the chip card reader. The programming desktop automatically allocates the
individual commands to the correct command group depending on the chip card reader.

1.4.1 Sync Command


The Synchronization Command is used for synchronization between the component 7711 and the chip
card reader. The chip card reader must respond to this command with certain data (e.g. firmware version
or reader status) so that the component 7711 gets a sign of life from the chip card reader.

1.4.2 Init Command


Initialization Commands are sent only once to the chip card reader. Thus the chip card reader is
configured for reading certain chip cards. The chip card reader keeps the command data internally stored.
This is particularly interesting for chip card readers that allow a macro script processing or can save
individual parameters.

1.4.3 Start Command


Start Commands are sent to the chip card reader for every single chip card to be read. Normally, for chip
card readers with macro script processing one single Start Command that triggers the macro script
processing is sufficient. Beforehand the macro script must have been loaded into the chip card reader via
Init Commands. For chip card readers without macro script processing usually several Start Commands
are necessary for the complete communication for reading the chip card. Each Start Command may be
followed by one or more Format Commands.

Page 9 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

1.4.4 Format Command


Format Commands define which Start Command response data the component 7711 has to convert in
which manner. This is necessary because the data inside the chip card are often packed or coded, or
because the chip card reader delivers the data in a certain format.
Because of component 7711 restrictions and additional protocol frame maximum possible chip card data
to convert is 121 byte. However the chip card reader may provide more data.
This command is automatically generated and cannot be deleted. It must be adapted by the operator to
his requirements.

Command: Format command


Command class: Component command
Command type: Component command
Command group: Format command
Command parameters:
Conversion Selection of one of the Conversion Methods.
Range: selection list or 00...FF hex.
Default: no conversion, 00 hex.
Tag character Optional tag character to be searched for.
Range: 00...FF hex.
Default: blank
Offset Offset of the first data byte (behind the tag character).
Range: 0...251
Default: 0
Number of bytes Number of bytes to be converted.
Range: 0...255
Default: 0 (i.e. all)
Reverse string Reverse formatted string if necessary.
Range: yes/no
Default: no
Return data: None.

1.4.4.1 Conversion Methods


In most cases a data conversion is necessary because the data inside the chip card are often packed or
coded, or because the chip card reader delivers the data in a certain format. The conversion method is
defined with Format Commands.

1.4.4.1.1 No Conversion
The read data are not converted but transferred unchanged.
Example:
Before conversion After No Conversion
31 32 33 hex. 31 32 33 hex. = „123“

1.4.4.1.2 Swap Nibbles and convert BCD to ASCII


The two nibbles (half bytes) of a byte are swapped and then converted from BCD (Binary Coded Decimal)
to an ASCII character each.
Example:
Before conversion After Swap Nibbles and convert BCD to ASCII
21 43 65 hex. „123456“

1.4.4.1.3 Convert Nibbles BCD to ASCII


Every single nibble (half byte) is converted from BCD (Binary Coded Decimal) to an ASCII character.
Example:
Before conversion After Convert Nibbles BCD to ASCII
12 34 56 hex. „123456“

Page 10 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

1.4.4.1.4 Swap Nibbles


The two nibbles (half bytes) of a byte are swapped.
Example:
Before conversion After Swap Nibbles
13 23 33 43 hex. 31 32 33 34 hex. = „1234“

1.4.4.1.5 Convert 1 Byte Hex to 2 Digits decimal ASCII


Each byte is interpreted as a hexadecimal number and is converted to two decimal ASCII digits with
leading zero.
Note: hexadecimal numbers larger than 63 hex. are not correctly converted because of the limitation to
two decimal ASCII digits (max. 99)! This effect does not occur with Convert 1 Byte Hex to 3 Digits decimal
ASCII.
Example:
Before conversion After Convert 1 Byte Hex to 2 digits decimal ASCII
07 hex. „07“
63 hex. „99“

1.4.4.1.6 Convert 1 Byte Hex to 3 Digits decimal ASCII


Each byte is interpreted as a hexadecimal number and is converted to three decimal ASCII digits with
leading zeros.
Example:
Before conversion After Convert 1 Byte Hex to 3 digits decimal ASCII
07 hex. „007“
63 hex. „099“
7B hex. „123“

1.4.4.1.7 Convert each Nibble Hex to 2 Digits decimal ASCII


Each nibble (half byte) is interpreted as a hexadecimal number and is converted to two decimal ASCII
digits with leading zero.
Example:
Before conversion After Convert each Nibble Hex to 2 digits decimal ASCII
07 hex. „0007“
63 hex. „0603“
3F hex. „0315“
AB hex. „1011“

1.4.4.1.8 Convert 2 Byte Hex to 4 Digits decimal ASCII


Each pair of bytes is interpreted as a hexadecimal number and is converted to four decimal ASCII digits
with leading zeros.
Note: hexadecimal numbers larger than 27 0F hex. are not correctly converted because of the limitation to
four decimal ASCII digits (max. 9999)!
Example:
Before conversion After Convert 2 Byte Hex to 4 digits decimal ASCII
00 07 hex. „0007“
00 63 hex. „0099“
00 7B hex. „0123“
27 0F hex. „9999“

Page 11 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

1.4.4.1.9 Convert 2 ASCII digits to 1 Byte Hex


Each character is interpreted as ASCII representation of a nibble (half byte) and each pair is composed to
1 Hex byte.
Example:
Before conversion After Convert 2 ASCII digits to 1 Byte Hex
„31394146” 31 39 41 46 hex. = „19AF“

1.4.4.1.10 Swap each Pair of Bytes


Each two bytes are swapped in pairs.
Example:
Before conversion After Swap each Pair of Bytes
32 31 34 33 hex. 31 32 33 34 hex. = „1234“

1.4.4.1.11 Swap Nibbles and convert Hex to ASCII


The two nibbles (half bytes) of a byte are swapped and then converted from Hex (hexadecimal) to an
ASCII character each.
Example:
Before conversion After Swap Nibbles and convert Hex to ASCII
21 98 FA hex. „1289AF“

1.4.4.1.12 Convert Nibbles Hex to ASCII


Each single nibble (half byte) is converted from Hex (hexadecimal) to an ASCII character each.
Example:
Before conversion After Convert Nibbles BCD to ASCII
12 89 AF hex. „1289AF“

1.4.4.1.13 User defined Conversion


This is used to set up a new conversion method that is already implemented in the component 7711 but is
not yet offered by the programming desktop.

1.5 Command Types


All commands are automatically allocated to a certain command type corresponding to their function. This
depends on the selected chip card reader and on the component 7711.

1.5.1 Reader Command


Reader commands are executed inside the chip card reader. They serve for further chip card data
processing or for the internal control of the chip card reader.

1.5.2 Chip Card Command


With chip card commands access to the chip card is gained directly or indirectly via the chip card reader.
Also, the setting of access parameters is covered by this category.

1.5.3 Component Command


Component commands are executed by the component 7711. This concerns, above all, the handling of
read data supplied by the chip card reader (refer to Format Command)

Page 12 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2 CHIP CARD BASICS

2.1 Introduction

2.1.1 Definition of Chip Cards


On principle, chip cards are card bodies made of plastic having the size of a credit card with built-in
integrated circuit. They either have contact pads or are contactless. Additionally, magnetic stripes,
embossed characters or optical information can be present simultaneously on the card (e.g. OCR,
barcode, 2D code, holograms).

2.1.2 Applications for Chip Cards


For example as phone card, health insurance card, bank card (EC), mobile phone (SIM),
access/admittance control, identity card, patient data memory, data encryption, electronic signature, etc.
The ever increasing integration density and memory capacity will result in an enhancement of possible
applications. Moreover, there will be fewer restrictions regarding the development of new applications.

2.1.3 Advantages of Chip Cards


• higher storage capacity than with magnetic cards
• great variety of possible applications
• protection of the stored data against undesirable access and manipulation.

Page 13 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.1.4 Types of Chip Cards


• Memory Cards
- a distinction must be drawn between „simple “memory cards (data memory only) and „intelligent
“memory cards (also data modification)
- consist of ROM (identification data, e.g. card manufacturer, chip type), EEPROM (application
data, e.g. name, credit balance), and access logic (security)
- read only access
- especially inexpensive
- designed for a single, particular application
- application examples: health insurance card (simple memory card), phone cards (intelligent
memory card, credit decrement)

• Microprocessor Cards (Smartcards)


- consisting of ROM (operating system), EEPROM (data memory), CPU (processor), RAM (main
memory), possibly crypto coprocessor
- read and write access
- high security thanks to complex crypto algorythms and crypto processors
- several independent applications possible on one card
- application examples: bank card, mobile phone, identity card, access/admittance control, data
encryption, electronic signature

• Super Chip Cards


- processor card with built-in foil battery, foil keyboard and foil display
- functions to be utilized also without card terminal
- price and robustness still problematic

Page 14 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.1.5 Data Exchange


• contact card: via contact pads with VCC, GND, CLK, RST, I/O
• contactless card: energy and clock input predominantly by means of inductive coupling, clock
sometimes capacitive, too

Chip cards are completely passive. Supply voltage and clock must always be supplied from outside.
Meanwhile there are also extremely flat batteries available for the integration into plastic cards (super chip
cards) so that a certain self-sufficient range of functions is possible (e.g. readout of the current credit
balance). Position and layout of the contacts and coupling fields, are standardized. Also is the type and
sequence of the electrical wiring.
The data transmission always takes place according to serial protocols.

2.1.6 Protective Measures


The variety of chip card application fields offer a big incentive for misuse. Potential attackers usually want
to take the opportunity to procure money. Either they want to manipulate data on the card (e.g. reload a
phone card), or gain access to sensitive data (e.g. bank applications). In order to prevent misuse
effectively a number of safety measures have been taken.
• Technological protection mechanisms, e.g.:
- All buses internal only; buses scrambled
- Constant power consumption for all commands
- Memory in middle silicon layers; embedded in additional metalizations with electrical function
- Resistance measurement or capacitance sensing for monitoring the passivation layer
- Voltage monitoring
- Low frequency detection
• Additional safety features on the card body, e.g.:
- Signature stripe
- Micro characters (not copyable)
- Guilloches (rounds or oval closed, intertwined line fields, not copyable)
- Hologram
- Multiple laser image (similar to hologram, may contain card specific information)
- Invisible characteristics (visible only under infrared light or ultraviolet light)
• Safety routines in the operating system that allow certain access only to certain areas
• Crypto algorythms inside the chip per software or with crypto processor

Page 15 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.2 Details

2.2.1 General

2.2.1.1 Memory
In chip cards predominantly ROM, EEPROM and RAM are used. Meanwhile FRAM is also used as a
replacement for EEPROM. Only very limited memory capacity is available on the card due to a strongly
restricted chip area.
Trend of memory capacities within chip cards:
ROM [KB] RAM [KB] EEPROM [KB]
Start time (1986) 6 0,256 2
Today (2002) 96 4 64 (FRAM)
160 6 68
Comparison with magnetic stripe: approx. 1 KBit.
Memory cards have a typical memory capacity of a few dozens of bytes up to some hundred bytes.

Page 16 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.2.1.1.1 Memory Types


The following memory types are used in chip cards:
• ROM (Read Only Memory)
Content is „hardwired“ during chip manufacturing using a ROM-mask and is read only.
Contains the largest part of the operating system and manufacturer specific data.
• EEPROM (Electrically Erasable Programmable Read Only Memory)
Data are maintained also in power off condition.
Contains parts of the operating system, application software and modifiable application data as well.
Individual memory areas are protected by MMU (Memory Management Unit) and additionally contain
checksums.
It takes a relatively long time to write a memory cell, approx. 3-10 ms. The number of write/erase
cycles is limited to approx. 10,000–100,000. This must be considered in case of frequently needed
memory cells (e.g. I/O-buffers), e.g. by cyclic memory structures.
In contrast to former chip cards the programming voltage must no longer be supplied from the outside
but is internally created from the supply voltage by means of an integrated charge pump.
Typical division of the EEPROM:
- Manufacturer area:
Fixed data such as chip card manufacturer, chip type, chip version, manufacturing date.
Hardware mechanisms prevent later alteration of these data (often as WORM: Write Once Read
Multiple).
- Personalization area:
application specific fixed data of the system provider such as identification number, serial
number, person specific data.
- Application area:
current and variable data, e.g. for counting, registration and cancellation.
- Safety area:
Data of the security logic, e.g. PIN number and error counter. Not accessible from outside.
Reading and modifying of memory areas is regulated by access attributes. Thus it is possible to
define a memory area as freely accessible, read only, or completely disabled.
• FRAM (Ferroelectric Random Access Memory)
Nonvolatile memory with ferroelectric substances.
Programming time is in the range of approx. 100ns. Programming cycles approx. 1 trillion.
Some years ago the number of read cycles was limited. Meanwhile technologically ripened and is
serious competition regarding EEPROMs because is much faster. Furthermore, better energy
balance than with EEPROM. But there are still problems in the manufacture together with CMOS-
processes (µP) and analog circuits (RF). FRAM is still a bit more expensive. That is why it is not so
widespread on the market.
• RAM (Random Access Memory)
This memory keeps its content only when voltage is supplied.
In chip cards SRAM (Static Random Access Memory) is used predominantly. In contrast to DRAM
(Dynamic Random Access Memory) this requires no refresh cycles, but the chip area is considerably
larger. DRAM cannot be used because the outer clock supply can also be stopped (to save energy)
and the DRAM would then lose its memory content.
RAM is considerably faster than EEPROM. Therefore, it is used only for intermediate values during
the program operation.

2.2.1.1.2 Size Comparison of Memory Types


SRAM

EEPROM
FRAM
ROM
In order to reduce the area consumption the RAM in particular is held as small as possible
(size ratio SRAM/ROM approx. 16/1).

Page 17 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.2.1.2 Architecture

2.2.1.2.1 Operating System


Microprocessor cards (Smartcards) are equipped with a full CPU, on which runs an operating system
similar to the one in a PC.
Main tasks of the operating system are memory protection, realization of the protocols for data
transmission, control of the program sequence, file management, implementation of cryptographic
algorithms, as well as the selection of the required card application.
All commands and data structures are standardized.
Differently from a PC the memory capacity in chip cards is very limited. Therefore, the chip card operating
systems have a very limited range of functions only. Usually not all commands and file structures can be
implemented simultaneously. Therefore, in the ISO 7816-4 so-called profiles M-Q for chip cards have
been introduced that define, in each case, a subset of the commands and data structures.
Up to date smart card operating systems allow to reload new program code into the EEPROM. In this way
several applications can also be subsequently installed on a card (e.g. Augsburg-Card: EC-card with
additional regional discount function).

2.2.1.2.2 Command Set


The command set for microprocessor cards is standardized. This covers the following functions:
• File management
• File selection
• Files read and write
• Searching in files
• Identification
• Authentication
• Execution of cryptographic algorithms
• Chip card hardware test
• Support of transfer protocols
• Special commands for individual applications

Examples:
SELECT FILE File selection
READ BINARY Reading data
UPDATE BINARY Writing data
VERIFY Verifying the input, e.g. PIN number
INTERNAL AUTHENTICATE Card authentication by the outside world
EXTERNAL AUTHENTICATE Outside world authentication by the card
GET CHALLENGE Requesting a random number

2.2.1.2.3 Data Structures


Memory cards only have memory locations that can be directly accessed via physical memory addresses.

Processor cards (smart cards) have a hierarchically organized file management system with symbolic and
thus hardware-independent addressing.
The file management is optimized to a minimum memory consumption. The addressing of files is done by
means of hexadecimal codes. This is possible because a computer (terminal) serves as a communication
partner; a man-machine-interface is not available.
Operating systems are object-oriented, i.e. all information on a file is stored in the file itself (header
carries administration data, body carries application data).

Page 18 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.2.1.2.4 File Types


• MF (Master File)
Root directory
• DF (Dedicated Files)
Directories of the individual applications
• EF (Elementary Files)
Application data

The file types are hierarchically structured. MF corresponds to the trunk of a tree, DF to branches, and EF
to leaves, respectively.
There is only one MF. This may contain EFs and DFs. DFs may again contain DFs and EFs.

2.2.1.2.5 Data Security


Since chip cards are frequently used for security-relevant applications (admittance systems, payment,
tickets, electronic purse, ...) data security plays to an important role.
Possible attacks aim at
- unauthorized readout of data, duplication, modification
- unwarranted access/admittance
- replay and fraud
Cryptographic procedures are used to guarantee data security.
Cryptographic procedures are distiguished between symmetrical and asymmetrical procedures:
Symmetrical procedures use the same key for encryption and decryption. Largest prevalence.
Asymmetrical procedures use different keys for encryption and decryption. Thus security is increased
accordingly. Asymmetrical procedures are less widespread, because the expenditure of computation is
considerably higher.
The cryptographic procedures are often quite simple. According to Kerkhoff‘s principle the procedures are
disclosed. The secret lies only in the applied key (there is an infinite number of keys but only a limited
number of cryptographic procedures). Furthermore, it is possible to generate an individual key for every
card during manufacture, e.g. from the serial number together with a master key. The card ID can then be
requested only via a SAM (Security Authentication module). An additional chip card with cryptographic
processor and master key serves as a SAM. The master key cannot be read.
The creation of real random numbers is of great importance for the cryptography. Thus it is impossible to
retrieve secret keys by intercepting the data exchange.
A general problem is the safe distribution of a secret key.

• Encoding (Ciphering)
Data are encoded to protect them against unwarranted interception. Either by means of software or in
a separate cryptographic processor.
Various encoding procedures have prevailed, e.g.
- DEA (Data Encryption Algorithm), DES (Data Encryption Standard) respectively:
symmetrical code.
Triple-DES with three different keys increases the security accordingly.
- RSA (Rivest/Shamir/Adleman):
asymmetrical code, arithmetic of large prime numbers.
- DSA (Digital Signature Algorithm), DSS (Digital Signature Standard) respectively:
predominantly used for digital signature, but also possible for encoding. Discreet logarithm.
Stream cipher: each character is separately encoded prior to transfer; used in most cases.
Block cipher: several characters are collected into a block and then encoded prior to transfer. This is,
however, compute-intensive and therefore more uncommon.
• Authentication
It often is sufficient to check only the authenticity of the terminal and the chip card. The data itself can
then be sent unencrypted. During authentication mutual knowledge of a joint secret (cryptographic
key) is tested. By means of the secret key a Message Authentication code (MAC) is generated (e.g.
with DSA) and attached to the message. In this way the recipient may test if the message is
unchanged (electronic signature).

Page 19 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.2.2 Contact Chip Cards

2.2.2.1 Standards
• ISO 7816:
This is the most important standard for contact chip cards. It is based on the standards ISO 7810,
7811, 7812, 7813 for identification cards (embossing, magnetic stripes, etc.).
ISO 7816 takes into account that the chip card functions are integrated simultaneously to all hitherto
existing functional elements (e.g. magnetic stripes, embossing field, ...), i.e. is compatible to these.
Part 1 regulates measurements and physical properties,
Part 2 regulates measurements and position of the contacts,
Part 3 regulates electrical signals and transfer protocols,
Part 4 regulates commands and data structures,
Part 5 regulates numbering system for applications,
Part 6 regulates generally usable data elements,
Part 7 regulates additional commands as supplement to part 4.
• GSM 11.11:
Detailed description for chip cards to be used in digital mobile phones. Based on ISO 7816.
Definition of commands, file structures, Answer To Reset, etc.
• EMV (Europay Mastercard Visa) specification:
Description for cards to be used with financial applications. Based on ISO 7816. Defines commands,
file structures, transfer protocols and secure messaging.
• ISO 10373:
describes test methods for ID-cards.
Part 1 describes general tests,
Part 2 describes magnetic stripe tests,
Part 3 describes tests for contact chip cards and accessory interface devices.

2.2.2.2 Mechanical Specifications


• Card Dimensions
Thickness is always 0.76 ± 0.08 mm.
For contact chip cards three different card sizes are defined:
ID-1: 85.6mm * 54.0mm (prevalent)
ID-00: 66.0mm * 33.0mm (mini card, not yet astablished)
ID-000: 25.0mm * 15.0mm (Plug-In, e.g. SIM card in mobile phones)

Page 20 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

• Layout of Contacts

C1 (VCC): Supply voltage


C2 (RST): Reset
C3 (CLK): Clock
C4 (RFU): Reserved for Future Use (not used or not existing)
C5 (GND): Ground
C6 (VPP): Programming voltage for EEPROM
(in most cases not used because of integrated charge pump inside the chip)
C7 (I/O): Input / Output
C8 (RFU): Reserved for Future Use (not used or not existing)

2.2.2.3 Electrical Specifications


• Supply Voltage
With contact chip cards until now typically 5 V ±10%.
General development goes to 3V technology (particularly in mobile phones). This necessitates an
extended voltage range of 3 - 5 V ± 10% in chip cards.
• Frequencies
With contact chip cards the clock frequency usually is 3.5712 MHz, respectively 4.9152 MHz, with an
internal divider of 372, respectively 512. The divider specifies the number of clock cycles per bit. In
principle, however, any clock frequency is possible within certain limits.
• Transmission Rate
On using standard frequencies together with the respective standard dividers the transmission rate
typically is 9600 baud.
On using smaller internal dividers (min. 32) or higher clock frequencies, the transmission rate can be
increased correspondingly. However, the processor then has less time for a secure identification of
individual bits.
Secure messaging reduce the transmission rate.

Page 21 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.2.2.4 Communication
• Data Transmission
Only one I/O line is available for data exchange. Therefore, terminal and chip card can only mutually
send and receive (half duplex). At present full duplex is not yet feasible but will be possible in future
by using the free contact fields. Only in this way a data encryption inside the chip card is feasible in
real time.
The communication is always initiated by the terminal (master). The chip card (slave) only responds
to the commands received, i.e. it never transmits independently.
• Connection set up
In order to set up a communication with the chip card the terminal must meet a certain standardized
power on sequence. For closing the connection there is a standardized power off sequence. If these
sequences are not met the chip card could be irreparably damaged.
With contact chip cards ground must be connected first, the supply voltage thereafter, only then the
clock (cold reset). A warm reset can be initialized with a low/high pulse on the reset line.
• Answer To Reset (ATR)
In answer to a reset the chip card sends an ATR (Answer To Reset) within 400-40,000 clock cycles in
accordance with a standardized protocol. The ATR contains various information on data transmission
like, for example, frequency divider, applied protocol, EEPROM programming voltage, memory size.
According to ISO 7816-3 the ATR has a maximum length of 33 bytes. 372 is invariably used as
divider.
• Protocol Type Selection (PTS)
The terminal may alter one or several data transmission parameters. For this the PTS mechanism
exists (sometimes also called PPS Protocol Parameter Selection). The terminal sends a PTS record
to the chip card. The latter returns the record if the PTS request is supported. Otherwise, the terminal
must send a new reset.
• Protocols
- Memorycards (e.g. phone card) operate with clock synchronous serial data transmission. This is
strongly linked with the hardware and is built as simple as possible.
Synchronous transfer protocols are not standardized. The terminal must directly access memory
addresses on the chip. Transmission errors cannot be recognized.
Some chip card types with appropriate transfer protocols:
I²C-Bus
4404/4406 memory cards (2-wire-protocol)
4418/4428 memory cards (3-wire-protocol)
4432/4442 memory cards (2-wire-protocol)

- Smartcards operate with asynchronous data transmission.


Various communication protocols are defined as follows:
Name Description
T=0 Asynchronous, half-duplex, character-oriented (1989, ISO 7816)
T=1 Asynchronous, half-duplex, block-oriented (1992, ISO 7816)
T=2 Asynchronous, full duplex, block-oriented (ISO 10536); in definition phase
T=3..13 Not yet or not completely defined
T=14 German card phones (proprietary standard of Telekom )
T=15 Reserved for upgrades, not yet specified

Page 22 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

• Data Exchange
Between smart card and terminal data are exchanged in form of international standardized protocol
independent data units, so-called APDUs (Application Protocol Data Units). A distinction must be
drawn between command-APDUs and response-APDUs.

Command-APDU:
Header Body
CLA INS P1 P2 Lc Data Le

CLA: Class byte describes the applied command set, e.g.


0x00 Standard
0xA0 GSM
INS: Instruction byte contains the actual command, e.g.
0xA4 Select File Select a file
0xB0 Read Binary Read from a file
0xD2 Write Record Write record
0x84 Get Challenge Random number
0x20 Verify PIN comparison
P1,2: Parameter bytes contain command-specific parameters
The body fields are optional depending on the command
Lc: (Length of Command Data) contains the length of the data field
Data: contains the data transferred to the card
Le: (Length Expected) contains the expected number of response data

Response APDU:
Body Trailer
Data SW1 SW2
The body is optional and contains the response data.
The trailer always contains the return code.

• Typical Sequence

Page 23 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.2.3 Contactless Chip Cards


RFID: Radio Frequency IDentification.
Contactless chip cards have, in addition to the chip, into the card body incorporated coupling coils and
coupling fields. These are used for power supply and data exchange. Predominantly inductive coupling is
used for data exchange; occasionally also capacitance coupling.
Nevertheless, sometimes contactless chip cards are additionally equipped with contact pads (CombiCard,
Dual-Interface-Card) in order to communicate with all types of terminals. Application, e.g., loading credit
balance at a contact EC-terminal and automatic payment at a contactless terminal (e.g. public
transportation).

Since it is possible to also have several contactless chip cards simultaneously in the terminal’s
electromagnetic field (e.g. jointly in a wallet) fast anti-collision algorithms prevent data exchange from
being disturbed by one another. On principle there are four different anti-collision procedures:
- Time multiplex (TDMA: Time Division Multiple Access); is mostly used. E.g. ALOHA, slotted ALOHA
- Space multiplex (SDMA: Space Division Multiple Access); only for a few particular applications
- Frequency multiplex (FDMA: Frequency Division Multiple Access); only for a few particular
applications
- Code multiplex (CDMA: Code Division Multiple Access)

2.2.3.1 Distance Ranges


Distinctions are drawn between
• Close Coupling Cards:
Close range up to 1 cm distance to the terminal.
Capacitance and also inductive coupling.
Cards must be inserted into the terminal, or must touch it on a certain spot on the surface,
respectively.
Low field strengths are easy to shield and, nevertheless, they induce sufficient power also for large
memories. Security against interception.
Uncommon because handling is not optimal.
• Remote Coupling Cards:
Inductive coupling (electromagnetic).
They can pass by the terminal at a certain distance.
Higher field strength is necessary. Data transfer can be intercepted.
There are further distinctions as follows:
- “Proximity“ Cards:
up to 10 cm distance to the terminal, average transmission rate, e.g. access control
- “Vicinity“ Cards:
up to 100 cm distance to the terminal, lower transmission rate, e.g. ticketing in transportation
systems.

Due to different power consumption during read/write the ranges are limited:
• Read range:
- Memorycard up to 1 m,
- Smartcard few mm.
• Write range:
- Memorycard approx. 10 cm only
- Smartcard few mm

National telecommunication regulations set ranges to narrow limits.

2.2.3.2 Application Examples


• Access control
• automatic payment (ticket, flight ticket, ski pass)
• automatic vehicle identification (toll)
• automatic luggage identification
• The main application is in public transport. AFC Automatic Fare Collection. As a result, transport
services are more cost efficiency.

Page 24 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.2.3.3 Advantages over Contact Chip Cards


• Insensitive to dirt, fat, electrostatic disturbances or overvoltage
• Card surface fully usable for design and advertisement
• No contact wear out
• Suitable for rough environmental conditions (humidity, dust, etc)
• Maintenance-free terminals; no moving mechanical parts
• Terminal protected against vandalism (chewing gum in the card slot, overvoltage), can even be
installed concealed
• More comfort for users (position invariance, no insertion necessary)

Comparison contact/contactless chip cards:


contact contactless
Typical amount of data 16...64 Kbytes 16...64 Kbytes
Data density (compared to barcode, OCR, magnetic stripes) very high very high
Legibility by machines good good
Legibility by persons impossible impossible
Influence of dirt or humidity possible (contacts) no influence
Influence of optical cover - no influence
Influence of orientation and position one orientation no influence
Wear off contacts no influence
Production costs low average
Purchase cost reader electronics low average
Running costs average (contacts) none
Unauthorized copying/modifying (compared to magnetic stripes) impossible impossible
Reading speed (including handling of the data carrier) low (~ 4 s) fast (~ 0,5 s)
Maximum distance between data carriers and reader direct contact 0...5 m (microwave)

Page 25 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.2.3.4 Standards
• ISO 10536:
Basic standard for contactless chip cards in the close-coupling range (close range with touch of
terminal).
Is compatible with ISO 7816 and describes additional characteristics of the contactless technique.
Part 1 regulates physical characteristics (difference is ESD compatibility, for the rest same as
ISO 7816),
Part 2 regulates position and layout of the coupling elements (simultaneously inductive and
capacitive),
Part 3 regulates modulation procedures and data transmission
Part 4 henceforth regulates a full duplex protocol to be also used for contact chip cards
• ISO 14443:
describes remote-coupling cards in the „proximity“ range (up to 10 cm distance to the terminal). The
variants A and B describe different modulation procedures. A terminal must support both procedures.
Part 1 regulates physical characteristics,
Part 2 regulates high frequency energy transmission and signal interface,
Part 3 regulates initialization and anti-collision procedures,
Part 4 regulates transfer protocol.
• ISO 15693:
describes remote-coupling cards in the „vicinity“ range (up to 100 cm distance to the terminal).
Part 1 regulates physical characteristics,
Part 2 regulates air interface and initialization,
Part 3 regulates anti-collision procedure and transfer protocol.
• ISO 10373:
describes test methods for ID cards.
Part 6 describes tests for proximity cards,
Part 7 describes tests for vicinity cards.

In the early stages of contactless chip cards (approx. 1995) the Austrian company Micron has developed
the MIFARE system specifically for payment applications in public transport. This has gained acceptance
as a de facto industrial standard and was later taken over by Philips. MIFARE is fully compatible to
ISO 14443A and describes a protocol as well as cryptology. It is possible to have 16 independent
applications per card (e.g. public transport ticket, car rental agency, parking ticket, gas station card,
bonus card for department stores, bonus card for restaurants, ski ticket, ...)
Moreover, there also exists:
- MIFARE LIGHT with only one application per card and a smaller memory
- MIFARE PLUS as a Dual-Interface-Card
- MIFARE PRO with larger memory and large scale encryption

Page 26 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.2.3.5 Mechanical Specifications


• Card Dimensions
In contrast to contact chip cards for contactless chip cards only the ID-1 format is used (85.6mm *
54.0mm * 0.76mm).
• Position of Coupling Fields
Close-Coupled Chip Cards (rarely used):
The card must be inserted into a terminal and cannot simply be passed by. The coupling fields are
arranged in a way so that position-independence in the terminal is guaranteed.

1: inductive coupling transformers (for energy transmission, in most cases also data)
2: capacitive coupling areas (sometimes data)
3: Chip contacts

Remote-Coupled Chip Cards (most common):


These cards need not be inserted into a terminal but can simply be passed nearby. They have an
extensive antenna but no capacitive coupling fields.

1: Antenna, in most cases 3-6 windings


2: Chip

Combined Cards:
They have both contact pads and coupling fields as well, respectively an antenna.

2.2.3.6 Electrical Specifications


• Supply Voltage
With contactless chip cards up to 150 mW are induced by the terminal. From that the chip card
automatically generates its internal power supply.
• Frequencies
With contactless chip cards the energy transmission is done via an alternating magnetic field. The
carrier frequency is 13.56 MHz. It is in the ISM frequency range available world-wide
(Industrial/Scientific/Medical) and has been chosen with regard to other radio services.
The 3.712 MHz, respectively 4.9152 MHz, characteristically used with contact chip cards are
significant for combined contact/contactless chip cards. Data transmission is done via a carrier
frequency modulating subcarrier.
• Transmission Rates
106 kBaud (Proximity), 1.6 - 24.9 kBaud (Vicinity), respectively.
Secure messaging reduces the transmission rate.

Page 27 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

2.2.3.7 Communication
• Connection set up
In order to set up or close the communication with a chip card the terminal must comply with a certain
standardized power on sequence, similar to the one used with contact chip cards, concerning, above
all, the electric field for power supply.
• Data Exchange
Further data exchange is similarly to the one with contact chip cards having ATR (Answer To Reset),
PTS (Protocol Type Selection), standardized protocols and protocol independent APDUs (Application
Protocol Data Units).

Page 28 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

3 CHIP READING FORM


Chip Card Reading Form

Company:
Address:
Client

Name:
Phone:
Email:

Contact Smart Card


Protocol: ¡ International T=0
¡ International T=1
¡ Other (please specify):

Chip card voltage: ¡5V ¡3V ¡ Other (please specify):


Additional information
(please specify):
Chip Card Type

Contact Memory Card


Chip type: ¡ SLE 4404/4406 or compatible
¡ SLE 4418/4428 or compatible
¡ SLE 4432/4442 or compatible
¡ SLE 4436 or compatible
¡ I²C up to 2 kByte
¡ I²C up to 64 kByte
¡ Other (please specify):

Additional information
(please specify):
Other Chip Card Type
Please specify:

File info / APDU:


Read info / APDU:
Address: ¡ dec. ¡ hex.
Tag character: hex.
Offset (including tag): ¡ dec. ¡ hex.
Number of bytes: ¡ dec. ¡ hex.
Data conversion: ¡ No conversion
¡ Swap nibbles and convert to ASCII
¡ Convert nibbles to ASCII
¡ Swap nibbles
Data to read

¡ Convert 1 byte Hex to 2 digits decimal ASCII


¡ Convert 1 byte Hex to 3 digits decimal ASCII
¡ Convert each nibble to 2 digits decimal ASCII
¡ Convert 2 byte Hex to 4 digits decimal ASCII
¡ Convert 2 ASCII digits to 1 Byte Hex
¡ Swap each Pair of Bytes
¡ Swap Nibbles and convert Hex to ASCII
¡ Convert Nibbles Hex to ASCII
¡ Other (please specify):

Additional information
(please specify):

Entrust sample cards: ¡ yes ¡ no

Page 29 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4 CHIP CARD READER

4.1 CREAM130

4.1.1 General Information


The programming desktop V1.1.9 requires CREAM130 firmware version BOEWE-CREAM V3.0a or
higher.

• Memory Cards:
Supported chip card types:
SLE 4404/4406 or compatible
SLE 4436 or compatible
SLE 4418/4428 or compatible
SLE 4432/4442 or compatible
I2C-bus up to 64 kByte
Chip voltage:
5V
• Processor Cards:
Supported protocols:
International protocol T=0
International protocol T=1
Chip voltage:
default 5 V
3V
Chip frequency:
default 3,686 MHz
Adjustable in steps from 0.595 MHz to 9.216 MHz. The chip frequencies possible accrue from
divisor factor 2...31 related to the CREAM130 clock frequency of 18.432 MHz.

The CREAM130 is able to process macro scripts automatically. These macro scripts must be loaded
once after power on and contain all Commands for reading the chip card. As soon as the CREAM130
receives the Start Chip Card Reading command it processes the internally saved macro script on its own.
As a single answer the accordingly read and selected data are transmitted. This method is extremely
runtime-efficient since only a minimal communication between component 7711 and CREAM130 is
necessary.

4.1.2 Commands
The CREAM130 command set is structured as follows:
• Reader Commands:
for operating the CREAM130 and setting up its macro interpreter.
• Chip Card Commands:
for reading the chip card and setting up communication and protocol parameters as well.
• Control Commands:
for controlled data extraction and for conditional macro script processing.

Page 30 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.1 Response Status Code


All commands received by the CREAM130 are acknowledged with an answer. Within this answer starting
from offset 2 there is the status code composed of two ASCII characters in most cases. With some
commands the status code is enlarged by two additional digits. With most commands a correct answer is
marked by status code 00.
The answers are described with the individual commands.

Status code Explanation


(2-digit ASCII)
General
00 okay, no error
01 sequence error, read error
02 contacting error (e.g. short circuit VCC)
03 card having invalid data
04 command unknown or not feasible
05 comparison error (stop-command condition is true)
06 tag character not found
07 too few read data, command not feasible (wrong chip card type, no chip card)
08 syntax error
92 command okay, no error
93 parameter okay
94 initialization okay
95 command error (additionally 2 characters command code)
Memory cards
30 header unknown
31 field identification for card number (tag character) not found
Processor cards
51 Timeout error
52 Parity error
53 Framing error
54 Buffer overrun
55 Contact disrupted
56 Transmission error
57 Acknowledge error
58 Transmission error (resynchronisation failed)
59 Transmission error (power supply off)
5A No layer-7-daten (empty I-frame)
5D Chip card does not respond (mute chip card)
5E Unknown ATR

The return data during processing a macro script are separately described for all Chip Card Commands.

4.1.2.2 Reader Commands


Reader commands are used for operating the CREAM130 and setting up its macro interpreter. They are
automatically generated by the programming desktop. Neither can they be modified nor deleted.
On receiving any reader command the CREAM130 gives an answer that is separately described with the
respective reader command. Within this answer there is the Response Status Code, too.
Reader commands are not saved as macro script.

Page 31 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.2.1 Get Version


The Get version command supplies the current CREAM130 firmware version. The component 7711 may
use this command as a synchronization command in order to request a sign of life from the CREAM130.
This command is generated once and cannot be manipulated.

Answer
from offset 2: Response Status Code ‘9200‘
from offset 6: version string, e.g. `BOEWE-CREAM V3.0a`

4.1.2.2.2 Reset Macro Buffer


The Reset Macro Buffer command erases the macro buffer and prepares the CREAM130 for the receipt
of new macro script commands.
This command is generated once and cannot be manipulated.

Answer
from offset 2: Response Status Code ‘00‘

4.1.2.2.3 End of Macro


The End of Macro command marks the end of the macro script.
This command is generated once and cannot be manipulated.

Answer
from offset 2: Response Status Code ‘00‘

4.1.2.2.4 Activate Macro


The Activate Macro command prepares the CREAM130 for the processing of the macro script.
This command is generated once and cannot be manipulated.

Answer
from offset 2: Response Status Code ‘9201‘

4.1.2.2.5 Start Chip Card Reading


The Start Chip Card Reading command induces the CREAM130 to execute the internally saved macro
script and to read the chip card accordingly. Prerequisite is that the chip card is correctly contacted at this
time. In case of error a corresponding Response Status Code is generated.
This command is generated once and cannot be manipulated.
The response time should be adapted to the actual chip card read time. This must be determined
experimentally.

Answer
from offset 2: Response Status Code ‘00‘
from offset 4: read chip card data

4.1.2.3 Chip Card Commands


The purpose of the chip card commands is to read the chip card and to set up the communication and
protocol parameters as well. They differ depending on the chip card type and the chip card protocol,
respectively.
Chip card commands are sent once as a macro script to the CREAM130. Upon receipt the CREAM130
supplies an answer containing the Response Status Code consisting of two ASCII characters from offset
2.
All chip card commands supply certain return data that can be evaluated within the macro script while the
macro script is being processed. These return data are separately described with every chip card
command.

Page 32 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.1 Select Protocol / Select Chip Type


The Select Protocol command, Select Chip Type respectively, is used to set up the CREAM130 to the
processor card respectively memory card selected in the assistant.
This command is automatically generated once and cannot be manipulated.

Command: Select Protocol, Select Chip Type respectively


Command class: -
Command type: Chip card command
Command group: Init command
command parameters:
Protocol resp. Chip type invariable
Return data:
Offset 0: Status: 81 hex. on okay, other on error

4.1.2.3.2 Processor Cards

4.1.2.3.2.1 Get Chip Card Frequency


The Get Chip Card Frequency command returns the chip card clock frequency for processor cards as
divisor factor relative to the CREAM130 clock frequency 18.432 MHz.

Command: Get Chip Card Frequency


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters: none
Return data:
Offset 0: Status: F0 hex. on okay, other on error
Offset 1: Divisor factor: 02...1F hex. (corresponding to 9.216...0.596 MHz)

4.1.2.3.2.2 Select Chip Card Frequency


The Select Chip Card Frequency command allows the setting of the chip card clock frequency for
processor cards.
This command is automatically generated once and cannot be deleted. Older configurations can be given
this command once later on. Additionally the Reset Chip Card Frequency command is automatically
generated.

Command: Select Chip Card Frequency


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters:
Chip card frequency Selection of chip card frequency. Higher Frequencies reduce reading
time. Upper an lower frequency limits depend on the chip card.
Range: selection list 0.596 MHz to 9.216 MHz
Default : 3.686 MHz
Return data:
Offset 0: Status: F0 hex. on okay, other on error

Page 33 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.2.3 Power On
The Power On command executes the power on sequence for the processor card and reads the ATR
(Answer To Reset)
This command is automatically generated once and cannot be deleted.

Command: Power On
Command class: -
Command type: Chip card command
Command group: Init command
Command parameters:
Chip card voltage Chip voltage selection
Range: selection list 5V, 3V respectively
Default: 5V
ATR Timing ATR timing selection.
For non standard complying chip cards a change could be
advantageous.
Range: selection list T=0, T=1 respectively
Default: T=1
Return data:
Offset 0: Status: okay = 82 hex.
refer to chapter Runtime Return Code 4.1.2.3.2.7.1 for T=0
or 4.1.2.3.2.8.1 for T=1
From offset 1: ATR data

4.1.2.3.2.4 Power Off


The Power Off command executes the power off sequence for the processor card.
This command is automatically generated once and cannot be manipulated.

Command: Power Off


Command class: -
Command type: Chip card command
Command group: Init command
Command parameters: none
Return data:
Offset 0: Status: okay = 81 hex.
refer to chapter Runtime Return Code 4.1.2.3.2.7.1 for T=0
or 4.1.2.3.2.8.1 for T=1

4.1.2.3.2.5 Reset Chip Card Frequency


The Reset Chip Card Frequency command resets the chip card clock frequency to the default value of
3.686 MHz. This is necessary because of compatibility to older configurations that contain no explicit
frequency setting but expect a standard frequency of 3.686 MHz.
This command is automatically generated once and cannot be manipulated.

Command: Reset Chip Card Frequency


Command class: -
Command type: Chip card command
Command group: Init command
Command parameters: none
Return data:
Offset 0: Status: F0 hex. on okay, other on error

Page 34 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.2.6 Protocol Parameter Selection (PPS)


The Protocol Parameter Selection command allows to optimize the chip card’s communication
parameters in order to reduce reading time.
Whether or which Protocol Parameter Selection is supported by a specific chip card type is notified in the
interface byte TA1 of its ATR (refer to ISO/IEC 7816-3).
If this command is used a Set Chip Card Communication Parameters command has to follow.

Command: Protocol Parameter Selection


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters:
FI / DI Clock Rate Conversion Factor in higher nibble,
Baud Rate Adjustment Factor in lower nibble
(refer to ISO/IEC 7816-3)
Range: 00...FF hex.
Default: 11 hex.
Return data:
Offset 0: Status: okay = 82 hex.
refer to chapter Runtime Return Code 4.1.2.3.2.7.1 for T=0
or 4.1.2.3.2.8.1 for T=1
From offset 1: Chip card’s PPS response data. On success the chip card usually
echoes the PPS request (refer to ISO/IEC 7816-3).

Page 35 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.2.7 Protocol T=0

4.1.2.3.2.7.1 Runtime Return Code


At runtime the T=0 commands provide the following return codes:

Return code Meaning


80 hex. Chip card not contacted
81 hex. Chip card contacted, chip supply voltage off
82 hex. Okay: chip card contacted, chip supply voltage on
8E hex. Input/output error
8F hex. Command not known or cannot be executed

Return code 8E hex. is supplemented by two additional error code bytes:

1. Byte Information on chip contacting


Error code Meaning
00 hex. Either the chip contacting is incorrect or the power supply inside the chip is
interrupted
01 hex. Chip card correctly contacted
FF hex. No information provided on chip contacting
2. Byte Input/output error definition
Error code Meaning
01 hex. The waiting time (BWT, CWT) for receiving chip card data has been exceeded
02 hex. Parity error
03 hex. Protocol framing error
04 hex. More data have been received from the chip card than can be stored inside the
CREAM130
05 hex. Chip card contacting disrupted during command operation
06 hex. No data were sent to the chip card because a faulty data byte has been received
for more than three times
07 hex. Faulty chip card protocol, e.g. incorrect acknowledge from the chip card
08 hex. Severe transfer error, resynchronization successful
09 hex. Severe transfer error, chip card power supply has been switched off
0A hex. Transfer okay, but there are no layer-7-data (empty I-frame)
0D hex. Chip card does not respond
0E hex. Unknown ATR from the chip card

Page 36 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.2.7.2 Set Chip Card Communication Parameters


Communication parameters between CREAM130 and chip card can be set by using the Set Chip Card
Communication Parameter command.

Command: Set Chip Card Communication Parameters


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters:
Work Waiting Index (WI) After the chip card has sent a start bit the CREAM130 does not wait
longer than WI * 80 ms for the next start bit to come.
Range: 0...255 dec. (ignore parameter with value 255)
Default: 20 dec.
Extra Guard Time Index (N) After the last bit the chip card normally sends a new start bit only after
a guard time of 2 etu (Elementary Time Unit, bit duration depending on
chip frequency and divisor factor).
This parameter extends the guard time by N * etu.
Exception: N=1 reduces the guard time to 1 etu.
Range: 0...255 dec. (ignore parameter with value 255)
Default : 0 dec.
Division factor (DF) Sets the chip card division factor (number of cycles per bit).
DF=Fi/Di (refer to ISO/IEC 7816-3).
If DF shall be changed a PPS command (Protocol Parameter
Selection) has to be sent previously.
This parameter is optional.
Range: 0...65535 dec. (ignore parameter with value 65535)
Default: empty
Return data:
Offset 0: Status: okay = 82 hex.
refer to chapter 4.1.2.3.2.7.1 Runtime Return Code

Page 37 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.2.7.3 APDU Command


Any read/write commands can be generated. Data are stated in the form of standardized APDUs
(Application Protocol Data Units). For details refer to chapter 2.2.2.4 Communication topic Data
Exchange and to ISO/IEC 7816-4.
The most common commands (Select File, Read Binary, Read Record) are largely pre-defined.

Command: APDU Command


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters:
Instruction class (CLA) Instruction class, e.g. refer to ISO/IEC 7816-4
Range: selection list, 00...FF hex. respectively
Default: Standard, 00 hex. respectively
Instruction (INS) Instruction code, e.g. refer to ISO/IEC 7816-4
Range: selection list, 00...FF hex. respectively
Default: Select File, A4 hex. respectively
Parameter 1 (P1) First instruction parameter, e.g. refer to ISO/IEC 7816-4
Range: selection list depending on instruction, 00...FF hex. resp.
Default: 00 hex.
Parameter 2 (P2) Second instruction parameter, e.g. refer to ISO/IEC 7816-4
Range: selection list depending on instruction, 00...FF hex. resp.
Default: 00 hex.
Length of Data field (Lc) No input; automatically calculated
Data field Instruction data, e.g. refer to ISO/IEC 7816-4
Input: depending on instruction either no input or any hex-bytes
Default: empty
Length of response data (Le) / P3 Input: depending on instruction either no input or
range: 00...FF hex., 0...255 dec. respectively
Default: 0
Return data:
Offset 0: Status: okay = 82 hex.
refer to chapter 4.1.2.3.2.7.1 Runtime Return Code
From offset 1: SW1 SW2: chip card return codes (e.g. refer to ISO/IEC 7816-4)
Offset 3: Length of response data
From offset 4: Response data

Page 38 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.2.8 Protocol T=1

4.1.2.3.2.8.1 Runtime Return Code


At runtime the T=1 commands provide the following return codes:

Return code Meaning


80 hex. Chip card not contacted
81 hex. Chip card contacted, chip supply voltage off
82 hex. Okay: chip card contacted, chip supply voltage on
8E hex. Input/output error
8F hex. Command not known or cannot be executed

Return-Code 8E hex. is supplemented by an additional error code byte:

Error code Meaning


01 hex. The waiting time (BWT, CWT) for receiving chip card data has been exceeded
02 hex. Parity error
03 hex. Protocol framing error
04 hex. More data have been received from the chip card than can be stored inside the
CREAM130
05 hex. Chip card contacting disrupted during command operation
06 hex. No data were sent to the chip card because a faulty data byte has been received for more
than three times
07 hex. Faulty chip card protocol, e.g. incorrect acknowledge from the chip card
08 hex. Severe transfer error, resynchronization successful
09 hex. Severe transfer error, chip card power supply has been switched off
0A hex. Transfer okay, but there are no layer-7-data (empty I-frame)
0D hex. Chip card does not respond
0E hex. Unknown ATR from the chip card

Page 39 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.2.8.2 Set Chip Card Communication Parameters


Communication parameters between CREAM130 and chip card can be set by using the Set Chip Card
Communication Parameters command.

Command: Set Chip Card Communication Parameters


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters:
Block Waiting Index (BWI) Defines the maximum time the CREAM130 waits after the last
command character for the first response character. For calculation of
Block Waiting Index (BWI) refer to T=1 specification in ISO/IEC 7816-3.
Range: 0...255 dec. (ignore parameter with value 255)
Default: 40 dec.
Character Waiting Index (CWI) Defines the maximum time the CREAM130 waits between two response
characters. For calculation of Character Waiting Index (CWI) refer to
T=1 specification in ISO/IEC 7816-3.
Range: 0...255 dec. (ignore parameter with value 255)
Default: 130 dec.
Inter Character Delay (ICD) Defines the intervals in which individual characters are sent to the chip
card
Range: 0...255 dec. (ignore parameter with value 255)
Default: 0 dec.
Division Factor (DF) Sets the chip card division factor (number of cycles per bit).
DF=Fi/Di (refer to ATR specification in ISO/IEC 7816-3).
If DF shall be changed a Protocol Parameter Selection (PPS) command
has to be sent first.
This parameter is optional.
Range: 0...65535 dec. (ignore parameter with value 65535)
Default: empty
Return data:
Offset 0: Status: okay = 82 hex.
refer to chapter 4.1.2.3.2.8.1 Runtime Return Code

4.1.2.3.2.8.3 Protocol Commands

4.1.2.3.2.8.3.1 Change Information Field Length


The length of the information field is modified by using the Change Information Field Length command.
This is necessary if the chip card sends more than 32 response data.

Command: Change Information Field Length


Command class: Protocol command
Command type: Chip card command
Command group: Init command
Command parameters:
INF field length New information field length
Range: 0...254 dec.
Default: 254 dec.
Return data:
Offset 0: Status: okay = 82 hex.
refer to chapter 4.1.2.3.2.8.1 Runtime Return Code
Offset 1: NAD = 00 hex.
Offset 2: PCB = E1 hex.
Offset 3: LEN = 01 hex.
Offset 4: New information field length
Offset 5: EDC

Page 40 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.2.8.3.2 User Defined Protocol Command


The purpose of the User Defined Protocol Command is to generate any user-defined protocol command
in accordance with T=1 specification.

Command: User Defined Protocol Command


Command class: User defined command
Command type: Chip card command
Command group: Init command
Command parameters:
Node Address (NAD) Refer to T=1 specification in ISO/IEC 7816-3
Range: 00...FF hex.
Default: 00 hex.
Protocol Control Bytes (PCB) Refer to T=1 specification in ISO/IEC 7816-3
Range: 00...FF hex.
Default: 00 hex.
Length (LEN) No input; automatically calculated
Information Field (INF) Refer to T=1 specification in ISO/IEC 7816-3
Input: any Hex-Bytes
Default: empty
Error Detection Code (EDC) No input; automatically calculated
Return data:
Offset 0: Status: okay = 82 hex.
refer to chapter 4.1.2.3.2.8.1 Runtime Return Code
Offset 1: NAD
Offset 2: PCB
Offset 3: LEN
From offset 4: LEN bytes information field
Offset 4+LEN: EDC

Page 41 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.2.8.4 APDU Command


Any read/write commands can be generated. The data are given in the form of standardized APDUs
(Application Protocol Data Units). For details refer to chapter 2.2.2.4 Communication topic Data
Exchange and to ISO/IEC 7816-4.
The most common commands (Select file, Read Binary, Read Record) are largely pre-defined.
The T=1 protocol frame is automatically generated.

Command: APDU Command


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters:
Instruction class (CLA) Instruction class, e.g. refer to ISO/IEC 7816-4
Range: selection list, 00...FF hex. respectively
Default: Standard, 00 hex. respectively
Instruction (INS) Instruction code, e.g. refer to ISO/IEC 7816-4
Range: selection list, 00...FF hex. respectively
Default: Select File, A4 hex. respectively
Parameter 1 (P1) First instruction parameter, e.g. refer to ISO/IEC 7816-4
Range: selection list depending on instruction, 00...FF hex. resp.
Default: 00 hex.
Parameter 2 (P2) Second instruction parameter, e.g. refer to ISO/IEC 7816-4
Range: selection list depending on instruction, 00...FF hex. resp.
Default: 00 hex.
Length of Data field (Lc) No input; automatically calculated
Data field Instruction data, e.g. refer to ISO/IEC 7816-4
Input: depending on instruction (INS) either no input or any hex-
bytes
Default: empty
Length of response data (Le) / P3 Input: depending on instruction (INS) either no input or
range: 00...FF hex., 0...255 dec. respectively
Default: 0
Return data:
Offset 0: Status: okay = 82 hex.
refer to chapter 4.1.2.3.2.8.1 Runtime Return Code
Offset 1: NAD
Offset 2: PCB
Offset 3: LEN
From offset 4: LEN byte response data
Offset 4+LEN: EDC

4.1.2.3.3 Memory Cards

4.1.2.3.3.1 Power Off


The Power Off command executes the power off sequence for the memory card.
This command is automatically generated once and cannot be manipulated.

Command: Power Off


Command class: -
Command type: Chip card command
Command group: Init command
Command parameters: none
Return data:
Offset 0: Status: 81 hex. or 82 hex.
Refer to chapter Runtime Return Code of selected chip type

Page 42 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.3.2 SLE 4404/4406

4.1.2.3.3.2.1 Runtime Return-Code


At runtime the SLE 4404/4406 commands provide the following return codes:

Return Code Meaning


80 hex. Chip card not contacted
81 hex. Okay: chip card contacted
8D hex. Chip card contacted, but removed after read command
8E hex. Input/output error
8F hex. Command not known or cannot be executed

4.1.2.3.3.2.2 Read Card Data


With the Read Card Data command the complete memory content is read: 52 bytes with SLE 4404, 16
bytes with SLE 4406, respectively.

Command: Read Card Data


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters:
User Code Optional security code for access protection.
Only for SLE 4404, not for SLE4406.
Range: 0000...FFFF hex.
Default: empty
Return data:
Offset 0: Status: okay = 81 hex.
refer to chapter 4.1.2.3.3.2.1 Runtime Return-Code
From offset 1: Read data

4.1.2.3.3.3 SLE 4418/4428

4.1.2.3.3.3.1 Runtime Return-Code


At runtime the SLE 4418/4428 commands provide the following return codes:

Return Code Meaning


80 hex. Chip card not contacted
81 hex. Chip card contacted, chip supply voltage off
82 hex. Okay: chip card contacted, chip supply voltage on
8D hex. PIN not tested or error counter overflow
8E hex. Invalid PIN or input/output error
8F hex. Command not known or cannot be executed

Page 43 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.3.3.2 Read Data


With the command Read Data a certain memory area is read.

Command: Read Data


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters:
Address Start address of the memory area
Range: 0000...FFFF hex.
Default: 0000 hex.
Number of Bytes Number of data bytes to be read
Range: 0...255 dec.
Default: 0 dec.
Return data:
Offset 0: Status: okay = 81 hex.
refer to chapter 4.1.2.3.3.3.1 Runtime Return-Code
From offset 1: Read data

4.1.2.3.3.4 SLE 4432/4442

4.1.2.3.3.4.1 Runtime Return-Code


At runtime the SLE 4432/4442 commands provide the following return codes:

Return Code Meaning


80 hex. Chip card not contacted
81 hex. Chip card contacted, chip supply voltage off
82 hex. Okay: chip card contacted, chip supply voltage on
8D hex. PIN not tested or error counter overflow
8E hex. Invalid PIN or input/output error
8F hex. Command not known or cannot be executed

4.1.2.3.3.4.2 Read 128 Bytes Card Data


With the Read 128 Bytes Card Data command a certain 128 byte memory block is read.

Command: Read 128 Bytes Card Data


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters:
128 Byte Memory Area Memory area selection
Range: selection list first / last
Default: first
Return data:
Offset 0: Status: okay = 82 hex.
refer to chapter 4.1.2.3.3.4.1 Runtime Return-Code
From offset 1: Read data

Page 44 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.3.5 SLE 4436

4.1.2.3.3.5.1 Runtime Return-Code


At runtime the SLE 4436 commands provide the following return codes:

Return Code Meaning


80 hex. Chip card not contacted
81 hex. Okay: chip card contacted, chip supply voltage off
8E hex. Input/output error
8F hex. Command not known or cannot be executed

4.1.2.3.3.5.2 Read 16 Bytes Identity Data


With the Read 16 Bytes Identity Data command 16 byte identity data are read (bits 0...127).
These data are used for identifying and authorizing the chip card.

Command: Read 16 Bytes Identity Data


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters: none
Return data:
Offset 0: Status: okay = 81 hex.
refer to chapter 4.1.2.3.3.5.1 Runtime Return-Code
From offset 1: 16 byte read data

4.1.2.3.3.5.3 Read 8 Bytes User Data


With the Read 8 Bytes User Data command 8 byte user data are read (bits 320...383). If bit 111 is not set
this command goes wrong.

Command: Read 8 Bytes User Data


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters: none
Return data:
Offset 0: Status: okay = 81 hex.
refer to chapter 4.1.2.3.3.5.1 Runtime Return-Code
From offset 1: 8 byte read data

4.1.2.3.3.5.4 Read Card Data


With the Read Card Data command all 48 bytes of the memory card are read (bit 0.... 383).

Command: Read Card Data


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters: none
Return data:
Offset 0: Status: okay = 81 hex.
refer to chapter 4.1.2.3.3.5.1 Runtime Return-Code
From offset 1: 48 byte read data

Page 45 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.3.6 I2C

4.1.2.3.3.6.1 Runtime Return-Code


At runtime the I2C commands provide the following return codes:

Return Code Meaning


80 hex. Chip card not contacted
81 hex. Okay: chip card contacted
8E hex. Input/output error or invalid chip address
8F hex. Command not known or cannot be executed

4.1.2.3.3.6.2 Deactivate Automatic Power Off


The Deactivate Automatic Power Off command prevents the chip voltage from being automatically
switched off again after each read command. Thus the run time for the sequential processing of several
commands is optimized.
This command is automatically generated and cannot be manipulated.

Command: Deactivate Automatic Power Off


Command class: -
Command type: Chip card command
Command group: Init command
Command parameters: none
Return data:
Offset 0: Status: okay = 81 hex.
refer to chapter 4.1.2.3.3.6.1 Runtime Return-Code

4.1.2.3.3.6.3 Get I2C Memory Size


The Get I2C Memory Size command asks for the actual memory size of the I2C card (up to 2 Kbytes, up
to 64 Kbytes respectively). This can be advantageous for complex configurations depending on the actual
memory size.

Command: Get I2C Memory Size


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters: none
Return data:
Offset 0: Status: okay = 81 hex.
refer to chapter 4.1.2.3.3.6.1 Runtime Return-Code
Offset 1: Memory size: 00hex. = up to 2 Kbytes, 01hex. = up to 64 Kbytes

Page 46 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.3.6.4 Select I2C Memory Size


The purpose of the Select I2C Memory Size command is to set the CREAM130 to the memory size of the
I2C card.
This command is automatically generated but can be modified. This can be advantageous for complex
configurations depending on the actual memory size. This command must exist at least once.

Command: Select I2C Memory Size


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters:
I2C Memory Size Selection of the I2C card memory size
Range: selection list up to 2 Kbytes, up to 64 Kbytes respectively
Default: up to 2 Kbytes
Return data:
Offset 0: Status: okay = 81 hex.
refer to chapter 4.1.2.3.3.6.1 Runtime Return-Code

4.1.2.3.3.6.5 Select Chip Address


Use the Select Chip Address command to set the I2C module chip address.

Command: Select Chip Address


Command class: Chip card command
Command type: Chip card command
Command group: Init ommand
Command parameters:
Chip Address Selection of the I2C module address
Range: selection list A0 hex., E0 hex. respectively
Default: A0 hex.
Return data:
Offset 0: Status: okay = 81 hex.
refer to chapter 4.1.2.3.3.6.1 Runtime Return-Code

4.1.2.3.3.6.6 Select Page


The Select Page command selects a 256 byte memory page. This command is allowed only for I2C cards
up to 2 Kbytes memory size.

Command: Select Page


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters:
Page Number Selection of a 256 byte memory page
Range: 0...7
Default: 0
Return data:
Offset 0: Status: okay = 81 hex.
refer to chapter 4.1.2.3.3.6.1 Runtime Return-Code

Page 47 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.3.6.7 Read Number of Bytes


The Read Number of Byte command reads an adjustable number of data bytes from the memory card.
The memory size and possibly the chip address or memory page must be adjusted beforehand.

Command: Read Number of Bytes


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters:
Address width Address width depending on adjusted memory size
Range: selection list 1 byte / 2 bytes
Default: automatically, 1 byte respectively
Address Start address of data to be read
Range: 00...FF hex., 0000...FFFF hex. respectively
Default: 00 hex., 0000 hex. respectively
Number of Bytes Number of data to be read.
range: 0...255
default : 0
Return data:
Offset 0: Status: okay = 81 hex.
refer to chapter 4.1.2.3.3.6.1 Runtime Return-Code
From offset 1: Read data

4.1.2.3.3.6.8 Read 16 Bytes


The Read 16 Bytes command reads 16 data bytes from the memory card. The memory size and possibly
the chip address or memory page must be set beforehand.

Command: Read 16 Bytes


Command class: Chip card command
Command type: Chip card command
Command group: Init command
Command parameters:
Address width Address width depending on adjusted memory size
Range: selection list 1 byte / 2 bytes
Default: automatically, 1 byte respectively
Address Start address of the data to be read
Range: 00...FF hex., 0000...FFFF hex. respectively
Default: 00 hex., 0000 hex. respectively
Return data:
Offset 0: Status: okay = 81 hex.
refer to chapter 4.1.2.3.3.6.1 Runtime Return-Code
From offset 1: Read data

Page 48 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.3.4 User defined Chip Card Command


The purpose of the User defined Chip Card Command is to generate a user-defined chip card commands
that is supported by the CREAM130 but is not yet offered by the programming desktop. The CREAM130
command frame is automatically generated.

Command: User defined Chip Card Command


Command class: User defined command
Command type: Chip card command
Command group: Init command
Command parameters:
Command Command code including data and parameters
Range: any hex-bytes 00...FF hex.
Default : 00 hex.
Return data: Not defined

Page 49 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.4 Control Commands


Control commands are used for controlled data extraction and for conditional macro script processing.
Control commands are sent once as macro script to the CREAM130. Upon receipt the CREAM130 sends
a response including the Response Status Code composed of two ASCII characters starting at offset 2.
There are the following groups of control commands:
• Extract Commands:
for controlled extraction of read chip card data the CREAM130 has to send as a response.
• Skip Commands:
for controlled skipping of macro commands depending on certain data.
• Stop Commands:
for controlled exiting the macro processing depending on certain data.

4.1.2.4.1 Extract Commands


Extract commands serve for controlled selection of certain data from the read chip card data that are to
be sent by the CREAM130 as an answer.
Directly after a chip card read command a certain data set is extracted by using the Extract with Offset
and Length command.
Within this data set further controlled data selection can be performed optionally by using the commands
Extract with Tag Search and/or Extract explicitly selected Data Bytes.
The result data of several consecutive extract commands are concatenated in the corresponding internal
memories.
The maximum internal memory size is 255 Byte.
Because of component 7711 restrictions and additional protocol frame maximum possible extracted chip
card data is 121 byte. This has to be taken into account when using extract commands.

Use of internal memories:

- The Extract with Offset and Length command writes the extracted data into the extract buffer.
- The commands Extract with Tag Search and Extract explicitly selected Data Bytes extract data from
the extract buffer and write them into the output buffer.
- If the configuration exclusively contains Extract with Offset and Length commands the extract buffer is
used as output buffer.
- If the configuration also contains commands Extract with Tag Search or Extract explicitly selected
Data Bytes only the data inside the output buffer are sent as response.
- When using several Extract with Offset and Length commands it could be advantageous to clear the
extract buffer by means of the Clear Extract Buffer command. This ensures the correct function of
command Extract with Tag Search, respectively facilitates offset determination for command Extract
explicitly selected Data Bytes.

Page 50 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.4.1.1 Extract with Offset and Length


The purpose of command Extract with Offset and Length is to extract a certain data set from the response
of the directly preceding Chip Card Commands.
Normally the read chip card data or the read ATR data are to be extracted with this command.
Depending on the chip card command these data can be found at a certain position within the response
data. In the Standard Mode the programming desktop automatically takes this position into account. In
the Advanced Mode the structure of the response data must be taken into account. In order to give a
distinction the Command Description is automatically adapted accordingly.
The result data of this command are internally stored inside the CREAM130.
Within this data set another specific data selection can be performed optionally by using the commands
Extract with Tag Search and/or Extract explicitly selected Data Bytes.
It may be advisable to clear the temporary buffer by means of the Clear Extract Buffer command. Also
refer to chapter Extract Commands.

Command: Extract with Offset and Length


Command class: Extract command
Command type: Reader command
Command group: Init command
Command parameters:
Offset Offset of the required data in the response of the preceding chip card
command. In the Standard Mode the response data structure is
automatically taken into account.
Range: 0...254
Default: 0
Number of Bytes Number of data bytes to be extracted starting from offset.
Range: 0...255 (0 = all)
Default: 0
Return data: none

4.1.2.4.1.2 Extract with Tag Search


The Extract with Tag Search command allows the search for a tag character in the result data of the
directly preceding command Extract with Offset and Length and the extraction of a certain data set
starting from this tag character. The result data of this command are internally stored inside the
CREAM130. Also refer to chapter Extract Commands.

Command: Extract with Tag Search


Command class: Extract command
Command type: Reader command
Command group: Init command
Command parameters:
Tag character Tag character to search for
Range: 00...FF hex.
Default: 00 hex.
Offset Data offset starting at the tag character itself
Range: 0...255
Default: 0 (the tag character itself)
Number of Bytes Number of data bytes to be extracted starting from Offset
Range: 0...255
Default: 0
Return data: none

Page 51 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.4.1.3 Extract explicitly selected Data Bytes


The Extract explicitly selected Data Bytes command allows the extraction of certain individually selected
bytes from the result data of the directly preceding command Extract with Offset and Length. The result
data of this command are internally stored inside the CREAM130. Also refer to chapter Extract
Commands.

Command: Extract explicitly selected Data Bytes


Command class: Extract command
Command type: Reader command
Command group: Init command
Command parameters:
Offset Data offset
Range: 0...255
Default: 0
Selection positions Positions of the required data bytes starting from Offset
Range: 00...FF hex.
Default: 00 hex.
Return data: none

4.1.2.4.1.4 Clear Extract Buffer


The Clear extract Buffer command clears the buffer containing the result data of command Extract with
Offset and Length. This can be advantageous when using several commands Extract with Offset and
Length. This ensures the correct tag search with command Extract with Tag Search, respectively
facilitates the offset determination for command Extract explicitly selected Data Bytes. Also refer to
chapter Extract Commands.

Command: Clear Extract Buffer


Command class: Extract command
Command type: Reader command
Command group: Init command
Command parameters: none
Return data: none

Page 52 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.4.2 Skip Commands


Skip commands are used for controlled skipping of macro commands, usually depending on certain
return data of a directly preceding chip card command. In this way it is possible to control conditional
macro script processing.

Important Note: with T=1 processor cards the send-sequence bit must toggle with each APDU/Protocol
command. This is automatically done by the Programming Desktop during command generation. Skip
commands can not be taken into consideration because otherwise the send-sequence bit ought to be
changed at runtime during conditional processing.
Consequence: APDU/Protocol commands always have to be skipped in pairs. If necessary an additional
APDU/Protocol command has to be inserted.

4.1.2.4.2.1 Skip if equal


The purpose of the Skip if equal command is to skip a certain number of following macro commands if
certain return data of the directly preceding chip card command is identical with a reference value.

Command: Skip if equal


Command class: Skip command
Command type: Reader command
Command group: Init command
Command parameters:
Skip Counter Number of following macro commands to be skipped
Range: 0...255
Default: 1
Reference value Reference value for equality control
Range: 00...FF hex.
Default: 00 hex.
Offset Offset in return data of the preceding chip card command.
Range: 0...255
Default: 0
Return data: none

4.1.2.4.2.2 Skip if not equal


The purpose of the Skip if not equal command is to skip a certain number of following macro commands if
certain return data of the directly preceding chip card command is not identical with a reference value.

Command: Skip if not equal


Command class: Skip command
Command type: Reader command
Command group: Init command
Command parameters:
Skip Counter Number of following macro commands to be skipped
Range: 0...255
Default: 1
Reference value Reference value for inequality control
Range: 00...FF hex.
Default: 00 hex.
Offset Offset in return data of the preceding chip card command
Range: 0...255
Default: 0
Return data: none

Page 53 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.4.2.3 Skip unconditionally


The purpose of the Skip unconditionally command is to unconditionally skip a certain number of following
macro commands.

Command: Skip unconditionally


Command class: Skip command
Command type: Reader command
Command group: Init command
Command parameters:
Skip Counter Number of following macro commands to be skipped
Range: 0...255
Default: 1
Return data: none

4.1.2.4.3 Stop Commands


Stop commands serve for controlled exiting the macro processing, usually depending on certain return
data of a directly preceding chip card command. This is particularly advantageous for explicit
troubleshooting or debugging within a configuration.

4.1.2.4.3.1 Stop if equal


The Stop if equal command is used for exiting the macro processing with Response Status Code 05 if
certain return data of the directly preceding chip card command are identical with certain reference
values.
If there are not sufficient data available for the complete execution of a comparison process the
Response Status Code 07 is generated.

Command: Stop if equal


Command class: Stop command
Command type: Reader command
Command group: Init Command
Command parameters:
Reference values Reference values for equality control
Range: any hex-bytes 00...FF hex.
Default: 00 hex.
Offset Offset in return data of the preceding chip card command
Range: 0...255
Default: 0
Return data: none

Page 54 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.4.3.2 Stop if not equal


The Stop if not equal command is used for exiting the macro processing with Response Status Code 05 if
certain return data of the directly preceding chip card command are not identical with certain reference
values. This refers to both data comparison and data amount as well.

Command: Stop if not equal


Command class: Stop command
Command type: Reader command
Command group: Init command
Command parameters:
Reference values Reference values for inequality control
Range: any hex-bytes 00...FF hex.
Default: 00 hex.
Offset Offset in return data of the preceding chip card command
Range: 0...255
Default: 0
Return data: none

4.1.2.4.3.3 Stop with Error Code


The Stop with Error Code command is used for exiting the macro processing with an adjustable error
code. This should differ from already pre defined Response Status Codes.

Command: Stop with Error Code


Command class: Stop command
Command type: Reader command
Command group: Init command
Command parameters:
Error code 2-digit error code
Range: 00...99 dec.
Default: 00 dec.
Return data: none

4.1.2.4.3.4 Stop with Return Code of last Chip Card Command


Stop with Return Code of last chip Card Command is used for exiting the macro processing with the
return status code of the directly preceding Chip Card Commands.

Command: Stop with Return Code of last Chip Card Command


Command class: Stop command
Command type: Reader command
Command group: Init command
Command parameters: none
Return data: none

Page 55 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.2.4.4 User defined Control Command


The purpose of the User defined Control Command is to generate user defined control commands that
are supported by the CREAM130 but are not yet offered by the programming desktop. The CREAM130
protocol frame is automatically generated.

Command: User defined Control Command


Command class: User defined command
Command type: Reader command
Command group: Init command
Command parameters:
Command Code Control command code
Range: 00...FF hex.
Default: 00 hex.
Command Data Control command data and parameters
Range: any hex-bytes
Default: empty
Return data: none

4.1.2.5 User defined Command


Use the User defined Command to generate any user defined command that is not yet offered by the
programming desktop. The user himself must guarantee the correctness of the command. The
programming desktop is not able to execute any checks. Therefore, this command should be used only
by experienced users. It requires knowledge of the component 7711, chip card readers and chip cards.
It is possible to enter any ASCII character. Each hex-byte must have a preceding $ character
(e.g.: 0D 0A hex. => $0D$0A). Thus it is possible to mix any ASCII characters and hex-bytes.

Command: User defined Command


Command class: User defined command
Command type: Reader command
Command group: Init command
Command parameters:
Command Complete command line
Range: any ASCII character
Default: empty
Return data: none

Page 56 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.3 Configuration Examples

4.1.3.1 T=0
Commands generated in programming desktop:

Configuration file:

*
* Example T=0
*
Comment=*
CSync=Y
CInit=I
CStart=S
RCode=R
RTime=T
DTime=L
Format=Z
Tag=X
Reverse=W
CrLfOn=0
Baud=19200,8,n,1
Protocol=>,:,1,1,0,3
Reader=CREAM130
*
* Get CREAM version (Sync command)
Y<00:
R$07BOEWE-CREAM
T50
* Reset Macro Buffer (Init command)
I<2001:
R$0300
T50
* Select Protocol T=0 (Init command)
I<2002$02$F1$03:
R$0300
T50
* Select Chip Card Frequency 4.608 MHz (Init command)
I<2002$04$F8$04$05$04:
R$0300
T50
* Power On, 5V, ATR Timing T=0 (Init command)
I<2002$01$01:
R$0300
T50
* Select File 2FE2 (Init command)
I<2002$0A$04$A0$A4$00$00$02$02$00$2F$E2:
R$0300
T50
* Stop if last Chip Card Command Response is not 82 hex. at Offset 0 (Init command)
I<2002$00$03$01$00$82:
R$0300
T50
* Read Binary 10 Bytes (Init command)
I<2002$08$04$A0$B0$00$00$0A$00$0A:
R$0300
T50

Page 57 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

* Extract 10 read Data Bytes from Offset 0 (Init command)


I<2002$00$03$02$04$0A:
R$0300
T50
* Power Off (Init command)
I<2002$01$05:
R$0300
T50
* Reset Chip Card Frequency to 3.686 MHz (Init command)
I<2002$04$F8$04$05$05:
R$0300
T50
* End of Macro (Init command)
I<2003:
R$0300
T50
* Activate Macro (Init command)
I<0120:
R$039201
T50
* Start Chip Card Reading (Start command)
S<02:
R$0300
T250
* Convert 10 Bytes from Offset 0: Swap Nibbles and convert BCD to ASCII (Format command)
Z$01$04$0A

Page 58 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.3.2 T=1
Commands generated in programming desktop:

Configuration file:

*
* Example T=1
*
Comment=*
CSync=Y
CInit=I
CStart=S
RCode=R
RTime=T
DTime=L
Format=Z
Tag=X
Reverse=W
CrLfOn=0
Baud=19200,8,n,1
Protocol=>,:,1,1,0,3
Reader=CREAM130
*
* Get CREAM version (Sync command)
Y<00:
R$07BOEWE-CREAM
T50
* Reset Macro Buffer (Init command)
I<2001:
R$0300
T50
* Select Protocol T=1 (Init command)
I<2002$02$F1$07:
R$0300
T50
* Select Chip Card Frequency 4.608 MHz (Init command)
I<2002$04$F8$04$05$04:
R$0300
T50
* Power On, 5V, ATR Timing T=1 (Init command)
I<2002$02$01$01:
R$0300
T50
* Change Information field Length to 64 Bytes (Init command)
I<2002$06$04$00$C1$01$40$80:
R$0300
T50
* Select File 1122 (Init command)
I<2002$0D$04$00$00$08$00$A4$00$00$02$11$22$00$9D:
R$0300
T50
* Read Binary 16 Bytes (Init command)
I<2002$0A$04$00$40$05$00$B0$00$00$10$E5:
R$0300
T50
* Extract 16 read Data Bytes from Offset 0 (Init command)
I<2002$00$03$02$04$10:
R$0300
T50

Page 59 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

* Power Off (Init command)


I<2002$01$05:
R$0300
T50
* Reset Chip Card Frequency to 3.686 MHz (Init command)
I<2002$04$F8$04$05$05:
R$0300
T50
* End of Macro (Init command)
I<2003:
R$0300
T50
* Activate Macro (Init command)
I<0120:
R$039201
T50
* Start Chip Card Reading (Start command)
S<02:
R$0300
T200
* Convert 16 Bytes from Offset 0: No conversion (Format command)
Z$00$04$10

Page 60 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.3.3 SLE 4404/4406


Commands generated in programming desktop:

Configuration file:

*
* Example SLE 4404/4406
*
Comment=*
CSync=Y
CInit=I
CStart=S
RCode=R
RTime=T
DTime=L
Format=Z
Tag=X
Reverse=W
CrLfOn=0
Baud=19200,8,n,1
Protocol=>,:,1,1,0,3
Reader=CREAM130
*
* Get CREAM version (Sync command)
Y<00:
R$07BOEWE-CREAM
T50
* Reset Macro Buffer (Init command)
I<2001:
R$0300
T50
* Select Chip Type SLE 4404/4406 (Init command)
I<2002$02$F1$01:
R$0300
T50
* Read Card Data; 4404: 52 Bytes, 4406: 16 Bytes (Init command)
I<2002$01$01:
R$0300
T50
* Stop if last Chip Card Command Response is equal FF hex. at Offset 1 (Init command)
I<2002$00$03$0B$01$FF:
R$0300
T50
* Extract 16 read Data Bytes from Offset 0 (Init command)
I<2002$00$03$02$01$10:
R$0300
T50
* End of Macro (Init command)
I<2003:
R$0300
T50
* Activate Macro (Init command)
I<0120:
R$039201
T50
* Start Chip Card Reading (Start command)
S<02:
R$0300
T200
* Convert 16 Bytes from Offset 0: No conversion (Format command)
Z$00$04$10

Page 61 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.3.4 SLE 4418/4428


Commands generated in programming desktop:

Configuration file:

*
* Example SLE 4418/4428
*
Comment=*
CSync=Y
CInit=I
CStart=S
RCode=R
RTime=T
DTime=L
Format=Z
Tag=X
Reverse=W
CrLfOn=0
Baud=19200,8,n,1
Protocol=>,:,1,1,0,3
Reader=CREAM130
*
* Get CREAM version (Sync command)
Y<00:
R$07BOEWE-CREAM
T50
* Reset Macro Buffer (Init command)
I<2001:
R$0300
T50
* Select Chip Type SLE 4418/4428 (Init command)
I<2002$02$F1$0C:
R$0300
T50
* Read 6 Bytes from Address 006B hex. (Init command)
I<2002$04$02$00$6B$06:
R$0300
T50
* Stop if last Chip Card Command Response is equal FF hex. at Offset 1 (Init command)
I<2002$00$03$0B$01$FF:
R$0300
T50
* Extract 6 read Data Bytes from Offset 0 (Init command)
I<2002$00$03$02$01$06:
R$0300
T50
* Power Off (Init command)
I<2002$01$08:
R$0300
T50
* End of Macro (Init command)
I<2003:
R$0300
T50
* Activate Macro (Init command)
I<0120:
R$039201
T50
* Start Chip Card Reading (Start command)
S<02:
R$0300
Page 62 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

T200
* Convert 6 Bytes from Offset 0: Convert Nibbles BCD to ASCII (Format command)
Z$02$04$06

Page 63 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.3.5 SLE 4432/4442


Commands generated in programming desktop:

Configuration file:

*
* Example SLE 4432/4442
*
Comment=*
CSync=Y
CInit=I
CStart=S
RCode=R
RTime=T
DTime=L
Format=Z
Tag=X
Reverse=W
CrLfOn=0
Baud=19200,8,n,1
Protocol=>,:,1,1,0,3
Reader=CREAM130
*
* Get CREAM version (Sync command)
Y<00:
R$07BOEWE-CREAM
T50
* Reset Macro Buffer (Init command)
I<2001:
R$0300
T50
* Select Chip Type SLE 4432/4442 (Init command)
I<2002$02$F1$0B:
R$0300
T50
* Read first 128 Bytes Card Data (Init command)
I<2002$02$02$00:
R$0300
T50
* Extract all read Data Bytes from Offset 48 (Init command)
I<2002$00$03$02$31$00:
R$0300
T50
* Extract 7 Data Bytes from Offset 2 starting at Tag 81 hex. (Init command)
I<2002$00$04$04$81$02$07:
R$0300
T50
* Extract 12 Data Bytes from Offset 2 starting at Tag 82 hex. (Init command)
I<2002$00$04$04$82$02$0C:
R$0300
T50
* Power Off (Init command)
I<2002$01$08:
R$0300
T50
* End of Macro (Init command)
I<2003:
R$0300
T50
* Activate Macro (Init command)
I<0120:
Page 64 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

R$039201
T50
* Start Chip Card Reading (Start command)
S<02:
R$0300
T200
* Convert 19 Bytes from Offset 0: No conversion (Format command)
Z$00$04$13

Page 65 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.3.6 SLE 4436


Commands generated in programming desktop:

Configuration file:

*
* Example SLE 4436
*
Comment=*
CSync=Y
CInit=I
CStart=S
RCode=R
RTime=T
DTime=L
Format=Z
Tag=X
CrLfOn=0
Baud=19200,8,n,1
Protocol=>,:,1,1,0,3
Reader=CREAM130
*
* Get CREAM version (Sync command)
Y<00:
R$07BOEWE-CREAM
T50
* Reset Macro Buffer (Init command)
I<2001:
R$0300
T50
* Select Chip Type SLE 4436 (Init command)
I<2002$02$F1$0D:
R$0300
T50
* Read 48 Bytes Card Data (Init command)
I<2002$01$11:
R$0300
T50
* Stop if last Chip Card Command Response is equal Reference value at Offset 1 (Init command)
I<2002$00$03$0B$01$FF:
R$0300
T50
* Extract 48 Bytes from Offset 0 (Init command)
I<2002$00$03$02$01$30:
R$0300
T50
* Power Off (Init command)
I<2002$01$12:
R$0300
T50
* End of Macro (Init command)
I<2003:
R$0300
T50
* Activate Macro (Init command)
I<0120:
R$039201
T50
* Start Chip Card Reading (Start command)
S<02:
R$0300
T200
* Convert 48 Bytes from Offset 0: No conversion (Format command)
Page 66 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

Z$00$04$30

Page 67 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.3.7 I²C
Commands generated in programming desktop:

Configuration file:

*
* Example I2C
*
Comment=*
CSync=Y
CInit=I
CStart=S
RCode=R
RTime=T
DTime=L
Format=Z
Tag=X
Reverse=W
CrLfOn=0
Baud=19200,8,n,1
Protocol=>,:,1,1,0,3
Reader=CREAM130
*
* Get CREAM version (Sync command)
Y<00:
R$07BOEWE-CREAM
T50
* Reset Macro Buffer (Init command)
I<2001:
R$0300
T50
* Select Chip Type I2C (Init command)
I<2002$02$F1$04:
R$0300
T50
* Deactivate Automatic Power Off (Init command)
I<2002$02$0A$01:
R$0300
T50
* Get I2C Memory Size (Init command)
I<2002$01$09:
R$0300
T50
* Skip next 5 Commands if last Chip Card Command Response is equal 01 hex. at Offset 1 (Init
command)
I<2002$00$04$06$01$01$05:
R$0300
T50
* Select I2C Memory Size Up to 2 kByte (Init command)
I<2002$02$09$00:
R$0300

Page 68 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

T50
* Select Chip Address A0 hex. (Init command)
I<2002$02$07$A0:
R$0300
T50
* Select Page No. 0 (Init command)
I<2002$02$06$00:
R$0300
T50
* Read 128 Bytes from Address 00 hex. (Init command)
I<2002$03$01$00$80:
R$0300
T50
* Skip next 3 Commands (Init command)
I<2002$00$02$08$03:
R$0300
T50
* Select I2C Memory Size Up to 64 kByte (Init command)
I<2002$02$09$01:
R$0300
T50
* Select Chip Address A0 hex. (Init command)
I<2002$02$07$A0:
R$0300
T50
* Read 128 Bytes from Address 0000 hex. (Init command)
I<2002$04$01$00$00$80:
R$0300
T50
* Extract all read Data Bytes from Offset 47 (Init command)
I<2002$00$03$02$30$00:
R$0300
T50
* Extract 7 Data Bytes from Offset 2 starting at Tag 81 hex. (Init command)
I<2002$00$04$04$81$02$07:
R$0300
T50
* Extract 12 Data Bytes from Offset 2 starting at Tag 82 hex. (Init command)
I<2002$00$04$04$82$02$0C:
R$0300
T50
* Power Off (Init command)
I<2002$01$0B:
R$0300
T50
* End of Macro (Init command)
I<2003:
R$0300
T50
* Activate Macro (Init command)
I<0120:
R$039201
T50
* Start Chip Card Reading (Start command)
S<02:
R$0300
T200
* Convert all Bytes from Offset 0: No conversion (Format command)
Z$00$04$00

Page 69 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.4 Trouble Shooting


It may occur that chip cards can not be read even though the programming is done to the best of one’s
knowledge and belief. This chapter shall support trouble shooting within the programming desktop.

4.1.4.1 Preparation
1) Treat the Start command:
Ø Make a note of the displayed response time
Ø Increase the response time to 10.000 ms
For chip cards with extremely long response time increase of this parameter may lead to success. In
this case a reduced card throughput in the card channel is expected.

2) Treat the Format command:


Ø Make a note of all displayed parameters
Ø Modify the parameters as follows:
Conversion no conversion
Tag character none
Offset 0
Number of bytes 0
Reverse string no reversal

3) Activate “Advanced editing mode“ in <F12> Menu.

4) Have the chip card to be tested ready.

Page 70 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.4.2 Execution
The execution of dependent scripts with Skip Commands may be tested by insertion of suitable Stop
Commands.

4.1.4.2.1 Processor Card

4.1.4.2.1.1 Test ATR


1) Insert new command “Extract with Offset and Length“ directly behind the “Power On“ command.
Adjust parameters as follows:
Offset 0
Number of bytes 0 (i.e. all)
Leave all other parameters unchanged.

2) Insert new command “Skip unconditionally“ directly behind previously generated Extract command.
Adjust parameters as follows:
Skip Counter Number of all following commands up to “Power Off”
Leave all other parameters unchanged.

3) Save modified configuration in <F12> Menu or with <F9> Exit.

4) Trigger reading of the chip card to be tested.

5) Analysis of response time:


The ATR response time should be measured. Usually the whole reading time is mainly determined by
the ATR response time. This time can not be influenced by the reader.

6) Analysis of received data:


All data are coded hexadecimally.
- The first byte contains the runtime return code of the “Power On“ command,
refer to chapter 4.1.2.3.2.7.1 Runtime Return Code for protocol T=0,
chapter 4.1.2.3.2.8.1 Runtime Return Code for protocol T=1, respectively.
- From the second byte on the ATR data follow.
ATR data have to be interpreted according to ISO/IEC 7816-3, especially regarding to the
protocol used.
If the ATR is not received correctly switching the ATR timing of the “Power On“ command may
solve the problem.

Page 71 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.4.2.1.2 Test APDU Command


1) Move the APDU command to be tested ahead of the Extract/Skip command pair (refer to 4.1.4.2.1.1
Test ATR).

2) Adjust the “Skip unconditionally“ command:


set parameter “Skip Counter” to number of following commands up to “Power Off”.

3) Save modified configuration in <F12> Menu or with <F9> Exit.

4) Trigger reading of the chip card to be tested.

5) Analysis of received data:


all data are coded hexadezimally.
• Protocol T=0:
- Byte 1 contains the runtime return code of the APDU command,
refer to chapter 4.1.2.3.2.7.1 Runtime Return Code.
- Byte 2 and 3 contain the chip card return codes SW1 and SW2.
For the relevant command these codes are to be taken either from ISO/IEC 7816-4 or from the
chip card specification.
- Byte 4 contains the number of response data.
- From Byte 5 on follow the response data, if available.
• Protocol T=1:
The T=1 protocol frame has to be interpreted according to ISO/IEC 7816-3.
- Byte 1 contains the runtime return code of the APDU command,
refer to chapter 4.1.2.3.2.8.1 Runtime Return Code.
- Byte 2-4 contain NAD, PCB and LEN of the T=1 protocol frame.
LEN is the length of the following INF field.
- From Byte 5 on follows the INF field with the response data, if available.
- Byte n-2 and n-1 contain the chip card return codes SW1 and SW2.
For the relevant command these codes are to be taken either from ISO/IEC 7816-4 or from the
chip card specification.
- Byte n contains the EDC (checksum).
Especially for processor cards T=1 it might be necessary to insert the
“Change Information field Length“ command directly behind the “Power On“ command. Increase
the parameter “INF field length” according to the chip card specification or experimentally.

4.1.4.2.2 Memory Card


1) Make a note of the displayed parameters of the Read and Extract commands.

2) Modify the parameters in a manner so that a maximum of data will be received:


Ø Offset 0, Address 0, respectively
Ø Number of Bytes 255, 0 respectively (i.e. all)

3) Save modified configuration in <F12> Menu or with <F9> Exit.

4) Trigger reading of the chip card to be tested.

5) Analysis of received data:


All data are coded hexadecimally.
- The first byte contains the runtime return code of the Read command. Refer to the corresponding
chapter of the relevant chip type.
- From the second byte on the received card data follow.

Page 72 of 73
Help Manual for Chip Reading Programming Desktop V 1.1.9 or higher
Revision A, 03/21/2007

4.1.4.3 Conclusion
1) Deactivate “Advanced edit mode“ in <F12> Menu.

2) Delete additionally inserted test commands.

3) Restore or correct Format command parameters.

4) Restore or correct Start command response time.

5) “Save configuration“ in <F12> Menu or with <F9> Exit.

6) Trigger chip card reading for final check.

Page 73 of 73

You might also like