Set command

The set command transmits a command to a selected Universal Integrated Circuit Card (UICC) using an opened logical channel. The UICC response is sent back to the Terminal Adapter (TA) as it is.

The command allows direct control of the currently selected UICC by a distant application on the Terminal Equipment (TE). The TE processes the UICC information.
Note: Executing a Run GSM Algorithm command or an Authenticate command from the TE using the +CGLA command is not supported.

Syntax:

+CGLA=<sessionid>,<length>,<command>

Response syntax:

+CGLA: <length>,<response>

The set command parameters and their defined values are the following:

<sessionid>
Integer.
Session ID used to target a specific application on a smart card, such as Universal Subscriber Identity Module (USIM), using the opened logical channel.
<length>
Integer. Number of hexadecimal characters.
<command>
The command passed to the SIM in hexadecimal format. Two characters per byte. Contains CLA, INS, P1, P2, and optionally Lc, Data, and Le bytes according to the command Application Protocol Data Unit (APDU) structure specification in ETSI TS 102 221, Ch. 10.1.
<response>
The response from the SIM in hexadecimal format. Two characters per byte. Contains optional data bytes and SW1, SW2 according to the response APDU structure specification in ETSI TS 102 221, Ch. 10.2.

The following command example Status command to read the currently selected AID on the channel:

AT+CGLA=2,10,"80F2000100"
+CGLA: 32,"840CA0000000871004FF49FF05899000"
OK

The response is DF name TLV-object (tag, length, AID) + SW1, SW2 ('9000').