Cybermouse: Reference Manual
Cybermouse: Reference Manual
Reference Manual
Contents
INTRODUCTION............................................................................................................................................................................................... 4
FEATURES ......................................................................................................................................................................................................... 4
Copyright 1996-1999 1
Cybermouse Reference Manual
c) READ_DATA........................................................................................................................................................24
d) WRITE_DATA ......................................................................................................................................................24
e) ERASE_DATA ......................................................................................................................................................25
f) PRESENT_CODE .................................................................................................................................................25
g) SET_FUSE.............................................................................................................................................................26
h) BLOW_FUSE ........................................................................................................................................................26
4. Siemens SLE 4432/4442 intelligent 256 Byte Memory Card .......................................................................................................... 27
a) RESET ...................................................................................................................................................................27
b) POWER_OFF ........................................................................................................................................................27
c) READ_DATA........................................................................................................................................................27
d) WRITE_DATA ......................................................................................................................................................28
e) WRITE_PROTECTION ........................................................................................................................................28
f) PRESENT_CODE (only SLE 4442).....................................................................................................................28
g) READ PRESENTATION ERROR COUNTER (only SLE 4442)........................................................................29
h) CHANGE_CODE (only SLE 4442)......................................................................................................................29
5. Siemens SLE 4418/4428 intelligent 1K Byte Memory Card............................................................................................................ 30
a) RESET ...................................................................................................................................................................30
b) POWER_OFF ........................................................................................................................................................30
c) READ_DATA........................................................................................................................................................30
d) WRITE_DATA ......................................................................................................................................................31
e) WRITE_PROTECTION ........................................................................................................................................31
f) PRESENT_CODE (only SLE 4428).....................................................................................................................31
g) READ PRESENTATION ERROR COUNTER (only SLE 4428)........................................................................32
6. '93CS06/46' type EEPROMs with MICROWIRE interface ............................................................................................................ 33
a) RESET ...................................................................................................................................................................33
b) POWER_OFF ........................................................................................................................................................33
c) READ_DATA........................................................................................................................................................33
d) WRITE_DATA ......................................................................................................................................................33
e) WRITE_ALL .........................................................................................................................................................34
f) READ_PROT ........................................................................................................................................................34
g) SET_PROTECTION..............................................................................................................................................34
h) CLEAR_PROTECTION........................................................................................................................................35
i) DISABLE_PROTECTION ....................................................................................................................................35
7. ST1333 - type EEPROM WITH T2G PROTOCOL.......................................................................................................................... 36
a) RESET ...................................................................................................................................................................36
b) POWER_OFF ........................................................................................................................................................36
c) READ_DATA........................................................................................................................................................36
d) WRITE_DATA ......................................................................................................................................................36
e) ERASE_DATA ......................................................................................................................................................37
f) PRESENT_TRANSPORT_CODE ........................................................................................................................37
g) AUTHENTICATE_CARD ....................................................................................................................................38
8. X76F041 Card (Xicor) .................................................................................................................................................................... 39
a) RESET ...................................................................................................................................................................39
b) POWER_OFF ........................................................................................................................................................39
c) READ_DATA........................................................................................................................................................39
d) READ_DATA_WITH_PASSWORD ....................................................................................................................39
e) CONFIG_READ ....................................................................................................................................................40
f) WRITE_DATA ......................................................................................................................................................40
g) WRITE_DATA_WITH_PASSWORD ..................................................................................................................41
h) CONFIG_WRITE ..................................................................................................................................................41
i) CARD_ADMIN .....................................................................................................................................................41
9. X76F128/640 Card (Xicor) ............................................................................................................................................................. 44
a) RESET ...................................................................................................................................................................44
b) POWER_OFF ........................................................................................................................................................44
c) READ_DATA_WITH_PASSWORD ....................................................................................................................44
d) WRITE_DATA_WITH_PASSWORD ..................................................................................................................45
e) RESET_PASSWORD............................................................................................................................................45
f) RESET_DEVICE...................................................................................................................................................45
g) CHANGE_PASSWORD .......................................................................................................................................45
10. X76F100 Card (Xicor) ............................................................................................................................................................... 47
a) RESET ...................................................................................................................................................................47
b) POWER_OFF ........................................................................................................................................................47
c) READ_DATA_WITH_PASSWORD ....................................................................................................................47
d) WRITE_SECTOR_DATA_WITH_PASSWORD .................................................................................................47
e) CHANGE_ PASSWORD ......................................................................................................................................48
11. MCU-based Card ....................................................................................................................................................................... 49
a) RESET (3V or 5V) ................................................................................................................................................49
b) POWER_OFF ........................................................................................................................................................49
c) EXCHANGE_APDU.............................................................................................................................................49
d) EXCHANGE_T1_FRAME....................................................................................................................................50
12. Security Application Module (SAM) .......................................................................................................................................... 51
a) ACTIVATE_SAM .................................................................................................................................................51
Copyright 1996-1999 2
Cybermouse Reference Manual
b) DEACTIVATE_SAM............................................................................................................................................51
c) EXCHANGE_SAM_APDU ..................................................................................................................................51
APPENDIX A: SUPPORTED CARD TYPES ............................................................................................................................................... 53
Copyright 1996-1999 3
Cybermouse Reference Manual
INTRODUCTION
The Smart Card Reader/Writer CyberMouse is an interface for the communication between a computer (for example, a PC) and a smart card.
Different types of smart cards have different commands and different communication protocols. This prevents in most cases the direct
communication between a smart card and a computer. The CyberMouse Reader/Writer establishes a uniform interface from the computer to the
smart card for a wide variety of cards. By taking care of the card specific particulars, it releases the computer software programmer of getting
involved with the technical details of the smart card operation, which are in many cases not relevant for the implementation of a smart card
system.
The CyberMouse Smart Card Reader/Writer is connected to the computer through a serial asynchronous interface (RS-232) or USB interface.
The reader accepts commands from the computer, carries out the specified function at the smart card and returns the requested data or status
information.
NOTE - Although the CyberMouse is a true card reader/writer as it can read and write smart cards, the terms card reader or reader will be
used indifferently to refer to the CyberMouse, for the sake of readability and because these designations are commonly in use for this kind of
devices.
FEATURES
• ISO7816-1/2/3 compatible smart card interface
• Supports most common memory-based smart cards (2-wire bus, 3-wire bus)
• Supports CPU-based cards with T=0 and/or T=1 protocol
• Three CLK frequencies for microcontroller-based cards: 3.68MHz, 1.84MHz and 0.92MHz
• Automatic CLK frequency selection and PTS (protocol type selection) procedure
• Smart card interface short circuit protected
• RS-232 interface to PC with simple command structure
• Selectable baud rate of serial interface to PC, max. 115.2 kBit/s
• Installation of up to three security application modules (SAM) inside the reader
• Convenient stand available as accessory
Copyright 1996-1999 4
Cybermouse Reference Manual
• Cards following the extended I2C bus (XIIC) addressing protocol with memory capacity up to 64 Kbytes and minimum 4 bytes page write
capability, including, in particular:
AM64KP
Microchip 24C65
• '416'/'896' type intelligent EEPROMs with security and PIN, including:
AM416
Atmel AT88SC101/2/3, AT88SC1601/1604
Gemplus GPM416, GPM896
Siemens SLE 4404
• Siemens SLE4432/4442 intelligent 256 bytes EEPROM with write protect function:
AM2KP, AM2KS
SLE 4432, SLE 4442
• Siemens SLE 4418/4428 intelligent 1K bytes EEPROM with write-protect function:
AM8KP, AM8KS
SLE 4418, SLE 4428
• EEPROMs with MICROWIRE interface, including:
AM256
NM93CS06/CS46
• Cards following the T2G protocol:
SGS-Thomson ST1333
• XICOR card type, including:
X76F041, X76F128/640, X76F100
T F D N
0 / 1 372 1 0...255
0 / 1 558 1 0...255
0 / 1 558 0.5 0...255
0 / 1 558 0.25 0...255
0 / 1 744 1 0...255
0 / 1 744 2 0...255
0 / 1 744 0.5 0...255
0 / 1 744 0.25 0...255
0 / 1 744 0.125 0...255
0 / 1 1116 1 0...255
0 / 1 1116 2 0...255
0 / 1 1116 0.5 0...255
0 / 1 1116 0.25 0...255
0 / 1 1488 1 0...255
0 / 1 1488 2 0...255
0 / 1 1488 4 0...255
0 / 1 1488 0.5 0...255
0 / 1 1488 0.25 0...255
Copyright 1996-1999 5
Cybermouse Reference Manual
0 / 1 1860 1 0...255
0 / 1 1860 2 0...255
0 / 1 1860 4 0...255
0 / 1 1860 0.5 0...255
0 / 1 1860 0.25 0...255
0 / 1 512 1 0...255
0 / 1 512 0.5 0...255
0 / 1 512 0.25 0...255
0 / 1 768 1 0...255
0 / 1 768 2 0...255
0 / 1 768 0.5 0...255
0 / 1 768 0.25 0...255
0 / 1 1024 1 0...255
0 / 1 1024 2 0...255
0 / 1 1024 0.5 0...255
0 / 1 1536 1 0...255
0 / 1 1536 2 0...255
0 / 1 1536 4 0...255
0 / 1 1536 0.5 0...255
0 / 1 2048 1 0...255
0 / 1 2048 2 0...255
0 / 1 2048 4 0...255
The CyberMouse performs the Protocol Type Selection (PTS) procedure as specified in ISO7816-3:1989/Amd.2: 1994.
When the card ATR indicates the specific operation mode (TA2 present; bit b5 of TA2 must be 0) and that particular mode is not supported by
the CyberMouse, the reader will reset the card to set it to negotiable mode. If the card cannot be set to negotiable mode, the reader will reject the
card.
When the card ATR indicates the negotiable mode (TA2 not present) and communication parameters other than the default parameters, the
CyberMouse will execute the PTS and try to use the communication parameters that allow operating the card at the highest CLK frequency
(3.6864MHz), or allow at the highest communication speed (shortest etu), in this priority. If the card does not accept the PTS, the reader will use
the default parameters (F=372, D=1).
For the meaning of the aforementioned parameters, please refer to ISO7816, part 3.
Copyright 1996-1999 6
Cybermouse Reference Manual
POWER SUPPLY
The CyberMouse requires a voltage of 5V DC, 200mA, regulated, power supply. The CyberMouse gets the power supply from PC (through the
cable supplied along with each type of reader).
A. Status LEDs
Two LEDs on the front of the reader indicate the presence of the power supply to the reader and the activation status of the smart card interface:
Red LED Indicates 5V power supply to the reader is present.
After a reset of the reader (by removing/applying the power supply, or through the RS-232/USB interface), the red LED
flashes three times.
Green LED Indicates power supply to the smart card is switched on, i.e., the smart card is activated.
SERIAL INTERFACE
The CyberMouse is connected to a computer through a serial asynchronous interface following the RS-232 standard.
A. Communication Parameters
The following communication parameters are used by the CyberMouse and cannot be modified by the host computer:
Transmission protocol : serial asynchronous
Parity : none
Data Bits : 8
Stop Bits : 1
Handshake : through CTS
The CyberMouse provides two means to select the transmission speed (baud rate) used by the reader in the normal operation, by hardware
and/or by software.
B. Interface Wiring
For the communication between the CyberMouse and a computer, five lines of the RS-232 interface are used: RxD, TxD, CTS, DTR and GND.
Copyright 1996-1999 7
Cybermouse Reference Manual
NOTE - Communication problems between the CyberMouse and a PC can occur if a 25 pin to 9 pin RS-232 adapter or a cable is used in
which not all 9 signal lines are connected. Adapters supplied with computer mouse frequently have not all lines connected. For the correct
operation of the reader, use only a 9 pin to 25 pin adapter and a serial interface cable in which all 9 signal lines are connected!
NOTE - To prevent any radio interference between the CyberMouse and other electrical and electronic equipment, do not use an RS-232
cable longer than 3 meters!
Copyright 1996-1999 8
Cybermouse Reference Manual
USB INTERFACE
The CyberMouse is connected to a computer through a USB following the USB standard.
A. Communication Parameters
The CyberMouse is connected to a computer through USB as specified in the USB Specification 1.0. The CyberMouse is working in low speed
mode, i.e. 1.5 Mbps.
USB Interface Wiring
NOTE - In order for the CyberMouse functioning properly through USB interface, CyberMouse proprietary device drive has to be installed.
Please refer to the Device Driver Installation Guide for more detail. You can download the newest driver from www.cybermouse.de
Copyright 1996-1999 9
Cybermouse Reference Manual
COMMUNICATION PROTOCOL
In the normal operation, the CyberMouse acts as a slave device with regard to the communication between a computer and the reader. The
communication is carried out in the form of successive command-response exchanges. The computer transmits a command to the reader and
receives a response from the reader after the command has been executed. A new command can be transmitted to the CyberMouse only after the
response to the previous command has been received.
There are two cases where the reader transmits data without having received a command from the computer, namely, the Reset Message of the
reader and the Card Status Message.
1. Command
Copyright 1996-1999 10
Cybermouse Reference Manual
2. Response
The response from the CyberMouse to any command depends on whether the command has been received by the reader without error (e.g.,
checksum error).
Copyright 1996-1999 11
Cybermouse Reference Manual
90 H = command successfully executed
60 H = error in command data; command cannot be executed
67 H = error detected in command execution
FFH = status message initiated by the reader
SW2 Further qualification of the command execution status.
A table listing the possible values of the status bytes SW1 and SW2 and the corresponding meaning is given in
Appendix B.
Data Length Number of subsequent data bytes, and is encoded in 3 bytes. The first byte is FFH. The second byte and the third byte
represent data length N.
Data Data contents of the command.
For a READ_DATA command, for example, the data bytes would contain the contents of the memory addresses read from
the card. The data bytes can represent values read from the card and/or status information.
Checksum The checksum is computed by XORing all response bytes including header, status bytes, data length and all data bytes.
c) Transmission error
If the receiving party of a command (i.e., the CyberMouse) or a response (i.e., the computer) detects an error in the data length or the checksum
of a command, it disregards the received data and sends a "NOT ACKNOWLEDGE" message to the transmitting party upon completion of the
faulty transmission. The "NOT ACKNOWLEDGE" message consists of two bytes:
byte 1 2
05H 05 H
If the CyberMouse responds with a 'NOT ACKNOWLEDGE' message to a command from the computer, the computer would normally transmit
the command again.
If the computer detects a transmission error in a response from the CyberMouse, it can send the 'NOT ACKNOWLEDGE' to the reader upon
which the reader will transmit the most recent response again.
3. Reset Message
A reset of the reader occurs automatically whenever the reader is being powered up. A reset can also be actuated through the RS-232/USB
interface.
In either case the reader transmits one time a Reset Message, which has the same structure as the normal response to a command and the
following contents:
byte 1 2 3 4 5 6
Header SW1 SW2 Data length Data Checksum
01 H FF H 00 H 01 H BAUD=12 H
BAUD Indicates the hardware baud rate setting (default baud rate), which is set to 9600 bps (this is only valid in the RS232 reader).
The reader does not expect an acknowledge signal from the computer. After transmitting the Reset Message the reader is waiting for the first
command from the computer.
Copyright 1996-1999 12
Cybermouse Reference Manual
Card Status Message for Card Insertion
byte 1 2 3 4 5
Header SW1 SW2 Data length Checksum
01 H FF H 01 H 00 H FF H
byte 1 2 3 4 5
Header SW1 SW2 Data length Checksum
01 H FF H 02 H 00 H FC H
A card status message is transmitted only once for every card insertion or removal event. The reader does not expect an acknowledge signal
from the computer. After transmitting a status message, the reader waits for the next command from the computer.
NOTE - If the card is being removed from the reader while a card command is being executed, the reader will transmit a normal response to
the computer with the response status bytes indicating the card removal during command execution (see Appendix B: Response Status Codes).
B. Transmission Protocol
The start of a command (to the reader) or a response (from the reader, including the Reset Message and Card Status Messages) is indicated by
the respective party through the transmission of the single byte Start-of-Text (STX) character with the value 02H.
The end of a command or response is indicated through the single byte End-of-Text (ETX) character with the value 03H.
Within the command and response transmission only ASCII characters representing the hexadecimal (hex) digits 0...F are used. Each byte of a
command or response is splitted into its upper and lower halfbyte (nibble). For each halfbyte is transmitted the ASCII character representing the
respective hex digit value. For example, to transmit the data byte 3AH, two bytes are actually sent on the interface, namely, 33H (ASCII code for
'3') followed by 41H (ASCII code for 'A'):
The following example shows the transmission of a command with instruction code A2H and one data byte with the value 3DH. The command
has the following structure:
byte 1 2 3 4 5
Header Instruction Data length Data Checksum
02H 30H 31H 41H 32H 30H 31H 33H 44H 39H 46H 03H
For the representation of the hex halfbyte values as the corresponding ASCII characters in commands, the CyberMouse accepts both upper case
characters 'A' ... 'F' (41H ... 46H) and lower case characters 'a' ... 'f' (61H ... 66H):
byte 1 2 3 4 5 6 7 8 9 10 11 12
STX '0' '1' 'A' '2' '0' '1' '3' 'D' '9' 'F' ETX
02H 30H 31H 41H 32H 30H 31H 33H 44H 39H 46H 03H
02H 30H 31H 61H 32H 30H 31H 33H 64H 39H 66H 03H
In its response messages, the CyberMouse uses upper case characters 'A' ... 'F'.
Copyright 1996-1999 13
Cybermouse Reference Manual
COMMANDS
The commands executed by the CyberMouse can generally be divided into two categories, namely, Control Commands and Card Commands.
Control Commands control the internal operation of the CyberMouse. They do not directly affect the card inserted in the reader and are
therefore independent of the selected card type.
Card Commands are directed toward the card inserted in the CyberMouse. The structure of these commands and the data transmitted in the
commands and responses depend on the selected card type.
A. Control Commands
1. GET_ACR_STAT
This command returns relevant information about the particular CyberMouse model and the current operating status, such as, the firmware
revision number, the maximum data length of a command and response, the supported card types, and whether a card is inserted and powered
up.
Command format
01 H 00 H
REV 10 bytes CyberMouse firmware type and revision code. The following data are transmitted:
AC-SETxxxx
byte 1 2
card type 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
See Appendix A for the correspondence between these bits and the respective card types.
C_SEL The currently selected card type as specified in a previous SELECT_CARD_TYPE command. A value of 00H means that no
card type has been selected.
C_STAT Indicates whether a card is physically inserted in the reader and whether the card is powered up:
00H : no card inserted
01H : card inserted, not powered up
03H : card powered up
2. SET_PROTOCOL
This command is used to control the line speed of the communication channel between CyberMouse reader and host device. The line speed of
the communication is controlled by two factors, namely, the Delay Factor and the Baud Rate.
Command format
03 H 01 H
Copyright 1996-1999 14
Cybermouse Reference Manual
Instruction Data length Data
Code
DELAY N BAUD RATE
03 H 02 H
to change the Delay Factor and the Baud Rate (for RS232 reader only).
DELAY Determines the time delay inserted by the CyberMouse between two consecutive bytes sent in order to adapt to slower host
system speeds. The time delay is given by N * 0.1msec, with N ranging from 0 ... 255 (00 - FFH). The default value is N = 0
(delay changes only valid on RS232 reader).
BAUD RATE Selects the baud rate (bps) of the serial interface between reader and host system. The default hardware baud rate is 9600 bps.
(baud rate changes only valid on RS232 reader).
The new protocol becomes effective by the completion of the SET_PROTOCOL command, immediately after the CyberMouse has sent out
the response string to the SET_PROTOCOL command.
3. SELECT_CARD_TYPE
This command sets the required card type. The firmware in the CyberMouse adjusts the communication protocol between reader and the
inserted card according to the selected card type.
Command format
02 H 01 H
TYPE See Appendix A for the value to be specified in this command for a particular card to be used.
4. RESET
This section describes the RESET command only for the case when no card type is selected or when the card type 00H is selected. For all other
cases, please refer to the specific section described for each individual card type.
Command format
80 H 00 H
ATR
Copyright 1996-1999 15
Cybermouse Reference Manual
The return status code for this command is 90 00H when the inserted card is a T=0 card, 90 01H when the inserted card is a T=1 card, and 90 10
H when the inserted card is a memory card; otherwise the status code is 60 20H.
5. SET_NOTIFICATION
This command disables / enables the Card Status Messages transmitted by the reader to notify the host computer of the insertion or removal of a
card.
Command format
06 H 01 H
NOTIFY Specifies whether the Card Status Message shall be transmitted to notify the host computer of card insertion / removal
01H : transmit Card Status Message
02H : do not transmit Card Status Message
Copyright 1996-1999 16
Cybermouse Reference Manual
B. Card Commands
The available commands and the parameters specified in the card commands as well as the data transmitted in the response from the
CyberMouse depend on the selected card type.
a) RESET
This command powers up the card inserted in the card reader and performs a card reset.
If the card is powered up when the command is being issued, only a reset of the card is carried out; the power supply to the card is not switched
off.
Command format
80 H 00 H
ATR
b) POWER_OFF
This command powers off the card inserted in the card reader.
Command format
81 H 00 H
c) READ_DATA
To read the specified number of bytes from the specified address of the inserted card. The bytes are read from the card with LSB first, i.e., the
bit at card address 0 is regarded as the LSB of byte 0.
Command format
90 H 03 H 00 H
Copyright 1996-1999 17
Cybermouse Reference Manual
d) WRITE_DATA
To write one byte to the specified address of the inserted card. The byte is written to the card with LSB first, i.e., the bit at card address 0 is
regarded as the LSB of byte 0.
Two different WRITE modes are available for this card type, which are distinguished by a flag in the command data field:
a) Write
The byte value specified in the command is written to the specified address. This command can be used for writing personalization
data and counter values to the card.
b) Write with carry
The byte value specified in the command is written to the specified address and the command is sent to the card to erase the next
lower counter stage. This write mode can therefore only be used for updating the counter value in the card.
With either write mode, the byte at the specified card address is not erased prior to the write operation and, hence, memory bits can only be
programmed from '1' to '0'.
The backup mode available in the SLE4436 card can be enabled or disabled in the write operation.
Command format
91 H 04 H 00 H
e) ERASE_DATA (ST1335)
To erase the specified number of bytes starting at the specified address, i.e., set all bits to '1'.
Command format
95 H 03 H
f) PRESENT_TRANSPORT_CODE
To submit the transport code to the card in order to enable the card personalization mode. The following actions are executed by the
CyberMouse:
- search a '1' bit in the presentation counter and write the bit to '0'
- present the specified code to the card
The CyberMouse does not try to erase the presentation counter after the code submission! This must be done by the application software through
a separate 'Write with carry' command.
Copyright 1996-1999 18
Cybermouse Reference Manual
Command format
92 H
g) AUTHENTICATE_CARD (SLE4436)
To read a card authentication certificate from a SLE4436 card. The following actions are executed by the CyberMouse:
- select Key 1 or Key 2 in the card as specified in the command
- present the challenge data specified in the command to the card
- generate the specified number of CLK pulses for each bit of authentication data computed by the card
- read 16 bits of authentication data from the card
- reset the card to normal operation mode
The CyberMouse returns the 16 bits of authentication data calculated by the card in the response.
Command format
96 H 08 H
CERT
CERT 16 bits of authentication data computed by the card. The LSB of BYTE 1 is the first authentication bit read from the card.
h) AUTHENTICATE_CARD (ST1335)
To read a card authentication certificate from a ST1335 card. The following actions are executed by the CyberMouse:
- present the challenge data specified in the command to the card
- generate the required number of READ and PROG pulses for the computation of signature by the card
- read 4 bits of authentication data from the card
- reset the card to normal operation mode
The CyberMouse returns the 4 bits of authentication data calculated by the card in the response.
Command format
96 H 04 H
Copyright 1996-1999 19
Cybermouse Reference Manual
Response data format
CERT
CERT Single byte response which holds 4 bits of authentication data computed by the card. The LSB of CERT is the first
authentication bit read from the card.
i) AUTHENTICATE_CARD (SLE5536)
To read a card authentication certificate from a SLE5536 card. The following actions are executed by the CyberMouse:
- select Key 1 or Key 2 in the card as specified in the command
- present the challenge data specified in the command to the card
- generate the specified number of CLK pulses for each bit of authentication data computed by the card
- read 16 bits of authentication data from the card
- reset the card to normal operation mode
The CyberMouse returns the 16 bits of authentication data calculated by the card in the response.
Command format
96 H 08 H
CERT
CERT 16 bits of authentication data computed by the card. The LSB of BYTE 1 is the first authentication bit read from the card.
Copyright 1996-1999 20
Cybermouse Reference Manual
a) RESET
This command powers up the card inserted in the card reader. No action is taken if the card is powered up when the command is being issued.
Command format
80 H 00 H
b) POWER_OFF
This command powers off the card inserted in the card reader.
Command format
81 H 00 H
c) SET_OPTIONS
To set the memory page size for the Page Write mode and for the XIIC-bus cards, the chip select address bits transmitted in the XIIC-bus
control byte.
If this command is not sent to the CyberMouse, the default value for the memory page size is four (4) bytes and the default value for the XIIC-
bus chip select address bits is 000B.
Command format
84 H 01 H
d) READ_DATA
To read the specified number of bytes from the specified address of the inserted card.
Copyright 1996-1999 21
Cybermouse Reference Manual
Command format
90 H 03 H
ADDR Byte address of first byte to be read from the card. The high byte of the address is specified as the first byte of ADDR.
LEN Number N of data bytes to be read from the card
(0 < N ≤ MAX_R)
e) WRITE_DATA
To write the specified data bytes to the specified address of the inserted card.
Command format
91 H
Command format
97 H 00 H
START Value of register PROT_START, i.e., the number of the first write-protected block
BLK_CNT Value of register PROT_CNT, i.e., the number of write-protected blocks starting from block # START
HE_BLK Value of register HE_BLOCK, i.e., the number of the High Endurance memory block
Copyright 1996-1999 22
Cybermouse Reference Manual
Command format
94H 02H
START New value of register PROT_START, i.e., the number of the first block to be write-protected (0 ≤ START ≤ 15)
BLK_CNT New value of register PROT_CNT, i.e., the number of blocks to be write-protected starting from block # START (0 <
BLK_CNT ≤ 15)
Command format
94H 01H
HE_BLK New value of register HE_BLOCK, i.e., the block number of the High Endurance memory block (0 ≤ HE_BLK ≤ 15)
Copyright 1996-1999 23
Cybermouse Reference Manual
a) RESET
This command powers up the card inserted in the card reader and performs a card reset.
If the card is powered up when the command is being issued, only a reset of the card is carried out, the power supply to the card is not switched
off.
Command format
80 H 00 H
ATR
b) POWER_OFF
This command powers off the card inserted in the card reader.
Command format
81 H 00 H
c) READ_DATA
To read the specified number of bytes from the specified address of the inserted card. The bytes are read from the card with LSB first, i.e., the
bit at card address 0 is regarded as the LSB of byte 0.
Command format
90 H 03 H
d) WRITE_DATA
To write the specified data bytes to the specified address of the inserted card. The bytes are written to the card with LSB first, i.e., the bit at
card address 0 is regarded as the LSB of byte 0.
The data contents at the specified addresses are not erased prior to the write operation and, hence, memory bits can only be programmed from '1'
to '0'.
Copyright 1996-1999 24
Cybermouse Reference Manual
Command format
91 H
e) ERASE_DATA
To erase the specified number of bytes starting at the specified address, i.e., set all bits to '1'.
NOTE - The memory of the 416/896 type cards is organized in words (16 bits) and only complete words can be erased. Therefore, if an odd
number N (N=2*X + 1; 0 ≤ X ) of bytes is specified in the ERASE_DATA command, N+1 bytes will actually be erased.
Command format
95 H 03 H
f) PRESENT_CODE
To submit a secret code to the card to enable the read or write operations according to the card lifecycle stage and the setting of option bits in
the card.
Through parameters specified in the command data, this command allows to present all the different codes provided by different card types,
such as the transport code, the erase code, etc.
The following actions are executed by the CyberMouse:
- present the specified code to the card
- if applicable, search a '1' bit in the error/erase counter at the specified address and write the bit to '0'
- if applicable, try to erase the erase counter / error counter / reloadable memory area immediately following the secret code in the card
memory
Command format
92 H
Copyright 1996-1999 25
Cybermouse Reference Manual
ADDR = 08
CNT = 04
g) SET_FUSE
To set the FUSE pin of the inserted card to the required electrical state. The FUSE pin controls the way a card interprets the status of the internal
FUSE bit.
The selection becomes active only after a card reset. The default state of the FUSE pin after selecting this card type is 'not connected' (= high
impedance), which is by most cards interpreted as 'Fuse blown'.
Command format
84 H 01 H
h) BLOW_FUSE
To execute the process for blowing a fuse at the specified memory address to irreversibly change the card life cycle state.
NOTE - This command is only used with the ATMEL cards of type AT88SCxxxx. The AM416 / GPM896 / SLE4404 cards use normal
WRITE operations to the proper addresses to blow the fuses.
Command format
94 H 02 H
ADDR Byte address of the fuse. The first bit (bit 0) at this byte address will be written to 0 using the special control signal timing
required by the AT88SCxxxx cards.
Copyright 1996-1999 26
Cybermouse Reference Manual
a) RESET
This command powers up the card inserted in the card reader and performs a card reset.
If the card is powered up when the command is being issued, only a reset of the card is carried out, the power supply to the card is not switched
off.
Command format
80 H 00 H
ATR
b) POWER_OFF
This command powers off the card inserted in the card reader.
Command format
81 H 00 H
c) READ_DATA
To read the specified number of bytes from the specified address of the inserted card.
Command format
90 H 03 H
ADDR Byte address of first byte to be read from the card. The high byte of the address is specified as the first byte of ADDR.
LEN Number N of data bytes to be read from the card (0 < N ≤ MAX_R)
Copyright 1996-1999 27
Cybermouse Reference Manual
d) WRITE_DATA
To write the specified data bytes to the specified address of the inserted card.
Command format
91 H
e) WRITE_PROTECTION
To write the protection bits for the specified addresses in the card.
Each of the bytes specified in the command is internally in the card compared with the byte stored at the specified address and if the data match,
the corresponding protection bit is irreversibly programmed to '0'.
Command format
94 H
Copyright 1996-1999 28
Cybermouse Reference Manual
Command format
92 H 03 H
ERRCNT CODE
ERRCNT The value of the presentation error counter after the code presentation.
CODE The three bytes secret code read from the card.
If the correct code has been presented to the card, the value of ERRCNT is 07H and the value of CODE is identical to the
code data specified in the command.
92 H 0H
ERRCNT DUMMY
Command format
93 H 03 H
Copyright 1996-1999 29
Cybermouse Reference Manual
a) RESET
This command powers up the card inserted in the card reader and performs a card reset.
If the card is powered up when the command is being issued, only a reset of the card is carried out, the power supply to the card is not switched
off.
Command format
80 H 00 H
ATR
b) POWER_OFF
This command powers off the card inserted in the card reader.
Command format
81 H 00 H
c) READ_DATA
To read the specified number of bytes from the specified address of the inserted card.
Command format
90 H 03 H
ADDR Byte address of first byte to be read from the card. The high byte of the address is specified as the first byte of ADDR.
LEN Number N of data bytes to be read from the card (0 < N ≤ MAX_R)
The number L of protection bytes returned in the response is determined by the number N of data bytes read from the card as follows:
L = 1 + INT(N/8)
The arrangement of the protection bits in the PROT bytes is as follows:
Copyright 1996-1999 30
Cybermouse Reference Manual
PROT 1 PROT 2 ....
d) WRITE_DATA
To write the specified data bytes to the specified address of the inserted card.
Command format
91 H
e) WRITE_PROTECTION
To write the protection bits for the specified addresses in the card.
Each of the bytes specified in the command is internally in the card compared with the byte stored at the specified address and if the data match,
the corresponding protection bit is irreversibly programmed to '0'.
Command format
94 H
Command format
92 H 02 H
Copyright 1996-1999 31
Cybermouse Reference Manual
Response data format
ERRCNT CODE
ERRCNT The value of the presentation error counter after the code presentation.
CODE The two bytes secret code read from the card.
If the correct code has been presented to the card, the value of ERRCNT is FFH and the value of CODE is identical to the
code data specified in the command.
Command format
92 H 0H
ERRCNT DUMMY
Copyright 1996-1999 32
Cybermouse Reference Manual
NOTE - The memory of the 93CS06/46 type EEPROM is electrically organized in words (16 bits) and only complete words can be read,
written and erased.
a) RESET
This command powers up the card inserted in the card reader. If the card is powered up when the command is being issued, the power supply to
the card will not temporarily be switched off.
Command format
80 H 00 H
b) POWER_OFF
This command powers off the card inserted in the card reader.
Command format
81 H 00 H
c) READ_DATA
To read the specified number of words from the specified address of the inserted card.
Command format
90 H 03 H
BYTE x Data words read from the card memory. Each data word is transmitted in two bytes, with the high byte of the word transmitted
first.
d) WRITE_DATA
To write the specified data words to the specified address of the inserted card.
Copyright 1996-1999 33
Cybermouse Reference Manual
Command format
91 H
e) WRITE_ALL
To fill the complete card memory with the specified value.
Command format
95 H 02 H
DATA The word value to be written to all card addresses. The value is transmitted in two bytes with the high byte of the word
transmitted first.
f) READ_PROT
To read the contents of the write-protection register from the card (i.e., the start address of the write-protected memory area).
Command format
97 H 00 H
PROT
PROT Value of write protection register, i.e., the address of the first write-protected word.
g) SET_PROTECTION
To set the start address of the write-protected memory area in the card.
Command format
94H 01H
PROT New value of the write protection register, i.e., the address of the first word to be write-protected
Copyright 1996-1999 34
Cybermouse Reference Manual
h) CLEAR_PROTECTION
To clear the write-protection register in the card, i.e., to set all memory addresses to 'not write-protected'.
Command format
94H 00H
i) DISABLE_PROTECTION
Irreversibly to disable access to the write-protection register in the card. The contents of the write-protection register is not changed and the
currently write-protected memory area cannot be modified any more.
Command format
Copyright 1996-1999 35
Cybermouse Reference Manual
NOTE - a programmed bit is '1' while an erased bit is '0' for this type of card.
a) RESET
This command powers up the card inserted in the card reader and performs a card reset.
If the card is powered up when the command is being issued, only a reset of the card is carried out; the power supply to the card is not switched
off.
Command format
80 H 00 H
ATR
b) POWER_OFF
This command powers off the card inserted in the card reader.
Command format
81 H 00 H
c) READ_DATA
To read the specified number of bytes from the specified address of the inserted card. The bytes are read from the card with LSB first, i.e., the
bit at card address 0 is regarded as the LSB of byte 0.
Command format
90 H 03 H 00 H
d) WRITE_DATA
To write one byte to the specified address of the inserted card. The byte is written to the card with LSB first, i.e., the bit at card address 0 is
regarded as the LSB of byte 0.
Copyright 1996-1999 36
Cybermouse Reference Manual
Two different WRITE modes are available for this card type, which are distinguished by a flag in the command data field:
a) Write
The byte value specified in the command is written to the specified address. This command can be used for writing personalization
data and counter values to the card.
b) Write with carry
The byte value specified in the command is written to the specified address and the command is sent to the card to erase the next
lower counter stage. This write mode can therefore only be used for updating the counter value in the card.
With either write mode, the byte at the specified card address is not erased prior to the write operation and, hence, memory bits can only be
programmed from '0' to '1'.
The backup mode available in the ST1333 card can be enabled or disabled in the write operation.
Command format
91 H 04 H 00 H
e) ERASE_DATA
To erase the specified number of bytes starting at the specified address, i.e., set all bits to '0'.
Command format
95 H 03 H
f) PRESENT_TRANSPORT_CODE
To submit the transport code to the card in order to enable the card personalization mode. The following actions are executed by the
CyberMouse:
- search a '0' bit in the presentation counter and write the bit to '1'
- present the specified code to the card
The CyberMouse does not try to erase the presentation counter after the code submission! This must be done by the application software through
a separate 'Write with carry' command.
Command format
92 H
Copyright 1996-1999 37
Cybermouse Reference Manual
BYTE x Transport code
g) AUTHENTICATE_CARD
To read a card authentication certificate from a ST1333 card. The following actions are executed by the CyberMouse:
- present the challenge data specified in the command to the card
- generate the required number of READ and PROG pulses for the computation of signature by the card
- read 4 bits of authentication data from the card
- reset the card to normal operation mode
The CyberMouse returns the 4 bits of authentication data calculated by the card in the response.
Command format
96 H 04 H
CERT
B8 B7 B6 B5 B4 B3 B2 B1
Copyright 1996-1999 38
Cybermouse Reference Manual
a) RESET
This command powers up the card inserted in the card reader.
No action is taken if the card is powered up when the command is being issued.
Command format
Instruction Data
Code length
80 H 00 H
ATR
19 H 55 H AA H 55 H
b) POWER_OFF
This command powers off the card inserted in the card reader.
Command format
Instruction Data
Code length
81 H 00 H
c) READ_DATA
To read the specified number of bytes from the specified address of the inserted card. Please note that the reader always use the sequential read
command to read out the data.
The X76F041 card allows reading data only within a block. However, the AC-SET EVB handles the reading across block boundaries
transparently to the application. Thus, data can be read from any address irrespective of the bock structure of the card., provided that the
adjacent blocks are both not READ protected.
Command format
ADDR LEN
90 H 03 H
ADDR Byte address of first byte to be read from the card. The high byte of the address is specified as the first byte of ADDR.
LEN Number N of data bytes to be read from the card (0 < N ≤ MAX_R)
d) READ_DATA_WITH_PASSWORD
To read the specified number of bytes from the specified address of the inserted card after submission of the specified READ password.
Copyright 1996-1999 39
Cybermouse Reference Manual
The X76F041 card allows reading data only within a block. However, the AC-SET EVB handles the reading across block boundaries
transparently to the application. Thus, data can be read from any address irrespective of the bock structure of the card., provided that the
adjacent blocks are both READ protected.
Command format
90 H 0B H PW7 …. PW0
ADDR Byte address of the first byte to be read from the card. The high byte of the address is specified as the first byte of ADDR.
LEN Number N of data bytes to be read from the card (0 < N ≤ MAX_R)
PASSWORD The READ password
e) CONFIG_READ
This command is the same as READ_DATA_WITH_PASSWORD except that the CONFIGURATION password is used in this command and the
read operation is not restricted to a certain memory area.
Command format
92 H 0B H PW7 …. PW0
ADDR Byte address of first byte to be read from the card. The high byte of the address is specified as the first byte of ADDR.
LEN Number N of data bytes to be read from the card (0 < N ≤ MAX_R)
PASSWORD The CONFIGURATION password
f) WRITE_DATA
To write the specified number of data bytes starting from a specified address.
The X76F041 card allows writing data only to one complete sector (8 bytes) at a time. However, the AC-SET EVB handles the writing across
sector boundaries transparently to the application. Thus, any number of data bytes can be written to any address irrespective of the sector
structure of the card provided that the number of bytes to be written is a multiple of 8 and that adjacent memory blocks are both not WRITE
protected.
Command format
91 H
Copyright 1996-1999 40
Cybermouse Reference Manual
BYTE x Byte values to be written to the card starting at address ADDR. BYTE 1 is written to address ADDR; BYTE N is written to
address ADDR+N-1.
g) WRITE_DATA_WITH_PASSWORD
To write the specified number of data bytes starting from a specified address, after submitting the specified WRITE password to the card.
The X76F041 card allows writing data only to one complete sector (8 bytes) at a time. However, the AC-SET EVB handles the writing across
sector boundaries transparently to the application. Thus, any number of data bytes can be written to any address irrespective of the sector
structure of the card provided that the number of bytes to be written is a multiple of 8 and that adjacent memory blocks are both WRITE
protected.
Command format
94 H PW7 …. PW0
h) CONFIG_WRITE
This command is exactly the same as WRITE_DATA_WITH_PASSWORD except that the CONFIGURATION password is used in this
command and the write operation is not restricted.
Command format
93 H PW7 …. PW0
i) CARD_ADMIN
This command is used to perform various card administration functions.
Copyright 1996-1999 41
Cybermouse Reference Manual
Command format
95 H PW7 …. PW0 1 .. N
Copyright 1996-1999 42
Cybermouse Reference Manual
Mass program
0x70 Nil 0 [CONFIGURATION 0
password]
Mass erase
0x80 Nil 0 [CONFIGURATION 0
password]
Copyright 1996-1999 43
Cybermouse Reference Manual
a) RESET
This command powers up the card inserted in the card reader.
No action is taken if the card is powered up when the command is being issued.
Command format
Instruction Data
Code length
80 H 00 H
ATR
19 H 28 H AA H 55 H
ATR
19 H 64 H AA H 55 H
b) POWER_OFF
This command powers off the card inserted in the card reader.
Command format
Instruction Data
Code length
81 H 00 H
c) READ_DATA_WITH_PASSWORD
To read the specified number of bytes from the specified address of Array 0 or Array 1 of the inserted card, after submission of the specified
READ password for Array 0 or Array 1, respectively.
The X76F128/640 card allows reading data only within an array.
Command format
90 H 0C H PW7 …. PW0
Copyright 1996-1999 44
Cybermouse Reference Manual
d) WRITE_DATA_WITH_PASSWORD
To write the specified number of data bytes starting from a specified address of Array 0 or Array 1, after submitting the specified WRITE
password of the corresponding array to the card.
Command format
91 H PW7 …. PW0
e) RESET_PASSWORD
This command is will clear both arrays and set all passwords to all zero, after submitting the correct password for reset.
Command format
96 H 08 PW7 …. PW0
f) RESET_DEVICE
This command will clear the X76F128/640 retry counter and reactivate the device, after submitting the correct password for reset. When this
command is used prior to the retry counter overflow, the retry counter is reset and no arrays or passwords are affected. If the retry counter has
overflowed, all memory areas are cleared and all commands are blocked and the retry counter is disabled. Issuing a valid RESET_DEVICE
command (with reset password) to the device resets and re-enables the retry counter and re-enables the other commands. Again, the passwords
are not affected.
Command format
97 H 08 PW7 …. PW0
g) CHANGE_PASSWORD
This command is used to change the X76F128/640 various passwords after submitting the original corresponding password.
Copyright 1996-1999 45
Cybermouse Reference Manual
Command format
Copyright 1996-1999 46
Cybermouse Reference Manual
a) RESET
This command powers up the card inserted in the card reader.
No action is taken if the card is powered up when the command is being issued.
Command format
Instruction Data
Code length
80 H 00 H
ATR
19 H 00H AA H 55 H
b) POWER_OFF
This command powers off the card inserted in the card reader.
Command format
Instruction Data
Code length
81 H 00 H
c) READ_DATA_WITH_PASSWORD
To read the specified number of bytes from the specified address of the inserted card after submission of the specified READ password.
Command format
90 H 0B H PW7 …. PW0 00
ADDR Byte address of the first byte to be read from the card. The high byte of the address is specified as the first byte of ADDR.
LEN Number N of data bytes to be read from the card (0 < N ≤ MAX_R)
PASSWORD The READ password
d) WRITE_SECTOR_DATA_WITH_PASSWORD
To write the specified number of data bytes(in multiples of 8) starting from a specified address, after submitting the specified WRITE
password to the card. The starting address must be on a sector start (i.e. multiples of 8).
Copyright 1996-1999 47
Cybermouse Reference Manual
Command format
91 H PW7 …. PW0 00
e) CHANGE_ PASSWORD
This command will change the password for READ or the password for WRITE, after submitting the WRITE password.
Command format
Copyright 1996-1999 48
Cybermouse Reference Manual
80 H 00 H
To reset the card using 3V, extended reset command can be used
80 H 01 H 01 H
ATR
NOTE - The ATR is only returned in the CyberMouse response if the communication protocol of the card is compatible with the reader, i.e.,
if the card can be processed by the CyberMouse. Otherwise, the CyberMouse returns an error status and deactivates the smart card interface.
b) POWER_OFF
This command powers off the card inserted in the card reader.
Command format
81 H 00 H
c) EXCHANGE_APDU
To exchange an APDU (Application Protocol Data Unit) command/response pair between the MCU card inserted in the CyberMouse and the
host computer.
Command format
A0 H
Copyright 1996-1999 49
Cybermouse Reference Manual
NOTE - With the T=0 communication protocol it is not possible to transmit data to the card and from the card in a single command-response
pair. Hence, only either Lc or Le can be greater than 0 in an EXCHANGE_APDU command when a T=0 card is in the reader. If both parameters
have a value greater than 0, the CyberMouse does not execute the command and returns an error status.
d) EXCHANGE_T1_FRAME
To exchange an APDU (Application Protocol Data Unit) command/response pair between the MCU card inserted in the CyberMouse and the
host computer using T1 protocol.
Command format
A1 H
Copyright 1996-1999 50
Cybermouse Reference Manual
a) ACTIVATE_SAM
To power up and reset the specified SAM and transmit the SAM's ATR in the response.
Command format
88 H 01 H
ATR
NOTE - The ATR is only returned in the CyberMouse response if the communication protocol of the SAM is compatible with the reader, i.e.,
if the SAM can be processed by the CyberMouse. Otherwise, the CyberMouse returns an error status and deactivates the SAM.
b) DEACTIVATE_SAM
This command powers off the SAM inserted in the CyberMouse-M20-1 board.
Command format
89 H 00 H
c) EXCHANGE_SAM_APDU
To exchange an APDU (Application Protocol Data Unit) command/response pair between the SAM in the CyberMouse-M20-1 board and the
host computer.
Command format
B0 H
NOTE - With the T=0 communication protocol it is not possible to transmit data to the SAM and from the SAM in a single command-
response pair. Hence, only either Lc or Le can be greater than 0 in an EXCHANGE_SAM_APDU command when a T=0 SAM is in the reader. If
both parameters have a value greater than 0, the CyberMouse does not execute the command and returns an error status.
Copyright 1996-1999 51
Cybermouse Reference Manual
Response data format
Copyright 1996-1999 52
Cybermouse Reference Manual
05 AM8KP SLE4418
AM8KS SLE4428
06 AM2KP SLE4432
AM2KS SLE4442
07 AM64KP 24C65
08 AM256 93CS06/46
0AH X76F041
0BH ST1333
0EH X76F128/640
10H X76F100
Copyright 1996-1999 53
Cybermouse Reference Manual
90 10 OK – synchronous protocol is used (only in response to the RESET command). The exact card type should be
selected by using the SELECT_CARD_TYPE command.
60 02 No card in reader
60 20 Card failure
67 12 APDU command aborted (only MCU-based card using T=1 protocol); the command abortion may be caused by a
card internal failure.
Copyright 1996-1999 54
Cybermouse Reference Manual
Revision Modifications
1.09 first distributed release
Copyright 1996-1999 55
Cybermouse Reference Manual
Device
Power supply
Type ..................................................... RS-232C, five lines: RxD, TxD, CTS, DTR, GND
Connector............................................. supplied together with the reader
Case
Operating Conditions
Copyright 1996-1999 56
Cybermouse Reference Manual
NOTES
Copyright 1996-1999 57
Cybermouse Reference Manual
NOTES
Copyright 1996-1999 58