nrf9160

Set command

The set command transmits a command to the Subscriber Identity Module (SIM).

Syntax:

+CSIM=<length>,<command>

Response syntax:

+CSIM: <length>,<response>
+CME ERROR code
11 – SIM PIN required.
12 – SIM PUK required.
13 – SIM failure.
14 – SIM busy.
17 – SIM PIN2 required.
18 – SIM PUK2 required.

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

<length>
Integer. The 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 performs a MANAGE CHANNEL command to open a logical channel. The SIM card returns channel number 01 and success status 9000:

AT+CSIM=10,"0070000001"
+CSIM: 6,"019000"
OK