Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

SIM Toolkit functions


Detailed Description

The API provides several wrappers for STK functions as described in Ref. 11.14. Further there are several higher functions for developer convenience.

You can create your own wrapper with the help of stk_cmd().

Data Structures

Defines

Typedefs

Functions


Define Documentation

#define ALPHA_LEN
 

Max. ALPHA (EF_ADN) length.

#define APP_NO
 

User selected NO

#define APP_YES
 

User selected YES

#define BEARER_CSD
 

Indicates CSD bearer.

#define BEARER_GPRS
 

Indicates GPRS bearer.

#define BER_TLV_ME_TO_SIM_CALL_CONTROL
 

ENVELOPE CALL CONTROLL Tag Ref. 11.14

#define BER_TLV_ME_TO_SIM_CB_DOWNLOAD
 

ENVELOPE CB DOWNLOAD Tag Ref. 11.14

#define BER_TLV_ME_TO_SIM_EVENT_DOWNLOAD
 

ENVELOPE EVENT DOWNLOAD Tag Ref. 11.14

#define BER_TLV_ME_TO_SIM_MENU_SELECTION
 

ENVELOPE SIM MENU SELECTION Tag Ref. 11.14

#define BER_TLV_ME_TO_SIM_MO_SMS_CONTROL
 

ENVELOPE MO SMS CONTROL Tag Ref. 11.14

#define BER_TLV_ME_TO_SIM_RESERVED_TIA_EIA_136
 

RFU Ref. 11.14

#define BER_TLV_ME_TO_SIM_SMS_PP_DOWNLOAD
 

ENVELOPE SMS-PP DOWNLOAD Tag Ref. 11.14

#define BER_TLV_ME_TO_SIM_TIMER_EXPIRATION
 

ENVELOPE TIMER EXPIRATION Tag Ref. 11.14

#define BER_TLV_SIM_TO_ME_PROACTIVE_CMD
 

Ref. 11.14

#define CR_FLAG
 

Comprehension required flag. Ref. 11.14

#define DEV_ID_DISPLAY
 

Ref. 11.14

#define DEV_ID_EARPIECE
 

Ref. 11.14

#define DEV_ID_KEYPAD
 

Ref. 11.14

#define DEV_ID_ME
 

Ref. 11.14

#define DEV_ID_NETWORK
 

Ref. 11.14

#define DEV_ID_SIM
 

Ref. 11.14

#define DURATION_10_SEC
 

play_tone() constant, Ref. 11.11.

#define DURATION_MIN
 

play_tone() constant, Ref. 11.11.

#define DURATION_SEC
 

play_tone() constant, Ref. 11.11.

#define ENULL
 

"End NULL" means User End.

#define IPPROTO_TCP
 

Indicates TCP IP protocol.

#define IPPROTO_UDP
 

Indicates UDP IP protocol.

#define Q_DISPLAY_ICON_NOT_SELF_EXP
 

Ref. 11.14

#define Q_DISPLAY_ICON_SELF_EXP
 

Ref. 11.14

#define Q_DISPLAY_TEXT_DELAY_CLEAR
 

Ref. 11.14

#define Q_DISPLAY_TEXT_HIGH_PRIORITY
 

Ref. 11.14

#define Q_DISPLAY_TEXT_NORMAL_PRIORITY
 

Ref. 11.14

#define Q_DISPLAY_TEXT_USER_CLEAR
 

Ref. 11.14

#define Q_GET_INKEY_CHAR
 

Ref. 11.14

#define Q_GET_INKEY_DIGIT
 

Ref. 11.14

#define Q_GET_INKEY_HELP
 

Ref. 11.14

#define Q_GET_INKEY_UCS2
 

Ref. 11.14

#define Q_GET_INKEY_YESNO
 

Ref. 11.14

#define Q_GET_INPUT_ALPHABET
 

Ref. 11.14

#define Q_GET_INPUT_DIGITS
 

Ref. 11.14

#define Q_GET_INPUT_HELP
 

Ref. 11.14

#define Q_GET_INPUT_NO_ECHO
 

Ref. 11.14

#define Q_GET_INPUT_SMS_PACKED
 

Ref. 11.14

#define Q_GET_INPUT_UCS2
 

Ref. 11.14

#define Q_LAUNCH_BROWSER_NEW
 

Ref. 11.14

#define Q_LAUNCH_BROWSER_REOPEN
 

Ref. 11.14

#define Q_LAUNCH_BROWSER_REUSE
 

Ref. 11.14

#define Q_OPEN_CHANNEL_AUTOMATIC_RECONNECTION
 

Ref. 11.14

#define Q_OPEN_CHANNEL_IMMEDIATE
 

Ref. 11.14

#define Q_OPEN_CHANNEL_ONDEMAND
 

Ref. 11.14

#define Q_REFRESH_SIM_FILE_CHANGE
 

Ref. 11.14

#define Q_REFRESH_SIM_INIT
 

Ref. 11.14

#define Q_REFRESH_SIM_INIT_FILE_CHANGE
 

Ref. 11.14

#define Q_REFRESH_SIM_INIT_FULL_FILE
 

Ref. 11.14

#define Q_REFRESH_SIM_RESET
 

Ref. 11.14

#define Q_SELECT_ITEM_CHOICE
 

Ref. 11.14

#define Q_SELECT_ITEM_HELP
 

Ref. 11.14

#define Q_SELECT_ITEM_NAVIGATION
 

Ref. 11.14

#define Q_SELECT_ITEM_NO_PRESENTATION
 

Ref. 11.14

#define Q_SEND_DATA_BUFFERED
 

Ref. 11.14

#define Q_SEND_DATA_IMMEDIATELY
 

Ref. 11.14

#define Q_YESNO_DELETE_QMARK
 

Concat string with localized "Delete" and question mark. I.e. result is "Delete (string)?".

#define Q_YESNO_QMARK
 

Ref. 11.14

#define STK_CMD_CLOSE_CHANNEL
 

Proactive SIM CLOSE CHANNEL command. Ref. 11.14

#define STK_CMD_DISPLAY_TEXT
 

Proactive SIM DISPLAY TEXT command. Ref. 11.14

#define STK_CMD_END_OF_PROACTIVE_SESSION
 

RDU, Proactive SIM command. Ref. 11.14

#define STK_CMD_GET_CHANNEL_STATUS
 

Proactive SIM GET CHANNEL STATUS command. Ref. 11.14

#define STK_CMD_GET_INKEY
 

Proactive SIM GET INKEY command. Ref. 11.14

#define STK_CMD_GET_INPUT
 

Proactive SIM GET INPUT command. Ref. 11.14

#define STK_CMD_GET_READER_STATUS
 

Proactive SIM GET READER STATUS command. Ref. 11.14

#define STK_CMD_LANGUAGE_NOTIFICATION
 

Proactive SIM LANGUAGE NOTIFICATION command. Ref. 11.14

#define STK_CMD_LAUNCH_BROWSER
 

Proactive SIM LAUNCH BROWSER command. Ref. 11.14

#define STK_CMD_MORE_TIME
 

Proactive SIM MORE TIME command. Ref. 11.14

#define STK_CMD_NULL
 

RFU, do not use. Ref. 11.14

#define STK_CMD_OPEN_CHANNEL
 

Proactive SIM OPEN CHANNEL command. Ref. 11.14

#define STK_CMD_PERFORM_CARD_APDU
 

Proactive SIM PERFORM CARD APDU command. Ref. 11.14

#define STK_CMD_PLAY_TONE
 

Proactive SIM PLAY TONE command. Ref. 11.14

#define STK_CMD_POLL_INTERVAL
 

Proactive SIM POLL INTERVAL command. Ref. 11.14

#define STK_CMD_POLLING_OFF
 

Proactive SIM POLLING OFF command. Ref. 11.14

#define STK_CMD_POWER_OFF_CARD
 

Proactive SIM POWER OFF CARD command. Ref. 11.14

#define STK_CMD_POWER_ON_CARD
 

Proactive SIM POWER ON CARD command. Ref. 11.14

#define STK_CMD_PROVIDE_LOCAL_INFO
 

Proactive SIM PROVIDE LOCAL INFO command. Ref. 11.14

#define STK_CMD_RECEIVE_DATA
 

Proactive SIM RECEIVE DATA command. Ref. 11.14

#define STK_CMD_REFRESH
 

Proactive SIM REFRESH command. Ref. 11.14

#define STK_CMD_RESERVER_TIA_EIA_136
 

RFU, Proactive SIM command. Ref. 11.14

#define STK_CMD_RUN_AT_COMMAND
 

Proactive SIM RUN AT COMMAND command. Ref. 11.14

#define STK_CMD_SELECT_ITEM
 

Proactive SIM SELECT ITEM command. Ref. 11.14

#define STK_CMD_SEND_DATA
 

Proactive SIM SEND DATA command. Ref. 11.14

#define STK_CMD_SEND_DTMF
 

Proactive SIM SEND DTMF command. Ref. 11.14

#define STK_CMD_SEND_SMS
 

Proactive SIM SEND SMS command. Ref. 11.14

#define STK_CMD_SEND_SS
 

Proactive SIM SEND SS command. Ref. 11.14

#define STK_CMD_SEND_USSD
 

Proactive SIM SEND USSD command. Ref. 11.14

#define STK_CMD_SET_UP_CALL
 

Proactive SIM SET UP CALL command. Ref. 11.14

#define STK_CMD_SET_UP_EVENT_LIST
 

Proactive SIM SET UP EVENT LIST command. Ref. 11.14

#define STK_CMD_SET_UP_IDLE_MODE_TEXT
 

Proactive SIM SET UP IDLE MODE TEXT command. Ref. 11.14

#define STK_CMD_SET_UP_MENU
 

Proactive SIM SET UP MENU command. Ref. 11.14

#define STK_CMD_TIMER_MANAGEMENT
 

Proactive SIM TIMER MANAGEMENT command. Ref. 11.14

#define T_ADDRESS
 

Address tag Ref. 11.14

#define T_ALPHA_ID
 

Alpha identifier tag Ref. 11.14

#define T_AT_CMD
 

AT command tag Ref. 11.14

#define T_AT_RESPONSE
 

AT response tag Ref. 11.14

#define T_BC_REPEAT_INDICATOR
 

BC repeat indicator tag Ref. 11.14

#define T_BCCH_CHANNEL_LIST
 

BCCH channel list tag Ref. 11.14

#define T_BEARER
 

Bearer tag Ref. 11.14

#define T_BEARER_DESCRIPTION
 

Bearer description tag Ref. 11.14

#define T_BROWSER_ID
 

Browser ID tag Ref. 11.14

#define T_BROWSER_TERMINATION_CAUSE
 

Browser termination cause tag Ref. 11.14

#define T_BUFFER_SIZE
 

Buffer size tag Ref. 11.14

#define T_C_APDU
 

C-APDU tag Ref. 11.14

#define T_CALL_CONTROL_REQUESTED_ACTION
 

Call control requested action tag Ref. 11.14

#define T_CAPABILITY_CONF
 

Capability configuration tag Ref. 11.14

#define T_CARD_ATR
 

Card ATR tag Ref. 11.14

#define T_CARD_READER_ID
 

Card reader ID tag Ref. 11.14

#define T_CARD_READER_STATUS
 

Card reader status tag Ref. 11.14

#define T_CAUSE
 

Cause tag Ref. 11.14

#define T_CB_PAGE
 

Cell broadcast page tag Ref. 11.14

#define T_CHANNEL_DATA
 

Channel data tag Ref. 11.14

#define T_CHANNEL_DATA_LEN
 

Channel data length tag Ref. 11.14

#define T_CHANNEL_STATUS
 

Channel status tag Ref. 11.14

#define T_CMD_DETAILS
 

Command Details Tag Ref. 11.14

#define T_DATE
 

Date tag Ref. 11.14

#define T_DEFAULT_TEXT
 

Default text tag Ref. 11.14

#define T_DEVICE_ID
 

Device Identities Tag Ref. 11.14

#define T_DTMF_STRING
 

DTMF string tag Ref. 11.14

#define T_DURATION
 

Duration tag Ref. 11.14

#define T_EVENT_LIST
 

Event list tag Ref. 11.14

#define T_FILE_LIST
 

File list tag Ref. 11.14

#define T_HELP_REQUEST
 

Help request tag Ref. 11.14

#define T_ICON_ID
 

Icon ID tag Ref. 11.14

#define T_IMEI
 

IMEI tag Ref. 11.14

#define T_IMMEDIATE_RESPONSE
 

Immediate response tag Ref. 11.14

#define T_ITEM
 

Item tag Ref. 11.14

#define T_ITEM_ICON_ID_LIST
 

Item icon ID list tag Ref. 11.14

#define T_ITEM_ID
 

Item ID tag Ref. 11.14

#define T_ITEMS_NEXT_ACTION_INDICATOR
 

Items next axtion indicator tag Ref. 11.14

#define T_LANGUAGE
 

Language tag Ref. 11.14

#define T_LOCATION_INFO
 

Location information tag Ref. 11.14

#define T_LOCATION_STATUS
 

Location status tag Ref. 11.14

#define T_NETWORK_ACCESS_NAME
 

Network access name tag Ref. 11.14

#define T_NMR
 

Network Measurement Result tag Ref. 11.14

#define T_NOT_USED_3B
 

RFU Ref. 11.14

#define T_NOT_USED_3D
 

RFU Ref. 11.14

#define T_OTHER_ADDRESS
 

Other address tag Ref. 11.14

#define T_PROVISIONING_REFERENCE_FILE
 

Provisioning reference file tag Ref. 11.14

#define T_R_APDU
 

R-APDU tag Ref. 11.14

#define T_RESERVED_2F
 

RFU Ref. 11.14

#define T_RESERVED_ETIA_136_60
 

RFU Ref. 11.14

#define T_RESERVED_ETIA_136_61
 

RFU Ref. 11.14

#define T_RESPONSE_LEN
 

Response length tag Ref. 11.14

#define T_RESULT
 

Result tag Ref. 11.14

#define T_SIM_ME_INTERFACE_TRANSPORT_LEVEL
 

SIM-ME interface transport level tag Ref. 11.14

#define T_SMS_TPDU
 

SMS TPDU tag Ref. 11.14

#define T_SS_STRING
 

Suplementary services string tag Ref. 11.14

#define T_SUBADDRESS
 

Subaddress tag Ref. 11.14

#define T_TEXT_STRING
 

Text string tag Ref. 11.14

#define T_TIMER_ID
 

Timer ID tag Ref. 11.14

#define T_TIMER_VALUE
 

Timer value tag Ref. 11.14

#define T_TIMING_ADVANCE
 

Timing advance tag Ref. 11.14

#define T_TONE
 

Tone tag Ref. 11.14

#define T_TRANSACTION_ID
 

Transaction identifier tag Ref. 11.14

#define T_URL
 

URL tag Ref. 11.14

#define T_USSD_STRING
 

USSD string tag Ref. 11.14

#define TONE_BEEP
 

play_tone() constant, Ref. 11.11.

#define TONE_BUSY
 

play_tone() constant, Ref. 11.11.

#define TONE_CONGESTION
 

play_tone() constant, Ref. 11.11.

#define TONE_DIAL
 

play_tone() constant, Ref. 11.11.

#define TONE_ERROR
 

play_tone() constant, Ref. 11.11.

#define TONE_NEGATIVE
 

play_tone() constant, Ref. 11.11.

#define TONE_POSITIVE
 

play_tone() constant, Ref. 11.11.

#define TONE_RADIO_ACK
 

play_tone() constant, Ref. 11.11.

#define TONE_RADIO_NO
 

play_tone() constant, Ref. 11.11.

#define TONE_RINGING
 

play_tone() constant, Ref. 11.11.

#define TONE_WAITING
 

play_tone() constant, Ref. 11.11.


Typedef Documentation

typedef struct _Sockaddr Sockaddr
 

Network socket structure used for open_channel_raw().


Function Documentation

void change_imsi void   ) 
 

Warning:
SIM Toolkit function, usable only in stk_thread(). Change EF_IMSI procedure according the Ref. 11.11.
Examples:
fake_sim.c.

void close_channel u8  channel  ) 
 

Wrapper around the STK CLOSE CHANNEL command.

Warning:
SIM Toolkit function, usable only in stk_thread().
Parameters:
channel 
See also:
open_channel_raw(), get_channel_status()
Examples:
net.c.

u8 display_more u32  file  ) 
 

AKA "more" command - show content of file as text.

Warning:
SIM Toolkit function, usable only in stk_thread().
Parameters:
file Inode pointer on file.
Returns:
APP_END, APP_BACK
Examples:
mc.c, and reader.c.

u8 display_text const u8 body,
const u8 head
 

Compose and display text. It can consists of two parts - head and body. If the total length exceeds display_text_len then head is not displayed.

Warning:
SIM Toolkit function, usable only in stk_thread().
Parameters:
body body, ALPHA coding or STRING_SLV coding, from RAM, EEPROM, PROGMEM
head head, ALPHA coding or STRING_SLV coding, from RAM, EEPROM, PROGMEM
Returns:
APP_BACK if user back, APP_END if user end, APP_OK if user ok
Examples:
certs.c, fake_sim.c, hello_world_ucs2.c, mc.c, net.c, sysinfo.c, test_idle.c, and test_prot_mem.c.

u8* display_text_raw const u8 text,