1、 ETSI TS 1Universal Mobile TelC-languag(3GPP TS 31.1TECHNICAL SPECIFICATION131 131 V13.0.0 (2016elecommunications System (LTE; age binding to (U)SIM API .131 version 13.0.0 Release 1316-02) (UMTS); 13) ETSI ETSI TS 131 131 V13.0.0 (2016-02)13GPP TS 31.131 version 13.0.0 Release 13Reference RTS/TSGC-
2、0631131vd00 Keywords LTE,UMTS ETSI 650 Route des Lucioles F-06921 Sophia Antipolis Cedex - FRANCE Tel.: +33 4 92 94 42 00 Fax: +33 4 93 65 47 16 Siret N 348 623 562 00017 - NAF 742 C Association but non lucratif enregistre la Sous-Prfecture de Grasse (06) N 7803/88 Important notice The present docum
3、ent can be downloaded from: http:/www.etsi.org/standards-search The present document may be made available in electronic versions and/or in print. The content of any electronic and/or print versions of the present document shall not be modified without the prior written authorization of ETSI. In cas
4、e of any existing or perceived difference in contents between such versions and/or in print, the only prevailing document is the print of the Portable Document Format (PDF) version kept on a specific network drive within ETSI Secretariat. Users of the present document should be aware that the docume
5、nt may be subject to revision or change of status. Information on the current status of this and other ETSI documents is available at http:/portal.etsi.org/tb/status/status.asp If you find errors in the present document, please send your comment to one of the following services: https:/portal.etsi.o
6、rg/People/CommiteeSupportStaff.aspx Copyright Notification No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and microfilm except as authorized by written permission of ETSI. The content of the PDF version shall not be modified withou
7、t the written authorization of ETSI. The copyright and the foregoing restriction extend to reproduction in all media. European Telecommunications Standards Institute 2016. All rights reserved. DECTTM, PLUGTESTSTM, UMTSTMand the ETSI logo are Trade Marks of ETSI registered for the benefit of its Memb
8、ers. 3GPPTM and LTE are Trade Marks of ETSI registered for the benefit of its Members and of the 3GPP Organizational Partners. GSM and the GSM logo are Trade Marks registered and owned by the GSM Association. ETSI ETSI TS 131 131 V13.0.0 (2016-02)23GPP TS 31.131 version 13.0.0 Release 13Intellectual
9、 Property Rights IPRs essential or potentially essential to the present document may have been declared to ETSI. The information pertaining to these essential IPRs, if any, is publicly available for ETSI members and non-members, and can be found in ETSI SR 000 314: “Intellectual Property Rights (IPR
10、s); Essential, or potentially Essential, IPRs notified to ETSI in respect of ETSI standards“, which is available from the ETSI Secretariat. Latest updates are available on the ETSI Web server (https:/ipr.etsi.org/). Pursuant to the ETSI IPR Policy, no investigation, including IPR searches, has been
11、carried out by ETSI. No guarantee can be given as to the existence of other IPRs not referenced in ETSI SR 000 314 (or the updates on the ETSI Web server) which are, or may be, or may become, essential to the present document. Foreword This Technical Specification (TS) has been produced by ETSI 3rd
12、Generation Partnership Project (3GPP). The present document may refer to technical specifications or reports using their 3GPP identities, UMTS identities or GSM identities. These should be interpreted as being references to the corresponding ETSI deliverables. The cross reference between GSM, UMTS,
13、3GPP and ETSI identities can be found under http:/webapp.etsi.org/key/queryform.asp. Modal verbs terminology In the present document “shall“, “shall not“, “should“, “should not“, “may“, “need not“, “will“, “will not“, “can“ and “cannot“ are to be interpreted as described in clause 3.2 of the ETSI Dr
14、afting Rules (Verbal forms for the expression of provisions). “must“ and “must not“ are NOT allowed in ETSI deliverables except when used in direct citation. ETSI ETSI TS 131 131 V13.0.0 (2016-02)33GPP TS 31.131 version 13.0.0 Release 13Contents Intellectual Property Rights 2g3Foreword . 2g3Modal ve
15、rbs terminology 2g3Foreword . 6g31 Scope 7g32 References 7g33 Definitions and abbreviations . 8g33.1 Definitions 8g33.2 Abbreviations . 8g34 Description . 9g34.1 Overview 9g34.2 Design Rationale and Upward Compatibility . 10g34.3 Application Triggering . 10g34.4 Proactive command handling . 13g34.5
16、Application Loading . 13g35 C-language binding for (U)SIM API 13g35.1 Overview 13g35.2 Toolkit Application Functions 14g35.2.1 main 14g35.2.2 CatGetFrameworkEvent . 15g35.2.3 CatExit 15g35.3 Registry 15g35.3.1 CatSetMenuString . 15g35.3.2 CatNotifyOnFrameworkEvent 16g35.3.3 CatNotifyOnEnvelope 16g35
17、.3.4 CatNotifyOnEvent 16g35.4 Man-Machine Interface 17g35.4.1 CatAddItem. 17g35.4.2 CatSelectItem 17g35.4.3 CatEndSelectItem . 17g35.4.4 CatDisplayText . 17g35.4.5 CatGetInKey . 18g35.4.6 CatGetInput. 18g35.4.7 CatSetupIdleModeText . 19g35.4.8 CatPlayTone . 20g35.5 Timers 20g35.5.1 CatGetTimer . 20g
18、35.5.2 CatFreeTimer 20g35.5.3 CatStartTimer . 20g35.5.4 CatGetTimerValue 21g35.6 Supplementary Card Reader Management . 21g35.6.1 CatPowerOnCard 21g35.6.2 CatPowerOffCard . 21g35.6.3 CatPerformCardAPDU . 22g35.6.4 CatGetReaderStatus 22g35.7 UICC File Store Access . 22g35.7.1 CatSelect . 23g35.7.2 Ca
19、tStatus. 23g35.7.3 CatGetCHVStatus . 23g35.7.4 CatReadBinary 23g35.7.5 CatUpdateBinary 24g35.7.6 CatReadRecord . 24g3ETSI ETSI TS 131 131 V13.0.0 (2016-02)43GPP TS 31.131 version 13.0.0 Release 135.7.7 CatUpdateRecord 24g35.7.8 CatSearch 25g35.7.9 CatIncrease . 25g35.7.10 CatInvalidate . 25g35.7.11
20、CatRehabilitate . 25g35.8 Miscellaneous . 26g35.8.1 CatGetTerminalProfile 26g35.8.2 CatMoreTime 26g35.8.3 CatPollingOff 26g35.8.4 CatPollInterval 26g35.8.5 CatRefresh 27g35.8.6 CatLanguageNotification 27g35.8.7 CatLaunchBrowser . 27g35.9 Low-level Interface 28g35.9.1 CatResetBuffer . 28g35.9.2 CatSt
21、artProactiveCommand 29g35.9.3 CatSendProactiveCommand . 29g35.9.4 CatOpenEnvelope . 29g35.9.5 CatSendEnvelopeResponse 29g35.9.6 CatSendEnvelopeErrorResponse 29g35.9.7 CatPutData 29g35.9.8 CatPutByte 30g35.9.9 CatPutTLV 30g35.9.10 CatPutBytePrefixedTLV . 30g35.9.11 CatPutOneByteTLV 30g35.9.12 CatPutT
22、woByteTLV . 30g35.9.13 CatGetByte . 31g35.9.14 CatGetData . 31g35.9.15 CatFindNthTLV 31g35.9.16 CatFindNthTLVInUserBuffer. 31g35.10 Network Services . 32g35.10.1 CatGetLocationInformation 32g35.10.2 CatGetTimingAdvance . 32g35.10.3 CatGetIMEI 32g35.10.4 CatGetNetworkMeasurementResults 32g35.10.5 Cat
23、GetDateTimeAndTimeZone 33g35.10.6 CatGetLanguage . 33g35.10.7 CatSetupCall . 33g35.10.8 CatSendShortMessage 34g35.10.9 CatSendSS 35g35.10.10 CatSendUSSD . 35g35.10.11 CatOpenCSChannel 36g35.10.12 CatOpenGPRSChannel . 37g35.10.13 CatCloseChannel 39g35.10.14 CatReceiveData 39g35.10.15 CatSendData . 40
24、g35.10.16 CatGetChannelStatus 40g35.10.17 CatServiceSearch 40g35.10.18 CatGetServiceInformation 41g35.10.19 CatDeclareService 41g35.10.20 CatRunATCommand 41g35.10.21 CatSendDTMFCommand . 42g35.11 Supporting Data Types . 42g35.11.1 CatRecordAccessMode . 42g35.11.2 CatSearchMode . 42g35.11.3 CatFramew
25、orkEventType . 42g35.11.4 CatEnvelopeTagType . 43g35.11.5 CatEventType . 43g35.11.6 CatTextString 43g35.11.7 CatAlphaString . 43g35.11.8 CatIconIdentifier . 43g35.11.9 CatIconOption . 44g3ETSI ETSI TS 131 131 V13.0.0 (2016-02)53GPP TS 31.131 version 13.0.0 Release 135.11.10 CatDCSValue . 44g35.11.11
26、 CatDisplayTextOptions 44g35.11.12 CatGetInKeyOptions 44g35.11.13 CatGetInputOptions 44g35.11.14 CatSelectItemOptions . 45g35.11.15 CatTimeUnit . 45g35.11.16 CatTone 45g35.11.17 CatRefreshOptions 45g35.11.18 CatGetReaderStatusOptions . 45g35.11.19 CatDevice . 46g35.11.20 CatGeneralResult 46g35.11.21
27、 CatTimerValue . 47g35.11.22 CatTimeInterval 47g35.11.23 CatFileStatus . 47g35.11.24 CatLanguageNotificationOptions . 48g35.11.25 CatLocationInformation 48g35.11.26 CatTimingAdvance . 48g35.11.27 CatLaunchBrowserOptions . 48g35.11.28 CatSetupCallOptions 48g35.11.29 CatTypeOfNumberAndNumberingPlanIde
28、ntifier . 49g35.11.30 CatSendShortMessageOptions 49g35.11.31 CatSendDataOptions . 49g35.11.32 CatMEInterfaceTransportLevelType 50g35.11.33 CatBearer 50g35.11.34 CatOpenChannelOptions 50g35.11.35 CatAddressType . 50g35.11.36 CatFID 50g35.11.37 CatTextFormat 51g35.11.38 CatTextForegroundColour 51g35.1
29、1.39 CatTextBackgroundColour . 51g3Annex A (normative): Application executable architecture . 52g3Annex B (informative): Example 54g3Annex C (informative): Change history . 56g3History 57g3ETSI ETSI TS 131 131 V13.0.0 (2016-02)63GPP TS 31.131 version 13.0.0 Release 13Foreword This Technical Specific
30、ation has been produced by the 3rdGeneration Partnership Project (3GPP). The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with
31、 an identifying change of release date and an increase in version number as follows: Version x.y.z where: x the first digit: 1 presented to TSG for information; 2 presented to TSG for approval; 3 or greater indicates TSG approved document under change control. y the second digit is incremented for a
32、ll changes of substance, i.e. technical enhancements, corrections, updates, etc. z the third digit is incremented when editorial only changes have been incorporated in the document. ETSI ETSI TS 131 131 V13.0.0 (2016-02)73GPP TS 31.131 version 13.0.0 Release 131 Scope A Subscriber Identity Module Ap
33、plication Programming Interface (SIM API) has been defined in TS 42.019 4 as a technology-independent API by which toolkit applications and (U)SIMs co-operate. That specification is independent of the programming language technology used to create the application, the platform used to host the appli
34、cation and the runtime environment used to execute the application. The present document includes information applicable to (U)SIM toolkit application developers creating applications using the C programming language ISO/IEC 9899 7. The present document describes an interface between toolkit applica
35、tions written in the C programming language and the (U)SIM in order to realize the co-operation set forth in TS 42.019 4. In particular, the API described herein provides the service of assembling proactive commands and disassembling the responses to these commands for the application programmer. So
36、ftware tools, integrated software development environments and software management systems that may be used to create application programs are explicitly out of scope of the present document. 2 References The following documents contain provisions which, through reference in this text, constitute pr
37、ovisions of the present document. References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. For a specific reference, subsequent revisions do not apply. For a non-specific reference, the latest version applies. In the case of a referenc
38、e to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document in the same Release as the present document. 1 3GPP TR 21.905: “Vocabulary for 3GPP Specifications“. 2 3GPP TS 31.111: “USIM Application Toolkit (USAT)“. 3 3GPP TS 23.04
39、8: “Security Mechanisms for the (U)SIM application toolkit; Stage 2“. 4 3GPP TS 42.019: “Subscriber Identity Module Application Programming Interface (SIM API); Stage 1“. 5 ISO 639 (1988): “Code for the representation of names of languages“. 6 3GPP TS 23.038: “Alphabets and language-specific informa
40、tion“. 7 ISO/IEC 9899: “Programming Languages - C“. 8 3GPP TS 11.14: “Specification of the SIM Application Toolkit for the Subscriber Identity Module - Mobile Equipment (SIM ME) interface“. 9 Tool Interface Standard (TIS) Executable and Linking Format Specification Version 1.2. 10 SYSTEM V Applicati
41、on Binary Interface, Edition 4.1. 11 3GPP TS 51.011: “Specification of the Subscriber Identity Module - Mobile Equipment (SIM-ME) interface“. 12 Void. 13 3GPP TS 31.115: “Secured packet structure for (U)SIM Toolkit applications“. 14 3GPP TS 31.116: “Remote APDU Structure for (U)SIM Toolkit applicati
42、ons“. 15 3GPP TS 31.102: “Characteristics of the USIM Application“. ETSI ETSI TS 131 131 V13.0.0 (2016-02)83GPP TS 31.131 version 13.0.0 Release 1316 3GPP TS 31.101: “UICC-Terminal Interface, Physical and Logical Characteristics“. 3 Definitions and abbreviations 3.1 Definitions For the purposes of t
43、he present document, the following terms and definitions apply: application: computer program that defines and implements a useful domain-specific functionality The term may apply to the functionality itself, to the representation of the functionality in a programming language, or to the realization
44、 of the functionality as executable code. application executable: representation of an application as collection of executable codes application program: representation of an application in a programming language such as assembly language, C, Java, WML or XHTML Application Programming Interface (API
45、): collection of entry points and data structures that an application program can access when translated into an application executable byte code: processor-independent representation of a basic computer operation such as “increment by one“ that is executed by computer program called a byte code int
46、erpreter data structure: memory address that can be accessed by an application executable in order to read or write data entry point: memory address that can be branched to by an application executable in order to access functionality defined by an application-programming interface Depending on the
47、software technology, an entry point is also called a subroutine, a function or a method. executable code: generic term for either byte code or native code framework: defines a set of Application Programming Interface (API) functions for developing applications and for providing system services to th
48、ose applications loadfile: representation of an application executable that is transmitted from the terminal to the smart card operating system A loadfile typically includes information about the application executable in addition to the application executable itself. native code: processor-dependen
49、t representation of a basic computer operation such as “increment by one“ that is executed by the hardware circuitry of a computers central processing unit toolkit application: uses the commands described in TS 31.111 2 and TS 11.14 8 3.2 Abbreviations For the purpose of the present document, the following abbreviations apply: APDU Application Protocol Data Unit API Application Programming Interface CAT Card Application Toolkit CS Circuit Switched DCS Digital Cellular System DF Dedicated File DTMF Dual Tone Multiple Frequen