1、 ETSI TS 1Digital cellular telecoTest specification foApplication Program(3GPP TS 51.0floppy3TECHNICAL SPECIFICATION151 013 V13.0.0 (2016communications system (Phafor Subscriber Identity Modulamming Interface (API) for Jav.013 version 13.0.0 Release 13GLOBAL SYSTEMOBILE COMMUN16-02) hase 2+); ule (S
2、IM) a a Card 13) TEM FOR ICATIONSRETSI ETSI TS 151 013 V13.0.0 (2016-02)13GPP TS 51.013 version 13.0.0 Release 13Reference RTS/TSGC-0651013vd00 Keywords GSM 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 -
3、NAF 742 C Association but non lucratif enregistre la Sous-Prfecture de Grasse (06) N 7803/88 Important notice The present document 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 electro
4、nic and/or print versions of the present document shall not be modified without the prior written authorization of ETSI. In case 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)
5、version kept on a specific network drive within ETSI Secretariat. Users of the present document should be aware that the document 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.
6、asp If you find errors in the present document, please send your comment to one of the following services: https:/portal.etsi.org/People/CommiteeSupportStaff.aspx Copyright Notification No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopyin
7、g and microfilm except as authorized by written permission of ETSI. The content of the PDF version shall not be modified without the written authorization of ETSI. The copyright and the foregoing restriction extend to reproduction in all media. European Telecommunications Standards Institute 2016. A
8、ll rights reserved. DECTTM, PLUGTESTSTM, UMTSTMand the ETSI logo are Trade Marks of ETSI registered for the benefit of its Members. 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 registere
9、d and owned by the GSM Association. ETSI ETSI TS 151 013 V13.0.0 (2016-02)23GPP TS 51.013 version 13.0.0 Release 13Intellectual 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,
10、is publicly available for ETSI members and non-members, and can be found in ETSI SR 000 314: “Intellectual Property Rights (IPRs); 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 t
11、he ETSI Web server (https:/ipr.etsi.org/). Pursuant to the ETSI IPR Policy, no investigation, including IPR searches, has been 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
12、be, or may become, essential to the present document. Foreword This Technical Specification (TS) has been produced by ETSI 3rd Generation Partnership Project (3GPP). The present document may refer to technical specifications or reports using their 3GPP identities, UMTS identities or GSM identities.
13、These should be interpreted as being references to the corresponding ETSI deliverables. The cross reference between GSM, UMTS, 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
14、not“, “may“, “need not“, “will“, “will not“, “can“ and “cannot“ are to be interpreted as described in clause 3.2 of the ETSI Drafting 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 15
15、1 013 V13.0.0 (2016-02)33GPP TS 51.013 version 13.0.0 Release 13Contents Intellectual Property Rights 2g3Foreword . 2g3Modal verbs terminology 2g3Foreword . 9g31 Scope 10g32 References 10g33 Definitions and abbreviations . 11g33.1 Definitions 11g33.2 Abbreviations . 11g34 Test Environment . 12g34.1
16、Applicability . 12g34.2 Test environment description . 12g34.3 Tests format 13g34.3.1 Test Area Reference 13g34.3.1.1 Conformance requirements . 14g34.3.1.2 Test Area files . 14g34.3.1.3 Test Procedure. 15g34.3.1.4 Test Coverage . 15g34.4 Initial Conditions 15g34.5 Package name . 15g34.6 AID Coding
17、16g34.6.1 Specific Test Applet Name for API 16g34.6.2 Specific Test Applet Name for Framework 17g34.7 Test Equipment 17g34.7.1 APDU tool 17g34.7.2 Util package 18g34.7.3 Applet installation parameters 18g34.7.3.1 Security parameters . 18g34.7.3.2 Loading components . 18g34.8 Testing methodology 18g3
18、4.8.1 Test interfaces and facilities 18g35 Test plan . 18g36 API Test Plan . 19g36.1 Package sim.access: 19g36.1.1 Interface SIMView . 19g36.1.1.1 Constants . 19g36.1.1.2 Method select(short fid, byte fci, short fciOffset, short fciLength) 19g36.1.1.3 Method select (short fid) . 23g36.1.1.4 Method s
19、tatus 25g36.1.1.5 Method readBinary 27g36.1.1.6 Method updateBinary 30g36.1.1.7 Method readRecord. 33g36.1.1.8 Method updateRecord . 39g36.1.1.9 Method seek 45g36.1.1.10 Method increase 49g36.1.1.11 Method invalidate . 52g36.1.1.12 Method rehabilitate . 53g36.1.2 Class SIMSystem 55g36.1.2.1 Method g
20、etTheSIMView 55g36.1.3 Class SIMViewException . 56g36.1.3.1 Method throwIt . 56g3ETSI ETSI TS 151 013 V13.0.0 (2016-02)43GPP TS 51.013 version 13.0.0 Release 136.1.3.2 Constructor 57g36.1.3.3 Reason Codes 58g36.2 Package sim.toolkit 58g36.2.1 Interface ToolkitConstants 58g36.2.1.1 Constants . 58g36.
21、2.2 Interface ToolkitInterface . 59g36.2.2.1 Method processToolkit 59g36.2.3 Class EditHandler . 60g36.2.4 Class EnvelopeHandler . 60g36.2.4.1 Method getEnvelopeTag . 60g36.2.4.2 Method getItemIdentifier 61g36.2.4.3 Method getSecuredDataLength . 62g36.2.4.4 Method getSecuredDataOffset 66g36.2.4.5 Me
22、thod getTheHandler . 69g36.2.4.6 Method getTPUDLOffset 70g36.2.4.7 Method getLength . 72g36.2.4.8 Method copy . 73g36.2.4.9 Method findTLV . 75g36.2.4.10 Method getValueLength 76g36.2.4.11 Method getValueByte . 77g36.2.4.12 Method copyValue 79g36.2.4.13 Method compareValue 81g36.2.4.14 Method findAn
23、dCopyValue(byte tag, byte dstBuffer, short dstOffset) 84g36.2.4.15 Method findAndCopyValue(byte tag, byte occurrence, short valueOffset, byte dstBuffer, short dstOffset, short dstLength) 86g36.2.4.16 Method findAndCompareValue(byte tag, byte compareBuffer, short compareOffset) 89g36.2.4.17 Method fi
24、ndAndCompareValue(byte tag, byte occurrence, short valueOffset, byte compareBuffer, short compareOffset, short compareLength) . 92g36.2.4.18 Method getCapacity 95g36.2.4.19 Method getUserDataLength 96g36.2.4.20 Method getChannelIdentifier 98g36.2.5 Class EnvelopeResponseHandler 100g36.2.5.1 Method g
25、etTheHandler . 100g36.2.5.2 Method post. 101g36.2.5.3 Method postAsBERTLV . 103g36.2.5.4 Method getLength . 104g36.2.5.5 Method copy . 105g36.2.5.6 Method findTLV . 107g36.2.5.7 Method getValueLength 109g36.2.5.8 Method getValueByte . 110g36.2.5.9 Method copyValue 111g36.2.5.10 Method compareValue 1
26、14g36.2.5.11 Method findAndCopyValue(byte tag, byte dstBuffer, short valueOffset) 116g36.2.5.12 Method findAndCopyValue(byte tag, byte occurrence, short valueOffset, byte dstBuffer, short dstOffset, short dstLength) 119g36.2.5.13 Method findAndCompareValue(byte tag, byte compareBuffer, short compare
27、Offset) 122g36.2.5.14 Method findAndCompareValue(byte tag, byte occurrence, short valueOffset, byte compareBuffer, short compareOffset, short compareLength) . 124g36.2.5.15 Method appendArray 128g36.2.5.16 Method appendTLV(byte tag, byte value) 130g36.2.5.17 Method appendTLV(byte tag, byte value1, b
28、yte value2) 131g36.2.5.18 Method appendTLV(byte tag, byte value, short valueoffset, short valuelength) . 133g36.2.5.19 Method appendTLV(byte tag, byte value1, byte value2, short value2offset, short value2length) 135g36.2.5.20 Method clear . 138g36.2.5.21 Method getCapacity 139g36.2.6 Class MEProfile
29、 140g36.2.6.1 Method check (byte index) 140g36.2.6.2 Method check (byte mask, short offset, short length) . 141g36.2.6.3 Method check (short index). 142g36.2.6.4 Method getValue (short indexMSB, short indexLSB) 143g36.2.6.5 Method copy (short startOffset, byte dstBuffer, short dstOffset, short dstLe
30、ngth) 144g36.2.7 Class ProactiveHandler . 146g3ETSI ETSI TS 151 013 V13.0.0 (2016-02)53GPP TS 51.013 version 13.0.0 Release 136.2.7.1 Method getTheHandler . 146g36.2.7.2 Method init 147g36.2.7.3 Method initDisplayText 149g36.2.7.4 Method initGetInkey . 152g36.2.7.5 Method initGetInput 155g36.2.7.6 M
31、ethod send 158g36.2.7.7 Method getLength . 161g36.2.7.8 Method copy . 162g36.2.7.9 Method findTLV . 163g36.2.7.10 Method getValueLength 165g36.2.7.11 Method getValueByte . 166g36.2.7.12 Method copyValue 167g36.2.7.13 Method compareValue 170g36.2.7.14 Method findAndCopyValue(byte tag, byte dstBuffer,
32、 short valueOffset) 173g36.2.7.15 Method findAndCopyValue(byte tag, byte occurence, short valueOffset, byte dstBuffer, short dstOffset, short dstLength) 175g36.2.7.16 Method findAndCompareValue(byte tag, byte compareBuffer, short compareOffset) 178g36.2.7.17 Method findAndCompareValue(byte tag, byte
33、 occurence, short valueOffset, byte compareBuffer, short compareOffset, short compareLength) . 181g36.2.7.18 Method appendArray 184g36.2.7.19 Method appendTLV(byte tag, byte value) 186g36.2.7.20 Method appendTLV(byte tag, byte value1, byte value2) 188g36.2.7.21 Method appendTLV(byte tag, byte value,
34、 short valueoffset, short valuelength) 189g36.2.7.22 Method appendTLV(byte tag, byte value1, byte value2, short value2offset, short value2length) . 192g36.2.7.23 Method clear . 194g36.2.7.24 Method getCapacity 195g36.2.7.25 Method initCloseChannel 196g36.2.8 Class ProactiveResponseHandler 198g36.2.8
35、.1 Method copyAdditionalInformation 198g36.2.8.2 Method copyTextString 202g36.2.8.3 Method getAdditionalInformationLength . 205g36.2.8.4 Method getGeneralResult 207g36.2.8.5 Method getItemIdentifier 209g36.2.8.6 Method getTextStringCodingScheme . 211g36.2.8.7 Method GetTextStringLength . 213g36.2.8.
36、8 Method getTheHandler . 215g36.2.8.9 Method getLength . 216g36.2.8.10 Method copy . 217g36.2.8.11 Method findTLV . 219g36.2.8.12 Method getValueLength 221g36.2.8.13 Method getValueByte . 222g36.2.8.14 Method copyValue 223g36.2.8.15 Method compareValue 226g36.2.8.16 Method findAndCopyValue(byte tag,
37、 byte dstBuffer, short valueOffset) 228g36.2.8.17 Method findAndCopyValue(byte tag, byte occurence, short valueOffset, byte dstBuffer, short dstOffset, short dstLength) 231g36.2.8.18 Method findAndCompareValue(byte tag, byte compareBuffer, short compareOffset) 234g36.2.8.19 Method findAndCompareValu
38、e(byte tag, byte occurence, short valueOffset, byte compareBuffer, short compareOffset, short compareLength) . 236g36.2.8.20 Method getCapacity 240g36.2.8.21 Method getChannelIdentifier 241g36.2.8.22 Method copyChannelData. 244g36.2.9 Class ToolkitRegistry . 248g36.2.9.1 Method allocateTimer . 248g3
39、6.2.9.2 Method changeMenuEntry 249g36.2.9.3 Method clearEvent 256g36.2.9.4 Method disableMenuEntry 258g36.2.9.5 Method enableMenuEntry. 260g36.2.9.6 Method getEntry . 261g36.2.9.7 Method getPollInterval 262g36.2.9.8 Method initMenuEntry 264g36.2.9.9 Method isEventSet 269g3ETSI ETSI TS 151 013 V13.0.
40、0 (2016-02)63GPP TS 51.013 version 13.0.0 Release 136.2.9.10 Method releaseTimer 271g36.2.9.11 Method requestPollInterval . 273g36.2.9.12 Method setEvent . 274g36.2.9.13 Method setEventList . 278g36.2.10 Class ViewHandler . 283g36.2.11 Class ToolkitException . 283g36.2.11.1 Exception Constants 283g3
41、6.2.11.2 Constructor ToolkitException . 283g36.2.11.3 Method throwIt . 284g36.3 SIM Toolkit Framework . 285g36.3.1 Minimum Handler Availability. 285g36.3.1.1 ProactiveHandler . 285g36.3.1.2 ProactiveResponseHandler . 293g36.3.1.3 EnvelopeHandler . 305g36.3.1.4 EnvelopeResponseHandler . 313g36.3.2 Ha
42、ndler Integrity . 329g36.3.2.1 ProactiveHandler . 329g36.3.2.2 ProactiveResponseHandler . 331g36.3.2.3 EnvelopeHandler . 333g36.3.2.4 EnvelopeResponseHandler . 357g36.3.3 Applet Triggering . 358g36.3.3.1 EVENT_PROFILE_DOWNLOAD 358g36.3.3.2 EVENT_MENU_SELECTION 359g36.3.3.3 EVENT_MENU_SELECTION_HELP_
43、REQUEST 361g36.3.3.4 EVENT_FORMATTED_SMS_PP_ENV . 365g36.3.3.5 EVENT_UNFORMATTED_SMS_PP_ENV . 366g36.3.3.6 EVENT_CALL_CONTROL_BY_SIM 368g36.3.3.7 EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM 370g36.3.3.8 EVENT_TIMER_EXPIRATION . 371g36.3.3.9 EVENT_UNFORMATTED_SMS_CB 373g36.3.3.10 EVENT_EVENT_DOWNLOAD_MT_CA
44、LL . 374g36.3.3.11 EVENT_EVENT_DOWNLOAD_CALL_CONNECTED . 375g36.3.3.12 EVENT_EVENT_DOWNLOAD_CALL_DISCONNECTED 377g36.3.3.13 EVENT_EVENT_DOWNLOAD_LOCATION_STATUS 378g36.3.3.14 EVENT_EVENT_DOWNLOAD_USER_ACTIVITY 379g36.3.3.15 EVENT_EVENT_DOWNLOAD_IDLE_SCREEN_AVAILABLE 381g36.3.3.16 EVENT_EVENT_DOWNLOA
45、D_CARD_READER_STATUS . 382g36.3.3.17 EVENT_UNRECOGNIZED_ENVELOPE 384g36.3.3.18 EVENT_STATUS_COMMAND . 385g36.3.3.19 EVENT_FORMATTED_SMS_CB 387g36.3.3.20 EVENT_EVENT_DOWNLOAD_LANGUAGE_SELECTION 389g36.3.3.21 EVENT_EVENT_DOWNLOAD_BROWSER_TERMINATION 390g36.3.3.22 EVENT_FIRST_COMMAND_AFTER_SELECT 392g3
46、6.3.3.23 EVENT_EVENT_DOWNLOAD_DATA_AVAILABLE . 394g36.3.3.24 EVENT_EVENT_DOWNLOAD_CHANNEL_STATUS . 396g36.3.3.25 EVENT_FORMATTED_SMS_PP_UPD . 399g36.3.3.26 EVENT_UNFORMATTED_SMS_PP_UPD . 402g36.3.4 Proactive Command Sending by the STF . 404g36.3.4.1 System Proactive Commands 404g36.3.4.2 Interaction
47、 with GSM commands . 405g36.3.4.3 Proactive Command Control . 407g36.3.5 Exception Handling 409g36.3.5.1 Hide Exceptions from the ME . 409g36.3.5.2 Interaction with Multiple Triggering . 410g36.3.6 Framework Security Management 411g36.3.6.1 Input Data 412g36.3.6.2 Output Data. 417g36.3.7 Envelope Re
48、sponse Posting 419g36.3.7.1 EVENT_CALL_CONTROL_BY_SIM 419g36.3.7.2 EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM 421g36.3.7.3 EVENT_UNRECOGNIZED_ENVELOPE 423g36.3.7.4 EVENT_FORMATTED_SMS_PP_ENV . 423g3ETSI ETSI TS 151 013 V13.0.0 (2016-02)73GPP TS 51.013 version 13.0.0 Release 136.3.8 Toolkit Installation 4
49、26g36.3.8.1 Timers Allocation . 426g36.3.8.2 Item Identifier . 428g36.3.8.3 Item Position . 430g36.3.8.4 Maximum Text Length for a menu entry 431g36.3.8.5 Maximum number of menu entries . 433g36.3.8.6 Access Domain . 434g36.3.8.7 Priority Level 440g36.3.8.8 Channel Allocation 444g36.3.8.9 Minimum Security Level 446g36.3.9 File System Context 447g36.3.9.1 Initial Context . 447g36.3.9.2 Context Preservation (current file) 448g36.3.9.3 Context Preservation (current record pointer) . 450g36.3.10 Other parts transferred to framewor