This command transports large amounts of data on APDU based communication with different data formats.
This command is either a case 2 or case 3 command depending on P1 b3 as described below. It becomes a case 1 command when P1 b2 is set (session abort).
P1 defines the data transfer session number and is also used for requesting retransmission and for session abort. The session number allows up to four transfer sessions to be interleaved.
The P2 parameter contains the number of remaining data blocks going from terminal to the UICC in this transaction.
If the UICC successfully receives an encrypted block that is not the last block then the UICC may respond with SW1 SW2 set to '92 XX' indicating normal ending of the command. The UICC may indicate that it wants to return data related to this or another data transfer session with status words SW1 SW2 indicating the session number with 'More data blocks pending'.
If the UICC successfully receives the last block then SW1 SW2 shall indicate 'Data transaction ongoing'.
If the UICC has been requested to send a block to the terminal, b3 in P1 is set to '0', and this is not the last block to be retrieved to the terminal, then SW1 SW2 shall indicate 'More data blocks pending'.
Both the terminal and the UICC can abort the data transfer session.
A data transfer session is ongoing until it is aborted by the UICC or terminal or completed in normal circumstances. Upon session abort by the terminal, the Connection SA remains open and all data related to the current transaction are lost.
If the UICC indicates a proactive command the terminal can send a command like STATUS that allows SW1 SW2 to be '91 XX' in a different session. The interrupted transaction is resumed afterwards.
If P2 is different from 0 then the APDU shall contain data. Once P2 has reached zero the terminal shall not start sending more data in the same session as long as the UICC is producing response data.
Data coding:
The data transmitted is encapsulated in a BER-TLV data object structure and is formatted as follows:
The same tag value shall be used within one transfer session. All data within subsequent TRANSACT DATA commands within the same session shall use the same tag as the first TRANSACT DATA command in the session.
Response status words:
The normal response to the TRANSACT DATA APDU is '92 XX': Data transaction ongoing. The encoding of SW2 can be seen in Table 11.33.
Session number - The session number from P1
the pending data block is a response to
-
-
-
-
-
-
-
X
Data available control
0 -
No more pending data blocks. Transaction complete
1 -
More data blocks pending. Terminal shall send another 'TRANSACT DATA' APDU to retrieve that data
The session is aborted by the UICC if status words '6A 84' - Not enough memory space is returned.
Response data:
The UICC may indicate that it wants to respond with data to each command APDU as long as this is part of the same session. This means that not all data to the UICC has to be sent before the UICC can start responding with data.
Response data shall be encoded within TLV objects with the same tag and format as the one used in the data in the TRANSACT DATA APDU command.
This function is used to store the internal status of the UICC so that the power supply to the UICC can be switched off, and to subsequently restore the UICC status. The mechanism therefore allows restoring to a new card session certain states saved at suspension of a previous card session.
The terminal does not issue the command if the UICC suspension mechanism is not indicated as supported by the UICC in the UICC Maximum Power Consumption file (EFUMPC).
A UICC supporting LSEs shall not indicate support for the UICC suspension mechanism. A terminal supporting LSEs shall not use the UICC suspension mechanism defined in the present document on a UICC supporting LSEs.
The terminal shall not use this mechanism if it supports an interface in addition to the interface defined in the present document (e.g. the UICC-CLF interface as defined in ETSI TS 102 613 [19]).
The following P1 values are defined.
When the UICC receives the command to suspend, it stores the complete UICC status to a non-volatile memory. The UICC status includes all data that is required to resume the UICC in the exact same condition, so that it is equivalent as if the power supply was not removed. This includes, but is not limited to:
the status of selected applications on each logical channel;
the security context related to PIN verification status for each application;
for each logical channel, the selected EF with:
for a transparent EF: offset;
for a linear fixed EF and cyclic EF: record pointer, for a BER TLV structure EF: the current operation (if any), current tag pointer (including the current offset in the data object), the offset and length of data which was transferred in the previous block;
the status of toolkit applications.
The UICC shall reject the command with status word '6985' during an active proactive UICC session, or if there is any open BIP channel, or if a secure channel (including those defined in the present document or in ETSI TS 102 225 [21] and ETSI TS 102 226 [29]) is in use. The UICC may use the status word '6985' to reject the command due to internal reasons.
The UICC shall reject the command with status word '9864' if the minimum duration requested by the terminal is too large to be accepted.
The UICC generates a random Resume token of 8 bytes and stores it with the complete status in its non-volatile memory. The UICC also indicates the maximum time duration for which it can be suspended, using a value between the minimum and the maximum proposed by the terminal.
Upon reception of the response indicating successful execution of the SUSPEND UICC command, the terminal shall deactivate the contacts of the UICC, following the sequence specified in clause 4.5.2.
Input:
Minimum duration of the suspension proposed by the terminal
Maximum duration of the suspension proposed by the terminal
Output:
Maximum duration of the suspension negotiated by the UICC, in the range proposed by the terminal
This function is used to restore the status of the UICC that was previously stored to non-volatile memory of the UICC using the SUSPEND UICC command with P1 = 'Suspend the UICC'. The UICC shall delete the stored UICC status after execution of the command, irrespective of the result.
Only the following commands can be issued by the terminal before resuming the UICC, with the status resulting from the use of these commands being lost after a successful resume:
SELECT with P1 ≠ '04'
READ BINARY
READ RECORD
TERMINAL CAPABILITY
If the UICC receives any other command, it deletes the stored status and continues with its current status.
The UICC rejects the RESUME UICC command if it does not have a valid status to resume returning status word '6985'.
The UICC compares the Resume token passed by the terminal with the token stored in the non-volatile memory. The UICC responds with an error if the Resume token passed by the terminal does not match, returning status word '6982'. The UICC restores the previous status and return '9000' if the Resume token passed by the terminal is validated.
If the terminal sent a TERMINAL CAPABILITY command before suspending the UICC, it shall send the TERMINAL CAPABILITY command with same content before resuming the UICC.
Input:
An appropriate application shall be selected in the UICC before issuing this command. The function initiates the computation of identity data by the UICC.
Input:
This command is used to manage LSIs and LSEs. It provides the mechanism required for the multiplexing of the APDUs of different LSIs, each targeting a separate LSE, and thus enables multiple independent LSEs to reside on one UICC.
It provides functionality for:
selecting an LSE for subsequent APDUs (see note 3);
resetting an LSE;
setting up the LSI configuration after power up or a reset of the physical interface; and
assigning the UICC-CLF interface to an LSE and retrieving the LSI of the LSE that has the UICC-CLF interface assigned.
Unless the LSI configuration is pre-agreed (see clause 7.5), MANAGE LSI (configure LSIs) shall be used to setup the LSI configuration before sending a command on an LSI different from 0 or a different MANAGE LSI command.
The terminal shall send the MANAGE LSI (configure LSIs) command not more than once in a card session.
At the beginning of a card session, LSI 0 is selected. The terminal may select a different LSI using the MANAGE LSI (select LSI) APDU, indicating an LSI number up to the jointly supported maximum value.
After a MANAGE LSI (select LSI) APDU, the indicated LSI is selected and subsequent ADPUs are handled by the LSE on this LSI until the next MANAGE LSI (select LSI), MANAGE LSI (reset LSE) or MANAGE LSI (assign SWP) APDU or a reset of the interface.
A MANAGE LSI (reset LSE) APDU shall result in the selection and the resetting of the LSE on the indicated LSI and shall be equivalent to a warm reset for a UICC not supporting LSEs.
The MANAGE LSI (assign SWP) is used by the terminal to indicate the LSE that will handle the communication over the UICC-CLF interface. The terminal shall not assign that interface to an LSE, if the UICC-CLF interface is not indicated as supported in the ATR of that specific LSE. After assigning the interface to an LSE successfully, the LSE shall be used for handling the communication over the UICC-CLF interface until a new MANAGE LSI (assign SWP) command is received. This includes any communication that occurs after a UICC reset or while the interface defined in the present document is deactivated. A MANAGE LSI (assign SWP) also selects and resets the LSE that gets the UICC-CLF interface assigned.
After assigning the UICC-CLF interface to an LSE, the terminal shall activate the UICC-CLF interface to handle the SYNC_ID verification process as described in ETSI TS 102 613 [19], clause 9.4.1.
The terminal can retrieve the LSE that is currently assigned to handle the communication over the UICC-CLF interface using the MANAGE LSI (retrieve SWP) command.
Input:
none or the LSI configuration supported by the terminal.
Output:
none; or
the ATR of the LSE, or
the LSI configuration to be used in the card session, or
the LSI of the LSE that has the UICC-CLF interface assigned.
Reset LSE - Lc not present, Le present and set to '00'
0
0
0
0
0
0
1
0
Assign SWP - Lc not present, Le present and set to '00'
0
0
0
0
0
0
1
1
Retrieve SWP - P2 set to '00', Lc not present, Le present and set to '00'
0
0
0
0
0
1
0
0
Configure LSIs - P2 set to '00', Lc and data present, Le present and set to '00'
NOTE 1:
All other values are RFU.
NOTE 2:
If the NAD byte is used to select the LSI, this command shall not be used by the terminal.
Command data:
For select LSI, reset LSE, assign SWP and retrieve SWP, the command data is not present.
For reset LSE and assign SWP, if the NAD byte is used to select the LSI, the command shall be sent on the LSI indicated by P2.
For configure LSIs, the command data shall contain the values supported by the terminal:
Byte(s)
Description
Value
Length
Status
1
Tag for highest LSI proposed by the terminal
'80'
1
M
2
Length of next field
1
1
3
Highest LSI proposed by the terminal
1
4
Tag for LSI options supported by the terminal
'81'
1
O
5
Length of next field
1
1
6
LSI options supported by the terminal, coding see Table 11.34d
1
The UICC shall interpret any value for the highest LSI proposed by the terminal that is greater than the maximum value for the LSI defined in clause 7.5 as the maximum value itself.
1: LSI indication via NAD byte supported / used
0: LSI indication via NAD byte not supported /not used
X
X
X
X
X
X
X
-
RFU, shall be set to 0
If the TLV for the LSI options is absent in the command or in the response, it shall be interpreted as all bits being set to 0.
Tags '90' and '91' are reserved for GSMA SGP.22 [33].
The UICC shall ignore any additional TLV(s).
Response data:
For select LSI, the response data shall be empty.
For reset LSE and assign SWP, the response data shall contain the ATR of the LSE.
Byte(s) Description Value Length
Byte(s)
Description
Value
Length
1
Tag for ATR
'80'
1
2
Length of next field
N
1
3 to N+2
ATR value
N
For configure LSIs, the response data shall contain the LSI configuration supported by the UICC that can be used in the card session.
Byte(s)
Description
Value
Length
Status
1
Tag for highest LSI to be used in the card session
'80'
1
M
2
Length of next field
1
1
3
Highest LSI to be used in the card session
1
4
Tag for LSI options to be used in the card session
'81'
1
O
5
Length of next field
1
1
6
LSI options to be used in the card session, coding see Table 11.34d
1
The highest LSI in the response shall not be greater than the highest LSI value proposed by the terminal in the command.
If both the terminal and the UICC support LSI indication via NAD byte, this option shall be used in the card session.
Tags '90' and '91' are reserved for GSMA SGP.22 [33].
For retrieve SWP, the response shall contain the LSI of the LSE that has the UICC-CLF interface assigned.
Byte(s)
Description
Value
Length
1
Tag for LSE assigned to SWP
'80'
1
2
Length of next field
1
1
3
LSI of the LSE assigned to SWP, or 'FF' if none is assigned