Install and Setup the PCSC-Lite and IFD Handler

The Java Card Development Kit Simulator works with smart card terminals in Linux operating system by using the PCSC-Lite and the IFD Handler which comes with the bundle.

These are the steps to install, setup, and configure the PC/SC Daemon known as pcscd and the IFD Handler library named libjcsdkifdh.so located in the JC_HOME_SIMULATOR/drivers/IFDHandler/ directory, and how to run it with the simulator.

  1. Update apt database.
    sudo apt update
  2. Install middleware to access a smart card using PC/SC Daemon.
    sudo apt install -y pcscd
  3. Install pcsc-tools.
    sudo apt install -y pcsc-tools
  4. Create a new file named jcsdk_config in the PC/SC Daemon default configuration directory named /etc/reader.conf.d.
    sudo touch /etc/reader.conf.d/jcsdk_config
  5. Add a reader configuration for the IFDHandler implementation library named libjcsdkifdh.so, in the above-mentioned configuration file, jcsdk_config, as described below.
    # Configuration to interact with the Oracle PCSC Reader for Linux
    FRIENDLYNAME   "Oracle JCSDK PCSC Reader Demo 1"
    DEVICENAME     127.0.0.1:9025
    LIBPATH        /<absolute-path-to-jc-simulator>/drivers/IFDHandler/libjcsdkifdh.so
  6. Run PC/SC Daemon with the new configuration for the Java Card Development Kit Simulator IFD Handler.
    Use the following command to start a new daemon on the foreground for debugging.
    sudo pcscd -f -d -a
    Or, use the following to restart the pcsc daemon if it is already running. It will refresh the configuration of the reader.
    sudo systemctl restart pcscd

    To verify that the pcscd configuration is reflected in the new daemon, run pcsc_scan to list the available readers. "Oracle JCSDK PCSC Reader Demo 1" should be in the list.

  7. Run the simulator for Linux.
    Note: LD_LIBRARY_PATH must be updated with the OpenSSL libraries.
    cd ${JC_HOME_SIMULATOR}/bin
    ./jcsl

    (Optional) Launch the simulator with desired debugging level.

    ./jcsl -log_level=finest
  8. Use any client for sending PC/SC commands to the Simulator.