Send Message from ME to ICC

Once the ME has made its attempt to execute a proactive command from the ICC, the ME shall inform the ICC of the success or otherwise of that command, by using TERMINAL RESPONSE.

Envelope command

Envelope command is used to transfer STK information from ME to ICC.

Send Terminal Response

/**
* Send the response back to ICC after an attempt to execute STK Proactive
* Command.
*
* @param command
* Command received from ICC. See MozStkCommand.
* @param response
* The response that will be sent to ICC.
* @see MozStkResponse for the detail of response.
*/
void sendStkResponse(in jsval command, in jsval response);

Each STK message consists of at least two mandatory Comprehension-TLVs

Command Details

Device Identities

The remaining Comprehension-TLVs varies according to different type of STK message.

For the "Command Details" data object,
this data object shall be identical to the command details data object (including the comprehension required flag) given
by the UICC in the proactive command to which the terminal is giving the result.

And there two kinds of STK messages

From ICC to ME

MozStkCommand

From ME to ICC

MozStkResponse

In both MozStkCommand and MozStkResponse, we expose the content of 'Command Details' as:

number

type

qualifier

So when a webapp tries to create a MozStkResponse, the webapp needs to create exactly the same 'Command Details' as it got from MozStkCommand.

From ICC to ME

The STK message sent from ICC to ME called 'Proactive Command'.
And we use MozStkCommand to represent 'Proactive Command'.
For example, a Proactive Command SET_UP_MENU whose Comprehension-TLVs will be looked like