Date post: | 03-Jun-2018 |
Category: |
Documents |
Upload: | jameskachirosarumaha |
View: | 335 times |
Download: | 22 times |
of 212
8/12/2019 Developer Suite Getting Started
1/212
Developer Suite V3.2
Getting Started
8/12/2019 Developer Suite Getting Started
2/212
www.gemalto.com
All information herein is either public information or is the property of and owned solely by Gemalto NV. and/or its subsidiarieswho shall have and keep the sole right to file patent applications or any other kind of intellectual property protection inconnection with such information.
Nothing herein shall be construed as implying or granting to you any rights, by license, grant or otherwise, under anyintellectual and/or industrial property rights of or concerning any of Gemaltos information.
This document can be used for informational, non-commercial, internal and personal use only provided that:
The copyright notice below, the confidentiality and proprietary legend and this full warning notice appear in all copies.
This document shall not be posted on any network computer or broadcast in any media and no modification of any part ofthis document shall be made.
Use for any other purpose is expressly prohibited and may result in severe civil and criminal liabilities.
The information contained in this document is provided AS IS without any warranty of any kind. Unless otherwise expresslyagreed in writing, Gemalto makes no warranty as to the value or accuracy of information contained herein.
The document could include technical inaccuracies or typographical errors. Changes are periodically added to the informationherein. Furthermore, Gemalto reserves the right to make any change or improvement in the specifications data, information,and the like described herein, at any time.
Gemalto hereby disclaims all warranties and cond itions with regard to the information contained herein, including allimplied warranties of merchantability, fitness for a particular purpose, title and non-infringement. In no event shallGemalto be liable, whether in contract, tort or otherwise, for any indi rect, special or consequential damages or any
damages whatsoever includ ing but not limited to damages resulting from loss of use, data, profits, revenues, orcustomers, arising out of or in connection with the use or performance of information contained in this document.
Gemalto does not and shall not warrant that this p roduct wil l be resistant to all possible attacks and shall not incur,and disclaims, any liability i n this respect. Even if each product is compliant with current security standards in forceon the date of their design, security mechanisms' resistance necessarily evolves according to the state of the art insecurity and notably under the emergence of new attacks. Under no circumstances, shall Gemalto be held liable forany third party actions and in particular in case of any successful attack against systems or equipmentincorporating Gemalto products. Gemalto disclaims any liability with respect to security for direct, indirect,incidental or consequential damages that result from any use of it s products . It is further stressed that independenttesting and verification by the person using the product is particularly encouraged, especially in any application inwhich defective, incorrect or insecure function ing could result in damage to persons or property, denial of service orloss of privacy.
Copyright 2009 Gemalto N.V. All rights reserved. Gemalto and the Gemalto logo are trademarks and service marks ofGemalto N.V. and/or its subsidiaries and are registered in certain countries. All other trademarks and service marks, whether
registered or not in specific countries, are the property of their respective owners.GEMALTO, B.P. 100, 13881 GEMENOS CEDEX, FRANCE.
Tel: +33 (0)4.42.36.50.00 Fax: +33 (0)4.42.36.50.90
Printed in France. Document Reference: D1123621A
March 30, 2009
http://localhost/var/www/apps/conversion/tmp/scratch_3/http//www.gemalto.comhttp://localhost/var/www/apps/conversion/tmp/scratch_3/http//www.gemalto.com8/12/2019 Developer Suite Getting Started
3/212
Conten
ts
Chapter 1 Introduction 1
The Java Card Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
The GlobalPlatform Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
The OpenCard Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Java Card Concepts and Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
GSM and 3G Extension to the Java Card Specification . . . . . . . . . . . . . . . . . . . . 3
CDMA Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Client Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
File Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
CAP Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5JAR Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
SAP Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
IJC Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
AIDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
The Developer Suite V3.2 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Developer Suite V3.2 Development Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Development Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Tools Used During the Test Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Preface 11
Whats New in This Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Who Should Read this Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Conventions Used in this Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Chapter 3 Installing Developer Suite V3.2 13
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Installation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Before Installing Developer Suite V3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Installing Developer Suite V3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
After Installing Developer Suite V3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Apply and Import A License for Developer Suite V3.2 . . . . . . . . . . . . . . . . . . . . 15
Importing WTK Devices Into Eclipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Chapter 4 Developer Suite V3.2 Components 19
License Key Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Eclipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Static Content Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Menu to Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Static Content Explorer View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Static Content Explorer Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
JCardManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
8/12/2019 Developer Suite Getting Started
4/212
iv Contents
Application Manager 2G/3G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Simulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
The SIM Card Simulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
The Mobile Simulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Simulation Chain 2G and Simulation Chain 3G . . . . . . . . . . . . . . . . . . . . . . . . . 28
Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Cap File Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Crypto Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
File System Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Key File Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
OTA Interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Script Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
WTKOCF Bridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Chapter 5 Getting Started with Developer Suite V3.2 31
Developer Suite V3.2 Working Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Developer Suite Perspective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Java Card Project Management View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Project Wizards And Applications Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Project Wizards: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Applications Wizards - Twin displays: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Java Card Project Import and Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Import and Export Menu Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Importing Developer Suite Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Exporting Developer Suite Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Project Properties Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
How To Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Export Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
GDP and GBP pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
The Out Line Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41A Typical Development Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
How to import examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Chapter 6 M-NFC Enabled JavaCard Applet/Servlet 47
NFC Contactless Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
NFC Technology Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Three Modes of Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
NFC Contactless JavaCard Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Card Emulation Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Reader Emulation Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Use of SIM / UICC Toolkit In NFC Contactless Applets . . . . . . . . . . . . . . . . 49NFC Demo Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Creating An NFC Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Creating Emulation and Reader Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Creating an Emulation Servlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Creating a Reader Servlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Debugging the Servlet Using the Mobile Simulator 3G . . . . . . . . . . . . . . . . . . . . . . . 53
Starting the Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Starting the Reader Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Starting the Emulation Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Two Ways To Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Use The STK Method: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Use The SCWS Feature: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
8/12/2019 Developer Suite Getting Started
5/212
Contents v
The Card Simulator Proxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
The OCF View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Contact-less Tag Application: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
How to create a contact-less tag application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
How to program a contact-less tag application . . . . . . . . . . . . . . . . . . . . . . . . . . 64
How to run a contact-less tag application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Contact-less Reader Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69How to create a contact-less reader application . . . . . . . . . . . . . . . . . . . . . . . . . 69
How to program a contact-less reader application . . . . . . . . . . . . . . . . . . . . . . . 70
How to run a contact-less reader application. . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Chapter 7 Worked Example with USIM Toolkit Applet 77
Creating the Java Card Project with the Eclipse IDE . . . . . . . . . . . . . . . . . . . . . . . . 77
Adding a USIM Toolkit Applet to a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
The Toolkit Applet Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Debugging the USIM Toolkit Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Client Applications Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Mobile Simulator Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Applet Debugging Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Debugging the Applet Using the Mobile Simulator 3G . . . . . . . . . . . . . . . . . . . . 93
Step 1: Setting breakpoints in the applets code . . . . . . . . . . . . . . . . . . . . . . 93
Step 2: Debugging the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Step 3: Operating the Client Application (Mobile Simulator) . . . . . . . . . . . . . 95
Step 4: Notification that execution has stopped on a breakpoint . . . . . . . . . 96
Step 5: Bug detection and correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Loading and Installing the Applet in a Card using Eclipse . . . . . . . . . . . . . . . . . . . . . 97
Testing the USIM Toolkit Applet in a Real Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Chapter 8 Worked Example with JCRMI Applet and Client 99
Creating the Java Card Project with Eclipse IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Creating a Remote Object Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
The Remote Object Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Adding a JCRMI Applet to a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
The JCRMI Applet Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Creating a JCRMI Client Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
The JCRMI/APDU OCF Client Project Wizard . . . . . . . . . . . . . . . . . . . . . . . . . 107
Debugging the JCRMI Applet Using the JCRMI Client Application . . . . . . . . . . . . . 108
Step 1: Call the new function in the JCRMI client . . . . . . . . . . . . . . . . . . . . 108
Step 2: Setting breakpoints in the applets code . . . . . . . . . . . . . . . . . . . . . 109
Step 3: Debugging the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Step 4: Notification that execution has stopped on a breakpoint . . . . . . . . 111
Step 5: Bug detection and correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Loading and Installing the Applet in a Card using Eclipse . . . . . . . . . . . . . . . . . . . . 111
Testing the JCRMI Applet in a Real Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Chapter 9 Worked Example with JavaCard Applet and Client 113
Creating the Java Card Project with Eclipse IDE . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Adding a JavaCard Applet to the Java Card Project . . . . . . . . . . . . . . . . . . . . . . . . 113
The JavaCard Applet Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Debugging the Java Card Applet Using JCardManager . . . . . . . . . . . . . . . . . . . . . 114
Step 1: Setting breakpoints in the applets code . . . . . . . . . . . . . . . . . . . . . 114
Step 2: Debugging the project with JCardManager . . . . . . . . . . . . . . . . . . 115
Creating the OCF Client Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
8/12/2019 Developer Suite Getting Started
6/212
vi Contents
Debugging the Java Card Applet Using the OCF Client Application . . . . . . . . . . . . 115
Loading and Installing the Applet in a Card using Eclipse . . . . . . . . . . . . . . . . . . . . 116
Testing the Java Card Applet in a Real Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Chapter 10 Worked Example with SATSA MIDlets 117
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117Creating the Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Building the Midlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Creating the MIDlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Adding a SATSA Card Access Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Debugging the Applet and MIDlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Chapter 11 Worked Example with Servlet and Toolkit 127
Creating the Java Card Project with the Eclipse IDE . . . . . . . . . . . . . . . . . . . . . . . 127
Adding a Servlet to a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
The Servlet Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Debugging the Servlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Client Applications Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Mobile Simulator Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Servlet Debugging Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Debugging the Servlet Using the Static Content Explorer . . . . . . . . . . . . . . . . . 147
Step 1: Setting breakpoints in the Servlets code . . . . . . . . . . . . . . . . . . . . 147
Step 2: Debugging the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Step 3: Operating the Client Application (Static Content Explorer) . . . . . . . 149
Step 4: Notification that execution has stopped on a breakpoint . . . . . . . . 150
Step 5: Bug detection and correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Debugging the Servlet Using the Mobile Simulator 3G . . . . . . . . . . . . . . . . . . . 150
Loading and Installing the Servlet in a Card using Eclipse . . . . . . . . . . . . . . . . . . . 152
Testing the Servlet in a Real Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Chapter 12 Worked Example with HTTP MIDlet 155
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Creating the Servlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Creating the HTTP MIDlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Debugging the Applet and MIDlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Chapter 13 Creating and Using Libraries 159
How to Create Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
How to Use Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
How to Modify the Gxsc Script File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Chapter 14 Using the Application Manager 161
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Overview of Defining and Running an Application . . . . . . . . . . . . . . . . . . . . . . . . . 162
Starting the Application Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
The Application Manager Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Chapter 15 The Script Editor 163
What is a Script? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Starting the Script Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
8/12/2019 Developer Suite Getting Started
7/212
Contents vi i
The Script Editor Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Chapter 16 The File System Editor 167
What is the File System Editor? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
The File System Editor Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Contextual Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Chapter 17 The Key File Editor 171
Appendix A Manag ing OTA Pro fi les 173
The OTA Profile Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
SMS Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Text and Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Secured Message Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
KIc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
KID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179Configuring Data Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Configuring CC, RC, or DS Security Settings . . . . . . . . . . . . . . . . . . . . . . . 180
Expert Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Concatenation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Command Packet Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Response Packet Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Appendix B The JCardManager 185
Logical Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Script Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Traces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Terminology 189
Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
References 195
Standards and Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Web Site Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Recommended Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Index 197
8/12/2019 Developer Suite Getting Started
8/212
viii Contents
List of Figures
Figure 1 - The Java Card Environment:a PC/Workstation-Resident Client Application 1
Figure 2 - The Compilation, Loading and Conversion Process . . . . . . . . . . . . . . . . . . 5
Figure 3 - The AID Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Figure 4 - The Development Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 5 - Developer Suite V3.2 - Not Registered . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Figure 6 - License Key Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 7 - Profile Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 8 - Importing Wireless WTK - Preference Window . . . . . . . . . . . . . . . . . . . . . 17
Figure 9 - Importing Wireless WTK - Import Devices . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 10 - Importing Wireless WTK - Browse For Folder Window . . . . . . . . . . . . . . 18
Figure 11 - Importing Wireless WTK - Devices Refreshed . . . . . . . . . . . . . . . . . . . . 18
Figure 12 - The Developer Suite V3.2 Plug-ins for Eclipse . . . . . . . . . . . . . . . . . . . . 20
Figure 13 - Static Content Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Figure 14 - Static Content Manager View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Figure 15 - Memory status bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Figure 16 - Create New Folder - Select A Parent Folder . . . . . . . . . . . . . . . . . . . . . . 23
Figure 17 - Create New Folder - Enter Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Figure 18 - Create New Folder - Content Structure Updated . . . . . . . . . . . . . . . . . . 24
Figure 19 - Launch Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Figure 20 - Static Content Explorer Preference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Figure 21 - Sim Card Simulator Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 22 - The Mobile Simulator Parameters Window . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 23 - The WTKOCF Bridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure 24 - Switch to Developer Suite Perspective . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Figure 25 - Java Card Project Management View . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Figure 26 - Applications Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 27 - Application Wizard for Servlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 28 - File Menu - Import & Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 29 - Project Contextual Menu - Import & Export . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 30 - Import Main Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Figure 31 - Import Projects Found . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Figure 32 - Developer Suite Export Wizard - Step 1 . . . . . . . . . . . . . . . . . . . . . . . . . 37
Figure 33 - Project Properties Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Figure 34 - Open With Project Properties Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Figure 35 - Overview of Project Properties Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Figure 36 - Project Properties Editor - Application Tab . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 37 - Project Properties Editor - Exported Files Tab . . . . . . . . . . . . . . . . . . . . 40
Figure 38 - Development Flow with Developer Suite V3.2 Tools . . . . . . . . . . . . . . . 43
Figure 39 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Figure 40 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Figure 41 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Figure 42 - NFC Phone Interaction Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Figure 43 - NFC Applet - Card Emulation Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Figure 44 - NFC Applet - Reader Emulation Mode . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Figure 45 - Card Emulation Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Figure 46 - Reader Emulation Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Figure 47 - Emulation Servlet Creation - Step 1 - Technology Selection . . . . . . . . . 51
Figure 48 - Reader Servlet Creation - Step 1 - Technology Selection . . . . . . . . . . . 52
Figure 49 - Reader Servlet Creation Step 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Figure 50 - Select An Emulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Figure 51 - Start Reader Project - Select Reader Project . . . . . . . . . . . . . . . . . . . . . 53
Figure 52 - Start Reader Project- Mobile Simulator Launching In Process . . . . . . . . 53
Figure 53 - Start Reader Project - MS 3G Started With Reader Servlet . . . . . . . . . . 54
Figure 54 - Start Reader Project - Enter Pin Code for MS 3G . . . . . . . . . . . . . . . . . . 54
8/12/2019 Developer Suite Getting Started
9/212
Contents ix
Figure 55 - Start Reader Project - Mobile Simulator Home Screen . . . . . . . . . . . . . . 55
Figure 56 - Start Emulation Project - MS 3G Started With Emulation Servlet . . . . . . 55
Figure 57 - Using STK Method - Switch Reader Servlet To Reader Mode . . . . . . . . 56
Figure 58 - Using STK Method - NFC Window Menu . . . . . . . . . . . . . . . . . . . . . . . . 56
Figure 59 - Using STK Method - NFC Management Window . . . . . . . . . . . . . . . . . . 56
Figure 60 - Using STK Method - Transfer Completed . . . . . . . . . . . . . . . . . . . . . . . . 57
Figure 61 - Using the SCWS Feature - Mobile Simulator Select Button . . . . . . . . . . 57Figure 62 - Using the SCWS Feature - Load URL Menu . . . . . . . . . . . . . . . . . . . . . 57
Figure 63 - Using the SCWS Feature - Load URL Dialogue . . . . . . . . . . . . . . . . . . . 58
Figure 64 - Using the SCWS Feature - NFC Application Reader Demo . . . . . . . . . . 58
Figure 65 - Using the SCWS Feature - Switch Reader Servlet Mode . . . . . . . . . . . . 58
Figure 66 - Card Simulator Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Figure 67 - Card Simulator Console - Configuration Dialogue . . . . . . . . . . . . . . . . . 60
Figure 68 - Card Simulator Console - Confirm Terminating . . . . . . . . . . . . . . . . . . . 61
Figure 69 - OCF View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Figure 70 - Tag Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Figure 71 - Souce Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Figure 72 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Figure 73 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Figure 74 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Figure 75 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Figure 76 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Figure 77 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Figure 78 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Figure 79 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Figure 80 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Figure 81 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Figure 82 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Figure 83 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Figure 84 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Figure 85 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Figure 86 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73Figure 87 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Figure 88 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Figure 89 - Java Card Project Creation Wizard - Step 1 . . . . . . . . . . . . . . . . . . . . . . 78
Figure 90 - Java Card Project Creation Wizard - Step 4 . . . . . . . . . . . . . . . . . . . . . . 79
Figure 91 - Java Card Project Creation Wizard - Step 5 . . . . . . . . . . . . . . . . . . . . . . 80
Figure 92 - Java Card Project Creation Wizard - Step 7 . . . . . . . . . . . . . . . . . . . . . . 81
Figure 93 - Java Card Project Creation Wizard - Step 8 . . . . . . . . . . . . . . . . . . . . . . 82
Figure 94 - Adding a DAP Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Figure 95 - The Toolkit Applet Wizard Step 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Figure 96 - The Toolkit Applet Wizard Step 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Figure 97 - The Toolkit Applet Wizard Step 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Figure 98 - The Toolkit Applet Wizard Step 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86Figure 99 - The Toolkit Applet Wizard Step 4 Menus . . . . . . . . . . . . . . . . . . . . . 86
Figure 100 - The Toolkit Applet Wizard Step 4 Priority and Timers . . . . . . . . . . 87
Figure 101 - The Toolkit Applet Wizard Step 4 Channels . . . . . . . . . . . . . . . . . . 88
Figure 102 - The Toolkit Applet Wizard Step 4 Min. Security Level . . . . . . . . . . 88
Figure 103 - The Toolkit Applet Wizard Step 4 Security Parameters . . . . . . . . . 89
Figure 104 - The Toolkit Applet Wizard Step 4 SIM Access Parameters . . . . . . 90
Figure 105 - The Toolkit Applet Wizard Termination . . . . . . . . . . . . . . . . . . . . . . . 91
Figure 106 - Interactive Debugging of USIM Toolkit Applets . . . . . . . . . . . . . . . . . . . 93
Figure 107 - Setting Breakpoints in the Java Code . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Figure 108 - Debug window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Figure 109 - Mobile Simulator 3G Waiting for User Interaction . . . . . . . . . . . . . . . . . 95
Figure 110 - The Triggered Breakpoint in the Eclipse IDE . . . . . . . . . . . . . . . . . . . . 96
8/12/2019 Developer Suite Getting Started
10/212
x Contents
Figure 111 - Accessing the Script File in Eclipse . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Figure 112 - Script Editor Showing the Load Script . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Figure 113 - Remote Object Wizard Step 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Figure 114 - Remote Object Wizard Step 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Figure 115 - The Add Method Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Figure 116 - The Add Method Dialog Box (2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Figure 117 - Remote Object Wizard Step 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103Figure 118 - Java Card Project Implementation Source . . . . . . . . . . . . . . . . . . . . . 104
Figure 119 - The JCRMI Applet Wizard Step 1 . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Figure 120 - The JCRMI Applet Wizard Step 2 . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Figure 121 - The JCRMI Applet Wizard Step 3 . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Figure 122 - JCRMI/OCF Client Project Wizard Step 3 . . . . . . . . . . . . . . . . . . . . 108
Figure 123 - Call New Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Figure 124 - Setting the Breakpoint for JCRMI Client Example . . . . . . . . . . . . . . . 109
Figure 125 - New Debug Configuration for Client Test Project . . . . . . . . . . . . . . . . 110
Figure 126 - Edit Runtime Configuration Window . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Figure 127 - Edit Runtime Configuration Window . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Figure 128 - Remote Method Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Figure 129 - Adding the Add Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Figure 130 - Create New Midlet Suite Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Figure 131 - J2ME Midlet Project Wizard Step 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Figure 132 - Create New J2ME Midlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Figure 133 - New J2ME Midlet Wizard - Step 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Figure 134 - Source Folder Selection Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Figure 135 - SATSA Midlet Access Wizard Step 1 . . . . . . . . . . . . . . . . . . . . . . . . 122
Figure 136 - SATSA Midlet Access Wizard Step 2 . . . . . . . . . . . . . . . . . . . . . . . . 122
Figure 137 - Calling the Remote JCRMI Method . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Figure 138 - Debug Configuration for the JCRMI Applet Project . . . . . . . . . . . . . . . 124
Figure 139 - Specifying the MIDlet Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Figure 140 - The WTK Mobile Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Figure 141 - Java Card Project Creation Wizard - Step 1 . . . . . . . . . . . . . . . . . . . . 128
Figure 142 - Java Card Project Creation Wizard - Step 4 . . . . . . . . . . . . . . . . . . . . 129Figure 143 - Java Card Project Creation Wizard - Step 5 . . . . . . . . . . . . . . . . . . . . 130
Figure 144 - Java Card Project Creation Wizard - Step 7 . . . . . . . . . . . . . . . . . . . . 131
Figure 145 - Java Card Project Creation Wizard - Step 8 . . . . . . . . . . . . . . . . . . . . 132
Figure 146 - Adding a DAP Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Figure 147 - The Servlet Wizard Step 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Figure 148 - The Servlet Wizard Step 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Figure 149 - The Servlet Wizard - Step 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Figure 150 - The Servlet Wizard Step 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Figure 151 - The Servlet Wizard Step 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Figure 152 - The Servlet Wizard Step 5 Menus . . . . . . . . . . . . . . . . . . . . . . . . . 138
Figure 153 - The SCWS Wizard Step 5 Priority and Timers . . . . . . . . . . . . . . . 139
Figure 154 - The SCWS Wizard Step 5 Channels . . . . . . . . . . . . . . . . . . . . . . . 140Figure 155 - The SCWS Wizard Step 5 Min. Security Level . . . . . . . . . . . . . . . 140
Figure 156 - The SCWS Wizard Step 5 Security Parameters . . . . . . . . . . . . . . 141
Figure 157 - The SCWS Wizard Step 5 SIM Access Parameters . . . . . . . . . . . 142
Figure 158 - The SCWS Wizard Step 5 Number of services . . . . . . . . . . . . . . . 143
Figure 159 - The SCWS Wizard Step 5 Toolkit Parameters DAP . . . . . . . . . . . 143
Figure 160 - The SCWS Wizard Step 5 UICC Access Application paras . . . . . 144
Figure 161 - The SCWS Wizard Step 5 UICC Admin Access Application paras 144
Figure 162 - The Servlet Wizard Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Figure 163 - Interactive Debugging of USIM Toolkit Applets . . . . . . . . . . . . . . . . . . 146
Figure 164 - Setting Breakpoints in the Java Code . . . . . . . . . . . . . . . . . . . . . . . . . 147
Figure 165 - Debug Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Figure 166 - Static Content Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
8/12/2019 Developer Suite Getting Started
11/212
Contents xi
Figure 167 - The Triggered Breakpoint in the Eclipse IDE . . . . . . . . . . . . . . . . . . . 150
Figure 168 - Mobile Simulator 3G Waiting for User Interaction) . . . . . . . . . . . . . . . 151
Figure 169 - Accessing the Script File in Eclipse . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Figure 170 - Script Editor Showing the Load Script . . . . . . . . . . . . . . . . . . . . . . . . . 153
Figure 171 - HTTP Midlet Access Wizard- Step 1 . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Figure 172 - HTTP Midlet Access Wizard - Step 2 . . . . . . . . . . . . . . . . . . . . . . . . . 157
Figure 173 - Debug Configuration for the JCRMI Applet Project . . . . . . . . . . . . . . . 158Figure 174 - Specifying the MIDlet Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Figure 175 - The Application Manager Main Window . . . . . . . . . . . . . . . . . . . . . . . 162
Figure 176 - Script Editor Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Figure 177 - Script Editor The Add/Remove Commands Window . . . . . . . . . . . . 164
Figure 178 - The Select the Target Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Figure 179 - File System Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Figure 180 - Key File Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Figure 181 - The OTA Profile Manager Window . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Figure 182 - The Originating Address Editor Window . . . . . . . . . . . . . . . . . . . . . . . 174
Figure 183 - Triple DES Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Figure 184 - The Initial JCardManager Window . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
List of Tables
Table 1 - Development Stages and Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Table 2 - Accessing Developer Suite V3.2 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Table 3 - Simulator Versions Standards Compatibility . . . . . . . . . . . . . . . . . . . . . 27
Table 4 - Export Options and Relative Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Table 5 - Change Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Table 6 - Debugging and Testing Tools According to Applet Type . . . . . . . . . . . . . . 42
Table 7 - Mobile Simulator Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Table 8 - Mobile Simulator Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Table 9 - Contextual Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
8/12/2019 Developer Suite Getting Started
12/212
8/12/2019 Developer Suite Getting Started
13/212
1
Introduction
This chapter introduces the Java Card environment and explains the main Java Card
concepts and terminology. It then introduces the Developer Suite V3.2 tools and
describes when to use them during the development, conversion, and test phases of a
project.
The Java Card Environment
Figure 1shows the main components of a Java Card application.
Figure 1 - The Java Card Environment:a PC/Workstation-Resident Client
Appl ication
Java Cards contain a microprocessor, but have no means of directly receiving input or
displaying output. They must therefore be connected to a card reader, also known as a
card acceptance device (CAD), or terminal, which is in turn connected to or contained
in:
A workstation such as a personal computer (PC) via a USB or serial cable.
A mobile phone
Any other smart card reading device.
The card in a card reader and the client application communicate using application
protocol data unit (APDU) commands. APDUs contain command instructions, data and
responses. Refer to the ISO 7816-3standard for detailed information on APDUs.
Smart card reader
Java Card with
applet loaded into
the card
Communications
using APDUs
Smart card reader
to PC link (USB or
serial ports)
PC/Workstation
Client application
resident on PC/
Workstation
8/12/2019 Developer Suite Getting Started
14/212
2 Introduction
The GlobalPlatform Specifications
The GlobalPlatform (GP) is a generic framework for the management of
multi-application smart cards, devices and systems. It provides mechanisms for
securely managing the applications on smart cards in order to extend the Java Card
environment.
USIM R6 and R-UIM cards are GP 2.1.1 compliant. The other members of the
GemXplore card family are fully compatible with the GP 2.0.1 standard.
The GP specification includes several components:
A set of commands to manage the life cycle of the card and its applications, load,
install, and delete the applications on the card, and manage the cards security by,
for example, updating keys and setting up a secure channel between the card and
the terminal.
An API, consisting of a single Java package, org. gl obal pl at f or m(orvi sa. openpl at f or min the case of GP 2.0.1) that can be used by applicationdevelopers to access the GP features, in particular the applications life cycle and
the secure messaging mechanism.
A documented specification, which describes in detail the commands available and
the principles of interoperability between the Java Card and GP card environments.
The current version is GP 2.1.1.
To obtain the GP specification, go to www.globalplatform.org.
The OpenCard Framework
The OpenCard Framework (OCF) is an open architecture and a set of APIs providing acommon interface for card readers and smart card-based applications. The OCF
enables you to develop client applications that will work on a variety of different
suppliers equipment and platforms. The Developer Suite V3.2 tools use the OCF for all
communications between client applications, card readers, real cards and simulated
cards. An OCF to PCSC bridge is used to be able to manage PCSC card readers in
OCF.
To obtain further details about the OpenCard Framework, go to www.opencard.org.
Java Card Concepts and Terminology
AppletsAn applet is a Java program designed to work within the Java Card environment. Apart
from being programmed in Java, a Java Card applet is very different from a web
browser-based Java applet.
Applets can be pre-installed on a card during the manufacturing process. They can
also, however, be downloaded to a card at subsequent stages of the cards life cycle.
On GSM cards, for example, applets can be downloaded:
Note: The GlobalPlatform specification was formerly named Open Platform. OP 2.0.1
and GP 2.0.1 are exactly the same apart from the name.
Note: An applet is often referred to in specifications as a Java Card application. The
GlobalPlatform documentation, for example, is not specific to Java Cards and uses
the term application throughout. You can also load packages with no applets onto
cards, and applets can have instances, so application is a generic term.
http://www.opencard.org/http://www.opencard.org/8/12/2019 Developer Suite Getting Started
15/212
Introduction 3
From the wireless network using over the air techniques.
At the point-of-sale.
Many different applets can be installed on the same card, and multiple instances of the
same applet can be created (instantiated) and run on the same card. You can also
load packages containing library functions that are used by other applets on the card.
In the telecommunications environment, Java Card applets are server applicationsrunning in the card. These applets react to the mobile equipment (ME) user interface or
to an OTA application.
A telecom Java card can manage three types of API:
Toolkit
Java Card
GlobalPlatform
All GemXplore cards can support all three types of API.
Applets written for telecom applications can use the SAT (SIM Application Toolkit),
CAT (Card Application Toolkit), USAT (USIM Application Toolkit) or CCAT (CDMA
Card Application Toolkit) APIs. These applets must be created using the appropriate
Toolkit Applet wizard. See Chapter 7 - Worked Example with USIM Toolkit Appletforan example of how to create a USIM Toolkit applet.
Applets written for Java Card applications can be written using either exclusively Java
Card API methods (Java Card applets), or a combination of Java Card and
GlobalPlatform methods (Java Card-GP applets). Both types of applets must be
created using the Java Card Applet wizard. See Chapter 8 - Worked Example with
JCRMI Applet and Client. The choice of Java Card or Java Card-GP is made during
step 4 of the Java Card Applet wizard by checking (or not) Global Platform
specifications,as shown on page 114.
GSM and 3G Extension to the Java Card Specification
In order to support the SIM Toolkit mechanisms used by applications on GSM cards,the Java Card API has been extended with a GSM-specific API.
This API is defined in ETSI 102241 (a common Toolkit API for Telecom technologies)
and either the 3GPP TS 43.019 (for 2G cards) or 3GPP 31130 specification (for 3G
cards). Very basically, it enables applets to access the file system on a SIM card, and
to perform proactive exchanges with a mobile as defined in the SIM Toolkit
specification.
CDMA Extensions
Developer Suite V3.2 provides support for CDMA target cards, allowing you to
generate skeleton code for CCAT (CDMA Card Application Toolkit) applications.
You can use Developer Suite V3.2s Java Card project and applet creation wizards to
generate CCAT-compatible skeleton code for your project, then test and simulate
application deployment using Developer Suite V3.2 tools such as the Mobile Simulator
CDMA and the script editor.
The R-UIM card profile complies with the following specifications:
3GPP2 CS0035-A (Version 1.0)
ETSI TS 102.223 (CAT)
ETSI TS 102.241 (UICC API)
Java Card 2.2.1
8/12/2019 Developer Suite Getting Started
16/212
4 Introduction
Client Applications
A client application is a software program running on a workstation. The client
application communicates with an applet that has been uploaded and installed on a
card.
The client application controls all input and output operations on behalf of the applet,
and sends requests for processing to the applet. The applet acts as a server,responding to the client applications requests.
The following client applications are provided with Developer Suite V3.2:
The Mobile Simulator GSM, Mobile Simulator 3G, and Mobile Simulator CDMA.
The JCardManager.
Simulation Chain 2G and Simulation Chain 3G.
SATSA Midlet
You can also develop your own custom client applications with Eclipse. Developer
Suite V3.2 provides you with wizards to help you do this. To obtain further details about
developing your own client applications, see the documentation available at
www.opencard.org.
Targets
Applets can be loaded onto two types of target:
A real Java Card, which can be either ETSI 102-224/102-225/102-226 compatible,
or GlobalPlatform compatible.
A card simulator supplied with Developer Suite V3.2, which simulates a card/card
reader combination. The card simulator makes it possible to develop applets
without having access to real Java Cards or a card reader and also allows you to
debug your applets.
Packages
A package is a Java programming term to describe the collection of related classes
and interfaces to which an applet belongs. Since an entire package can be uploaded to
a card, it is easy to upload several applets at the same time. If you choose to develop
your own client application, the client applications classes must belong to a different
package than the applets classes. A package can also be created that only contains
library classes to be loaded, that is, no applets.
In global system for mobile communications (GSM) environments, a package is often
referred to as an executable load file.
http://www.opencard.org/http://www.opencard.org/8/12/2019 Developer Suite Getting Started
17/212
Introduction 5
File Formats
Before an applet can be loaded onto a card, it must be converted to byte code that can
be interpreted by the Java Card Virtual Machine (JCVM) on the card. The process is
illustrated in Figure 2 - The Compilation, Loading and Conversion Process:
Figure 2 - The Compilation, Loading and Conversion Process
The process involves converting the Java source files first to compiled Class files, then
to byte code. The byte code is then loaded onto the target card, where it is interpreted
by the Java Card Virtual Machine.
CAP Files
The .cap file format is the loadable file formatdefined by the Java Card
specification. It defines the binary representation of an applet (or library for packages
with no applets) that can be loaded and executed on a Java Card. A .cap file consists
of a set of components, each of which describes a different aspect of the contents. The
set of components in a CAP file includes a number of mandatory components defined
in the Java Card specification, but may also include a number of optional components
that are not necessarily supported by all card manufacturers.
For a complete description of the Java Card CAP file format, see Suns Java Card 2.2.1Virtual Machine Specification.
JAR Files
The .jar file structure is also defined in the Java Card specification. A .jar file is NOT
a loadable file format, it is simply an archive (similar to a .zip archive) containing a
set of .cap files, each .cap file corresponding to one loadable component. In order to
be loaded on a card, a .jar file must systematically be converted into a loadable .cap
file (this very basically consists in concatenating the individual .cap components from
the .jar archive).
SAP Files
Simulator Applet Package (SAP) files are a Gemalto-proprietary version of the CAP
files. Although they cannot be downloaded onto a real card, when loaded into
Developer Suite V3.2s card simulator they accurately simulate an applet in almost all
other ways.
IJC Files
The .ijc format is not strictly speaking a standard file format. It was created by the SIM
Alliance because the converter provided by Sun only generates JAR files, leaving
JAR to CAP conversion open, which caused divergences in CAP file formats from one
manufacturer to another.
Compiled
Java Code
Source
Java
Code
.Java . Class
Java CardVirtual Machine
( JCVM)
ByteCode
. SAP . CAP
. JAR .IJC
Compiler
Developer Suite V3.2Java Card plug-in
LoaderConverter
Eclipse and Developer Suite V3.2
8/12/2019 Developer Suite Getting Started
18/212
6 Introduction
The idea was thus to define a loadable file format containing only the components
described as mandatory by the Java Card specification (for example, the optional
Descriptor component has been removed in the IJC format).
In other words, the IJC format is the smallest common denominator of the different
CAP file components supported by the cards of the SIM Alliance members.
Projects
The term project in the Developer Suite V3.2 environment refers to a package which
may, or may not, include one or more applets, together with all necessary system
classes, with or without libraries. When no applets are included in the project it is a
library. The project file groups together all the files and environment variables
required for building, debugging and loading applets and libraries.
AIDs
For security reasons, client applications must be able to uniquely identify any installed
applet. Every package, applet, and instance of an applet loaded on a card must
therefore be assigned a unique identifier, known as an application identifier (AID). AnAID is a string of between 5 and 16 hexadecimal bytes.
Figure 3 - The AID Format
The first five bytes of an AID (the RID) indicate the application provider, that is, the
company supplying the package or applet. To obtain an RID, your company must
register with the international standards organization (ISO). This procedure is
described in ISO7816-5 Numbering system and registration procedure for application
identifiers.The remaining bytes (up to 11) of an AID contain the proprietary identifier extension
(PIX). The PIX is chosen by the application provider to uniquely identify a package or
applet. Your company is then responsible for assigning PIXs to individual applications.
As mentioned previously, three types of AID are used in a project:
The package AID. An AID assigned to a package.
The applet AID. An AID assigned to an applet.
The applet instance AID. An AID assigned to an instance of an applet.
An applet AID cannot have the same value as the AID of any other package or any
other applet stored on the same card.
The Developer Suite V3.2 Tools
Developer Sui te V3.2 builds a Java Card Integrated Developement Environment(IDE)
on Eclipse, an external tool from Eclipse.org. As a prerequisite of installing Developer
Suite V3.2, Eclipse is included in Developer Suite V3.2s installation package. It will be
automatically extracted and installed when you execute the installation program of
Developer Suite V3.2.
Eclipse is an open universal framework, with whose plug-ins, theoretically any
extended functions can be achieved and integrated perfectly with the platform. As a
result, Eclipse is popularly used by software tool vendors as a platform for building
developer tools. Developer Suite V3.2 is a set of seamlesssly embedded Eclipse plug-
ins (see also Eclipse on page 20). It adds a user-friendly Developer Suite
Application Identifier (AID)
RID (5 bytes) PIX (up to 11 bytes)
http://www.eclipse.org/platformhttp://www.eclipse.org/platform8/12/2019 Developer Suite Getting Started
19/212
Introduction 7
perspective(see Developer Suite Perspective on page 31), a Developer Suitemenu,
abundant wizards as well as tools used at pre-loading, loading and post-loading
stages.
Through Eclipse platform, Developer Suite V3.2provides the appropriate tools for
each stage of development and testing, as follows:
Wizards: These gather the information necessary to build and configure a skeletonJava Card project, such as Java package names and default applet AID values. All
Wizards can be launched through quick access fromAppl ication Wizardview
panel (see Java Card Project Management View on page 32).
Pre-loading tools: The Developer Suite V3.2 Java Card plug-in for Eclipse
prepares the applet for loading onto the card by converting Class files to byte code.
Loading tools and post-loading tools :
The JCardManager loads packages into a card or the card simulator, and
exchanges APDU commands with a loaded applet.
The Application Manager loads and installs applets into a card.
The Script Editor creates and edits XML script files to provide batch execution
of commands.
Simulation tools: A card simulator simulates all aspects of particular card types
behavior, and is extremely useful for testing and debugging the functionality of an
applet. The Mobile Simulator GSM, Mobile Simulator 3G and Mobile Simulator
CDMA card simulators operate in exactly the same way as the equivalent real
mobile telephones. The Simulation Chain 2G and Simulation Chain 3G tools
simulate a secure connection between a server and a mobile station.
Miscellaneous utilities: Various utility tools are also included:
The Cap File utility lets you visualize the contents of a loadable CAP file.
The Crypto Tool provides a method of enciphering and deciphering data using
the DES, 3DES, AES and RSA cryptographic algorit3.2hms and provides amethod of hashing using the SHA1 and MD5 hash algorithms.
The File System Editor allows you to view the file structure in a card or card
simulator and the properties and access conditions for any given file.
The Key File Editor allows you to create custom key files.
The OTA interpreter allows you to display an interpreted view of a sequence
of OTA data bytes.
The WTKOCF Bridge assures communication between the J2ME Mobile
Simulator and the SmartCardFramework. It converts the TLP224 WTK2.3
mobile simulator protocol into the TPDU format used by OCF.
The following table lists the Developer Suite V3.2tools and the corresponding
development stages and target types required.
Table 1 - Development Stages and Steps
Development Tools Development Stages
Quick-start tools :
Wizards Code development and compilation.
Pre-loading tools :
Developer Suite V3.2 JavaCard Plug-in for Eclipse
Converting Class files to loadable files (CAP or SAP).
8/12/2019 Developer Suite Getting Started
20/212
8 Introduction
The Developer Suite V3.2tools can be launched from within the plug-ins provided for
Eclipse, or from within the JCardManager. Some can also be launched from the
command line using supplied batch files. Table 2 - Accessing Developer Suite V3.2
Toolssummarizes the launch options.
Loading tools and Post-loading tools:
Application Manager Loads and installs applets.
JCardManager CAP file loading, APDU command exchange, tracing,scanning.
Script Editor Creation and edition of configuration files and scripts.
Simulation and test tools:
Simulation Chain 2G Simulates a client application, GSM network componentsand a mobile phone.
Simulation Chain 3G Simulates a client application, 3G network componentsand a mobile phone.
Mobile Simulator GSM Simulates a client GSM handset.
Mobile Simulator 3G Simulates a client 3G handset
Mobile Simulator CDMA Simulators a client CDMA handset
JCardManager APDU command exchange, tracing, scanning.
Card simulator Testing and debugging applets
Miscellaneous u tilities:
Cap File utility Viewing the contents of a CAP file
Key File Editor Creating custom key files
CryptoTool Enciphering and deciphering data
OTA Interpreter Displays an interpreted view of a sequence of 23.048-formatted data bytes
File System Editor Viewing the file structure and individual properties andaccess conditions for a file.
WTKOCF bridge A bridge between Suns Wireless Toolkit (WTK) phonesimulator and Developer Suite V3.2's reader/cardconnection. Enables communications with a real reader/card connection (since the WTKs TLP224 protocol isintegrated directly in the card simulators).
Table 2 - Accessing Developer Suite V3.2 Tools
Tool Accessible from:
EclipsePlug-in
JCardManager Command L ine
Wizards Yes No No
Mobile Simulators Yes No Yes
Cap File utility Yes Yes No
CryptoTool Yes Yes No
Table 1 - Development Stages and Steps (continued)
Development Tools Development Stages
8/12/2019 Developer Suite Getting Started
21/212
Introduction 9
Developer Suite V3.2 Development Scenarios
The Developer Suite V3.2tools allow you a wide range of flexibility when developing
applets. There is usually more than one way of accomplishing a task.
Development Phase
For the rapid development of a prototype applet with Developer Suite V3.2, do the
following:
Run the Wizards. Use the supplied wizards to generate skeleton code and a
project definition.
Debug the Project. Set breakpoints and then use Developer Sui te V3.2tools to
launch the simulator, load the files into the card simulator and launch the client
application.
Developer Suite V3.2 automatically generates a GXSC script file containing all
necessary load and install parameters. If necessary, you can edit this file using the
Script Editor.
Script Editor Yes Yes No
Key File Editor Yes Yes No
File System Editor No Yes No
OTA Interpreter Yes Yes No
WTKOCF bridge Yes Yes No
Table 2 - Accessing Developer Suite V3.2 Tools (continued)
Tool Accessible from:
EclipsePlug-in
JCardManager Command L ine
Note: When you debug a project, Developer Suite V3.2 automatically builds theproject for you first, that is, compiles the Java source code to Class files and converts
the Class files to CAP, JAR, or other file formats as necessary.
8/12/2019 Developer Suite Getting Started
22/212
10 Introduction
The following diagram illustrates the development phase.
Figure 4 - The Development Phase
Tools Used During the Test Phase
Once you have built and debugged your Java Card application, it can be further tested
in a real card.
The test scenario would be:
Load the applet into the card with JCardManager (possibly using GXSC scripts) or
the Application Manager (refer to Using the Application Manager on page 161).
Alternatively, you can use the deployment script generated with the project.
Test the applet using the client applications provided with Developer Suite V3.2:
The Mobile Simulator GSM, Mobile Simulator 3G, or Mobile Simulator CDMA
Simulation Chain 2G or Simulation Chain 3G
JCardManager (for Java Card applets)
OCF Client application (for Java Card applets)
JCRMI Client application (for JCRMI applets)
SATSA Midlet
Java Card Plug-inAu tomat ion
Eclipse IDEWizards
Project
Java Class File
Java CardProject
.GBP, GDP &.GXSC
.JAR
.SAP
.CAP.IJC
Debugger
Card SimulatorScript Editor
JCard Manager Mobile Simulators
(GSM, 3G, CDMA)
Simulation Chain 2G,Simulation Chain 3G
Installed applettriggers breakponts
Communication
Communication
File
Conversion
Loader
Edition of .GXSC files
Communication
8/12/2019 Developer Suite Getting Started
23/212
Prefac
e
This document is designed to help you learn about Gemalto Developer Suite V3.2 byusing it. It guides you step by step from the creation of a new Java Card applet, through
to its installation and testing.
Whats New in This Release
The main evolution of the Developer Suite 3.2 & Simulation Suite 2.2 are to:
Enhance the support of Multimedia Cards
New Standardized SCWS API
Support for MMReady & FullMM Cards
Support the Contact-less Cards
Add Live Update mechanism
Other improvements
Who Should Read this Book
You only need a minimum knowledge about smart cards, but you are strongly
recommended to read the standards and documents listed in References on
page 195.
Conventions Used in this Document
bold Command and window names are shown in bold. For example:
... the JCardManagerwindow...
> Menu selection sequences are shown using the > symbol to link
the selections. For example:
... select Start>Al lPrograms > Gemalto > Wireless
Solutions...
italics Book titles are shown in italics.
notation By default, a numeric value is expressed in decimal
notation.
Whenever a value is expressed in binary, it is followed by
the letter b. For example the decimal value 13 expressed
in binary becomes 1101b.
A hexadecimal number is followed by the letter h, or
preceded by 0x. For example, the decimal value 13
expressed in hexadecimal becomes 0Dhor0x0D.
8/12/2019 Developer Suite Getting Started
24/212
12 Preface
installdir This variable is used throughout this book to indicate the
directory in which Developer Suite V3.2 is installed. For
example, when the following directory is shown in the book:
installdir\ bi n
you may need to substitute the following directory:
c: \ Program Fi l es\ Gemal t o\ Devel oper Sui t e\ bi n
carddir This variable is used throughout this book to indicate the
directory which stores the files common to a particular type of
card. For example, when the following directory is shown in the
book:
.. . \ exampl es\carddir
you may need to substitute the following directory:
. . . \ exampl es\ USI M Car d R6
http://www.gemplus.com/http://www.gemplus.com/http://www.gemplus.com/8/12/2019 Developer Suite Getting Started
25/212
3
Installing Developer SuiteV3.2
This chapter describes how to install Developer Suite V3.2.
System Requirements
Hardware Requirements
The following hardware is required to install and use Developer Suite V3.2:
A Windows-compatible PC with:
500 MHz processor.
512 MB RAM recommended minimum (768 MB is recommended).
1GB of available disk space, plus another 1GB during installation.
Support for Super VGA resolutions (1024 x 768).
A CD-ROM drive (only mandatory when you install from a CD-ROM).
A PC/SC compliant smart card reader with associated connection cables and
drivers, such as the GemPC Twin smart card reader (P/N HWP108765 C); this is
not required for the Evaluation Version.
Optionally, a SIM Toolkit, USIM Toolkit, or CCAT (CDMA Card Application Toolkit)
Java Card (for example, GemXplore Xpresso v3 or GemXplore Generations). In
order to be able to download applets onto a card in Developer Suite V3.2, it must
be either Global Platform or 3GPP 23.048 compliant.
Software Requirements1 Developer Suite V3.2 runs under the following operating systems:
MicrosoftWindows 2000 (with Service Pack 4)
Microsoft WindowsXP (with Service Pack 2)
MicrosoftWindows Vista (with Service Pack 1)
2 EclipseVersion 3.3or higher
The Developer Suite V3.2 environment is installed as a set of plug-ins integrated in
Eclipse IDE. It installs a DeveloperSuitemenu on Eclipses menu bar, adds the
Java Card Project Management view, and configures various Java Card project-
specific property settings. The DeveloperSuitemenu allows you to directly launch
the various tools. The Java Card Project Management view gives you quick
8/12/2019 Developer Suite Getting Started
26/212
14 Installing Developer Suite V3.2
access to Java Card project and applet creation wizards. Certain tools display their
output in Eclipses messages window.
3 The Java 2 Software Development Kit (SDK) 1.5 or higher. This is also installed
as part of the Developer Suite V3.2 installation procedure.4 Java Cryptography Extension, necessary in order to use Simulation Chain 2G and
Simulation Chain 3G to their full capabilities (for example, allows the use of 24-byte
3DES keys). To fully benefit from all the features of Simulation Chain 2G and
Simulation Chain 3G, you should use the unlimited strength version. These can
be downloaded from http://java.sun.com/products/JCE.
5 AdobeAcrobatReader Version 4.0 or later. This is required to read the online
documentation provided on the installation CD-ROM.
6 Microsoft Internet Explorer Version 5.01 and Microsoft XML Parser Version 4.0, or
Microsoft Internet Explorer Version 6.0 or later.
7 If you are using the card simulator, you must make sure the TCP/IP networking
protocol is installed on your PC.
Installation Overview
You can either install the Developer Suite V3.2 environment from a CD-ROM or a . zi pfile downloaded from the product website. The installation program installs any
additional components required. If you have a card reader installed, it is configured for
use. The card simulator is automatically installed on your workstation during
installation.
Before Installing Developer Suite V3.2
To prepare for Developer Suite V3.2 Installation, perform the following steps:
1 Configure the display settings on your computer. The desktop resolution must be at
least 1,024 by 768 pixels, with 65,536 colors (16bit).
2 Log in with an account that has Administrator rights on your computer, otherwise
you will not be able to install Developer Suite V3.2. Contact your System
Administrator if do not have these rights.
3 Close all other applications running on your computer.
Installing Developer Suite V3.2
To install Developer Suite V3.2:
1 Insert the Developer Suite V3.2 CD-ROM into the CD-ROM drive on your
computer; or unzip the installation archive (the . zi pfile) to a temp directory anddouble-click the executable program (like GXDev_I nst al l . exe).
The installation program starts automatically.
For CD-ROM installation, if for any reason it does not start automatically, run the
drive:\Developer_Suite_x.y.z.exeprogram on the installation CD-ROM, where
driveis the drive letter of the CD-ROM drive.
Note: Eclipse is installed as part of the Developer Suite V3.2 installation procedure.
http://java.sun.com/productshttp://java.sun.com/productshttp://java.sun.com/productshttp://java.sun.com/productshttp://java.sun.com/productshttp://java.sun.com/productshttp://java.sun.com/productshttp://java.sun.com/products8/12/2019 Developer Suite Getting Started
27/212
Installing Developer Suite V3.2 15
2 Choose the Install Developer Suite V3.2 Installationoption. This program guides
you through the installation process.
After Installing Developer Suite V3.2
Apply and Import A License for Developer Sui te V3.2
Developer Suite V3.2 uses a new version of License Key Manager, to puts all
Developer Suite V3.2 components under protection against compromise.
Without a license, each time you launch the Developer Suite V3.2, a dialogue will
prompt you, warning that your copy of this product will expire in a certain number of
days, for example like Figure 5 - Developer Suite V3.2 - Not Registeredshows.
Figure 5 - Developer Suite V3.2 - Not Registered
On the above window:
Click Continual Trialto skip registration and use an evaluation version of
Developer Suite V3.2. You can use a full-featured version of Developer Suite V3.2
within the remaining days. ClickApply L icenseto activate the Developer Suite V3.2 product. This starts the
license application wizard. Then following steps in To apply a License to
Developer Suite V3.2: on page 15to complete registration.
To apply a License to Developer Suite V3.2:
1 After clickingApply L icensebutton, the License Key Managerwindow appear
like blow:
Figure 6 - License Key Manager
Note: The default software installation directory is:
c: \ Program Fi l es\ Gemal t o\ Devel oper Sui t eYou can specify a different drive or directory. To avoid confusion, the installation
directory is referred to as installdirthroughout this document.
8/12/2019 Developer Suite Getting Started
28/212
16 Installing Developer Suite V3.2
2 If a license is already achieve, click Import Licenseto browse and locate it on your
local disk. Follow the wizard to complete.
3 If you have no license on hand, you need to apply one first. Click Export Profile,
the following window appear:
Figure 7 - Profile Generation
4 Fill in the blank form in window as the above figure presents. All fields with a * are
required. For the Gemalto contact option, choose either the Gemalto Web Store
or Gemalto Email Address as your email receiptor.
5 Click Saveif you want to further revise your information before sending; click Save
& Sendto take modification in effect and feedback them to Gemalto.
6 A message will the be sent to your registered Email Box. A license (XML file) will be
attached.
7 Go back to the License Key Managerwindow. Click Import Licenseand follow
the wizard to complete.
Importing WTK Devices Into Eclipse
If you want to develop SATSA MIDlets, the Sun Java TM Wireless Toolkit V2.5 need to
be installed and configured.
For sake of convenience, WTK 2.5 is contained in Developer Suite V3.2 installation
package and will be automatically installed. We strongly suggest you do not change the
default installation path c: \ Devel oper Sui t eWt k.
Before using this tool, you need to follow the steps below to configure J2ME
environment by specifying a valid location for WTK Devices:
1 Start Eclipse as described in Eclipse on page 20.
2 On Eclipse menu bar, click Window > Preferences. This prompts the
Preferencewindow.
8/12/2019 Developer Suite Getting Started
29/212
Installing Developer Suite V3.2 17
3 On the left pane of Preferencewindow, click J2ME node to unfold it and select
Device Management, shown as follows:
Figure 8 - Importing Wireless WTK - Preference Window
4 On the Device Management page shown on the right, click Import button. On the
Import Devices window, click Browsebutton next to the Specify search
directory: textbox, as follows:
Figure 9 - Importing Wireless WTK - Import Devices
8/12/2019 Developer Suite Getting Started
30/212
8/12/2019 Developer Suite Getting Started
31/212
4
Developer Suite V3.2Components
License Key Manager
The License Key Manager applies a license protection mechanism to the Developer
Suite V3.2 at component level. Under the License Key Management System, the
products components are divided into two categories:
License-free components
Components that are open to use in both an evaluation version and a full
version of the Developer Suite V3.2 product.
License-protected components
Components that are only available in the full version of the Developer Suite
V3.2 product.
It is important to notice that, while an evaluation version demonstrates basic features ofthe Developer Suite V3.2, the full version is indispensable for a complete Java Card
development cycle. Main differences between the two versions are:
Smart Card Access. The Evaluation Version cannot access a real card and does
not generate byte code (.cap, .jar files) for cards. To test the behavior of your applet
in a card, you must use a card simulator.
The Application Manager is only available in the Full Version.
Many features in Simulation Chain 2G and Simulation Chain 3G are blocked.
The Mobile Simulator CDMA is only available in the Full Version.
For legal reasons, the cryptographic capabilities are limited in the Evaluation
Version:
For RSA, to 512bit key lengths (instead of 2,048 bits for the Full Version)
For DES and 3DES to 56 bits (instead of 168 bits for the Full Version)
For AES to 56 bits (instead of 256 bits for the Full Version)
Only the SCWS card and SIM R5 card profiles (available in wizards, mobile
simulators, commands, and so on) are available in the evaluation version.
Note: Longer values are accepted by the Evaluation Version, but in practice the
bits that exceed the allowed length are set to zero.
8/12/2019 Developer Suite Getting Started
32/212
20 Developer Suite V3.2 Components
Eclipse
The Developer Suite V3.2 is a Java Card plugin for Eclipse. To use the Developer
Suite V3.2, Eclipse needs to be installed on your PC. For more information about which
features are accessible from Eclipse, see Table 2 - Accessing Developer Suite V3.2
Tools on page 8.
Because Developer Suite V3.2 automatically launches Eclipse SDK, no separate
shortcuts are provided for Eclipse in Start menu. The IDE starts with an embedded
Developer Suite V3.2 plug-in when you click:
Start>Al l Programs> Gemalto > Wireless Solutions > Developer Suite.
The Developer Suite V3.2 adds a DeveloperSuite menu in Eclipse menu bar, from
which you can launch all the Developer Suite V3.2 tools. The following figure show the
Developer Suite menu and its menu items.
Figure 12 - The Developer Suite V3.2 Plug-ins for Eclipse
Static Content Explorer
The static Content Explorer provides a visual viewer to manage