Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Added support for NXP MIFARE Classic (1K, 4K variants) in `PcscCardCommunicationProtocol` with ATR pattern
`3B8F8001804F0CA00000030603000(1|2).*` according to PC/SC Part 3 Supplemental Document.
### Changed
- Changed default sharing mode from `EXCLUSIVE` to `SHARED` in `PcscReader.setSharingMode()` to improve compatibility
with multi-threaded applications.
### Fixed
- Fixed PC/SC context contention on Linux by implementing separate contexts for monitoring and communication operations,
preventing `SCARD_E_SHARING_VIOLATION` errors and thread blocking when using card presence detection concurrently with
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
group = org.eclipse.keyple
title = Keyple Plugin PCSC Java Lib
description = Keyple add-on to manage PC/SC readers
version = 2.5.4-SNAPSHOT
version = 2.6.0-SNAPSHOT

# Java Configuration
javaSourceLevel = 1.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,23 @@ public enum PcscCardCommunicationProtocol {
*/
INNOVATRON_B_PRIME("3B8.8001(80)?5A0A.*"),

/**
* NXP MIFARE Classic technologies (1K, 4K variants).
*
* <p>According to PC/SC Part 3 Supplemental Document:
*
* <ul>
* <li>Initial bytes: 3B8F8001804F0CA0000003
* <li>Card protocol: 0603 (ISO 14443 A part 3)
* <li>Card type: Variable (depends on memory capacity)
* </ul>
*
* <p>Default rule = <b>{@code 3B8F8001804F0CA00000030603000(1|2).*}</b>
*
* @since 2.6.0
*/
MIFARE_CLASSIC("3B8F8001804F0CA00000030603000(1|2).*"),

/**
* NXP MIFARE Ultralight technologies.
*
Expand All @@ -78,11 +95,11 @@ public enum PcscCardCommunicationProtocol {
* <li>Card type: 0003 (for Mifare UL)
* </ul>
*
* <p>Default rule = <b>{@code 3B8F8001804F0CA0000003060300030.*}</b>
* <p>Default rule = <b>{@code 3B8F8001804F0CA000000306030003.*}</b>
*
* @since 2.5.0
*/
MIFARE_ULTRALIGHT("3B8F8001804F0CA0000003060300030.*"),
MIFARE_ULTRALIGHT("3B8F8001804F0CA000000306030003.*"),

/**
* STMicroelectronics ST25/SRT512 memory tags.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ enum DisconnectionMode {
}

/**
* Changes the PC/SC sharing mode (default value {@link SharingMode#EXCLUSIVE}).
* Changes the PC/SC sharing mode (default value {@link SharingMode#SHARED}).
*
* <p>This mode will be used when a new {@link Card} is created.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ final class PcscReaderAdapter
private CardChannel channel;
private Boolean isContactless;
private String protocol = IsoProtocol.ANY.getValue();
private boolean isModeExclusive = true;
private boolean isModeExclusive = false;
private DisconnectionMode disconnectionMode = DisconnectionMode.RESET;
private final AtomicBoolean loopWaitCard = new AtomicBoolean();

Expand Down Expand Up @@ -599,7 +599,7 @@ public void stopWaitForCardRemoval() {
/**
* {@inheritDoc}
*
* <p>The default value is {@link SharingMode#EXCLUSIVE}.
* <p>The default value is {@link SharingMode#SHARED}.
*
* @since 2.0.0
*/
Expand Down