SIM toolkit

Introduction

SIM Application Toolkit (STK) is the 3GPP standard feature that allows the Subscriber Identity Module (SIM) to handle the DCE, by issuing commands such as sending SMS to the network, or triggering a SIM refresh, or asking for local information (e.g. Location, IMEI), and monitor its access to the cellular network, by configuring notifications for relevant events (envelopes).

The processing of SIM Application toolkit commands can be seamlessly performed by the DCE, or can be done by the host application by activating the SIM toolkit AT interface either in dedicated or in raw mode, where supported. In dedicated mode, the DTE is notified of STK commands and events after decoding; in raw mode the DTE is notified with the raw data as received from the SIM. Only one mode can be enabled and function at a time.

Most commands in this section (with the exception of +UBIP, +UCATPROF, +STKPROF, +CUSATW and +CUSATR AT commands, where supported) properly work only if the SIM toolkit interface has been activated by the DTE. Otherwise the SIM toolkit processing will be blocked.

If an AT command related to the dedicated mode is used when the raw mode is enabled (and vice versa), an error result code ("+CME ERROR: operation not allowed" if the +CMEE is set to 2) is usually returned.

For more details on the SIM Application toolkit command description and parameters, see 3GPP TS 51.014 [44] and ETSI TS 102.223 [45].

The setup menu fetched from the SIM card may vary with the terminal profile supported by the MT, which is affected by the capabilities of the module itself (e.g. speech): this implies that different u-blox modules may display different setup menus with the same SIM card.

The SIM card can establish data sessions with a SIM OTA server using the the module’s cellular connectivity by means of the Bearer Independent Protocol (BIP) feature.

The STK commands related to the Bearer Independent Protocol, i.e. Open Channel, Close Channel, Receive Data, Send Data, Get Channel Status and the events Data Available and Channel Status, are autonomously managed by the device without the intervention from the TE, unless the dedicated mode is supported and activated and the Open Channel command requires the user intervention (see ETSI TS 102 223 [45]).

Terminal profile +STKPROF

+STKPROF

Modules

All products

Attributes

Syntax

PIN required

Settings saved

Can be aborted

Response time

Error reference

full

Yes

NVM

No

-

+CME Error

Description

Allows reading and changing the terminal profile (list of SIM Application Toolkit facilities supported by the terminal, see ETSI TS 102 223 [45]) data stored in NVM and used only at the SIM initialization. The SIM card may use this information to filter the proactive commands sent to the module. This command does not actually remove/add any functionality from/to the module.

Syntax

TypeSyntaxResponseExample

Set

AT+STKPROF=<length>,<data>

OK

AT+STKPROF=2,"1F7F"

OK

Read

AT+STKPROF?

+STKPROF: <length>,<data>

OK

+STKPROF:17,"FFFFFFFF7F0300DF7F00000000010A0003"

OK

Test

AT+STKPROF=?

OK

Defined values

ParameterTypeDescription

<length>

Number

Length in bytes of data sent to DTE in <data>

<data>

String

Terminal profile data coded in hex format. The maximum length is 78 characters

Notes

  • The set command is allowed also if the SIM card is not inserted or the PIN is not inserted.

Proactive command in dedicated mode +STKPRO

+STKPRO

Modules

LEXI-R10401D-01B LEXI-R10801D-01B LEXI-R10001D

Attributes

Syntax

PIN required

Settings saved

Can be aborted

Response time

Error reference

partial

Yes

No

No

-

-

Description

The test command displays the list of the proactive commands that need a response from the user/application via +STKTR command. Only the test command syntax is allowed.

During the STK transactions, if the STK interface has been activated in dedicated mode, the URC +STKPRO displays every proactive command.

Syntax

TypeSyntaxResponseExample

Test

AT+STKPRO=?

+STKPRO: (list of supported <proactive_cmd>s)

OK

+STKPRO: (01,05,16,17,18,19,20,32,33,34,35,36,37,38,40,52,53)

OK

Generic syntax

URC

+STKPRO: <proactive_cmd>,…​

Refresh

URC

+STKPRO: 01,<type>,<number of files>,<files>

Set up event list

URC

+STKPRO: 05,<event_list>

Set up call

URC

+STKPRO: 16,<number>,<subaddr>,<type>,<alpha_1>,<icon_id1>,<alpha_2>,<icon_id2>

Send SS

URC

+STKPRO: 17,<ss_data>,<alpha>,<icon_id>,<ref_number>

Send USSD

URC

+STKPRO: 18,<dcs>,<hex_string>,<alpha>,<icon_id>,<ref_number>

Send SMS

URC

+STKPRO: 19,<alpha>,<icon_id>,<ref_number>

Send DTMF

URC

+STKPRO: 20,<alpha>,<icon_id>,<dtmf_string>

Play tone

URC

+STKPRO: 32,<tone>,<unit>,<interval>,<alpha>,<icon_id>

Display text

URC

+STKPRO: 33,<type>,<dcs>,<hex_string>,<icon_id>,<imm_resp>

Get inkey

URC

+STKPRO: 34,<type>,<dcs>,<hex_string>,<icon_id>

Get input

URC

+STKPRO: 35,<type>,<dcs>,<hex_string>,<max_rsp_len>,<min_rsp_len>,<default_text>,<icon_id>

Select item

URC

+STKPRO: 36,<type>,<alpha>,<item_id>,<total_items>,<item_text>,<next_action>,<default_item>,<icon_id>,<icon_id_list_element>

Set up menu

URC

+STKPRO: 37,<type>,<alpha>,<item_id>,<total_items>,<item_text>,<next_action>,<icon_id>,<icon_id_list_element>

Provide local info

URC

+STKPRO: 38,<type>

Set up idle mode text

URC

+STKPRO: 40,<dcs>,<hex_string>,<icon_id>

Run AT command

URC

+STKPRO: 52,<type>,<alpha>,<icon_id>,<at_command>

Language notification

URC

+STKPRO: 53,<language>

Open channel

URC

+STKPRO: 64,<type>,<alpha>,<icon_id>,<bearer_type>,<bearer_parameters>,<buffer_size>,<network_access_name>,<login_dcs>,<login_text>,<password_dcs>,<password_text>,<transport_type>,<transport_port>,<destination_address_type>,<destination_address>

Close channel

URC

+STKPRO: 65,<type>,<channel_id>,<alpha>,<icon_id>

Receive data

URC

+STKPRO: 66,<type>,<channel_id>,<alpha>,<icon_id>,<channel_data_length>

Send data

URC

+STKPRO: 67,<type>,<channel_id>,<alpha>,<icon_id>,<channel_data>

Defined values

ParameterTypeDescription

<proactive_cmd>

Number

Proactive command (see ETSI TS 102 223 [45])

<alpha>, <alpha_1>, <alpha_2>

String

Alpha identifier (used in several proactive commands, see ETSI TS 102 223 [45])

<default_text>

String

Default text for the GET INPUT command (see ETSI TS 102 223 [45])

<dcs>

Number

Data coding scheme

<default_item>

Number

Indication of the default item (see ETSI TS 102 223 [45])

<dtmf_string>

String

DTMF tones coded in BCD (same format as the dialling number string defined for EFADN in 3GPP TS 51.011 [41])

<event list>

Number

Bitmask representing the list of events. See the Table 11 for the meaning of each bit.

<hex_string>

String

Hexadecimal string (the coding is specified in the <dcs> parameter)

<icon_id>,<icon_id1>,<icon_id2>

Number

Icon identifier

<icon_id_list_element>

Number

Item icon identifier

<interval>

Number

Time duration in number of units

<imm_resp>

Number

Immediate response

<item_id>

Number

Identifier of an item within a list

<item_text>

String

Text string of item

<language>

String

Two bytes string indicating the language

<max rsp len>

Number

Maximum response length

<min rsp len>

Number

Minimum response length

<next_action>

Number

Used only in menu related proactive commands ("set up menu" and "select item") for each item. It gives the possible actions that will be initiated by the SIM Card in case of selection by the user (see ETSI TS 102 223 [45])

<number>

String

Called party number

<ref_number>

Number

Reference number

<subaddr>

String

Called party subaddr

<ss_data>

String

Supplementary services string

<type>

Number

Command qualifier

<tone>

Number

  • 01: dial tone

  • 02: call subscriber busy

  • 03: congestion

  • 04: radio path acknowledge

  • 05: radio path not available

  • 06: error / special information

  • 07: call waiting tone

  • 08: ringing tone

  • 10: general beep

  • 11: positive acknowledgement tone

  • 12: negative acknowledgement or error tone

<total_items>

Number

Total number of the menu items

<unit>

Number

  • 0: minutes

  • 1: seconds

  • 2: tenth of seconds

  • 3: milliseconds

Allowed values:

  • LEXI-R10401D-01B / LEXI-R10801D-01B / LEXI-R10001D / LEXI-R10011D / SARA-R10 - 3

<at_command>

String

AT command string

<bearer_type>

Number

Bearer type (see ETSI TS 102 223 [45])

<bearer_parameters>

String

Bearer parameters (see ETSI TS 102 223 [45])

<buffer_size>

Number

Buffer size (see ETSI TS 102 223 [45])

<network_access_name>

String

Network access name (see ETSI TS 102 223 [45])

<transport_type>

Number

Transport protocol type (see ETSI TS 102 223 [45])

<transport_port>

Number

Port number type (see ETSI TS 102 223 [45])

<destination_address_type>

Number

Type of address (see ETSI TS 102 223 [45])

<destination_address>

String

Address (see ETSI TS 102 223 [45])

<channel_id>

Number

Channel identifier (see ETSI TS 102 223 [45])

<channel_data_length>

Number

Channel data length (see ETSI TS 102 223 [45])

<channel_data>

String

Channel data (see ETSI TS 102 223 [45])

Notes

Table 11. Event list bit description
BitEvent description

0

MT call

1

Call connected

2

Call disconnected

3

Location status

4

User activity

5

Idle screen available

6

Card reader status

7

Language selection

8

Browser termination

9

Data available

10

Channel status

11

Access Technology Change

12

Display parameters changed

13

Local connection

14

Network Search Mode Change

15

Browsing status

LEXI-R10401D-01B / LEXI-R10801D-01B / LEXI-R10001D / SARA-R10

  • <proactive_cmd>=05,16,17,18,19,20,38,52,64,65,66 and 67 are not supported.

  • In <proactive_cmd>=01 parameter <number of files> and <files> are not supported.

Terminal response in dedicated mode +STKTR

+STKTR

Modules

LEXI-R10401D-01B LEXI-R10801D-01B LEXI-R10001D

Attributes

Syntax

PIN required

Settings saved

Can be aborted

Response time

Error reference

partial

Yes

No

No

< 20 s

+CME Error

Description

In dedicated mode, it allows entering response to a SIM Toolkit proactive command displayed by the +STKPRO URC.

If no response is entered, after a timeout of duration may range from 180 to 300 s, the module sends an autonomous terminal response to the SIM to complete the STK transaction. The result depends on the pending proactive command, and can be "Command performed successfully", "No response from user", "Command type not understood by ME", or "Command data not understood by ME" (see 3GPP TS 51.014 [44]).

The command must be always entered, to terminate the pending STK session at the MT-DTE interface, and to be able to enter additional STK commands.

The set command syntax depends on the <proactive_cmd> value.

Syntax

TypeSyntaxResponseExample

Generic syntax

Set

AT+STKTR=<proactive_cmd>[,<type>][,<result>,<add_result>[,<reference_number>][,<last_cmd>][,<dcs>][,<hex string>]]

OK

AT+STKTR=1,0

OK

Refresh

Set

AT+STKTR=01,<result>[,<add_result>]

OK

Set up event list

Set

AT+STKTR=05,<result>

OK

Set up call

Set

AT+STKTR=16,<result>[,<add_result>]

OK

Send SS

Set

AT+STKTR=17,<result>,<add_result>[,<reference_number>]

OK

Send USSD

Set

AT+STKTR=18,<result>,<add_result>[,<reference_number>]

OK

Send SMS

Set

AT+STKTR=19,<result>,<add_result>[,<reference_number>]

OK

Send DTMF

Set

AT+STKTR=20,<result>[,<add_result>]

OK

Play tone

Set

AT+STKTR=32,<result>,<add_result>

OK

Display text

Set

AT+STKTR=33,<result>,<add_result>

OK

Get inkey

Set

AT+STKTR=34,<result>,<add_result>,0,<dcs>,<hex_string>

OK

Get input

Set

AT+STKTR=35,<result>,<add_result>,0,<dcs>,<hex_string>

OK

Select item

Set

AT+STKTR=36,<result>,<add_result>,0,<dcs>,<hex_string>

OK

Set up menu

Set

AT+STKTR=37,<result>,<add_result>

OK

Provide local info (language setting)

Set

AT+STKTR=38,<result>,<language>

OK

Set up idle mode text

Set

AT+STKTR=40,<result>,<add_result>

OK

Run AT command

Set

AT+STKTR=52,<result>,<add_result>,0,<dcs>,<hex_string>

OK

Language notification

Set

AT+STKTR=53,<result>,<add_result>

OK

Open channel

Set

AT+STKTR=64,<result>

OK

Test

AT+STKTR=?

+STKTR: (list of supported <proactive_cmd> values)

OK

+STKTR: (01,05,16,17,18,19,20,32,33,34,35,36,37,38,40,52,53)

OK

Defined values

ParameterTypeDescription

<proactive_cmd>

Number

Proactive command (see ETSI TS 102 223 [45])

<result>

Number

  • 0: Command performed successfully

  • 1: Command performed with partial comprehension

  • 2: Command performed, with missing information

  • 3: REFRESH performed with additional EFs read

  • 4: Command performed successfully, but requested icon could not be displayed

  • 5: Command performed, but modified by call control by SIM

  • 6: Command performed successfully, limited service

  • 7: Command performed with modification

  • 16: Proactive SIM session terminated by the user

  • 17: Backward move in the proactive SIM session requested by the user

  • 18: No response from user

  • 19: Help information required by the user

  • 20: USSD or SS transaction terminated by the user

  • 32: MT currently unable to process command

  • 33: Network currently unable to process command

  • 34: User did not accept the proactive command

  • 35: User cleared down call before connection or network release

  • 36: Action in contradiction with the current timer state

  • 37: Interaction with call control by SIM, temporary problem

  • 38: Launch Browser generic error

  • 48: Command beyond MT’s capabilities

  • 49: Command type not understood by MT

  • 50: Command data not understood by MT

  • 51: Command number not known by MT

  • 52: SS Return Error

  • 53: SMS RP-ERROR

  • 54: Error, required values are missing

  • 55: USSD Return Error

  • 56: MultipleCard commands error

  • 57: Interaction with call control by SIM or MO short message control by SIM, permanent problem

  • 58: Bearer Independent Protocol error

<add_result>

Number

Additional information, required with specific result codes and/or proactive commands

<reference_number>

Number

Number containing the indicated reference number; this parameter can be used only in case of <proactive_cmd> related to SMS, SS, USSD

<dcs>

Number

Data coding scheme

<hex_string>

String

Each 8-bit octet is presented as two IRA character long hexadecimal numbers, e.g. octet with integer value 42 is presented to TE as two characters 2A (IRA 50 and 65). The value depends on the indicated <dcs> value. The meaning of the parameter depends on the proactive command:

  • Get input: the response string

  • Get inkey: the response character

  • Select item: identifier of an item within a list

  • Run AT command: the response to the AT command requested by the SIM

<language>

String

Decimal value of the ISO 639 language code. E.g. German language is coded as "de" in ISO 639. Thus 0x6465 has to be converted in decimal: <language>=25701

<last_cmd>

Number

Obsolete parameter, to be set to 0

Notes

  • *0 stands for the obsolete parameter <last_cmd>.

  • <proactive_cmd>=05,16,17,18,19,20,38,52 and 64 are not supported.

  • <dcs>= 0 and 8 are not supported.

Bearer Independent Protocol status indication +UBIP

+UBIP

Modules

All products

Attributes

Syntax

PIN required

Settings saved

Can be aborted

Response time

Error reference

full

No

Profile

No

-

+CME Error

Description

Configures the Bearer Independent Protocol status indication, i.e. the +UUBIP URC presentation.

The channel status event provides information about the link status and its drop, therefore it is advisable to enable it where available.

The command setting is stored in the personal profile.

Syntax

TypeSyntaxResponseExample

Set

AT+UBIP=<mode>

OK

AT+UBIP=1

OK

Read

AT+UBIP?

+UBIP: <mode>

OK

+UBIP: 0

OK

Test

AT+UBIP=?

+UBIP: (list of supported <mode>'s)

OK

+UBIP: (0,1)

OK

URC

+UUBIP: <ev_cmd>,<val>

+UUBIP: 10,261

Defined values

ParameterTypeDescription

<mode>

Number

Indicates whether the +UUBIP URC is enabled or not:

  • 0 (factory-programmed value): BIP status indication disabled

  • 1: BIP status indication enabled

  • 2: OPEN CHANNEL, CLOSE CHANNEL and CHANNEL STATUS EVENT status indications enabled

Allowed values:

  • 0, 1

<ev_cmd>

Number

Indicates the event download’s tag or proactive command’s tag. Allowed values:

  • 10: Channel status event

  • 64: Open channel proactive command

  • 65: Close channel proactive command

  • 66: Receive data proactive command

  • 67: Send data proactive command

<val>

Number

Indicates the channel status (in case of the event download channel status) or result in case of a proactive command (see ETSI TS 102 223 [45])

Notes

  • <ev_cmd>=10 and 66 are not supported.

Last updated: Jan 13, 2025
Need help?Contact Support
Questions?Contact us