9 Description of the commands

11.113GPPRelease 1999Specification of the Subscriber Identity Module - Mobile Equipment (SIM-ME) InterfaceTS

This clause states the general principles for mapping the functions described in clause 8 onto Application Protocol Data Units which are used by the transmission protocol.

9.1 Mapping principles

An APDU can be a command APDU or a response APDU.

A command APDU has the following general format:

CLA

INS

P1

P2

P3

Data

The response APDU has the following general format:

Data

SW1

SW2

An APDU is transported by the T=0 transmission protocol without any change. Other protocols might embed an APDU into their own transport structure (ISO/IEC 7816‑3 [26]).

The bytes have the following meaning:

‑ CLA is the class of instruction (ISO/IEC 7816‑3 [26]), ‘A0’ is used in the GSM application;

‑ INS is the instruction code (ISO/IEC 7816‑3 [26]) as defined in this subclause for each command;

‑ P1, P2, P3 are parameters for the instruction. They are specified in table 9. ‘FF’ is a valid value for P1, P2 and P3. P3 gives the length of the data element. P3=’00’ introduces a 256 byte data transfer from the SIM in an outgoing data transfer command (response direction). In an ingoing data transfer command (command direction), P3=’00’ introduces no transfer of data;

‑ SW1 and SW2 are the status words indicating the successful or unsuccessful outcome of the command.

For some of the functions described in clause 8 it is necessary for T=0 to use a supplementary transport service command (GET RESPONSE) to obtain the output data. For example, the SELECT function needs the following two commands:

‑ the first command (SELECT) has both parameters and data serving as input for the function;

‑ the second command (GET RESPONSE) has a parameter indicating the length of the data to be returned.

If the length of the response data is not known beforehand, then its correct length may be obtained by applying the first command and interpreting the status words. SW1 shall be ‘9F’ and SW2 shall give the total length of the data. Other status words may be present in case of an error. The various cases are:

Case 1: No input / No output

CLA

INS

P1

P2

P3

SW1

SW2

lgth (=’00’)

’90’

’00’

Case 2: No input / Output of known length

CLA

INS

P1

P2

P3

DATA with length lgth

SW1

SW2

lgth

’90’

’00’

NOTE: lgth=’00’ causes a data transfer of 256 bytes.

Case 3: No Input / Output of unknown length

CLA

INS

P1

P2

P3

SW1

SW2

lgth (=’00’)

‘9F’

lgth1

GET RESPONSE

CLA

INS

P1

P2

P3

DATA with length lgth2  lgth1

SW1

SW2

lgth2

’90’

’00’

Case 4: Input / No output

CLA

INS

P1

P2

P3

DATA with length lgth

SW1

SW2

lgth

’90’

’00’

Case 5: Input / Output of known or unknown length

CLA

INS

P1

P2

P3

DATA with length lgth

SW1

SW2

lgth

‘9F’

lgth1

GET RESPONSE

CLA

INS

P1

P2

P3

DATA with length lgth2  lgth1

SW1

SW2

lgth2

’90’

’00’

For cases 3 and 5, when SW1/SW2 indicates there is response data (i.e. SW1/SW2 = ‘9FXX’), then, if the ME requires to get this response data, it shall send a GET RESPONSE command as described in the relevant case above.

For case 5, in case of an ENVELOPE for SIM data download, SW1/SW2 may also indicate that there is response data with the value ‘9EXX’, and the ME shall then send a GET RESPONSE command to get this response data.

If the GSM application is one of several applications in a multi‑application card, other commands with CLA not equal to ‘A0’ may be sent by the terminal. This shall not influence the state of the GSM application.

The following diagrams show how the five cases of transmission protocol identified in the above diagrams can all be used to send pro‑active SIM commands. For further information on the diagrams below see TS 11.14 [27].

Case 1: No input / "OK" response with no output, plus additional command from SIM

CLA

INS

P1

P2

P3

SW1

SW2

lgth (=’00’)

’91’

lgth1

[Possible "normal GSM operation" command/response pairs]

FETCH

CLA

INS

P1

P2

P3

DATA with length lgth1

SW1

SW2

lgth1

’90’

’00’

NOTE: lgth1=’00’ causes a data transfer of 256 bytes.

Case 2: No input / "OK" response with data of known length, plus additional command from SIM

CLA

INS

P1

P2

P3

DATA with length lgth

SW1

SW2

lgth

’91’

lgth1

[Possible "normal GSM operation" command/response pairs]

FETCH

CLA

INS

P1

P2

P3

DATA with length lgth1

SW1

SW2

lgth1

’90’

’00’

NOTE: lgth=’00’ causes a data transfer of 256 bytes. The same applies to lgth1.

Case 3: No Input / "OK" response with data of unknown length, plus additional command from SIM

CLA

INS

P1

P2

P3

SW1

SW2

lgth (=’00’)

‘9F’

lgth1

GET RESPONSE

CLA

INS

P1

P2

P3

DATA with length lgth2  lgth1

SW1

SW2

lgth2

’91’

lgth3

[Possible "normal GSM operation" command/response pairs]

FETCH

CLA

INS

P1

P2

P3

DATA with length lgth3

SW1

SW2

lgth3

’90’

’00’

Case 4: Input / "OK" response with no output data, plus additional command from SIM

CLA

INS

P1

P2

P3

DATA with length lgth

SW1

SW2

lgth

’91’

lgth1

[Possible "normal GSM operation" command/response pairs]

FETCH

CLA

INS

P1

P2

P3

DATA with length lgth1

SW1

SW2

lgth1

’90’

’00’

Case 5: Input / "OK" response with data of known or unknown length, plus additional command from SIM

CLA

INS

P1

P2

P3

DATA with length lgth

SW1

SW2

lgth

‘9F’

lgth1

GET RESPONSE

CLA

INS

P1

P2

P3

DATA with length lgth2lgth1

SW1

SW2

lgth2

’91’

lgth3

[Possible "normal GSM operation" command/response pairs]

FETCH

CLA

INS

P1

P2

P3

DATA with length lgth3

SW1

SW2

lgth3

’90’

’00’

9.2 Coding of the commands

Table 9 below gives the coding of the commands. The direction of the data is indicated by (S) and (R), where (S) stands for data sent by the ME while (R) stands for data received by the ME. Offset is coded on 2 bytes where P1 gives the high order byte and P2 the low order byte. ’00 00′ means no offset and reading/updating starts with the first byte while an offset of ’00 01′ means that reading/updating starts with the second byte.

In addition to the instruction codes specified in table 9 the following codes are reserved:

GSM operational phase:

‘1X’ with X even, from X=6 to X=E.

Administrative management phase:

‘2A’, ‘D0’, ‘D2’, ‘DE’, ‘C4’, ‘C6’, ‘C8’, ‘CA’, ‘CC’, ‘B4’, ‘B6’, ‘B8’, ‘BA’ and ‘BC’.

Table 9: Coding of the commands

COMMAND

INS

P1

P2

P3

S/R

SELECT

‘A4’

’00’

’00’

’02’

S/R

STATUS

‘F2’

’00’

’00’

lgth

R

READ BINARY

‘B0’

offset high

offset low

lgth

R

UPDATE BINARY

‘D6’

offset high

offset low

lgth

S

READ RECORD

‘B2’

rec No.

mode

lgth

R

UPDATE RECORD

‘DC’

rec No.

mode

lgth

S

SEEK

‘A2’

’00’

type/mode

lgth

S/R

INCREASE

’32’

’00’

’00’

’03’

S/R

VERIFY CHV

’20’

’00’

CHV No.

’08’

S

CHANGE CHV

’24’

’00’

CHV No.

’10’

S

DISABLE CHV

’26’

’00’

’01’

’08’

S

ENABLE CHV

’28’

’00’

’01’

’08’

S

UNBLOCK CHV

‘2C’

’00’

see note

’10’

S

INVALIDATE

’04’

’00’

’00’

’00’

REHABILITATE

’44’

’00’

’00’

’00’

RUN GSM ALGORITHM

’88’

’00’

’00’

’10’

S/R

SLEEP

‘FA’

’00’

’00’

’00’

GET RESPONSE

‘C0’

’00’

’00’

lgth

R

TERMINAL PROFILE

’10’

’00’

’00’

lgth

S

ENVELOPE

‘C2’

’00’

’00’

lgth

S/R

FETCH

’12’

’00’

’00’

lgth

R

TERMINAL RESPONSE

’14’

’00’

’00’

lgth

S

NOTE: If the UNBLOCK CHV command applies to CHV1 then P2 is coded ’00’; if it applies to CHV2 then P2 is coded ’02’.

Definitions and codings used in the response parameters/data of the commands are given in subclause 9.3.

9.2.1 SELECT

COMMAND

CLASS

INS

P1

P2

P3

SELECT

‘A0’

‘A4’

’00’

’00’

’02’

Command parameters/data:

Byte(s)

Description

Length

1 ‑ 2

File ID

2

Response parameters/data in case of an MF or DF:

Byte(s)

Description

Length

1 ‑ 2

RFU

2

3 ‑ 4

Total amount of memory of the selected directory which is not allocated to any of the DFs or EFs under the selected directory

2

5 ‑ 6

File ID

2

7

Type of file (see subclause 9.3)

1

8 ‑ 12

RFU

5

13

Length of the following data (byte 14 to the end)

1

14 ‑ 34

GSM specific data

21

GSM specific data:

Byte(s)

Description

Length

14

File characteristics (see detail 1)

1

15

Number of DFs which are a direct child of the current directory

1

16

Number of EFs which are a direct child of the current directory

1

17

Number of CHVs, UNBLOCK CHVs and administrative codes

1

18

RFU

1

19

CHV1 status (see detail 2)

1

20

UNBLOCK CHV1 status (see detail 2)

1

21

CHV2 status (see detail 2)

1

22

UNBLOCK CHV2 status (see detail 2)

1

23

RFU

1

24 ‑ 34

Reserved for the administrative management

0 ≤ lgth ≤ 11

Bytes 1 – 22 are mandatory and shall be returned by the SIM. Bytes 23 and following are optional and may not be returned by the SIM.

NOTE 1: Byte 35 and following are RFU.

NOTE 2: The STATUS information of the MF, DFGSM and DFTELECOM provide some identical application specific data, e.g. CHV status. On a multi‑application card the MF should not contain any application specific data. Such data is obtained by terminals from the specific application directories. ME manufacturers should take this into account and therefore not use application specific data which may exist in the MF of a mono‑application SIM.

Similarly, the VERIFY CHV command should not be executed in the MF but in the relevant application directory (e.g. DFGSM).

Detail 1: File characteristics

b8

b7

b6

b5

b4

b3

b2

b1

Clock stop (see below)

For running the authentication algorithm, or the ENVELOPE command for SIM Data Download, a frequency is required of at least 13/8 MHz if b2=0 and 13/4 MHz if b2=1

Clock stop (see below)

for coding (see TS 11.12 [28])

RFU

b8=0: CHV1 enabled; b8=1: CHV1 disabled

The coding of the conditions for stopping the clock is as follows:

Bit b1

Bit b3

Bit b4

1

0

0

clock stop allowed, no preferred level

1

1

0

clock stop allowed, high level preferred

1

0

1

clock stop allowed, low level preferred

0

0

0

clock stop not allowed

0

1

0

clock stop not allowed, unless at high level

0

0

1

clock stop not allowed, unless at low level

If bit b1 (column 1) is coded 1, stopping the clock is allowed at high or low level. In this case columns 2 (bit b3) and 3 (bit b4) give information about the preferred level (high or low, respectively) at which the clock may be stopped.

If bit b1 is coded 0, the clock may be stopped only if the mandatory condition in column 2 (b3=1, i.e. stop at high level) or column 3 (b4=1, i.e. stop at low level) is fulfilled. If all 3 bits are coded 0, then the clock shall not be stopped.

Detail 2: Status byte of a secret code

b8

b7

b6

b5

b4

b3

b2

b1

Number of false presentations remaining
(‘0’ means blocked)

RFU

b8=0: secret code not initialised,

b8=1: secret code initialised

Response parameters/data in case of an EF:

Byte(s)

Description

Length

1 ‑ 2

RFU

2

3 ‑ 4

File size

(for transparent EF: the length of the body part of the EF)

(for linear fixed or cyclic EF: record length multiplied by the number of records of the EF)

2

5 ‑ 6

File ID

2

7

Type of file (see 9.3)

1

8

see detail 3

1

9 ‑ 11

Access conditions (see 9.3)

3

12

File status (see 9.3)

1

13

Length of the following data (byte 14 to the end)

1

14

Structure of EF (see 9.3)

1

15

Length of a record (see detail 4)

1

16 and following

RFU

Bytes 1-14 are mandatory and shall be returned by the SIM.

Byte 15 is mandatory in case of linear fixed or cyclic EFs and shall be returned by the SIM.

Byte 15 is optional in case of transparent EFs and may not be returned by the SIM.

Byte 16 and following (when defined) are optional and may not be returned by the SIM.

Detail 3: Byte 8

For transparent and linear fixed EFs this byte is RFU. For a cyclic EF all bits except bit 7 are RFU; b7=1 indicates that the INCREASE command is allowed on the selected cyclic file.

Detail 4: Byte 15

For cyclic and linear fixed EFs this byte denotes the length of a record. For a transparent EF, this byte shall be coded ’00’, if this byte is sent by the SIM.

9.2.2 STATUS

COMMAND

CLASS

INS

P1

P2

P3

STATUS

‘A0’

‘F2’

’00’

’00’

lgth

The response parameters/data are identical to the response parameters/data of the SELECT command in case of an MF or DF.

9.2.3 READ BINARY

COMMAND

CLASS

INS

P1

P2

P3

READ BINARY

‘A0’

‘B0’

offset high

offset low

lgth

Response parameters/data:

Byte(s)

Description

Length

1 ‑ lgth

Data to be read

lgth

9.2.4 UPDATE BINARY

COMMAND

CLASS

INS

P1

P2

P3

UPDATE BINARY

‘A0’

‘D6’

offset high

offset low

lgth

Command parameters/data:

Byte(s)

Description

Length

1 ‑ lgth

Data

lgth

9.2.5 READ RECORD

COMMAND

CLASS

INS

P1

P2

P3

READ RECORD

‘A0’

‘B2’

Rec.No.

Mode

lgth

Parameter P2 specifies the mode:

‑ ’02’ = next record;

‑ ’03’ = previous record;

‑ ’04’ = absolute mode/current mode, the record number is given in P1 with P1=’00’ denoting the current record.

For the modes "next" and "previous" P1 has no significance and shall be set to ’00’ by the ME. To ensure phase compatibility between Phase 2 SIMs and Phase 1 MEs, the SIM shall not interpret the value given by the ME.

Response parameters/data:

Byte(s)

Description

Length

1 ‑ lgth

The data of the record

lgth

9.2.6 UPDATE RECORD

COMMAND

CLASS

INS

P1

P2

P3

UPDATE RECORD

‘A0’

‘DC’

Rec.No.

Mode

lgth

Parameter P2 specifies the mode:

‑ ’02’ = next record;

‑ ’03’ = previous record;

‑ ’04’ = absolute mode/current mode; the record number is given in P1 with P1=’00’ denoting the current record.

For the modes "next" and "previous" P1 has no significance and shall be set to ’00’ by the ME. To ensure phase compatibility between Phase 2 SIMs and Phase 1 MEs, the SIM shall not interpret the value given by the ME.

Command parameters/data:

Byte(s)

Description

Length

1 ‑ lgth

Data

lgth

9.2.7 SEEK

COMMAND

CLASS

INS

P1

P2

P3

SEEK

‘A0’

‘A2’

’00’

Type/Mode

lgth

Parameter P2 specifies type and mode:

‑ ‘x0’ = from the beginning forward;

‑ ‘x1’ = from the end backward;

‑ ‘x2’ = from the next location forward;

‑ ‘x3’ = from the previous location backward;

with x=’0′ specifies type 1 and x=’1′ specifies type 2 of the SEEK command.

Command parameters/data:

Byte(s)

Description

Length

1 ‑ lgth

Pattern

lgth

There are no response parameters/data for a type 1 SEEK. A type 2 SEEK returns the following response parameters/data:

Byte(s)

Description

Length

1

Record number

1

9.2.8 INCREASE

COMMAND

CLASS

INS

P1

P2

P3

INCREASE

‘A0’

’32’

’00’

’00’

’03’

Command parameters/data:

Byte(s)

Description

Length

1 ‑ 3

Value to be added

3

Response parameters/data:

Byte(s)

Description

Length

1 ‑ X

Value of the increased record

X

X+1 ‑ X+3

Value which has been added

3

NOTE: X denotes the length of the record.

9.2.9 VERIFY CHV

COMMAND

CLASS

INS

P1

P2

P3

VERIFY CHV

‘A0’

’20’

’00’

CHV No.

’08’

Parameter P2 specifies the CHV:

‑ ’01’ = CHV1;

‑ ’02’ = CHV2.

Command parameters/data:

Byte(s)

Description

Length

1 ‑ 8

CHV value

8

9.2.10 CHANGE CHV

COMMAND

CLASS

INS

P1

P2

P3

CHANGE CHV

‘A0’

’24’

’00’

CHV No.

’10’

Parameter P2 specifies the CHV:

‑ ’01’ = CHV1;

‑ ’02’ = CHV2.

Command parameters/data:

Byte(s)

Description

Length

1 ‑ 8

Old CHV value

8

9 ‑ 16

New CHV value

8

9.2.11 DISABLE CHV

COMMAND

CLASS

INS

P1

P2

P3

DISABLE CHV

‘A0’

’26’

’00’

’01’

’08’

Command parameters/data:

Byte(s)

Description

Length

1 ‑ 8

CHV1 value

8

9.2.12 ENABLE CHV

COMMAND

CLASS

INS

P1

P2

P3

ENABLE CHV

‘A0’

’28’

’00’

’01’

’08’

Command parameters/data:

Byte(s)

Description

Length

1 ‑ 8

CHV1 value

8

9.2.13 UNBLOCK CHV

COMMAND

CLASS

INS

P1

P2

P3

UNBLOCK CHV

‘A0’

‘2C’

’00’

CHV No.

’10’

Parameter P2 specifies the CHV:

‑ 00 = CHV1;

‑ 02 = CHV2.

NOTE: The coding ’00’ for CHV1 differs from the coding of CHV1 used for other commands.

Command parameters/data:

Byte(s)

Description

Length

1 ‑ 8

UNBLOCK CHV value

8

9 ‑ 16

New CHV value

8

9.2.14 INVALIDATE

COMMAND

CLASS

INS

P1

P2

P3

INVALIDATE

‘A0’

’04’

’00’

’00’

’00’

9.2.15 REHABILITATE

COMMAND

CLASS

INS

P1

P2

P3

REHABILITATE

‘A0’

’44’

’00’

’00’

’00’

9.2.16 RUN GSM ALGORITHM

COMMAND

CLASS

INS

P1

P2

P3

RUN GSM ALGORITHM

‘A0’

’88’

’00’

’00’

’10’

Command parameters/data:

Byte(s)

Description

Length

1 ‑ 16

RAND

16

Response parameters/data:

Byte(s)

Description

Length

1 ‑ 4

SRES

4

5 ‑ 12

Cipher Key Kc

8

The most significant bit of SRES is coded on bit 8 of byte 1. The most significant bit of Kc is coded on bit 8 of byte 5.

9.2.17 SLEEP

COMMAND

CLASS

INS

P1

P2

P3

SLEEP

‘A0’

‘FA’

’00’

’00’

’00’

NOTE: This command is used by Phase 1 MEs only.

9.2.18 GET RESPONSE

COMMAND

CLASS

INS

P1

P2

P3

GET RESPONSE

‘A0’

‘C0’

’00’

’00’

lgth

The response data depends on the preceding command. Response data is available after the commands RUN GSM ALGORITHM, SEEK (type 2), SELECT, INCREASE, and ENVELOPE. If the command GET RESPONSE is executed, it is required that it is executed immediately after the command it is related to (no other command shall come between the command/response pair and the command GET RESPONSE). If the sequence is not respected, the SIM shall send the status information "technical problem with no diagnostic given" as a reaction to the GET RESPONSE.

Since the MF is implicitly selected after activation of the SIM, GET RESPONSE is also allowed as the first command after activation.

The response data itself is defined in the subclause for the corresponding command.

9.2.19 TERMINAL PROFILE

COMMAND

CLASS

INS

P1

P2

P3

TERMINAL PROFILE

‘A0’

’10’

’00’

’00’

lgth

Command parameters/data:

length lgth. The structure of the command parameters is defined in TS 11.14 [27].

Response parameters/data:

none available

9.2.20 ENVELOPE

COMMAND

CLASS

INS

P1

P2

P3

ENVELOPE

‘A0’

‘C2’

’00’

’00’

lgth

Command parameters/data:

length lgth. The structure of the command parameters is defined in TS 11.14 [27].

Response parameters/data:

The structure of the data is defined in TS 11.14 [27].

9.2.21 FETCH

COMMAND

CLASS

INS

P1

P2

P3

FETCH

‘A0’

’12’

’00’

’00’

lgth

Command parameters/data:

none.

Response parameters/data:

length lgth. The structure of the data is defined in TS 11.14 [27].

9.2.22 TERMINAL RESPONSE

COMMAND

CLASS

INS

P1

P2

P3

TERMINAL RESPONSE

‘A0’

’14’

’00’

’00’

lgth

Command parameters/data:

length lgth. The structure of the command parameters is defined in TS 11.14 [27].

Response parameters/data:

none available.

9.3 Definitions and coding

The following definitions and coding are used in the response parameters/data of the commands.

Coding

Each byte is represented by bits b8 to b1, where b8 is the most significant bit (MSB) and b1 is the least significant bit (LSB). In each representation the leftmost bit is the MSB.

RFU

In a GSM specific card all bytes which are RFU shall be set to ’00’ and RFU bits to 0. Where the GSM application exists on a multiapplication card or is built on a generic telecommunications card (e.g. TE9) then other values may apply. The values will be defined in the appropriate specifications for such cards. These bytes and bits shall not be interpreted by an ME in a GSM session.

File status

b8

b7

b6

b5

b4

b3

b2

b1

b1=0: invalidated; b1=1: not invalidated

RFU

b3=0: not readable or updatable when invalidated

b3=1: readable and updatable when invalidated

RFU

Bit b3 may be set to 1 in special circumstances when it is required that the EF can be read and updated even if the EF is invalidated, e.g. reading and updating the EFADN when the FDN feature is enabled, or reading and updating the EFBDN when the BDN feature is disabled.

Structure of file

‑ ’00’ transparent;

‑ ’01’ linear fixed;

‑ ’03’ cyclic.

Type of File

‑ ’00’ RFU;

‑ ’01’ MF;

‑ ’02’ DF;

‑ ’04’ EF.

Coding of CHVs and UNBLOCK CHVs

A CHV is coded on 8 bytes. Only (decimal) digits (0‑9) shall be used, coded in CCITT T.50 [20] with bit 8 set to zero. The minimum number of digits is 4. If the number of digits presented by the user is less than 8 then the ME shall pad the presented CHV with ‘FF’ before sending it to the SIM.

The coding of the UNBLOCK CHVs is identical to the coding of the CHVs. However, the number of (decimal) digits is always 8.

Coding of Access Conditions

The access conditions for the commands are coded on bytes 9, 10 and 11 of the response data of the SELECT command. Each condition is coded on 4 bits as shown in table 10.

Table 10: Access conditions

ALW

‘0’ *

CHV1

‘1’ *

CHV2

‘2’ *

RFU

‘3’

ADM

‘4’

…..

..

ADM

‘E’

NEW

‘F’ *

Entries marked "*" in the table above, are also available for use as administrative codes in addition to the ADM access levels ‘4’ to ‘E’ (refer to subclause 7.3) if required by the appropriate administrative authority. If any of these access conditions are used, the code returned in the Access Condition bytes in the response data shall be the code applicable to that particular level.

Byte 9:

b8

b7

b6

b5

b4

b3

b2

b1

UPDATE

READ; SEEK

Byte 10:

b8

b7

b6

b5

b4

b3

b2

b1

RFU

INCREASE

Byte 11:

b8

b7

b6

b5

b4

b3

b2

b1

INVALIDATE

REHABILITATE

9.4 Status conditions returned by the card

This subclause specifies the coding of the status words SW1 and SW2.

9.4.1 Responses to commands which are correctly executed

SW1

SW2

Description

’90’

’00’

‑ normal ending of the command

’91’

‘XX’

‑ normal ending of the command, with extra information from the proactive SIM containing a command for the ME. Length ‘XX’ of the response data

‘9E’

‘XX’

‑ length ‘XX’ of the response data given in case of a SIM data download error

‘9F’

‘XX’

‑ length ‘XX’ of the response data

9.4.2 Responses to commands which are postponed

SW1

SW2

Error description

’93’

’00’

‑ SIM Application Toolkit is busy. Command cannot be executed at present, further normal commands are allowed.

9.4.3 Memory management

SW1

SW2

Error description

’92’

‘0X’

‑ command successful but after using an internal update retry routine ‘X’ times

’92’

’40’

‑ memory problem

9.4.4 Referencing management

SW1

SW2

Error description

’94’

’00’

‑ no EF selected

’94’

’02’

‑ out of range (invalid address)

’94’

’04’

‑ file ID not found

‑ pattern not found

’94’

’08’

‑ file is inconsistent with the command

9.4.5 Security management

SW1

SW2

Error description

’98’

’02’

‑ no CHV initialized

’98’

’04’

‑ access condition not fulfilled

‑ unsuccessful CHV verification, at least one attempt left

‑ unsuccessful UNBLOCK CHV verification, at least one attempt left

‑ authentication failed (see note)

’98’

’08’

‑ in contradiction with CHV status

’98’

’10’

‑ in contradiction with invalidation status

’98’

’40’

‑ unsuccessful CHV verification, no attempt left

‑ unsuccessful UNBLOCK CHV verification, no attempt left

‑ CHV blocked

‑ UNBLOCK CHV blocked

’98’

’50’

‑ increase cannot be performed, Max value reached

NOTE: A Phase 1 SIM may send this error code after the third consecutive unsuccessful CHV verification attempt or the tenth consecutive unsuccessful unblocking attempt.

9.4.6 Application independent errors

SW1

SW2

Error description

’67’

‘XX’

‑ incorrect parameter P3 (see note)

‘6B’

‘XX’#

‑ incorrect parameter P1 or P2 (see ##)

‘6D’

‘XX’#

‑ unknown instruction code given in the command

‘6E’

‘XX’#

‑ wrong instruction class given in the command

‘6F’

‘XX’#

‑ technical problem with no diagnostic given

NOTE 1: # These values of ‘XX’ are specified by ISO/IEC; at present the default value ‘XX’=’00’ is the only one defined.

NOTE 2: ## When the error in P1 or P2 is caused by the addressed record being out of range, then the return code ’94 02′ shall be used.

NOTE: ‘XX’ gives the correct length or states that no additional information is given (‘XX’ = ’00’).

9.4.7 Commands versus possible status responses

The following table shows for each command the possible status conditions returned (marked by an asterisk *).

Table 11: Commands and status words

OK

Busy

Mem Sta

Refer.

Status

Security

Status

Application

Independent

Errors

Commands

90 00

91 XX

9E XX

9F XX

93 00

92 0X

92 40

94 00

94 02

94 04

94 08

98 02

98 04

98 08

98 10

98 40

98 50

67 XX

6B XX

6D XX

6E XX

6F XX

Select

*

*

*

*

*

*

*

Status

*

*

*

*

*

*

*

Update Binary

*

*

*

*

*

*

*

*

*

*

*

*

Update Record

*

*

*

*

*

*

*

*

*

*

*

*

*

Read Binary

*

*

*

*

*

*

*

*

*

*

*

Read Record

*

*

*

*

*

*

*

*

*

*

*

*

Seek

*

*

*

*

*

*

*

*

*

*

*

*

Increase

*

*

*

*

*

*

*

*

*

*

*

*

Verify CHV

*

*

*

*

*

*

*

*

*

*

*

*

Change CHV

*

*

*

*

*

*

*

*

*

*

*

*

Disable CHV

*

*

*

*

*

*

*

*

*

*

*

*

Enable CHV

*

*

*

*

*

*

*

*

*

*

*

*

Unblock CHV

*

*

*

*

*

*

*

*

*

*

*

*

Invalidate

*

*

*

*

*

*

*

*

*

*

*

Rehabilitate

*

*

*

*

*

*

*

*

*

*

*

Run GSM Algorithm

*

*

*

*

*

*

*

*

Sleep

*

*

*

*

*

Get Response

*

*

*

*

*

*

*

Terminal Profile

*

*

*

*

*

*

*

*

Envelope

*

*

*

*

*

*

*

*

*

*

*

Fetch

*

*

*

*

*

*

Terminal Response

*

*

*

*

*

*

*

*

The responses ’91 XX’, and ’93 00′ and ‘9E XX’ can only be given by a SIM supporting SIM Application Toolkit, to an ME also supporting SIM Application Toolkit.

For the SEEK command the response ’91 XX’ can be given directly after a Type 1 SEEK command. Following the Type 2 SEEK command the SIM can give the response ’91 XX’ only after the GET RESPONSE command.