This document offers a high-level overview of the SIM Toolkit Application for Android 1.0 and is primarily of interest for implementors of the Radio Interface Layer (RIL). The STK is R96 compatible (3GPP TS 11.14 v5.9.0) and complies partially with R99 (3GPP TS 101.267 v8.17.0). See the
STK Feature List for the complete feature list.
.
The Android STK implementation includes three layers:
- STK RIL: Low-level layer provided by the vendor plus
libril
.
- STK Telephony: Protocol translation layer that converts raw messages provided by the STK RIL to application level messages.
- STK Application: Provides the user interface interactions needed by the STK.
The Sim Toolkit communication flow is bi-directional and commands can originate from the STK RIL
packaged in RIL_UNSOL_STK_PROACTIVE_COMMAND
, RIL_UNSOL_STK_EVENT_NOTIFY
, RIL_UNSOL_REFRESH
and RIL_UNSOL_STK_SESSION_END
messages.
Commands originating from the STK App or STK Telephony layers are packaged in RIL_REQUEST_STK_SEND_TERMINAL_REPSONSE
, RIL_REQUEST_SEND_ENVELOPE_COMMAND
or RIL_REQUEST_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
.
For commands sent or recieved by the STK RIL, it's not necessary to remove unused sub-commands because the upper layers will gracefully ignore unused information contained in the message. The content of each message is encoded in the BER-TLV format except for two:
-
RIL_UNSOL_STK_SESSION_END
: has no data
-
RIL_REQUEST_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
: has a single byte of data that indicates accept/reject.
See the Android Platform Development Kit for details.
Communication from the RIL up
Communication to the upper layers is done using the RIL_UNSOL_xxx
family of commands defined in /hardware/ril/include/ril.h
. The payload for each command is encoded using BER-TLV. As stated above, it is not necessary to remove extraneous fields. This allows the SIM to pass a complete command to the upper layers and simplifies STK RIL code. Below is the mapping from RIL_UNSOL_xxx commands to the SIM commands.
RIL_UNSOL_STK_PROACTIVE_COMMAND
The Sim Toolkit communication flow is bi-directional and commands can originate from the STK RIL
packaged in RIL_UNSOL_STK_PROACTIVE_COMMAND
, RIL_UNSOL_STK_EVENT_NOTIFY
, RIL_UNSOL_REFRESH
and RIL_UNSOL_STK_SESSION_END
messages.
DISPLAY TEXT (6.4.1)
This command is handled by StkDialogActivity
. If the immediate response flag is set, the terminal response is sent with an "OK" (0x00)
result code when the message is first received. Otherwise the terminal response is sent when the dialog is dismissed either from user action or it times out.
The user sees a dialog box with a message and / or icon, an OK button, and a Cancel button.
Terminal responses include:
- "OK" (0x00)
- "Session terminated by user" (0x10)
- "Backward move by user" (0x11)
- "No response from user" (0x12)
GET IN KEY (6.4.2)
This command is processed by StkInputActivity
. It displays a dialog box with a prompt and or an icon and yes and no buttons.
Terminal responses include:
- “OK” (0x00) with “Yes” or “No” as the response text
- “Session terminated by user” (0x10) << Currently not supported
- “Backward move by user” (0x11)
- “No response from user” (0x12)
GET INPUT (6.4.3)
This command is handled by StkInputActivity
.
The user sees a dialog box with a prompt and / or an icon, a text box with optional default text, and an OK button. 'digits only,' 'min,' 'max,' and 'hidden' modes are all supported.
Terminal responses include:
- OK” (0x00) if the input criteria is met
- “Session terminated by user” (0x10) << Currently not supported
- “Backward move by user” (0x11)
- “No response from user” (0x12)
PLAY TONE (6.4.5)
This command is processed by ToneDialog
.
The user sees a dialog box with a prompt for the duration of the tone or until the user presses the back key.
Terminal responses include:
- "OK" (0x00) if the tone is played to completion
- “Session terminated by user” (0x10) if back button is pressed
SET UP MENU (6.4.8)
This command is processed by StkAppService
. It installs the STK ICON on the home page and prepares the Main menu for use when the ICON is selected. Typically this is the first RIL unsolicited command and should not be sent until after the RIL_RadioFunctions.getVersion
routine is called.
Terminal reponses:
At a later time, the STK ICON will be selected and StkMenuActivity
will launch and display the Main menu to the user. If an item is selected, it will be returned to the RIL in RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
with the item id. If no item is selected, the StkMenuActivity
will receive a timeout message and return to the Main menu and no message will be sent to the RIL.
Depending upon what item is selected, the SIM may perform another action, such as sending another set of menu items via a SELECT ITEM command or performing an action like send an SMS or text display.
SELECT ITEM (6.4.9)
This command is processed by StkMenuActivity
. Instead of displaying the Main menu, the list of menu items provided in this command are displayed.
Terminal responses:
The command then proceeds as in the SETUP MENU.
SET UP IDLE MODE TEXT (6.4.22)
StkAppService
displays the message and or icon as an Android notification.
Terminal responses include:
LAUNCH BROWSER (6.4.26)
This command is initially handled by StkDialogActivity
and presents the user with a confirmation dialog, a URL, and OK, and cancel buttons. If the user presses OK, the browser is launched using the URL.
Terminal responses include:
- “OK” (0x00) the browser has been launched
- “Session terminated by user” (0x10)
- “Backward move by user” (0x11)
- “No response from user” (0x12)
RIL_UNSOL_STK_EVENT_NOTIFY
The commands in this section are proactive in nature. They are handled by the STK RIL and the upper layers and delivered using RIL_UNSOL_STK_EVENT_NOTIFY
message. This distinction is an implementation detail of Android and is not defined in the 3GPP sepcifications.
The upper layers handle the UI and the STK RIL handles all other aspects of each command, which means that the STK RIL sends the terminal response (it is never sent by the STK App). Each command must be a properlery-formed proactive command. It is not necessary to remove unused fields. The behavior of any other command within this context sent by RIL_UNSOL_STK_EVENT_NOTIFY
is undefined. See Event Notify Command Details.
- SEND SMS (6.4.10) – no response
- SEND SS (6.4.11) – no response
- SEND USSD (6.4.12) – no response
- SET UP CALL (6.4.13) – responds with
RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
- SEND DTMF (6.4.24) – no response
RIL_UNSOL_SIM_REFRESH
Used to send the REFRESH
command. No response.
REFRESH (6.4.7)
RIL_UNSOL_STK_SESSION_END
Sent by the SIM to signal the end of a session. No content and no response.
RIL_UNSOL_STK_SESSION_END
Sent by SIM to signal end of session. No content and no response.
Communication from the application down
Communication from the upper layers to the RIL uses the commands below (defined in ril.h
):
RIL_REQUEST_STK_SEND_TERMINAL_REPSONSE
Used to send a terminal response for commands sent via RIL_UNSOL_STK_PROACTIVE_COMMAND
.
Contents include TERMINAL RESPONSE (6.8).
RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
Used to send information from to SIM encoded as BER-TLV tags (see R96 section 13). Two tags are supported:
- BER_MENU_SELECTION_TAG (0xd3); Contents: MENU SELECTION (8)
- BER_EVENT_DOWNLOAD_TAG (0xd6); Contents: EVENT DOWNLOAD Language selection (11.8)
Content for these tags include:
- MENU SELECTION (8)
- EVENT DOWNLOAD Language selection (11.8)
RIL_REQUEST_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
Returns a single-byte parameter:
- 1: accepted
- 0: not accepted
This should cause the terminal response to be sent to the SIM.
Telephony
STK Telephony is a protocol translation layer used to convert messages from BERL-TLV format to Application messages and back.
On the STK RIL side, STK Telphony receives raw buffer messages from RIL I/F and decodes them into a command parameters container before passing them on to the application. On the Application side, this layer receives application responses for commands and encodes them into raw buffer messages, which then get sent over the RIL I/F back to the SIM card.
Feature List
Feature |
Support |
Implemented by |
PROFILE DOWNLOAD - before radio turn-on |
YES |
Baseband |
SET UP MENU |
YES |
ME |
SELECT ITEM |
YES |
ME |
GET INPUT |
YES |
ME |
GET INKEY |
YES |
ME |
DISPLAY TEXT |
YES |
ME |
SET UP IDLE MODE TEXT |
YES |
ME |
SEND SHORT MESSAGE |
YES |
Baseband – ME |
SEND SS |
YES |
Baseband – ME |
SEND USSD |
YES |
Baseband – ME |
SEND DTMF |
YES |
Baseband – ME |
LAUNCH BROWSER |
YES |
ME |
SET UP CALL |
YES |
Baseband – ME |
PLAY TONE |
YES |
ME |
POLL INTERVAL |
YES |
Baseband |
POLLING OFF |
YES |
Baseband |
TIMER MANAGEMENT |
YES |
Baseband |
MORE TIME |
YES |
Baseband |
PROVIDE LOCAL INFORMATION (MCC, MNC, LAC, Cell ID & IMEI) |
YES |
Baseband |
PROVIDE LOCAL INFORMATION (NMR) |
YES |
Baseband |
PROVIDE LOCAL INFORMATION (Timing Advance) |
YES |
Baseband |
PROVIDE LOCAL INFORMATION(battery state) |
YES |
Baseband |
PROVIDE LOCAL INFORMATION (IMEISV) |
YES |
Baseband |
PROVIDE LOCAL INFORMATION (NMR(UTRAN)) |
YES |
Baseband |
PROVIDE LOCAL INFORMATION (Search Mode change) |
YES |
Baseband |
REFRESH |
YES |
ME |
SET UP EVENT LIST |
YES |
Baseband – ME |
Event: MT call |
YES |
Baseband |
Event: Call connected (all modes) |
YES |
Baseband |
Event: Call disconnected (all modes) |
YES |
Baseband |
Event: Idle screen available |
NO |
|
Event: Browser termination |
NO |
|
Event: Location status |
YES |
Baseband |
Event: Data available |
NO |
|
Event: Channel status |
NO |
|
Event: Access Technology changed |
YES |
Baseband |
Event: Local Connection |
NO |
|
Event: Network Search Mode Change |
YES |
Baseband |
GET READER STATUS |
NO |
|
POWER ON CARD |
NO |
|
POWER OFF CARD |
NO |
|
PERFORM CARD ADPU |
NO |
|
RUN AT COMMAND |
NO |
|
OPEN CHANNEL |
NO |
|
CLOSE CHANNEL |
NO |
|
RECEIVE DATA |
NO |
|
SEND DATA |
NO |
|
GET CHANNEL STATUS |
NO |
|
CALL CONTROL BY SIM |
YES |
Baseband |
SMS-PP data download |
YES |
Baseband |
SMS-CB data download |
YES |
Baseband |
BIP over GPRS |
NO |
|
BIP over USB |
NO |
|
Text Attributes |
NO |
|
Color icons |
YES |
ME |
分享到:
相关推荐
Mobile Application Development with SMS and the SIM Toolkit
SIM300Z TO CONECT SMS AND MOBIPHONE
可以通过微软自己的Microsoft Application Compatibility Toolkit 5.5将信任程序加入系统白名单。使用方法: 1. 安装后得到三个程序,我们需要使用管理员权限启动Compatibility Administrator; 2. 在Custom ...
Telit_SIM_Toolkit_AT_Application_Note_r0.pdf
CB),The present document is applicable to the exchange of secured packets between an entity in a GSM PLMN and an entity in the SIM.Secured Packets contain application messages to which certain ...
The success story of GSM is also the success story of the SIM. Every subscriber needs a SIM and there is no service without it. This is unlike some other systems where the micro-computer in the smart ...
Smart Cards : Card Application Toolkit Version 8.20 2009
Sample asp.net application with the latest rssToolkit.dll.
ACT5.5即Application Compatibility Toolkit Version 5.5(应用程序兼容工具包5.5版),它提供了可帮助用户针对特定程序与Windows XP/Vista操作系统兼容性问题加以诊断和解决的文档及工具。通过安装该工具可以解决...
satellite simulation 卫星 3D simulation control kinect
移动手机adroid iphone 等的系统安全分析,mobile application security
The iFIX Integration Toolkit allows application programmers to access real-time and historical data from iFIX. This toolkit provides these major classes of functions: Easy Database Access (EDA) for ...
好不容易搞到的资料!希望大家喜欢!是关于对一个Web项目在WAS上发布的东东!里面有具体的步骤,还有个实例!
Sim4Life是一款主要用于生物电磁学,热,流体,超声等领域的仿真设计软件。是生物电磁学及多物理场分析学术界和工程界最权威的软件。Sim4Life 5G工具包为5G毫米波天线阵列的设计、分析和优化提供了最有效的解决方案...
大名鼎鼎的界面库Toolkit.Pro.v15.3.1完整源代码
IBM:registered: Portal Toolkit 4.1 是 WebSphere:registered: Studio Application Developer(以下称为 Application Developer)的一个插件,它使您能够在一个集成的开发环境中开发和调试 portlet。Portal Toolkit...
In short, the Template Toolkit combines the best features of its competitors, with ease-of-use and flexibility, resulting in a technology that's fast, powerful and extensible, and ideally suited to ...
WPF21个优秀项目及源码 helixtoolkit-8c0d58aa0295WPF21个优秀项目及源码 helixtoolkit-8c0d58aa0295WPF21个优秀项目及源码 helixtoolkit-8c0d58aa0295WPF21个优秀项目及源码 helixtoolkit-8c0d58aa0295WPF21个优秀...
Codejock.Xtreme.Toolkit.Pro.v15.3.1 源码,.sln的工程属性32位和64位已经全部修改为 VS2017工程属性。直接使用VS2017打开编译即可使用。同时里面包含了已编译好的debug和release的动态库和静态库如下: ToolkitPro...
基于c++的stk(satellite toolkit)二次开发,STK从6.0版开始,为用户提供了两种开发接口:一种是通过STK/Connect模块实现,一种是通过STK提供ActiveX控件。