Ict3k7-3r6940 I
Ict3k7-3r6940 I
Ict3k7-3r6940 I
Revision History
Contents
Revision History............................................................................................................................................................... 1
1. Logic level.................................................................................................................................................................. 4
1.1 Transmission / Control Specification ................................................................................................................ 4
1.2 Transmission control method............................................................................................................................ 4
1.3 Transmission Control Characters..................................................................................................................... 4
1.4 Transmission Format......................................................................................................................................... 4
2. Transmission / Control protocol............................................................................................................................... 5
2.1 Timing chart........................................................................................................................................................ 5
2.2 Cancel of command........................................................................................................................................... 6
2.3 Protocol............................................................................................................................................................... 6
2.3.1 Ordinary operation...................................................................................................................................... 6
2.3.2 Irregular operation and back-up ................................................................................................................ 7
2.3.3 State transition matrix................................................................................................................................. 8
3. Command /Response............................................................................................................................................ 10
3.1 Text format........................................................................................................................................................ 10
3.2 Structure of Firmware areas............................................................................................................................ 11
4. Supervisor program code area.............................................................................................................................. 12
4.1 Command list.................................................................................................................................................... 12
4.2 Status code....................................................................................................................................................... 12
4.3 Error code ......................................................................................................................................................... 12
5. Command explanation of Supervisor program code area ................................................................................. 13
5.1 Initialize command ........................................................................................................................................... 13
5.2 Revision command.......................................................................................................................................... 13
5.3 Download command ....................................................................................................................................... 14
5.4 Switch command ............................................................................................................................................. 17
6. User program code area........................................................................................................................................ 18
6.1 Command list.................................................................................................................................................... 18
6.2 Status code....................................................................................................................................................... 21
6.3 Error code ......................................................................................................................................................... 21
7. Command explanation of User program code area............................................................................................ 24
7.1 Initialize command ........................................................................................................................................... 24
7.2 Status request command................................................................................................................................ 26
7.3 Entry command ............................................................................................................................................ 27
7.4 Card carry command....................................................................................................................................... 28
7.5 Retrieve command ....................................................................................................................................... 28
7.6 LED command ................................................................................................................................................. 29
7.7 Mag-Track Read command............................................................................................................................ 30
7.8 Intake / Withdraw command ........................................................................................................................... 32
7.9 Enable/Disable command............................................................................................................................... 34
7.10 Port In/Out command .................................................................................................................................... 35
7.11 Sensor Level transmit command.................................................................................................................. 37
7.12 Revision command........................................................................................................................................ 38
7.13 Counter command......................................................................................................................................... 39
7.14 IC Card control command............................................................................................................................. 40
7.14.1 Activate ICC command.......................................................................................................................... 40
7.14.2 Deactivate ICC command ..................................................................................................................... 42
7.14.3 Inquire ICC status command................................................................................................................. 43
7.14.4 ICC communication T=0........................................................................................................................ 44
7.14.5 ICC communication T=1........................................................................................................................ 45
7.14.6 ICC extended communication 1............................................................................................................ 47
CONFIDENTIAL No ASL - NP – 17749 – 01 2
1. Logic level
The protocol transmitted from HOST is automatically recognized by ICRW after a power-on.
After the recognition, communication is executed according to each protocol.
Protocol type is recognized only after power-on.
And the protocol cannot be switched to another protocol during communication.
ST b0 b1 b2 b3 b4 b5 b6 b7 P SP
LEN range
CRCC range
Max 300 bytes
Notes 1.Gap between characters STX to CRCC is less than 250 msec.
CONFIDENTIAL No ASL - NP – 17749 – 01 5
Power-on-reset Signal-reset
Power
Reset
50ms from Reset IC 50ms
CPU Reset
Signal Max 4sec. Max 4sec.
(after Initial Eject) (after Initial Eject)
DTR
3) Data gap
During receiving mode, if 250ms Time-out occurs, ICRW assumes receiving the Text characters
data is completed.
ON
CTS
OFF Approx.
1msec
0
TXD
1
Char (i) Char (i+1) Char (i+2) Char (i+3) Char (i+4)
2.3 Protocol
2.3.1 Ordinary operation
Min.5msec
(Execution)
(Execution)
X error
(ICRW) ACK Response
Case 2
Case 3
(Execution)
(ICRW) ACK Response Response
(Execution)
Case 5
(Execution) (discontinue)
(ICRW) ACK DLE, EOT
Max 4sec
CONFIDENTIAL No ASL - NP – 17749 – 01 8
1) HOST
Character
ACK NAK STX(F2h) Others Time out Timer
Mode
Re-send Re-send
(1) Wait for ACK
Go to (2) command Ignore Ignore command 300msec
after command
Go to (1)* Go to (1)*
2)ICRW
Character
ACK NAK STX(F2h) DLE,EOT Others Time out Timer
Mode
Go to (1)
after
(1) Neutral Ignore Ignore Go to (2) Ignore None
send
DLE,EOT
Send
(2) Wait for Receive 2 bytes as Length.
NAK 250msec
LEN Receive 2 bytes then go to (3)
& go to (1)
Send
(3) Wait for Receive Text in the Length bytes.
NAK 250msec
Text Receive the Length bytes then go to (4)
& go to (1)
3. Command /Response
HOST sends command to ICRW and instruct operation.
Command is followed by data necessary for operation.
ICRW sends result of execution as response.
Command must be transmitted more than 5msec after sending ACK to the response from ICRW.
Especially when not written clearly, it becomes 1 byte of one division. The division surrounded
by the dotted line shows the data which may not be considered as the case where it exists.
"C"
cm pm Data
(43h)
cm: Command code
pm: Parameters
"P"
cm pm st1 st0 Data
(50h)
st1,st0: Status code
"N"
cm pm e1 e0 Data
(4Eh)
e1,e0: Error code
In case error response "02"(30h,32h) arises in initialize command, User program code area is
abnormal condition. This state shows that ICRW executes Supervisor program code area.
And it needs to perform user part program rewriting by the download from HOST.
Switch command is to switch Supervisor program code area and User program code area.
Initialize command shall be executed when after Switch command is executed.
In addition to this, the firmware holds the sensor adjustment value for card detection,
the download counter of user program code area, and the path counter, as non-volatility data.
Moreover, since a firmware does not have the function of execution record of a command,
or memory dumping, it needs the communication log of HOST for the analysis of an error.
CONFIDENTIAL No ASL - NP – 17749 – 01 12
Execute this command whenever power is turned on or after switch from User program code area.
A positive response is not transmitted to HOST with the initialization command of Supervisor program
code area.
A response is surely set to negative response and returns the error code "02"(30h,32h) to HOST.
Eight characters that show firmware revision of Supervisor program code area
are added to an positive response, and it transmits to HOST.
Ex) "1234-01A"
CONFIDENTIAL No ASL - NP – 17749 – 01 14
“C” “J”
Command pm Download Data(ASCII 176bytes)
(43h) (4Ah)
“N” “J”
Negative response pm e1 e0
(4Eh) (4Ah)
Execution of this command rewrites program in the User program code area by downloading from HOST.
This command is used in case to write latest firmware.
pm="2" Execute the CRC check of User program code area and confirm it's condition.
(32h) Error "71"(37h,31h) arise in case CRC check is wrong.
Repeat the download again from pm="0"(30h).
Structure of the file for downloading with the ASCII text format
(2) (3)
“N0002” Switch Command
No “CK0”
Yes
XXXX-YY.DWL
(ASCII Text File)
(4)
Read Next
1 Line
(5)
EOF ?
Yes
No
Execute (6)
1 Line Command
(7)
Positive
Yes Response ?
Download No
Failure
(8)
Power Switch Command
Off / On “CK0”
(9)
Initialize Command
“C00....”
Standard Process
CONFIDENTIAL No ASL - NP – 17749 – 01 17
Note : Start from Initialize command of User program code area after the switch is completed.
Usual operation
CONFIDENTIAL No ASL - NP – 17749 – 01 18
“N” “0”
Negative response pm e1 e0
(4Eh) (30h)
This command set the operation conditions for ICRW and initializes ICRW.
Execute this command whenever power on, reset and code area change from supervisor program to
user program by switch command.
If this command is executed when the card is in the ICRW, the ICRW moves the card according to the
parameter of the command.
When the enable condition of the card insertion, this command disables the card insertion condition.
This command returns the ICRW from various error conditions to normal condition.
And this command clears the mag stripe data buffer.
Note 1. * These parameters have no meaning, but remained for the command format compatibility to
the command format of the other models. The parameter codes "0"(30h) to "4"(34h) are admitted as the
correct parameter to get positive response with the type recognizing code under the condition that the
model type is unknown.
Notes Pd, Ty, Ds, Cc, Re and Ce are omissible. When Pd, Ty, Ds or Cc are not set, these are set "0" (30h)
internally as a default value.
When Re or Ce are not set, the ICRW control the card according to the previous value.
When power failure occurs at the same timing of DSR OFF, power failure handling routine has priority.
CONFIDENTIAL No ASL - NP – 17749 – 01 26
“C” “1”
Command pm
(43h) (31h)
“P” “1”
Positive response pm st1 st0 Se
(50h) (31h)
“N” “1”
Negative response pm e1 e0
(4Eh) (31h)
Negative response is sent against Status request command if mechanical failure remains
from the prior operation.
b7 b0
Se= 0 X X X X X X X (binary)
Card Width Sensor
1: Card exists, 0: Card does not exist
PD2 1: Card exists, 0: Card does not exist
PD3 1: Card exists, 0: Card does not exist
PD4 1: Card exists, 0: Card does not exist
PI1 1: Shutter Close, 0: Shutter Open
PI2 1: IC Contact is set, 0: IC Contact is not set
(The IC contact is set mechanically at the card entry)
CAP 1: Capture Sensor Connector High Level
0: Capture Sensor Connector Low Level
(This connector terminal is pulled up, therefore this bit
is 1 when the connector is open or no mount. )
CONFIDENTIAL No ASL - NP – 17749 – 01 27
“C” “2”
Command pm mg
(43h) (32h)
“P” “2”
Positive response pm st1 st0
(50h) (32h)
“N” “2”
Negative response pm e1 e0
(4Eh) (32h)
This is to accept to carry the card inside ICRW. This command doesn't allow ICRW to send response
to HOST until ICRW completes to carry the card inside ICRW.
If ICRW can not move the card on the way of carrying it, ICRW sends jam error "10" (31h,30h) to HOST.
If another card already stays inside ICRW, ICRW sends error "02" (30h,32h) to HOST.
Send DLE,EOT from HOST in order to cancel this command.
While the card is carried inside ICRW, data on the mag stripe is read to data buffer by ICRW.
(Even if read error occurs, ICRW sends positive response to HOST upon completion of
carrying the card inside ICRW.)
If ICRW is in the ENABLE mode, ICRW sends execution impossible error to HOST.
“C” “3”
Command pm
(43h) (33h)
“P” “3”
Positive response pm st1 st0
(50h) (33h)
“N” “3”
Negative response pm e1 e0
(4Eh) (33h)
pm="0" EJECT
(30h) ICRW moves the card from inside of ICRW to Gate with roller on position.
After executing this command, ICRW can execute a retrieve command.
After card was ejected, ICRW executes a status request command, and when the status code is
"00" (30h,30h), it is shown that the card was completely pull out from the gate.
It takes a maximum of 7sec after ICRW receives a command until it returns a response.
If a card is not in ICRW, ICRW does not executes the card move operation and returns positive response.
pm="1" CAPTURE
(31h) ICRW moves the card from inside of ICRW to rear side.
After card was captured, ICRW executes a status request command and when its status code is
"00" (30h,30h), it is shown that the card was completely discharged from the ICRW.
It takes a maximum of 7sec after ICRW receives a command until it returns a response.
If a card is not in ICRW, ICRW sends error "02" (30h,32h) to HOST against receipt of this command.
ICRW moves card from gate with roller on position to inside of ICRW.
This command is available after Eject command.
This command does not ensure mag stripe read operation for read command after this command.
CONFIDENTIAL No ASL - NP – 17749 – 01 29
“P” “5”
Positive response pm st1 st0
(50h) (35h)
“N” “5”
Negative response pm e1 e0
(4Eh) (35h)
This function controls the LED on front bezel of ICRW. LED On commands for every color are able to
change directly from the condition of other color on.
The turn ON / OFF time is available for the LED blinking. The turn on time and turn off time are able to be
set independently. Each timer values are set by the 0.1 second unit which is given as 2bytes ASCII code.
Therefore, the minimum value is 0.1 second and the maximum value is 9.9 second. If these values are
omitted, the LED is only turned on. This blinking function doesn't affect to the other functions.
ex). Green LED blinking turn on time = 1.0sec. turn off time = 0.5sec. => "C511005"
CONFIDENTIAL No ASL - NP – 17749 – 01 30
“C” “6”
Command pm
(43h) (36h)
When ICRW takes in a card, the magnetic data read into the buffer is edited and is converted into
an ASCII code. If this data is normal, it will transmit to HOST as read data.
The data transmitted to HOST excepts the Start code, End code, and LRC on mag stripes.
The command with the above parameters allows ICRW not to read the card, but only to
transmit the data of buffer, which have been normally read during the card acceptance.
When Read Error occurs, ICRW sends negative response.
In case of card jamming, ICRW sends negative response too.
When the card has no magnetic track, ICRW makes no retrying and sends negative response
(Error code "24" (32h,34h) is no magnetic track).
When the card has a track with the sentinels but no data, ICRW sends negative response (error code
"23" (32h,33h))
Ex) Original data : 31h 32h 33h 34h 35h 36h 37h 38h 39h 30h
Transmit data : ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h
Decrypted data : 31h 32h 33h 34h 35h 36h 37h 38h 39h 30h 80h 00h 00h 00h 00h 00h
Ex) Original data : 31h 32h 33h 34h 7Eh 35h 36h 37h 7Eh 38h 39h 30h (pm="E"(45h))
Transmit data : ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h ??h
Decrypted data : 31h 32h 33h 34h 7Eh 35h 36h 37h 7Eh 38h 39h 30h 80h 00h 00h 00h
CONFIDENTIAL No ASL - NP – 17749 – 01 32
"P" “9” Se
Positive response pm st1 st0
(50h) (39h) (1byte)
"N" “9” Se
Negative response pm e1 e0
(4Eh) (39h) (1byte)
This command executes the wait of the card insertion and the intake, or the card eject and the wait of the
pull out. This command is recommended for the development of the new host control software.
The settings of the card watching time for each pm are the same. The setting unit of the card waiting time
are second. The meaning of the setting values are following.
Positive response
00 second 0.1 sec. watching for polling (The card condition can be recognized by
the st1 and st0 bytes of the positive response.)
99 sec. watching
99 second Negative response
(max. value)
The positive response is sent when the ICRW detects the card pull out or the finishing of the card intake.
Each commands are able to be executed and check the status even after the time out.
The negative response is sent immediately, when the card jam occur.
The positive response and negative response is sent with the card sensor status byte Se.
The bit assignment of the Se byte is the following which is same as the response of the status command.
b7 b0
Se= 0 X X X X X X X (binary)
Card Width Sensor (full shutter model) or PD1 (pin shutter model)
1: Card exists, 0: Card does not exist
PD2 1: Card exists, 0: Card does not exist
PD3 1: Card exists, 0: Card does not exist
PD4 1: Card exists, 0: Card does not exist
PI1 1: Shutter Close, 0: Shutter Open
PI2 1: IC Contact is set, 0: IC Contact is not set
(The IC contact is set mechanically at the card entry)
CAP 1: Capture Sensor Connector High Level
0: Capture Sensor Connector Low Level
(This connector terminal is pulled up, therefore this bit
is 1 when the connector is open or no mount. )
CONFIDENTIAL No ASL - NP – 17749 – 01 33
pm="1" Intake command (waiting card insertion and take in the card)
(31h) This command enables the card intake and watch the finishing of the card intake.
The positive response is sent immediately, if the ICRW receive this command after the card intake.
The intake enable state is kept after the time out. Therefore, the card can be take in at the interval of the
sequential intake command. If the time out is occur while the card intake, the card intake is continued and
negative response is sent.
pm="2" Intake command with magnetic records detection (waiting card insertion and take in the card with
(32h) magnetic records check).
This command check the magnetic record while the intake.
The no magnetic records error "24"(32h,34h) is sent, if the magnetic records are not detected.
The decode error of the magnetic records are not checked in this command.
“C” “:” mg
Command pm
(43h) (3Ah) (1byte)
“P” “:”
Positive response pm st1 st0
(50h) (3Ah)
“N” “:”
Negative response (4Eh) (3Ah)
pm e1 e0
Control command to accept/inhibit card entry. ICRW sends response upon receipt of this command.
ICRW status should be recognized by Status request command from HOST.
Choose Enable/Disable command or Entry command according to customer's control system.
Although a card will be taken in if the enable command is executed when the discharged card is in a gate
position, the reading result of magnetic data is not guaranteed.
Since execution of the entry command becomes impossible at the time of enable command execution,
combined use of the enable command and the entry command cannot be performed.
Notes; 1) Enable mode change automatically to Disable mode in case of the following conditions.
* Receipt of Initialize command.
* When power failure occurred.
* ICRW detects DSR signal off.
CONFIDENTIAL No ASL - NP – 17749 – 01 35
“C” “=” d0
Command pm
(43h) (3Dh) (1byte)
“N” “=”
Negative response (4Eh) (3Dh)
pm e1 e0
This is to check ICRW in maintenance. Operation checks can be done by this command
for the motor, the solenoids, the switch, and the sensors.
b7 b0
d0= 0 1 X 0 X X X X (binary)
b7 b0
Se= 0 X X X X X X X (binary)
Card Width Sensor (full shutter model) or PD1 (pin shutter model)
1: Card exists, 0: Card does not exist
PD2 1: Card exists, 0: Card does not exist
PD3 1: Card exists, 0: Card does not exist
PD4 1: Card exists, 0: Card does not exist
PI1 1: Shutter Close, 0: Shutter Open
PI2 1: IC Contact is set, 0: IC Contact is not set
CAP 1: Capture Sensor Connector High Level
0: Capture Sensor Connector Low Level
(This connector terminal is pulled up, therefore this bit
is 1 when the connector is open or no mount. )
MCF, SOL ON
The normal mode shows command modes other than the maintenance mode.
The method of going into the maintenance mode from the normal mode is only transmitting "C=0"
command shown in the above figure.
In order to return from the maintenance mode to the normal mode, please transmit "C=1" command shown
in the above figure.
However, Initialize command is executed, after returning to the normal mode, when transmitting Initialize
command into the maintenance mode.
CONFIDENTIAL No ASL - NP – 17749 – 01 37
“C” “>”
Command pm
(43h) (3Eh)
“P” “>”
Positive response pm st1 st0 v1h v1l v2h v2l v3h v3l v4h v4l
(50h) (3Eh)
“N” “>”
Negative response (4Eh) (3Eh)
pm e1 e0
This command converts voltage level of photo sensor from Analog to Digital and reports the value.
"vih", "vil" are upper nibble and lower nibble divided from 1 byte of A/D conversion value and "0"(30h)
added respectively.
pm="0" Emission amount of LED is normal level. If sensor voltage is less than 4.2V without any presence of
(30h) card on sensor, the sensor cleaning must be done as soon as possible. (Attention)
If sensor voltage is less than 3.0V, maintenance such as sensor cleaning must be done immediately
( Warning ) .
“C” “A”
Command pm
(43h) (41h)
“N” “A”
Negative response pm e1 e0
(4Eh) (41h)
pm="1" Indicates User program code area revision in positive response. (Data length = 8)
(31h) ex) "3432-01D"
pm="2" Indicates EMV controller's firmware revision in positive response. (Data length = 8)
(32h) ex) "2491-02C"
pm="3" Sends the EMV approval number to HOST(Data length = 21). Before EMV approved, 21 bytes space
characters return. EMV approval number is checked by specification.
(33h) ex) "11711 1203 400 20 FIM"
pm="4" (Reserve)
Note) This parameter is left for compatibility with an old ICRW. 22 bytes space characters return.
pm="5" Sends the IFM Identification of the EMV approval to HOST (Data length = 11). IFM Identification is checked
by specification.
(35h) ex) " IFM0K0-0400"
CONFIDENTIAL No ASL - NP – 17749 – 01 39
“N” “C”
Negative response pm e1 e0
(4Eh) (43h)
pm="2" This command reports cards pass count of the card transport in the ICRW.
(32h) One pass is one round trip of the card in the transport.
The pass count number is reported as the seven digit of ASCII decimal number.
This command activates an IC card. The ICRW supplies power (VCC) and clock (CLK), and releases
reset (RST).
Vcc="0" The ICRW supplies +5V to the VCC and activates according to the EMV version 4.2.
(30h)
Vcc="3" The ICRW supplies +5V to the VCC and activates according to the ISO/IEC7816-3:2006.
(33h)
Vcc="5" The ICRW supplies +3V to the VCC and activates according to the ISO/IEC7816-3:2006.
(35h) After receiving the ATR, the ICRW changes the voltage of the VCC in accordance with the T=15 value of
the ATR.
Vcc="6" The ICRW supplies with +5V to the VCC and activates according to the
(36h) ISO/IEC7816-3:2006. After receiving the ATR, the ICRW changes the voltage to the VCC in accordance
with the T=15 value of the ATR.
Vcc="8" The ICRW activates ICC according to ISO/IEC7816-3:2006. VCC is supplied in order of 5V, 3V, and
B
(38h) 1.8V.
Vcc="@" The ICRW supplies +5V to the VCC and activates according to the MONEO card specification.
(40h)
The Vcc parameter can be omitted, and the default value is "0"(30h).
Note) Vcc=30H is used on EMV comply card.
B Vcc=33H is used on old ISO/IEC7816-3 card. (only 5v card)
Vcc=35H (VCC=3V then 5V), Vcc=36H(VCC=5V then 3V) and Vcc=38H(5V, 3V then 1.8V) are
used on ISO/IEC7816-3:2006 card.
Also, Answer To Reset (ATR) from the IC card is received and transmitted to the HOST.
When a power failure is detected while a power supply is supplied to the IC card, the error code
"60"(36,30) is returned.
If the activation error is occurred, the ICRW initiate the deactivation sequence, and sends the error code "
61"(36h,31h), "63"(36h,33h) or "64"(36h,34h).
When the Vcc parameter "0"(30h) is selected and the ATR value is not based on the EMV, the ICRW
initiate the deactivation sequence, and sends the error code "69"(36h,39h).
B When the Vcc parameter "3"(33h), "5"(35h) ,"6"(36h) or "8"(38h) are selected and the ATR value is not
supported by the ICRW, the ICRW initiates the deactivation sequence, and sends the error code "
66"(36h,36h).
The Vcc parameter is not related to the IC card communication. The IC card communication complies
CONFIDENTIAL No ASL - NP – 17749 – 01 41
The activation command "CI0@" (Vcc="@"(40h)) is only for the MONEO application with the MONEO
card. For the other application (CB, EMV and others) with the MONEO card, the activation commands
B
"CI00","CI03","CI05", "CI06" or "CI08" are available.
The IC card automatic communication command "CI9" must be used after the ICC activation by "CI0@".
Power on
VCC
CLK
RST
380 ~ 42000 clk
12msec 370 ~ 42100 clk
B
41000clk
42100clk ATR wait
TYP.
CONFIDENTIAL No ASL - NP – 17749 – 01 42
Power off
VCC
CLK
RST
B 1-10msec.
1msec.
CONFIDENTIAL No ASL - NP – 17749 – 01 43
The ICRW reports the state of the IC card in the sti of a positive response.
b7 b0
B sti= 0 1 0 0 X X X X (binary)
sti
B b7 b6 b5 b4 b3 b2 b1 b0 Meaning
0 1 0 X - - - - V18
0 1 0 0 - - - - - VCC is defined by V5V3
0 1 0 1 - - - - - VCC=1.8V
0 1 0 - X X - - CLK frequency
0 1 0 - 0 0 - - - No clock
0 1 0 - 0 1 - - - CLK=3.58MHz
0 1 0 - 1 0 - - - CLK=7.16MHz
0 1 0 - 1 1 - - - Reserve
0 1 0 - - - X - V5V3
0 1 0 - - - 0 - - VCC=5V if V18=0
0 1 0 - - - 1 - - VCC=3V if V18=0
0 1 0 - - - - X Active
0 1 0 - - - - 0 - Inactive
0 1 0 - - - - 1 - Active
While a power supply is supplied to the IC card, the ICRW monitors the VCC (the power supply line of the
IC card). The error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 44
This command exchanges data with the IC card using protocol T=0.
In this command, the HOST has to set the "C-APDU" data.
px="3" The received data from the IC card is 258 bytes or less.
(33h)
px="5" The received data from the IC card is 259 bytes or more.
(35h) The ICRW requires the following R-APDU data receiving.
The HOST has to receive the remaining R-APDU data using the "CI7" command.
The maximum data size which can be handled with the ICRW is 261 bytes. If the ICRW receives 262
bytes data from the HOST, the ICRW sends the error code "04"(30h,34h) to the HOST. The maximum
length of the R-APDU in the positive response is 258 bytes. If the R-APDU length from the IC card is 259
bytes or more, the ICRW returns the response with the parameter px="5"(35h) and first 258 bytes data.
The remaining R-APDU data are sent as the positive response data of the command "CI7".
While a power supply is supplied to the IC card, the ICRW monitors the VCC (the power supply line of
the IC card). The ICRW is returned the error code "60"(36h,30h) when a power failure is detected.
If the protocol type of the IC card is not T=0, error code "62"(36h,32h) is sent.
If IC card does not respond within WWT(Working Wait Time), the ICRW deactivates the IC card and the
error code "63"(36h,33h) is sent.
If any other protocol error occurs, the ICRW deactivates the IC card and the error code "64"(36h,34h) is
sent. If HOST tries to communicate before the IC card activation, the error code "65"(36h,35h) is sent.
Note) Licc is the data length which the IC card returns. Please refer to the specifications of the IC card
about Licc.
CONFIDENTIAL No ASL - NP – 17749 – 01 45
This command exchanges data with the IC card using the protocol T=1.
In this command, the HOST has to set the "C-APDU" data. The ICRW adds the Prologue field and the
Epilogue field to the "C-APDU", and sends to the IC card.
If the C-APDU length is greater than the information field size for the IC card (IFSC), the ICRW divides the
C-APDU into several consecutive blocks.
chip data NAD PCB LEN CLA INS P1 P2 Lc Data1 .. Data(Lc) Le EDC
Prologue field Information field Epilogue
field
The ICRW sets the R-APDU data which received from the IC card into the positive response,
and transmits to the HOST.
Prologue field Information field Epilogue field
chip data NAD PCB LEN Data1 ... Data(Licc) SW1 SW2 EDC
px="4" The received R-APDU from the IC card is 258 bytes or less.
(34h)
px="?" The ICRW received the S(ABORTrequest) block from the IC card, suspended the data transmission to
(3Fh) the IC card, and deactivated the IC card. The HOST has to stop the following data transmitting.
The maximum data size which can be handled by the ICRW is 261 bytes. If the ICRW receives more
than 262 bytes data from the HOST, the ICRW sends the error code "04"(30h,34h) to the HOST.
When the C-APDU data size is 262 bytes or more, the HOST has to transmit the C-APDU exceeding
261 bytes using the command "CI5" and "CI6".
The maximum length of the R-APDU in the positive response is 258 bytes. If the R-APDU length from
the IC card is 259 bytes or more, ICRW returns the response with the parameter px="5"(35h) and first
CONFIDENTIAL No ASL - NP – 17749 – 01 46
While a power supply is supplied to the IC card, the ICRW monitors the VCC (the power supply line of
the IC card). The error "60"(36h,30h) is returned when a power failure is detected.
If the protocol type of IC card is not T=1, the error code "62"(36h,32h) is sent.
If the IC card does not respond within BWT(Block Waiting Time) or CWT(Character Waiting Time), the
ICRW deactivates the IC card and the error code "63"(36h,33h) is sent.
If any other protocol error occurs, the ICRW deactivates the IC card and the error code "64"(36h,34h) is
sent.
If the HOST tries to communicate before the IC card activation, the error code "65"(36h,35h) is sent.
In case there is any trouble in the sequence of command receiving, the error code "02"(30h,32h) is sent.
If the error code "02"(30h,32h) is sent, please re-start from the activation.
Note) The Licc is data length which the IC card returns. Please refer to specifications of the IC card about
length of Licc.
CONFIDENTIAL No ASL - NP – 17749 – 01 47
“P” “I”
Positive response px st1 st0
(50h) (49h)
This command transmits the C-APDU exceeding 261 bytes to the IC card. The HOST has to divide
the C-APDU into 261 bytes or less and transmits using this command repeatedly.
px="7" The ICRW requires the following C-APDU data to the IC card. There is no data portion of the positive
(37h) response. The HOST has to transmit the remaining C-APDU data using the command "CI5" or "CI6".
px="?" The ICRW received the S(ABORTrequest) block from the IC card, suspended the data transmission to
(3Fh) the IC card, and deactivated the IC card. The HOST has to stop the following data transmitting.
While a power supply is supplied to the IC card, the ICRW monitors the VCC (the power supply line of
the IC card). The error code "60" is returned when a power failure is detected.
If the protocol type of the IC card is not T=1, the error code "62"(36h,32h) is sent.
If the IC card does not respond within BWT(Block Waiting Time) or CWT(Character Waiting Time), the
ICRW deactivates the IC card and error code "63"(36h,33h) is sent.
If any other protocol error occurs, the ICRW deactivates the IC card and the error code "64"(36h,34h) is
sent.
If the HOST tries to communicate before the IC card activation, the error code "65"(36h,35h) is sent.
CONFIDENTIAL No ASL - NP – 17749 – 01 48
This command is used for transmitting the last part of the devided C-APDU. The size of the last data
which can be transmitted is 261 bytes or less.
px="4"(34h) The received R-APDU from the IC card is 258 bytes or less.
px="5"(35h) The received R-APDU from the IC card is 259 bytes or more.
The ICRW requires the following R-APDU data receiving.
The HOST has to receive the remaining R-APDU data using the "CI7" command.
px="?"(3Fh) The ICRW received the S(ABORTrequest) block from the IC card, suspended the data transmission
to the IC card, and deactivated the IC card. The HOST has to stop the following data transmitting.
While a power supply is supplied to the card, the ICRW monitors the VCC (the power supply line of the
card). The error "60"(36h,30h) is returned when a power failure is detected.
If protocol type of the IC card is not T=1, the error code "62"(36h,32h) is sent.
If the IC card does not respond within BWT(Block Waiting Time) or CWT(Character Waiting Time), the
ICRW deactivates the IC card and error code "63"(36h,33h) is sent.
If any other protocol error occurs, the ICRW deactivates the IC card and the error code "64"(36h,34h) is
sent.
If the HOST tries to communicate before the IC card activation, the error code "65"(36h,35h) is sent.
CONFIDENTIAL No ASL - NP – 17749 – 01 49
This command is used for receiving the divided R-APDU exceeding 258 bytes. The HOST has to receive
all of the remaining R-APDU data using this command repeatedly until the response of this command
becomes px="6"(36h).
px="5"(35h) The received R-APDU from the IC card is 259 bytes or more.
The ICRW requires the following R-APDU data receiving.
The HOST has to receive the remaining R-APDU data using "CI7" command.
px="6"(36h) There is no remaining R-APDU data from the IC card.
px="?"(3Fh) The ICRW received the S(ABORTrequest) block from the IC card, suspended the data transmission
to the IC card, and deactivated the IC card. The HOST has to stop the following data transmitting.
While a power supply is supplied to the card, the ICRW monitors the VCC (the power supply line of the
card). The error "60"(36h,30h) is returned when a power failure is detected.
If the IC card does not respond within WWT(T=0), BWT(T=1) or CWT(T=1), ICRW deactivates the IC
card and the error code "63"(36h,33h) is sent.
If any other protocol error occurs, the ICRW deactivates the IC card and the error code "64"(36h,34h) is
sent.
If HOST tries to communicate before an IC card activation, the error code "65"(36h,35h) is sent.
CONFIDENTIAL No ASL - NP – 17749 – 01 50
The ICRW sends a reset pulse, keeping the state where the IC card is activated (VCC,CLK), and
receives the ATR from the IC card again (Warm Reset).
If the ATR is not supported by the ICRW with the selected condition at the activate command, the ICRW
initiate the deactivation sequence, and sends the error code "66"(36h,36h) or "69"(36h,39h) with the ATR.
If the ATR receive error is occurred, the ICRW initiate the deactivation sequence, and sends the error
code " 61"(36h,31h), "63"(36h,33h) or "64"(36h,34h).
The ICRW returns error code "65"(36h,35h) if the IC card does not activated.
While a power supply is supplied to the IC card, the ICRW monitors the VCC (the power supply line of the
IC card). The error code "60"(36h,30h) is returned when a power failure is detected.
VCC
CLK
41000clk
42100clk ATR wait
TYP.
CONFIDENTIAL No ASL - NP – 17749 – 01 51
This command exchanges data with the IC card using the protocol T=0 or T=1. These protocols are
selected automatically by the ICRW. In this command, the HOST has to set "C-APDU" data.
Other functions are same as "CI3" or "CI4".
px="4"(34h) The received R-APDU from the IC card is 258 bytes or less.
px="5"(35h) The received R-APDU from the IC card is 259 bytes or more.
The ICRW requires the following R-APDU data receiving.
The HOST has to receive the remaining R-APDU data using "CI7" command.
px="?"(3Fh) The ICRW received the S(ABORTrequest) block from the IC card, suspended the data transmission
to the IC card, and deactivated the IC card. The HOST has to stop the following data transmitting.
While a power supply is supplied to the IC card, the ICRW monitors the VCC (the power supply line of the
card). The ICRW is returned the error code "60"(36h,30h) when a power failure is detected.
If the IC card does not respond within WWT(T=0), BWT(T=1) or CWT(T=1), the ICRW deactivates the IC
card and error code "63"(36h,33h) is sent. If any other protocol error occurs, the ICRW deactivates the IC
card and the error code "64"(36h,34h) is sent. If the HOST tries to communicate with this command
before the IC card activation, the error code "65"(36h,35h) is sent.
When the protocol is T=1 and C-APDU data is 262 bytes or more, the HOST has to use "CI5" and "CI6"
to sends the following C-APDU data.
CONFIDENTIAL No ASL - NP – 17749 – 01 52
“P” “I”
Positive response px st1 st0 R-APDU
(50h) (49h)
“N” “I”
Negative response pm er1 er0
(4Eh) (49h)
This command decrypts offlince PIN block of C-APDU and changes into plaintext verify command, then
transmits to an IC card.
This function intends the plain text offline PIN block (8bytes fixed) defined by the verify command which
P2 value is 80h to transmit ICRW safely.
The Key for decrypting PIN is set by "Key loading for the Plaintext offline PIN verification" command.
If "Device authentication data exchange and key exchange key loading" command or "Key loading for
the Plaintext offline PIN verification" command are not completed, error code "06"(30h,36h) is sent.
Reference:
The plaintext offline PIN block shall be formatted as follows:
Where
Name Value
C Control field Binary 2 (hex. 0010)
N PIN length 4-bit binary number with permissible values of hex. 0100 to hex. 1100
P PIN digit 4-bit field with permissible values of hex. 0000 to hex. 1001
P/F PIN / filler Determined by PIN length
F Filler 4-bit binary number with value of hex. 1111
This command activates a SAM. The ICRW supplies power (VCC) and clock (CLK), and releases reset
(RST).
Vcc="0" The ICRW supplies +5V to the VCC and activates according to the EMV version 4.2.
(30h)
Vcc="3" The ICRW supplies +5V to the VCC and activates according to the ISO/IEC7816-3:2006.
(33h)
Vcc="5" The ICRW supplies +3V to the VCC and activates according to the ISO/IEC7816-3:2006.
(35h) After receiving the ATR, the ICRW changes the voltage of the VCC in accordance with the T=15 value of
the ATR.
Vcc="6" The ICRW supplies with +5V to the VCC and activates according to the
(36h) ISO/IEC7816-3:2006. After receiving the ATR, the ICRW changes the voltage to the VCC in accordance
with the T=15 value of the ATR.
Vcc="8" The ICRW activates ICC according to ISO/IEC7816-3:2006. VCC is supplied in order of 5V, 3V, and
B
(38h) 1.8V.
Vcc="@" The ICRW supplies +5V to the VCC and activates according to the MONEO card specification.
(40h)
The Vcc parameter can be omitted, and the default value is "0"(30h).
Note) Vcc=30H is used on EMV comply card.
B Vcc=33H is used on old ISO/IEC7816-3 card. (only 5v card)
Vcc=35H (VCC=3V then 5V), Vcc=36H(VCC=5V then 3V) and Vcc=38H(5V, 3V then 1.8V) are
used on ISO/IEC7816-3:2006 card.
Also, Answer To Reset (ATR) from the SAM is received and transmitted to the HOST.
When a power failure is detected while a power supply is supplied to the SAM, the error code
"60"(36h,30h) is returned.
If the ATR receive error is occurred, the ICRW initiate the deactivation sequence, and sends the error
code " 61"(36h,31h), "63"(36h,33h) or "64"(36h,34h).
When the Vcc parameter "0"(30h) is selected and the ATR value is not based on the EMV2000 ver.4.0,
the ICRW initiate the deactivation sequence, and sends the error code " 69"(36h,39h).
When the Vcc parameter "3"(33h), "5"(35h) or "6"(36h) are selected and the ATR value is not supported
by the ICRW, the ICRW initiates the deactivation sequence, and sends the error code " 66"(36h,36h).
The Vcc parameter is not related to the SAM communication. The SAM communication complies with
the EMV version 4.2
CONFIDENTIAL No ASL - NP – 17749 – 01 54
The activation command "CI@@" (Vcc="@"(40h)) is only for the MONEO application with the MONEO
card. For the other application (CB, EMV and others) with the MONEO card, the activation commands
B
"CI@0","CI@3","CI@5" , "CI@6" or "CI@8" are available.
The SAM automatic communication command "CII" must be used after the SAM activation by "CI@@".
Power on
VCC
CLK
RST
380 ~ 42000 clk
B 12msec 370 ~ 42100 clk
41000clk
42100clk ATR wait
TYP.
CONFIDENTIAL No ASL - NP – 17749 – 01 55
Power off
VCC
CLK
RST
1-10msec.
B 1msec.
CONFIDENTIAL No ASL - NP – 17749 – 01 56
The ICRW reports the state of the SAM in the sti of the positive response.
B b7 b0
sti= 0 1 0 0 X X X X (Binary)
sti
B b7 b6 b5 b4 b3 b2 b1 b0 Meaning
0 1 0 X - - - - V18
0 1 0 0 - - - - - VCC is defined by V5V3
0 1 0 1 - - - - - VCC=1.8V
0 1 0 - X X - - CLK frequency
0 1 0 - 0 0 - - - No clock
0 1 0 - 0 1 - - - CLK=3.58MHz
0 1 0 - 1 0 - - - CLK=7.16MHz
0 1 0 - 1 1 - - - Reserve
0 1 0 - - - X - V5V3
0 1 0 - - - 0 - - VCC=5V if V18=0
0 1 0 - - - 1 - - VCC=3V if V18=0
0 1 0 - - - - X Active
0 1 0 - - - - 0 - Inactive
0 1 0 - - - - 1 - Active
CONFIDENTIAL No ASL - NP – 17749 – 01 57
And also, ICRW reports the number of the selected SAM with stj.
Before selecting SAM number, ICRW responds that ICRW selects SAM2.
b7 b0
stj= 0 0 1 1 0 X X X (binary)
Selected number
000:(SAM1 R.F.U.)
001: SAM 2 (option)
010: SAM 3 (option)
011: SAM 4 (option)
100: SAM 5 (option)
While a power supply is supplied to the SAM, the ICRW monitors the VCC (the power supply line of the
SAM). The error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 58
This command exchanges data with the SAM using protocol T=0.
In this command, the HOST has to set the "C-APDU" data.
The maximum data size which can be handled with the ICRW is 261 bytes. If the ICRW receives 262
bytes data from the HOST, the ICRW sends the error code "04"(30h,34h) to the HOST. The maximum
length of the R-APDU in the positive response is 258 bytes. If the R-APDU length from the SAM is 259
bytes or more, the ICRW returns the response with the parameter px="E"(45h) and first 258 bytes data.
The remaining R-APDU data are sent as the positive response data of the command "CIG".
While a power supply is supplied to the SAM, the ICRW monitors the VCC (the power supply line of the
SAM).
The ICRW is returned the error code "60"(36h,30h) when a power failure is detected.
If the protocol type of the SAM is not T=0, the error code "62"(36h,32h) is sent.
If the SAM does not respond within WWT(Working Wait Time), the ICRW deactivates the SAM and the
error code "63"(36h,33h) is sent.
If any other protocol error occurs, the ICRW deactivates the SAM and the error code "64"(36h,34h) is
sent.
If the HOST tries to communicate before the SAM activation, the error code "65"(36h,35h) is sent.
Note) Licc is the data length which the SAM returns. Please refer to the specifications of the SAM about
Licc.
CONFIDENTIAL No ASL - NP – 17749 – 01 59
This command exchanges data with the SAM using the protocol T=1.
In this command, the HOST has to set the "C-APDU" data. The ICRW adds the Prologue field and the
Epilogue field to the "C-APDU", and sends to the SAM.
If the C-APDU length is greater than the information field size for the SAM (IFSC), the ICRW divides
the C-APDU into several consecutive blocks.
chip data NAD PCB LEN CLA INS P1 P2 Lc Data1 .. Data(Lc) Le EDC
Prologue field Information field Epilogue
field
The ICRW sets the R-APDU information field which received from the SAM into the positive response,
and transmits to the HOST.
px="D"(44h) The received R-APDU from the SAM is 258 bytes or less.
px="E"(45h) The received R-APDU from the SAM is 259 bytes or more.
The ICRW requires the following R-APDU receiving to the HOST.
The HOST has to receive the remaining R-APDU data using "CIG" command.
px="O"(4Fh) The ICRW received the S(ABORTrequest) block from the SAM, suspended the data transmission
to the SAM, and deactivated the SAM. The HOST has to stop the following data transmitting.
The maximum data size which can be handled by the ICRW is 261 bytes. If the ICRW receives 262
bytes data from the HOST, the ICRW sends the error code "04"(30h,34h) to the HOST.
When the C-APDU data size is 262 bytes or more, the HOST has to transmit the C-APDU
exceeding 261 bytes using the command "CIE" and "CIF".
The maximum length of the R-APDU in the positive response is 258 bytes. If the R-APDU length
from the SAM is 259 bytes or more, ICRW returns the response with the parameter px="5"(35h) and
first 258 bytes data.
The remaining R-APDU data are sent as the positive response data of the command "CIG".
CONFIDENTIAL No ASL - NP – 17749 – 01 60
While a power supply is supplied to the SAM, the ICRW monitors the VCC (the power supply line of
the SAM). The error "60"(36h,30h) is returned when a power failure is detected.
If the protocol type of the SAM is not T=1, the error code "62"(36h,32h) is sent.
If the SAM does not respond within BWT(Block Waiting Time) or CWT(Character Waiting Time),
the ICRW deactivates the SAM and the error code "63"(36h,33h) is sent.
If any other protocol error occurs, the CRW deactivates the SAM and the error code "64"(36h,34h) is
sent.
If the HOST tries to communicate before the SAM activation, the error code "65"(36h,35h) is sent.
In case there is any trouble in sequence of command receiving, the error code "02"(30h,32h) is sent.
If the error code "02"(30h,32h) is sent, please re-start from activation.
Note) The Licc is data length which the SAM returns. Please refer to specifications of the SAM about
length of Licc.
CONFIDENTIAL No ASL - NP – 17749 – 01 61
“P” “I”
Positive response px st1 st0
(50h) (49h)
This command transmits the C-APDU exceeding 261 bytes to the SAM. The HOST has to divide the
C-APDU into 261 bytes or less and transmits using this command repeatedly.
px="G"(47h) The ICRW requires the following C-APDU data to the SAM. There is no data portion of the positive
response. The HOST has to transmit the remaining C-APDU data using the command "CIE" or "CIF".
px="O"(4Fh) The ICRW received the S(ABORTrequest) block from the SAM, suspended the data transmission to
the SAM, and deactivated the SAM. The HOST has to stop the following data transmitting.
While a power supply is supplied to the SAM, the ICRW monitors the VCC (the power supply line of the
SAM). The error code "60"(36h,30h) is returned when a power failure is detected.
If the protocol type of the SAM is not T=1, the error code "62"(36h,32h) is sent.
If the SAM does not respond within BWT(Block Waiting Time) or CWT(Character Waiting Time), the
ICRW deactivates the SAM and error code "63"(36h,33h) is sent.
If any other protocol error occurs, the ICRW deactivates the SAM and the error code "64"(36h,34h) is
sent.
If the HOST tries to communicate before the SAM activation, the error code "65"(36h,35h) is sent.
CONFIDENTIAL No ASL - NP – 17749 – 01 62
This command is used for transmitting the last part of the devided C-APDU. The size of the last data
which can be transmitted is 261 bytes or less.
px="D"(44h) The received R-APDU from the SAM is 258 bytes or less.
px="E"(45h) The received R-APDU from the SAM is 259 bytes or more.
The ICRW requires the following R-APDU data receiving.
The HOST has to receive the remaining R-APDU data using the "CIG" command.
px="O"(4Fh) The ICRW received the S(ABORTrequest) block from the SAM, suspended the data transmission to
the SAM, and deactivated the SAM. The HOST has to stop the following data transmitting.
While a power supply is supplied to the card, the ICRW monitors the VCC (the power supply line of the
SAM). The error "60"(36h,30h) is returned when a power failure is detected.
If protocol type of the SAM is not T=1, the error code "62"(36h,32h) is sent.
If the SAM does not respond within BWT(Block Waiting Time) or CWT(Character Waiting Time), the
ICRW deactivates the SAM and error code "63"(36h,33h) is sent.
If any other protocol error occurs, the ICRW deactivates the SAM and the error code "64"(36h,34h) is
sent. If the HOST tries to communicate before the SAM activation, the error code "65"(36h,35h) is sent.
CONFIDENTIAL No ASL - NP – 17749 – 01 63
This command is used for receiving the divided R-APDU exceeding 258 bytes. The HOST has to receive
all of the remaining R-APDU data using this command repeatedly until the response of this command
becomes px="F"(46h).
px="E"(45h) The received R-APDU from the SAM is 259 bytes or more.
The ICRW requires the following R-APDU data receiving.
The HOST has to receive the remaining R-APDU data using "CIG" command.
px="F"(46h) There is no remaining R-APDU data from the SAM.
px="O"(4Fh) The ICRW received the S(ABORTrequest) block from the SAM, suspended the data transmission to
the SAM, and deactivated the SAM. The HOST has to stop the following data transmitting.
While a power supply is supplied to the SAM, the ICRW monitors the VCC (the power supply line of the
SAM).The error "60"(36h,30h) is returned when a power failure is detected.
If the SAM does not respond within WWT(T=0), BWT(T=1) or CWT(T=1), the ICRW deactivates the
SAM and the error code "63"(36h,33h) is sent.
If any other protocol error occurs, the ICRW deactivates the SAM and the error code "64"(36h,34h) is
sent.
If the HOST tries to communicate before the SAM activation, the error code "65"(36h,35h) is sent.
CONFIDENTIAL No ASL - NP – 17749 – 01 64
The ICRW sends a reset pulse, keeping the state where the SAM is activated (VCC,CLK), and receives
the ATR from the SAM again (Warm Reset).
If the ATR is not supported by the ICRW with the selected condition at the activate command, the ICRW
initiate the deactivation sequence, and sends the error code "66"(36h,36h) or "69"(36h,39h) with the ATR.
If the ATR receive error is occurred, the ICRW initiate the deactivation sequence, and sends the error
code " 61"(36h,31h), "63"(36h,33h) or "64"(36h,34h).
The ICRW returns error code "65"(36h,35h) if the SAM does not activated.
While a power supply is supplied to the SAM, the ICRW monitors the VCC (the power supply line of the
SAM). The error code "60"(36h,30h) is returned when a power failure is detected.
VCC
CLK
This command exchanges data with the SAM using the protocol T=0 or T=1. These protocols are
selected automatically by the ICRW. In this command, the HOST has to set "C-APDU" data.
Other functions are same as "CIC" or "CID".
px="D"(44h) The received R-APDU from the SAM is 258 bytes or less.
px="E"(45h) The received R-APDU from the SAM is 259 bytes or more.
The ICRW requires the following R-APDU data receiving.
The HOST has to receive the remaining R-APDU data using "CIG" command.
px="O"(4Fh) The ICRW received the S(ABORTrequest) block from the SAM, suspended the data transmission
to the SAM, and deactivated the SAM. The HOST has to stop the following data transmitting.
While a power supply is supplied to the SAM, the ICRW monitors VCC (the power supply line of the
SAM).The ICRW is returned the error code "60"(36h,30h) when a power failure is detected.
If the SAM does not respond within WWT(T=0), BWT(T=1) or CWT(T=1), the ICRW deactivates the
SAM and error code "63"(36h,33h) is sent.
If any other protocol error occurs, the ICRW deactivates the SAM and the error code "64"(36h,34h) is
sent.
If the HOST tries to communicate with this command before the SAM activation, the error code
"65"(36h,35h) is sent.
When the protocol is T=1 and C-APDU data is 262 bytes or more, the HOST has to use "CI5" and "CI6"
to sends the following C-APDU data.
CONFIDENTIAL No ASL - NP – 17749 – 01 66
This command selects the SAM 2,3,4 or 5. The SAM 1 is reserved for future use(R.F.U).
These SAMs are available by connecting the external SAM board (option).
Sel = "0"(30h):(SAM 1(R.F.U.))
Sel = "1"(31h): SAM 2. (option)
Sel = "2"(32h): SAM 3. (option)
Sel = "3"(33h): SAM 4. (option)
Sel = "4"(34h): SAM 5. (option)
The SAM commands for each SAM are available after selecting the SAM by this command.
The SAM2 is the default value before selecting the SAM using this command.
CONFIDENTIAL No ASL - NP – 17749 – 01 67
Switch the control to Supervisor program code area from User program code area.
Note: Start from Initialize command of Supervisor program code area after the switch is completed.
Usual operation
CONFIDENTIAL No ASL - NP – 17749 – 01 68
This command activates the memory card. ICRW supply power (Vcc) and clock(CLK),
and assert reset (RST) signal. Then, the memory card is activated and return ATR.
ICRW returns a negative response when proper ATR isn't received from the memory card.
An error code "60"(36h,30h) is returned when a power failure is recognized while a power supply is
supplied to the card.
type :"1"(31h)
This is for the case to select SLE4406.
No ATR data check is executed, and return ATR.
If the card is activated properly with this command,
only SLE4406 command can be executed
: No definition or "0"(30h)
This is for the case to select all memory cards.
ICRW automatically judges the type of memory card by ATR data.
If the card is activated properly, the command of the memory card
of the judged kind can be executed.
Refer to the following table for the judgement.
Power on
CLK
Vcc
CLK
RST
CONFIDENTIAL No ASL - NP – 17749 – 01 70
This command report the status of Siemens memory card in "str" byte.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the card).
An error "60"(36h,30h) is returned when a power failure is detected.
b7 b0
str= 0 1 0 0 0 X X X (binary)
The SLE4442 memory card has no protocol handler in it. So, ICRW builds in protocol handler to
control the memory card. When a usual IC card is controlled, ICRW doesn't check the contents of the
data. (A message is transmitted and received between ICRW and the IC card) Then, the data that it
was received from HOST are transmitted through ICRW to the IC card.
About SLE4442, ICRW must control the signal line of the memory card directly about each data
transmission by the hardware. Therefore, some functions to control SLE4442 were prepared in ICRW.
These functions are specified by a command data form like C-APDU which format is based on ISO/IEC
7816-3 T=0 standard.
Therefore, ICRW recognizes the meaning of the command data, and carries out the treatment related
to the card by controlling hardware.
After the command was executed properly, ICRW returns a positive response with response data
9000h like from the IC card.
When an error occurs during the communication with SLE4442, ICRW returns a positive response with
status information in response data "SW1+SW2" which is based on the ISO/IEC7816-3 T=0 standard.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the
card). An error "60" is returned when a power failure is detected.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the
card). An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 72
The security code inside the security memory can't be read properly if the check of PSC (programmable
security code) isn't finished normally. ICRW returns three bytes of 00h as the security code
ICRW handles the data of all 32bits in the security memory as the data on 4bytes.
The contents (32bit) of the security memory can be read with the following command.
ex). "CR3" + 00B0020004 h
ICRW reads data from the security memory of SLE4442, and transmits data on cd h bytes from the
address ab h.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the
card). An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 73
ICRW writes data in the main memory. ICRW returns a result after written data are checked.
Before doing this operation, PSC (Programmable Security Code) check must be done.
The capacity of the main memory is 256 bytes. The byte number "00" of data to write means 256bytes.
The example that data are written in the whole area of the main memory is shown in the following.
ex). "CR3" + 00D0000000 h + Write Data (256byte)
After command execution, ICRW returns response with 9000h or sw1+sw2 as the result.
If the addressed data on main memory is protected by the protection memory, the write operation is not
available.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the
card). An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 74
ICRW can set up writing protection in a part of the main memory which can be protected. Once it is set
up, the protection can't be canceled. Before doing this operation, PSC (Programmable Security Code)
check must be done.
The address of the main memory that the protection is possible is 1Fh from 00h. Each protection
condition of the protectable main memory can be controlled with 4byte (32bits) in the protection memory.
For example, if bit0 of the protection memory byte0 is '1', data on the address 00h of the main memory
are protected.
The contents of data must be presented to protect data in main memory. Therefore, the contents of the
protection memory can't be operated directly.
For example, protection is set up with the next command when the value of the address 10h of the main
memory is 20h and protection isn't set up in the bit address 10h of the protection memory.
ex). "CR3" + 00D001100120 h
After command execution, ICRW returns response with 9000h or "SW1+SW2" as the result.
ICRW reads data first from the main memory, and it is compared with the value that it was received.
When this is wrong, writing isn't begun. Protection condition can be set up at a time in the data which
continued in the main memory.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the
card). An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 75
After a PSC check is finished normally, the Reference-Data area of 3byte can be changed.
All 32bits are handled as 4bytes. How to change the Reference-Data is as the following.
ex). "CR3"+ 00D0020103123456 h
After command execution, ICRW returns response with 9000h or "SW1+SW2" as the result.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the
card). An error "60"(36h,30h) is returned when a power failure is detected.
Caution : It is only writing though data writing to Error-Counter is always possible. Therefore, be careful of writing
to Error-Counter. Or, the card can't be written any more. Error-Counter is controlled when PSC is
checked.
CONFIDENTIAL No ASL - NP – 17749 – 01 76
Before changing data, PSC(Programmable Security Code) must be checked properly with SLE4442.
Because this function should be made effective, the issue of the next command is necessary.
ex). "CR3"+ 0020030103xxxxxx h (xxxxxx : security code 3bytes)
The presented data are compared with internal Reference-Data by SLE4442 card itself.
Writing treatment becomes effective until a power supply is turned off when a check is finished normally.
The writing function of the card is lost when the command is carried out continuously three times with the
wrong code. A user must know PSC at least when a user wants to rewrite the data on SLE4442 card.
Error-Counter can be reset in the zero if PSC is given to SLE4442 card properly if the value of
Error-Counter is 2 or less.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the card).
An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 77
Same as SLE4442, The SLE4428 memory card has no protocol handler in it.
So, ICRW also builds in protocol handler to control SLE4428.
The control method of SLE4428 is done in the same way as SLE4442.
Refer to SLE4442 for the details of the contents.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the card).
An error "60"(36h,30h) is returned when a power failure is detected.
ICRW reads data from the main memory of SLE4428, and transmits data on deh bytes from the
address abch.
The capacity of the main memory is 1024bytes. The byte number 00h of data to read means 256bytes.
The head part of the main memory can be read with the following command.
ex). "CR4" + 00B0000000h
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the
card). An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 78
The protection conditions of 1024bytes of main-memory are changed into the data on 1024bits, and it is
read. 1024bits is equivalent to 128bytes. (1024 = 128 x 8)
Data to read first become protection information to address 007 h from address 000 h of main-memory in
the case of abh = 00 h. The contents of the whole protection image can be read with the following
command.
ex). "CR4" + 00B0100080 h
ICRW reads data as the protection image of SLE4428, and transmits data on cd h bytes from the
address ab h.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the card).
An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 79
The capacity of the main memory is 1024 bytes. The byte number 00h of data to write means 256bytes.
The example that data are written in from the address 100h is shown in the following.
ex). "CR4"+ 00D0010000 h + Write Data (256byte)
After command execution, ICRW returns response with 9000h or "SW1+SW2" as the result.
If the addressed data on main memory is protected, the write operation is not available.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the card).
An error "60"(36h,30h) is returned when a power failure is detected.
This command is the same as data writing except for Protect's being done at the same time with writing.
Renewal becomes impossible when data are written with this command.
CONFIDENTIAL No ASL - NP – 17749 – 01 80
ICRW can set up writing protection in a part of the main memory which can be protected. Once it is
set up, the protection can't be canceled. Before doing this operation, PSC (Programmable Security
Code) check must be done. The contents of data must be presented to protect data in main memory.
For example, protection is set up with the next command when the value of the address 010 h of the
main memory is 20 h and protection isn't set up.
ex). "CR4" + 00D020100120 h
After command execution, ICRW returns response with 9000h or "SW1+SW2" as the result.
ICRW reads data first from the main memory, and it is compared with the value that it was received.
When this is wrong, writing isn't begun.
Protection condition can be set up at a time in the data which continued in the main memory.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the
card). An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 81
Before changing data, PSC(Programmable Security Code) must be checked properly with SLE4428.
Because this function should be made effective, the issue of the next command is necessary.
ex). "CR4"+ 0020000002xxxx h (xxxx : security code 2bytes)
The presented data are compared with internal Reference-Data by SLE4428 card itself.
Writing treatment becomes effective until a power supply is turned off when a check is finished normally.
The writing function of the card is lost when the command is carried out continuously eight times with the
wrong code. A user must know PSC at least when a user wants to rewrite the data on SLE4428 card.
Error-Counter can be reset in the zero if PSC is given to SLE4428 card properly if the value of
Error-Counter is 7 or less.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the card).
An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 82
Same as SLE4442, The SLE4406 memory card has no protocol handler in it.
So, ICRW also builds in protocol handler to control SLE4406.
The control method of SLE4406 is done in the same way as SLE4442.
Refer to SLE4442 for the details of the contents.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the card).
An error "60"(36h,30h) is returned when a power failure is detected.
Write operation is performed at an error counter (72bit~76bit), and TCB is presented to Transport code
area.
Verification is not performed when an error counter is 0.
The presented data are compared with internal Reference-Data by SLE4406 card itself. The writing
function of the card is lost when the command is carried out five times with the wrong code. Error
counter can not be reset to the 0.
After verification, writing the bit64 in the memory changes the card state from Issuer Mode to the User
Mode. This command is not required for card in User Mode.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the
card). An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 83
ICRW reads data from the memory of SLE4406, and transmits data on cdh bytes from the address abh.
The capacity of the memory is 128bits. 128bits is equivalent to 16bytes.
The contents of the whole data of memory can be read with the following command.
ex) Command
"CR5" + 00B000010 h
Response
"PR5" + 12345678….FF9000 h
16byte
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the
card). An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 84
The capacity of the memory is 128bits(=16bytes). However, ROM area is also contained. Refer to the
specification of SLE4406 for details of writable area in memory. ICRW does not distinguish ROM area
and PROM/EEPROM area.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the card).
An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 85
After command execution, ICRW returns response with 9000h or "SW1+SW2" as the result.
ICRW does not perform the check after reloading cycle operation.
A result of command execution can be checked by reading of the counter data.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the card).
An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 86
Wrd: The number of bytes of the word address of an I2C memory card to use
Wrd="1"(31h) : ICRW accesses an I2C memory card in the Word address of 1byte.
Wrd="2"(32h) : ICRW accesses an I2C memory card in the Word address of 2bytes.
CONFIDENTIAL No ASL - NP – 17749 – 01 87
When this command is received, ICRW reports the condition of an I2C memory card by byte of stj.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the card).
An error "60"(36h,30h) is returned when a power failure is detected.
b7 b0
sti= 0 1 0 X 0 0 X X (binary)
The I2C memory card has no protocol handler in it. So, ICRW builds in protocol handler to control this.
When a usual IC card is controlled, ICRW doesn't check the contents of the data.
(A message is transmitted and received between ICRW and the IC card)
Then, the data that it was received from HOST are transmitted through ICRW to the IC card.
About the I2C memory card, ICRW must control the signal line of the I2C memory card directly about
each data transmission by the hardware.
Therefore, some functions to control an I2C memory card were prepared in ICRW. These functions are
specified by a command data form like C-APDU which format is based on ISO/IEC 7816-3 T=0
standard.
Therefore, ICRW recognizes the meaning of the command data, and carries out the treatment related
to the card by controlling hardware.
After a command is carried out properly, ICRW returns 9000h by the positive response as if it was just
received from the IC card.
When an error occurs during the communication with the I2C memory card, ICRW returns a positive
response with status information in response data "SW1+SW2" which is based on T=0 standard of
ISO/IEC7816-3.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the
card). An error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 90
Value
ab h : The upper address of head address which begins to read data
cd h : The lower address of head address which begins to read data
ef h : The number of bytes of data to read
ICRW reads data from the I2C memory card, and transmits data on ef h bytes from the address abcd h.
The value established with ef h bytes is the value which makes the value which it can access without striding
over a page by an I2C memory card to use an upper limit
When the following command is transmitted, data can be read from the I2C memory card.
ex). "CS3" + 00B0000008 h
Note) It doesn't change to the next page automatically when it tries to read it by the bigger value than the page
size of the used I2C memory card or when it changes in the next page from the middle of the page.
Therefore, access it not to cross the boundary of the page. If it is not so, it isn't finished normally.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the card). An
error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 91
ICRW writes data in the I2C memory card. ICRW returns a result after written data are checked.
The example which data on 8bytes are written in by the continuance from the head address of the I2C memory
card is shown in the following.
ex). "CS3" + 00D0000008 h + Write Data (8bytes)
After command execution, ICRW returns response with 9000h or sw1+sw2 as the result.
Note) It doesn't change to the next page automatically when it tries to write it by the bigger value than the page
size of the used I2C memory card or when it changes in the next page from the middle of the page.
Therefore, access it not to cross the boundary of the page. If it is not so, it isn't finished normally.
While a power supply is supplied to the card, the ICRW monitors VCC (the power supply line of the card). An
error "60"(36h,30h) is returned when a power failure is detected.
CONFIDENTIAL No ASL - NP – 17749 – 01 92
This command loads the key for "Magnetic data encrypt / decrypt command" and "Plaintext offline PIN
verification command".
Detail of the encrypted data format is defined in the additional document to keep security.
7.19.1 Device authentication data exchange and key exchange key loading
This command is for the preparation procedure of the encrypted data communication between ICRW
and HOST.
ICRW decrypts the "Encrypted data A" of the command using the master exchange key which is the
fixed secret key and obtains the device authentication data and the key exchange key for "Key loading for
the magnetic data" and "Key Loading for the Plaintext offline PIN verification".
ICRW encrypts the authentication data using the key exchange key and transmits to the HOST as the
"Encrypted data B" of the positive response. HOST checks the result of the authentication from the
"Encrypted data B". These encrypting and decrypting processes use Triple DES-ECB.
If the key exchange key is weak key or semi weak key, ICRW sends the error code "04"(30h,34h).
If the first 8 bytes and the second 8 bytes of the key exchange key are the same data, ICRW sends the
error code "04"(30h,34h).
This command is for loading the key for the ICRW for the "Magnetic data encrypt / decrypt command".
ICRW decrypts the "Encrypted data" of the command using the key exchange key which is obtained by
the command with pm="0"(30h). This decrypting process uses Triple DES-ECB.
And ICRW obtains the key and initialization vector (IV) for "Magnetic data encrypt / decrypt command"
from the decrypted data.
If the obtained key is weak key or semi weak key, ICRW sends an error code "04"(30h,34h).
If ICRW has not obtain the key exchange key, ICRW sends and error code "06"(30h,36h).
CONFIDENTIAL No ASL - NP – 17749 – 01 93
This command is for loading the key for the ICRW for the "Plaintext offline PIN verification command".
ICRW decrypts the encrypted data of the command using the key exchange key which is obtained by
pm="0"(30h). This decrypting process uses Triple DES-ECB.
And ICRW obtains the key for "Plaintext offline PIN verification command" from the decrypted data.
When the Plaintext offline PIN verification command is used with the Single DES-ECB mode, the key is
only 8bytes and should be set in first 8bytes of the encrypted data. And second 8bytes should not be
same data to the first 8bytes.
If the obtained key is weak key or semi weak key, ICRW sends an error code "04"(30h,34h).
If the first 8 bytes and the second 8 bytes are the same data, ICRW sends an error code "04"(30h,34h).
If ICRW has not obtain the key exchange key, ICRW sends and error code "06"(30h,36h).
HOST CRD
ex.
“C6A”
Insert Magnetic Card
"02" Meaning : To show that ICRW executes Supervisor program code area.
(30h,32h) (Supervisor) (Initialize command only on supervisor mode)
Meaning : To show that un-executable command was received.
(User) Cf. Receiving read command while card is not staying inside the ICRW.
"03" Meaning : The function (hardware) required for execution of a command is not carried.
(30h,33h) The function may not be carried or be out of order.
(The existence of each function is automatically recognized by the firmware.)
Clear : The check of hardware is needed.
"06" Meaning : The key for the cipher function command is not received.
(30h,36h)
Clear : Cleared by the executing the key exchange procedure.
"B0" Meaning : Other commands were received before performing initialize command
(42h,30h) after a power supply injection, reset or switch command execution.
Clear : Execute Initialize command.
"11" Meaning : To show that the full shutter does not close when the card entry is completed.
(31h,31h)
Clear : Cleared in case card is returned to card gate by eject command.
After the card is inserted, the unexpected objects are inserted into the gate or
the full shutter is not work collect. Please conform those condition.
CONFIDENTIAL No ASL - NP – 17749 – 01 96
"13" Meaning : To show that the card longer than 88.5mm is inserted into ICRW.
(31h,33h)
Clear : Cleared in case card is returned to card gate by eject command.
"14" Meaning : To show that the card shorter than 83.5mm is inserted into ICRW.
(31h,34h)
Clear : Cleared in case card is returned to card gate by eject command.
"16" Meaning : To show that card staying inside the ICRW was moved up to the point where
(31h,36h) status request information changes.
Clear : Cleared in the case card is ejected.
"17" Meaning : To show that the card was not carried to the specific location after specified
(31h,37h) number of trial for specified time duration during execution of Retrieve command.
Clear : To execute a Retrieve command again and a card is normally taken in.
Or, cleared when the card is taken out from the card reader manually.
Confirm the recovery by Status request command in this case.
"18" Meaning : ICRW detected that two cards were inserted, and ejected it.
(31h,38h)
Clear : Remove ejected card from a gate.
"40" Meaning : To show that card is pulled out against card feed in operation.
(34h,30h)
Clear : Command execution is normally possible continuously.
The following errors may be recovered if ICRW re-take in and read a card.
When an error is not recovered after this operation, it is unrecoverable since magnetic record of
a card is unusual
"20" Meaning : To show that parity error exists in read error.
(32h,30h)
"21" Meaning : To show that other read error than "20"(32h,30h), "23"(32h,33h)
(32h,31h) and "24"(32h,34h) ( cf : no start sentinel is recorded in the card ).
"23" Meaning : To show that only start sentinel, end sentinel, LRC are contained in the card.
(32h,33h) There are no contents of data.
"24" Meaning : To show that the card has no magnetic track. For entry and enable command
(32h,31h) with mag check, this code is used to indicate error.
"30" Meaning : To show that power down (or power cut in short instant) is detected
(33h,30h) ( or being detected). It is to be recognized as normal power down
if back up power supply goes down below +12V.
Clear : Cleared when a card is ejected and pulled out after a power supply recovery.
"31" Meaning : To show that DSR signal was turned to OFF ( communication is cut ).
(33h,31h)
Clear : Cleared when a card is ejected and pulled out after DSR signal recovery.
CONFIDENTIAL No ASL - NP – 17749 – 01 97
PD2
CONFIDENTIAL No ASL - NP – 17749 – 01 98
Power On / Reset
Firmware Initializing
Mag. Head Set LED 1st Blink
Function Implementation Check Orange
Implemented ? NO
YES
only PD1
NO is closed ? Mag. Read Set LED 1st Blink
Error ? Orange
YES
YES
NO
Set LED 1st Blink
Card Pull Orange LED Power, Sensor, Green
Out ? Light 1sec. Motor is Normally?
YES NO
NO YES
IC Contact Set LED 2nd Blink
Card Entry Timer / Retry Counter Orange
Implemented ? NO
Motor On
YES
IC Contact
Implemented ? NO
YES
Contact IC Card Activation
Save Receive ATR
Contactless ICC
R/W
Implemented ? NO
YES
Contactless ICC Req.B Command
Save Receive ATQB
Card Eject
/* Generate GetCRC */
unsigned short GetCRC(unsigned char *p,unsigned short n)
{
unsigned char ch;
unsigned short i;
unsigned short crc = INIT;
int main(void)
{
/* Transmission command
STX : F2h
LEN : 00 08h
TEXT: Initialize command ("C0032400")
*/
unsigned char TransCommand[13] ={0xF2,0x00,0x08,0x43,0x30,0x30,0x33,0x32,0x34,0x30, 0x30,0x00,0x00};
return 0;
}
CONFIDENTIAL No ASL - NP – 17749 – 01 101
TA1 02, 12, 03, 13, 32, 33, 53, 54, 92, 93, B2, B3, D3, D4
CONFIDENTIAL No ASL - NP – 17749 – 01 102
D= 1 2 4 8 16 CLK
F= frequency
372 01 02 03 - - 3.58MHz
(9622) (19244) (38490)
372 11 12 13 - - 3.58MHz
(9622) (19244) (38490)
558 - - - - - -
744 31 32 33 - - 7.16MHz
(9622) (19244) (38490)
1116 - - - - - -
1488 - 52 53 54 - 7.16MHz
(9622) (19244) (38490)
1860 - - - - - -
512 91 92 93 - - 3.58MHz
(6991) (13983) (27965)
768 - - - - - -
1024 B1 B2 B3 - - 7.16MHz
(6991) (13983) (27965)
1536 - - - - - -
2048 - D2 D3 D4 7.16MHz
(6991) (13983) (27965)
Table A2-2 – Supportable TA1 values and PPS reqeust in EMV mode
B
ATR PPS request Transmission speed
TA1 F D PPS1 F D
02h 372 2 02h 372 2 Transmisson speed depends on PPS
03h 372 4 03h 372 4 response of PPS1
12h 372 2 12h 372 2
13h 372 4 13h 372 4
32h 744 2 32h 744 2
33h 744 4 33h 744 4
48h 1116 12 48h 1116 12
53h 1488 4 53h 1488 4
54h 1488 8 54h 1488 8
55h 1488 16 55h 1488 16
69h 1860 20 69h 1860 20
92h 512 2 92h 512 2
93h 512 4 93h 512 4
B2h 1024 2 B2h 1024 2
B3h 1024 4 B3h 1024 4
B4h 1024 8 B4h 1024 8
C8h 1536 12 C8h 1536 12
D3h 2048 4 D3h 2048 4
D4h 2048 8 D4h 2048 8
D5h 2048 16 D5h 2048 16
f=3.58MHz,
All other values of TA1 none
Transmission speed(bps) = 9622bps
Note ) If the card returns echoing PPS1, transmission speed is changed to table A2-4. If the card doesn’t transmit
PPS1, transmission speed is default(not changed).
CONFIDENTIAL No ASL - NP – 17749 – 01 105
Table A2-3 – Supportable TA1 values and PPS reqeust in ISO mode
B ATR PPS request Transmission speed
TA1 F D PPS1 F D
02h 372 2 02h 372 2 Transmisson speed depends on PPS
03h 372 4 03h 372 4 response of PPS1
04h 372 8
05h 372 16
06h 372 32
07h 372 64
08h 372 12
09h 372 20
12h 372 2 12h 372 2
13h 372 4 13h 372 4
14h 372 8
15h 372 16
16h 372 32
17h 372 64
18h 372 12
19h 372 20
32h 744 2 32h 744 2
33h 744 4 33h 744 4
34h 744 8
35h 744 16
36h 744 32
37h 744 64
38h 744 12
39h 744 20
48h 1116 12 48h 1116 12
53h 1488 4 53h 1488 4
54h 1488 8 54h 1488 8
55h 1488 16 55h 1488 16
56h 1488 32
57h 1488 64
58h 1488 12
59h 1488 20
CONFIDENTIAL No ASL - NP – 17749 – 01 106
Table A2-3(Continue) – Supportable TA1 values and PPS reqeust in ISO mode
B ATR PPS request Transmission speed
TA1 F D PPS1 F D
69h 1860 20 69h 1860 20 Transmisson speed depends on PPS
92h 512 2 92h 512 2 response of PPS1
93h 512 4 93h 512 4
94h 512 8
95h 512 16
96h 512 32
97h 512 64
98h 512 12
99h 512 20
B2h 1024 2 B2h 1024 2
B3h 1024 4 B3h 1024 4
B4h 1024 8 B4h 1024 8
B5h 1024 16
B6h 1024 32
B7h 1024 64
B8h 1024 12
B9h 1024 20
C8h 1536 12 C8h 1536 12
D3h 2048 4 D3h 2048 4
D4h 2048 8 D4h 2048 8
D5h 2048 16 D5h 2048 16
D6h 2048 32
D7h 2048 64
D8h 2048 12
D9h 2048 20
f=3.58MHz,
All other values of TA1 none
Transmission speed(bps) = 9622bps
Note ) If the card returns echoing PPS1, transmission speed is changed to table A2-4. If the card doesn’t
transmit PPS1, transmission speed is default(not changed).
CONFIDENTIAL No ASL - NP – 17749 – 01 107
The C-APDU consists of a mandatory header of four consecutive bytes denoted CLA, INS, P1 andP2, followed
by a conditional body of variable length. The meanings of every byte are below.
byte meanings
Mandatory Header CLA Instruction Class
INS Instruction Code
P1 Instruction Parameter 1
P2 Instruction Parameter 2
Conditional Body Lc Byte Length of Data Field
Data Data Field
Le Byte Length of Expected Response Length
About the details of each byte, refer to specifications of every card's standard.
1. In case of Vcc=30h
START
Set Case = 1
(See Note 1)
Cold Reset
Yes
'Case' is a process variable used to indicate whether a cold or warm reset is operative.
Case = 1 for a cold reset, and Case = 2 for a warm reset.
(*1)ICRW initiates the deactivation of ICC, and sends back error code “61”(36h,31h).
(*2)After ICRW received ATR which shows T=1 protocol, ICRW transmits S (IFSrequest) to ICC. If S
(IFSresponse) can't be received properly from ICC, ICRW initiates the deactivation of ICC, and sends back
error code "63"(36h,33h) or “64”(36h,34h).
When S (IFSresponse) is received properly in the above or when ATR is not T=1 protocol, ICRW transmits
the contents of ATR which is received from ICC to HOST.
(*3)When ATR content is not based on such protocol, which is supported by ICRW, error code “69”(36h,39h)
with ATR data will be sent back and ICRW will deactivate the IC card.
(Reference: EMV Integrated Circuit Card Specification for Payment Systems. Book 1 Version 4.2 June 2008)
CONFIDENTIAL No ASL - NP – 17749 – 01 111
2. In case of Vcc=33h
START
Set Case=1
Cold Reset
(Vcc=33h:VCC=5V)
Yes
Yes Yes
Is ATR Is ATR Is ATR No Is Case=1?
chek1 OK? class OK ? check2 OK ?
No No Yes
No
(*6)
(*4) ICRW initiates the deactivation of ICC, and sends back error code “61”(36h,31h).
(*5) ICRW checks IC-card’s class indicator, which is not supported by ICRW, error code “66”(36h,36h) with
ATR data will be sent back and ICRW will deactivate the IC card.
(*6) After ICRW received ATR which shows T=1 protocol, ICRW transmits S (IFSrequest) to ICC. If S
(IFSresponse) can't be received properly from ICC, ICRW initiates the deactivation of ICC, and sends back
error code “63"(36h,33h) or “64”(36h,34h).
When S (IFSresponse) is received properly in the above or when ATR is not T=1 protocol, ICRW
transmits the contents of ATR which is received from ICC to HOST.
(*7) When ATR content is not based on such protocol, which is supported by ICRW, error code “66”(36h,36h)
with ATR data will be sent back and ICRW will deactivate the IC card.
START
Cold Reset
Vcc=35h:VCC=3V
Vcc=36h:VCC=5V
No Card answers
to reset?
De-activate and
Yes
Cold Reset
Vcc=35h:VCC=5V
Vcc=36h:VCC=3V
Yes (*10)
(A)
ABORT
(*9)
Warm Reset
Yes Yes No
Is ATR Is ATR Is ATR
chek1 OK? class OK ? check2 OK ?
ABORT
No (*11)
No Yes
ABORT
(*8)
ABORT Continue using
(*9) parameters D,F
(*10)
CONFIDENTIAL No ASL - NP – 17749 – 01 113
(*8) ICRW initiates the deactivation of ICC, and sends back error code “61”(36h,31h).
(*9) ICRW checks IC-card’s class indicator, which is not supported by ICRW, error code “66”(36h,36h) with
ATR data will be sent back and ICRW will deactivate the IC card.
(*10) After ICRW received ATR which shows T=1 protocol, ICRW transmits S (IFSrequest) to ICC. If S
(IFSresponse) can't be received properly from ICC, ICRW initiates the deactivation of ICC, and sends back
error code "63"(36h,33h) or “64”(36h,34h).
When S (IFSresponse) is received properly in the above or when ATR is not T=1 protocol, ICRW transmits
the contents of ATR which is received from ICC to HOST.
(*11) When ATR content is not based on such protocol, which is supported by ICRW, error code “66”(36h,36h)
with ATR data will be sent back and ICRW will deactivate the IC card.
B 4. In case of Vcc=38H
START
VCC=5V
Cold Reset
No
Card answers
to reset?
*a
Yes
No
VCC=5V
VCC=3V No No Yes
Yes
(A)
Warm Reset
ABORT
(*12)
ABORT Continue using
(*13) parameters F,D
(*14)
CONFIDENTIAL No ASL - NP – 17749 – 01 115
(*12) ICRW initiates the deactivation of ICC, and sends back error code " 61".
(*13) ICRW checks IC-card's class indicator, which is not supported by ICRW, error code "66" with ATR data will
be sent back and ICRW will deactivate the IC card.
(*14) After ICRW received ATR which shows T=1 protocol, ICRW transmits S (IFSrequest) to ICC. If S
(IFSresponse) can't be received properly from ICC, ICRW initiates the deactivation of ICC, and sends back
error code "61". When S (IFSresponse) is received properly in the above or when ATR is not T=1 protocol,
ICRW transmits the contents of ATR which is received from ICC to HOST.
(*15) When ATR content is not based on such protocol, which is supported by ICRW, error code "66" with ATR
data will be sent back and ICRW will deactivate the IC card.
4. In case of Vcc=40h
START
Cold Reset
(VCC=5V)
Is ATR No
chek1 OK?
ABORT(*16)
Yes
Is ATR No
check2 OK ?
ABORT(*17)
Yes
No
ATR=
3F 65 25 TC1 MCE
?
Continue using
Yes
parameters D,F (*18)
No MCE= 4x,5x,9x No
MCE= 91,92,93 (except 91,92,93)
Yes Yes
If 91, ICRW sets T=0 and inverse convention Warm Reset Continue using
If 92, ICRW sets T=1 and direct convention parameters D,F (*18)
If 93, ICRW sets T=1 and inverse convention
Is ATR No
chek1 OK?
Is ATR No
check2 OK ?
ABORT(*17)
Yes
Continue using
parameters D,F(*14)
CONFIDENTIAL No ASL - NP – 17749 – 01 117
(*16) ICRW initiates the deactivation of ICC, and sends back error code “61”(36h,31h).
(*17) ICRW checks IC-card’s class indicator, which is not supported by ICRW, error code “66”(36h,36h) with
ATR data will be sent back and ICRW will deactivate the IC card.
(*18) After ICRW received ATR which shows T=1 protocol, ICRW transmits S (IFSrequest) to ICC. If S
(IFSresponse) can't be received properly from ICC, ICRW initiates the deactivation of ICC, and sends
back error code "63"(36h,33h) or “64”(36h,34h).
When S (IFSresponse) is received properly in the above or when ATR is not T=1 protocol, ICRW
transmits the contents of ATR which is received from ICC to HOST.
CONFIDENTIAL No ASL - NP – 17749 – 01 118
Start
NO
C-APDU < 262
YES
Transmit “CI5” + C-APDU(n)
C-APDU=C-APDU - C-APDU(n)
Receive “PIX”
NO
X = “7” ?
YES
1
NO
C-APDU < 262
YES
YES(X=“5”)
X = “5” ?
YES(X = “?”)
Receive “PIX” + R-APDU(n)
X = “?” ?
R-APDU=R-APDU+R-APDU(n)
NO
(X = “3”, “4” or “6”)
IC card
YES(X = “5”)
request
abortion. X = “5 “ ?
NO(X = “6” or “?”)
End
CONFIDENTIAL No ASL - NP – 17749 – 01 119
Example
HOST ICRW
"CI9” data
"PI4” data
(exp.2) Transmit data by command chaining(Each data size is 261 bytes or less)
Receive 258 bytes or less of data
"CI5” data1
"PI7"
"CI5” data2
"PI7"
"CI6” data3
"PI4” data
"CI9” data
"PI5” data1
"CI7"
"PI5” data2
"CI7"
"PI6” data3
(exp.4) Transmit data by command chaining (Each data size is 261 bytes or less)
Receive data by command chaining (Each data size is 258 bytes or less)
"CI5” data1
"PI7"
"CI5” data2
"PI7"
"CI6” data3
"PI5” data1
"CI7"
"PI5” data2
"CI7"
"PI6” data3
"CI5”data1
"PI? "
CONFIDENTIAL No ASL - NP – 17749 – 01 120
Start
NO
C-APDU < 262
YES
Transmit “CIE” + C-APDU(n)
C-APDU=C-APDU - C-APDU(n)
Receive “PIX”
NO
X = “G” ?
YES
1
NO
C-APDU < 262
YES
YES(X=“E”)
X = “E” ?
YES(X = “O”)
Receive “PIX” + R-APDU(n)
X = “O” ?
R-APDU=R-APDU+R-APDU(n)
NO
(X = “C”, “D” or “F”)
SAM
YES(X = “E”)
request
abortion. X = “E “ ?
NO(X = “F” or “O”)
End
CONFIDENTIAL No ASL - NP – 17749 – 01 121
Example
HOST ICRW
(exp.2) Transmit data by command chaining(Each data size is 261 bytes or less)
Receive 258 bytes or less of data
"CIE” data1
"PIG"
"CIE “data2
"PIG"
"CIF” data3
"PID” data