Smart Card Development Environment Setup

Setting up a smart card development environment: Eclipse JCIDE, NXP JCOP tools, readers, and test card procurement.

| 4 min read

Smart Card Development Environment Setup

Setting up a productive smart card development environment requires drivers, middleware, SDK toolchains, and IDE integrations to work together. The exact stack depends on whether you are targeting JavaCard, MULTOS, or a proprietary card OS, but the underlying reader and APDUAPDUProtocolCommunication unit between card and reader.Click to view → communication layer is common to all platforms.

Use the APDU Builder to construct and test commands once your environment is running.

Hardware Requirements

Component Minimum Recommended
Contact reader PC/SC-compatible ISO 7816ISO 7816StandardPrimary standard for contact smart cards.Click to view → reader ACS ACR39U or HID Omnikey 3121
Contactless reader PC/SC NFC reader ACS ACR122U or ACS ACR1252U
Development cards Blank JavaCardJavaCardSoftwareJava applet platform for smart cards.Click to view → 3.0.5 samples NXP JCOP4 J3R180, Infineon SLE97
JTAG/debug cable Optional Lauterbach TRACE32 for HW debug

Most USB readers ship with Windows drivers; on macOS and Linux, PC/SC support is provided by the platform PC/SC daemon (pcscd).

PC/SC Middleware Installation

Linux (Debian/Ubuntu):

sudo apt-get install pcscd pcsc-tools libpcsclite-dev
sudo systemctl enable --now pcscd
pcsc_scan   # verify reader is detected

macOS (built-in since 10.4):

# Start daemon if not running
sudo /usr/sbin/pcscd --foreground --debug
# List readers
system_profiler SPSmartCardsDataType

Windows: Windows includes a built-in PC/SC stack. Install vendor driver if reader is not auto-detected. Verify with certutil -scinfo.

JavaCard Development Toolchain

JavaCard applets are compiled from Java source to .cap files using the JavaCard Development Kit (JCDK):

  1. Install JDK 11 (JCDK 3.1 requires JDK 11): bash # macOS brew install openjdk@11

  2. Download JCDK from the Oracle Java Card archive. Extract to /opt/jcdk.

  3. Install ant-javacard build plugin or use Gradle: ```xml

```

  1. Install GlobalPlatformPro for card loading: bash # Download gp.jar from https://github.com/martinpaljak/GlobalPlatformPro java -jar gp.jar --list # list applets on card

MULTOS Development Toolchain

MULTOSMULTOSSoftwareHigh-security multi-app card OS.Click to view → applets are written in C and compiled with the MULTOS C Compiler (MCC):

# Install MULTOS SDK from https://www.multos.com/developer_tools
mcc -o MyApp.aif MyApp.c -I /opt/multos/include
# Load via MULTOS Application Management Tool (MAMT)
mamt -load MyApp.aif -card <reader_id>

The MULTOS TEE enforces strict inter-applet isolation; system calls are validated against the applet's declared privilege manifest.

IDE Setup (Eclipse with JCOP Tools)

For NXP JCOP cards, Eclipse IDE with the JCOP Tools plugin provides an integrated simulator and debugger (see the JCOP Development Guide for detailed configuration):

  1. Install Eclipse IDE for Java Developers.
  2. Add the NXP JCOP Tools update site via Help → Install New Software.
  3. Create a JavaCard project and configure the target JCOP version.
  4. Use the JCOP Simulator for initial testing; switch to physical card for hardware-specific side-channel tests.

PC/SC Python Client (Testing)

The pyscard library provides a Python API to send APDU commands to any PC/SC reader:

from smartcard.System import readers
from smartcard.util import toHexString

r = readers()[0]
conn = r.createConnection()
conn.connect()
atr = conn.getATR()
print("ATR:", toHexString(atr))

# SELECT by AID
SELECT = [0x00, 0xA4, 0x04, 0x00, 0x07,
          0xD2, 0x76, 0x00, 0x00, 0x85, 0x01, 0x01]
data, sw1, sw2 = conn.transmit(SELECT)
print(f"SW: {sw1:02X} {sw2:02X}  Data: {toHexString(data)}")

Use the ATR Parser to decode the ATRATRProtocolInitial response from card after power-on.Click to view → byte string returned above before proceeding with protocol negotiation.

Common Setup Issues

Issue Cause Fix
pcscd not found Daemon not running sudo systemctl start pcscd
SCARD_E_NO_READERS Driver not installed Install vendor USB driver
Card not responding Wrong protocol (T=0T=0ProtocolCharacter-oriented smart card protocol.Click to view → vs T=1T=1ProtocolBlock-oriented smart card protocol.Click to view →) Set protocol in conn.connect(protocol=T1)
INSTALL error 0x6985 Card not in correct security state Check Security Domain state with gp --list

See the Smart Card Debugging Guide for deeper troubleshooting once the environment is running.

자주 묻는 질문

Our guides cover a range of experience levels. Getting Started guides introduce smart card fundamentals. Security guides address Common Criteria certification and key management. Programming guides target developers working with APDU commands, JavaCard applets, and GlobalPlatform card management.