An open API service indexing awesome lists of open source software.

https://github.com/eclipse-keyple/keyple-plugin-pcsc-java-lib

Eclipse Keyple™ Project: PC/SC plugin lib for end users
https://github.com/eclipse-keyple/keyple-plugin-pcsc-java-lib

Last synced: 6 months ago
JSON representation

Eclipse Keyple™ Project: PC/SC plugin lib for end users

Awesome Lists containing this project

README

          

[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=eclipse_keyple-plugin-pcsc-java-lib&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=eclipse_keyple-plugin-pcsc-java-lib)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=eclipse_keyple-plugin-pcsc-java-lib&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=eclipse_keyple-plugin-pcsc-java-lib)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=eclipse_keyple-plugin-pcsc-java-lib&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=eclipse_keyple-plugin-pcsc-java-lib)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=eclipse_keyple-plugin-pcsc-java-lib&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=eclipse_keyple-plugin-pcsc-java-lib)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=eclipse_keyple-plugin-pcsc-java-lib&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=eclipse_keyple-plugin-pcsc-java-lib)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=eclipse_keyple-plugin-pcsc-java-lib&metric=coverage)](https://sonarcloud.io/summary/new_code?id=eclipse_keyple-plugin-pcsc-java-lib)

# Keyple Plugin PC/SC Java Library

## Overview

The **Keyple Plugin PC/SC Java Library** is an add-on to allow an application using Keyple to interact with PC/SC
readers.

## Documentation & Contribution Guide

The full documentation, including the **user guide**, **download information** and **contribution guide**, is available
on the Keyple website [keyple.org](https://keyple.org).

## API documentation

API documentation & class diagram is available online:
[docs.keyple.org/keyple-plugin-pcsc-java-lib](https://docs.keyple.org/keyple-plugin-pcsc-java-lib)

## Examples

Examples of implementation are available in the following repository:
[github.com/eclipse-keyple/keyple-java-example](https://github.com/eclipse-keyple/keyple-java-example)

## Limitations

This plugin accesses the machine's PC/SC driver using
the [calypsonet/jnasmartcardio](https://github.com/calypsonet/jnasmartcardio/) library, which is a fork of
[jnasmartcardio](https://github.com/jnasmartcardio/jnasmartcardio). This fork resolves some of the limitations of the standard `javax.smartcardio` library and adds
support for missing disconnect modes (`UNPOWER` and `EJECT`) that are absent in standard implementations.

However, several limitations remain under the Linux operating system, whose PC/SC layer is based on the `pcsclite`
library.

Indeed, access to a single PC/SC context via `pcsclite` under Linux is limited to one thread at a time, which may
considerably lengthens card insertion/removal observation and APDU execution times if several readers are observed
simultaneously and/or if different threads are used for business processing.

To overcome these limitations, under Linux it may be necessary to specify the duration of the observation cycle using
the `setCardMonitoringCycleDuration(...)` method of the factory builder. Note that reducing this duration increases the
CPU usage generated by the application. We recommend choosing a value that offers the best compromise between
performance and CPU usage. The specified duration may potentially be added one or more times to the processing time of
each APDUs.

Note that it is also possible to replace the default `jnasmartcardio` PC/SC `SecurityProvider` with another one using
the `setProvider(...)` method of the factory builder (e.g.
[intarsys smartcard-io v1.17.0](https://github.com/intarsys/smartcard-io/tree/7948abfccb270a66621b0d98871b20ec1bc8a021)).

## About the source code

The code is built with **Gradle** and is compliant with **Java 1.8** in order to address a wide range of applications.

## Continuous Integration

This project uses **GitHub Actions** for continuous integration. Every push and pull request triggers automated builds
and checks to ensure code quality and maintain compatibility with the defined specifications.