This is the repository for the Java implementation of the 'Eclipse Keyple' API. (In September 2019, the C++ implementation will be hosted on https://github.com/eclipse/keyple-cpp)
The API is currently divided in two major layers:
- The ‘Keyple Core' : a Secure Element Proxy API which allows managing SE readers in a generic way, whaterver the reader driver or environment, and for standalone or distributed solution.
- A ‘Calypso Keyple extension' : a high level Calypso Processing API allowing to operate commands with a Calypso Portable Object, and to manage a secure Calypso transaction. Dedicated reader’s plugins have to be implemented in order to interface the SE Proxy API with the specific reader’s drivers.
- Java SE 1.6 compact2
- Android 4.4 KitKat API level 19
- Modules that are provided as artifacts
- keyple-core: source and unit tests for the SE Proxy module.
- keyple-calypso: source and unit tests for the Calypso library.
- keyple-plugin: source and unit tests for the different plugins: smartcard.io PC/SC, Stub, Android NFC, Android OMAPI, etc.
- developer support, testing
- example: source for Keyple implementation examples, generic or Calypso specific.
- integration: source for the integration code (SDK).
Keyple features global for any Secure Element solution:
Features | Packages |
---|---|
Selections of Secure Elements (high level API) | org.eclipse.keyple.core.selection |
Management of SE readers | org.eclipse.keyple.core.seproxy |
Notifications of reader plug/unplug, of SE insertion/remove
|
org.eclipse.keyple.core.seproxy.event |
Communication protocols filters (setting for contactless/contacts SE Reader) | org.eclipse.keyple.core.seproxy.protocol |
Reader plugins implementation support
|
org.eclipse.keyple.core.seproxy.plugin |
Transmition of grouped APDU commands to a SE Reader (low level API) | org.eclipse.keyple.core.seproxy.message |
SE specific library implementation support
|
org.eclipse.keyple.core.command |
Keyple features defined to support the Calypso solution:
Features | Packages |
---|---|
Calypso Portable Object commands and secure transaction management
|
org.eclipse.keyple.calypso.transaction |
Calypso PO responses data parsing | org.eclipse.keyple.calypso.command.po.parser |
Calypso SAM responses data parsing | org.eclipse.keyple.calypso.command.sam.parser |
Calypso PO & SAM commands' sets
|
|
Depending on the targetting usage: implementation of a ticketing application (blue circle), a reader plugin (red circle), or a SE library (green circle), only specific Keyple packages must be imported.
- generic packages for any SE solution
- specific packages for Calypso
The Eclipse Keyple Java artifacts are published on the Eclipse Keyple Project page [https://projects.eclipse.org/projects/iot.keyple/downloads] (may be soon also available on Maven).
- Keyple modules:
- 'Keyple Core module' JAR: the generic API to manage Secure Element Readers and to select SE application.
- 'Keyple Calypso Library JAR': the Calypso API to operate a transaction with a Calypso Portable Object.
- Keyple plugins:
- 'Keyple PC/SC plugin JAR': to manage PC/SC readers on a PC environment supporting the # javax.smartcardio API
- 'Keyple NFC Android plugin AAR': to operate the contactless reader of an Android Environment supporting the android.nfc API
- 'Keyple OMAPI Android plugin AAR': to operate the internal contacts readers of an Android Environment supporting the OMAPI
- 'Keyple "stub" plugin JAR': plugin to simulate the presence of fake readers with or without fake cards
- 'Keyple "Remote SE" plugin JARs': plugin & service to manage a SE remotely in a transparent way.
The current functional specification keyple-doc is obsolete.
Here are the prerequisites to build the keyple components (jars) and to run the /example projects
- Java JDK 1.6 or newer
- Maven (any version) available here
Following command will build all the artifacts at once.
./gradlew build --info
Following command will build all the artifacts at once.
.\gradlew.bat build --info
If you want to build the keyple android components (aar plugins, apk example app), you need :
- Java JDK 1.8 or newer (OMAPI app requires java 1.8)
- Intellij 2018 community version or Android Studio 3.0
- Android sdk 26 should be installed on your machine follow those instructions
To acknowledge where is installed you Android SDK, you need to create a file local.properties
in the /android
, /android/example/calypso/nfc
, /android/example/calypso/omapi
folders with the following content
sdk.dir=absolut/path/to/where/your/android/sdk/is
For instance sdk.dir=/Users/user/Library/Android/sdk
To build the plugins, execute the following commands in the /keyple-java folder.
./gradlew -b ./android/build.gradle build
To build the example app NFC and OMAPI
./gradlew -b ./android/example/calypso/nfc/build.gradle assembleDebug
./gradlew -b ./android/example/calypso/omapi/build.gradle assembleDebug
To build the plugins, execute the following commands in the /keyple-java folder
.\gradlew.bat -b ./android/build.gradle build
To build the example app NFC and OMAPI
.\gradlew.bat -b ./android/example/calypso/nfc/build.gradle assembleDebug
.\gradlew.bat -b ./android/example/calypso/omapi/build.gradle assembleDebug