6.3.4 Proactive Command Sending by the STF

3GPP51.013Release 17Test specification for Subscriber Identity Module (SIM) Application Programming Interface (API) for Java CardTS

6.3.4.1 System Proactive Commands

Test Area Reference: FWK_PCS_SPCO

6.3.4.1.1 Conformance Requirements

6.3.4.1.1.1 Normal Execution

  • CRRN1: When a toolkit applet changes a menu entry of its registry object, the SIM Toolkit Framework shall dynamically* update the menu stored in the ME during the current card session
  • CRRN2: The STF shall use the data of the EFsume file when issuing the SET UP MENU proactive command.
  • CRRN3: For all EVENT_EVENT_DOWNLOAD_*: When a toolkit applet changes one or more of these requested events of its registry object, the STF shall dynamically* update the event list stored in the ME during the current card session by SET UP EVENT LIST proactive command.

NOTE: *The STF shall send its system proactive command as soon as no proactive session is pending and all the applets registered to the current events have been triggered and have returned from the processToolkit method invocation.

6.3.4.1.1.2 Parameters error

No requirements.

6.3.4.1.1.3 Context Errors

No requirements.

6.3.4.1.2 Test Suite Files

Test Script: FWK_PCS_SPCO_1.scr

Test Applet: FWK_PCS_SPCO_1.java

Load Script: FWK_PCS_SPCO_1.ldr

Cleanup Script: FWK_PCS_SPCO_1.clr

Parameter File: FWK_PCS_SPCO_1.par

6.3.4.1.3 Test Procedure

Id

Description

API/Framework Expectation

APDU Expectation

1

Install Applet 1, Registered to the EVENT_EVENT_DOWNLOAD_MT_CALL and EVENT_EVENT_DOWNLOAD_ LOCATION_STATUS

Perform SIM initialization with EVENT DOWNLOAD facilities supported

setEventList proactive command

[Event list]= ‘19020003’ or ‘99020003’

2

Trigger the applet by ENVELOPE (SMS_FORMATTED_PP) command

Clear the events and build a display text command

1. DISPLAY TEXT Proactive command

2. SET UP EVENT LIST Proactive command

[CommandQualifier]= 00h

6.3.4.1.4 Test Coverage

CRR number

Test case number

N1

see:

clause6.2.9.2, CRRN1,

clause 6.2.9.4, CRRN3,

clause 6.2.9.5 CRRN4,

clause 6.2.9.8 CRRN1

N2

see:

clause 6.2.9.2 CRRN1,

clause 6.2.9.8 CRRN1

N3

1,2

6.3.4.2 Interaction with GSM commands

Test Area Reference: FWK_PCS_IGCO

6.3.4.2.1 Conformance Requirements

6.3.4.2.1.1 Normal Execution

  • CRRN1: The STF shall process a GSM command even when a proactive command is pending (before and after the FETCH command until the terminal response). The STF shall answer with the SW1 and SW2 described in 3GPP TS 51.011 [3] and 3GPP TS 51.014 [16].

6.3.4.2.1.2 Parameters error

No requirements.

6.3.4.2.1.3 Context Errors

No requirements.

6.3.4.2.2 Test Suite Files

Test Script: FWK_PCS_IGCO_1.scr

Test Applet: FWK_PCS_IGCO_1.java

Load Script: FWK_PCS_IGCO_1.ldr

Cleanup Script: FWK_PCS_IGCO_1.clr

Parameter File: FWK_PCS_IGCO_1.par

6.3.4.2.3 Test Procedure

Id

Description

API/Framework Expectation

APDU Expectation

1

Interaction with GSM Commands after TERMINAL PROFILE in connection with FETCH and TERMINAL RESPONSE

Applet is registered to Menu Selection

RST

TERMINAL PROFILE

(Profile: supports all facilities except: SET UP EVENT LIST, POLL INTERVAL and POLLING OFF)

1- System issues a proactive command SETUP_MENU

2- SELECT MF

3- GET RESPONSE (6 Bytes)

4- Failed SELECT File

5- FETCH

6- SELECT MF

7- GET RESPONSE (6 Bytes)

8- TERMINAL RESPONSE

1- 91xx

2- 9Fxx

3- 91xx

4- 9404

5- Proactive Command: SETUP MENU

6- 9Fxx

7- 9000

8- 9000

2

Interaction with GSM Commands after

ENVELOPE (MENU SELECTION)

in connection with FETCH and TERMINAL RESPONSE

Menu Entry ID = 0x01

1- SELECT MF

2- GET RESPONSE (6 Bytes)

3- Failed SELECT File

4- FETCH

5- SELECT MF

6- GET RESPONSE (6 Bytes)

7- TERMINAL RESPONSE

1- 9FXX

2- 91XX

3- 9404

4- Proactive Command: DISPLAY TEXT

5- 9FXX

6- 9000

7- 9000

3

Interaction with GSM Commands after TERMINAL RESPONSE in proactive command session in connection with FETCH and TERMINAL RESPONSE

Menu Entry ID = 0x02

1- SELECT MF

2- GET RESPONSE (6 Bytes)

3- FETCH

4- SELECT MF

5- GET RESPONSE (6 Bytes)

6- Failed SELECT File

7- TERMINAL RESPONSE

8- SELECT MF

9- GET RESPONSE (6 Bytes)

10-Failed SELECT File

11-FETCH

12-SELECT MF

13-GET RESPONSE (6 Bytes)

14-TERMINAL RESPONSE

1- 9FXX

2- 91XX

3- Proactive Command: DISPLAY TEXT

4- 9FXX

5- 9000

6- 9404

7- 9000

8- 9FXX

9- 91XX

10-9404

11-Proactive Command: DISPLAY TEXT

12-9FXX

13-9000

14-9000

6.3.4.2.4 Test Coverage

CRR number

Test case number

N1

1, 2, 3

6.3.4.3 Proactive Command Control

Test Area Reference: FWK_PCS_PCCO

6.3.4.1.1 Conformance Requirements

6.3.4.1.1.1 Normal Execution

  • CRRN1: The SIM Toolkit Framework shall prevent the toolkit applet to issue the following proactive commands: SET UP MENU, SET UP EVENT LIST, POLL INTERVAL, POLLING OFF. If an applet attempts to issue such a command, the SIM Toolkit Framework shall throw an exception.
  • CRRN2: The SIM Toolkit Framework shall prevent a toolkit applet to issue a TIMER MANAGEMENT proactive command using a timer identifier, which is not allocated to it. If an applet attempts to issue such a command, the SIM Toolkit Framework shall throw an exception.
  • CRRN3: The SIM Toolkit Framework shall prevent a toolkit applet to issue a SEND DATA, RECEIVE DATA and CLOSE CHANNEL proactive commands using a channel identifier, which is not allocated to it. If an applet attempts to issue such a command the SIM Toolkit Framework shall throw an exception.
  • CRRN4: The SIM Toolkit Framework shall prevent a toolkit applet to issue an OPEN CHANNEL proactive command if it exceeds the maximum number of channel allocated to this applet. If an applet attempts to issue such a command the SIM Toolkit Framework shall throw an exception.
  • CRRN5: The proactive command is sent to the ME as defined and constructed by the toolkit applet without any check of the SIM Toolkit Framework.
  • CRRN6: The SIM Toolkit Framework cannot guarantee that if the SET UP IDLE MODE TEXT proactive command is used by a toolkit applet, another toolkit applet will not overwrite this text at a later stage.

6.3.4.1.2 Test Suite Files

Test Script: FWK_PCS_PCCO_1.scr

Test Applet: FWK_PCS_PCCO_1.java

FWK_PCS_PCCO_2.java

FWK_PCS_PCCO_3.java

Load Script: FWK_PCS_PCCO_1.ldr

Cleanup Script: FWK_PCS_PCCO_1.clr

Parameter File: FWK_PCS_PCCO_1.par

6.3.4.1.3 Test Procedure

Id

Description

API/Framework Expectation

APDU Expectation

0

Applets installation

Applet1 is installed with 4 timers maximum, 0 channel maximum and 1 menu.

Applet2 is installed with 8 timers maximum, 3 channels maximum.

Applet3 is installed with 1 channel maximum.

1

STK Proactive Commands

1- Send a formatted envelope with the TAR of Applet1

2- Applet1 builds and sends a SET UP MENU proactive command

3- Applet1 builds and sends a SET UP EVENT LIST proactive command

4- Applet1 builds and sends a POLL INTERVAL proactive command

5- Applet1 builds and sends a POLLING OFF proactive command

1- Applet1 is triggered

2- COMMAND_NOT_ALLOWED toolkit exception is thrown

3- COMMAND_NOT_ALLOWED toolkit exception is thrown

4- COMMAND_NOT_ALLOWED toolkit exception is thrown

5- COMMAND_NOT_ALLOWED toolkit exception is thrown

1- 90 00 (no proactive command is sent)

2

TIMER MANAGEMENT Proactive command

1- Send a formatted envelope with the TAR of Applet2

2- Applet2 allocates 8 timers by calling allocateTimer() method and release the 3 timers from id 1 to 3.

3- Send a formatted envelope with the TAR of Applet1

4- Applet1 allocates 3 timers (Id 1 to 3) by calling allocateTimer() method 3 times

5- Send a formatted envelope with the TAR of Applet2

6- Applet2 releases timers of Id 4 to 7

7- Send a formatted envelope with the TAR of Applet1

8- For each of the 3 timers allocated by Applet1 (Id 1to 3) a TIMER MANAGEMENT proactive session is performed

9- For other timers (Id 4 to 8), Applet1 builds and sends a TIMER MANAGEMENT proactive command

1- Applet2 is triggered

2- No exception is thrown

3- Applet1 is triggered

4- No exception is thrown

5- Applet2 is triggered

6- No exception is thrown

7- Applet1 is triggered

8- No exception is thrown

9- COMMAND_NOT_ALLOWED toolkit exception is thrown

8- 3 TIMER MANAGEMENT proactive commands are fetched

9- The Status word of the last previous Terminal Response is 90 00 (no more proactive command is sent)

3

No Channel allowed

1- Send a formatted envelope with the TAR of Applet1

2- Applet1 builds and sends a CSD OPEN CHANNEL proactive command

3- Applet1 builds and sends a GPRS OPEN CHANNEL proactive command

4Applet1 builds and sends a SEND DATA proactive command

5- Applet1 builds and sends a RECEIVE DATA proactive command

6- Applet1 builds and sends a CLOSE CHANNEL proactive command

1- Applet1 is triggered

2- COMMAND_NOT_ALLOWED toolkit exception is thrown

3- COMMAND_NOT_ALLOWED toolkit exception is thrown

4- COMMAND_NOT_ALLOWED toolkit exception is thrown

5- COMMAND_NOT_ALLOWED toolkit exception is thrown

6- COMMAND_NOT_ALLOWED toolkit exception is thrown

1- 90 00 (no proactive command is sent)

4

4 Channels allowed

1- Send a formatted envelope with the TAR of Applet3

2- Applet3 builds and sends a CSD OPEN CHANNEL proactive command

3- Send a Fetch and Terminal Response OK on channel 7

4- Send a formatted envelope with the TAR of Applet2

5- Applet2 builds and sends a CSD OPEN CHANNEL proactive command

6- Send a Fetch and Terminal Response OK on channel 1

7- Applet2 builds and sends a GPRS OPEN CHANNEL proactive command

8- Send Fetch and Terminal Response OK on channel 2

9- For each channel id from 3 to 7, Applet2 builds and sends a SEND DATA proactive command

10- For each channel id from 3 to 7, Applet2 builds and sends a RECEIVE DATA proactive command

11- For each channel id from 3 to 7, Applet2 builds and sends a CLOSE CHANNEL proactive command

12- Applet2 builds and sends a CSD OPEN CHANNEL proactive command

13- Fetch and Terminal Response OK on channel 3

14- Applet2 builds and sends an OPEN CHANNEL proactive command

1- Applet3 is triggered

2- No exception is thrown

4- Applet2 is triggered

5- No exception is thrown

7- No exception is thrown

9- COMMAND_NOT_ALLOWED toolkit exception is thrown

10- COMMAND_NOT_ALLOWED toolkit exception is thrown

11- COMMAND_NOT_ALLOWED toolkit exception is thrown

12- No exception is thrown

14- COMMAND_NOT_ALLOWED toolkit exception is thrown

2- 91 1C

3- OPEN CHANNEL proactive

5- 91 1C

6- OPEN CHANNEL proactive command is fetched

7- 91 17

8- OPEN CHANNEL proactive command is fetched, SW = 91 1C on the Terminal Response

13- OPEN CHANNEL proactive command is fetched

14- 90 00 expected to the previous Terminal Response (no proactive command is sent)

5

Unknown proactive command

1- Send an envelope menu selection with the item id of Applet1

2- Applet1 build an unknown proactive command of 8 null bytes and send it

3- Fetch and terminal response OK

1- Applet1 is triggered

2- 91 15

3- Command details TLV, Device Identities TLV and unknown TLV including 8 null bytes are fetched.

6.3.4.1.4 Test Coverage

CRR number

Test case number

N1

1

N2

2

N3

3,4

N4

3,4

N5

5

N6

Not testable