Using NXP RFIDDiscover with SpringCard PC/SC Couplers

RFIDDiscover (formerly MifareDiscover) is a GUI software provided by NXP to help the developers explore the features of their contactless cards (Mifare, Desfire, NTAG and ICode) and learn how-to use them from a real application.

This software is available to customers under NDA with NXP, through the DocStore document delivery platform (ref. SW1866).

This article shows how-to get started with this RFIDDiscover, in the aim of using it together with SpringCard devices. This is the preferred method to learn how those cards work, before starting the development of any software that would use them for data storage and/or secure transactions.

Read More

Using NXP Card Test Framework with SpringCard PC/SC Couplers

Card Test Framework is a GUI software provided by NXP to help the developers explore the features of their contactless cards (Mifare, Desfire, NTAG and ICode) and learn how-to use them from a real application.

This software is available to customers under NDA (non-disclosure agreement) with NXP, through the DocStore document delivery platform (ref. SW5434).

This article shows how-to get started with this Card Test Framework, in the aim of using it together with SpringCard devices.

Read More

Using NXP TapLinx SDK with SpringCard PC/SC couplers

NXP TapLinx SDK (formerly Mifare SDK) is an high-level sofware library provided by NXP to work with their Mifare, Desfire, NTAG and ICode products.

Written in Java, the TapLinx library has been initially developed for Android, running over Android's NfcAdapter object to communicate with the contactless cards or NFC tags through the tablet's or smartphone's integrated NFC interface.

Recently, the library has been ported to the standard JDK, making it usable in any Java desktop applications thanks to the JRE available on Windows, macOs, Linux, and more. In desktop applications, the TapLinx library relies on the system's PC/SC stack (javax.smartcardio API in Java) to access the contactless cards or NFC tags through a standard-compliant PC/SC coupler.

This makes TapLinx an interesting solution for developers of desktop applications that have to process NXP cards or tags. This article shows how-to get started with this SDK, in the aim of using it together with SpringCard devices.

Read More

PC/SC on Linux and Mac OS X with Mono

One the goals of the Mono project is to make Microsoft .NET applications runnable on Unix systems. Using Mono, it is therefore now possible to maintain a single C#/.NET code base, that runs on Linux, Mac OS X and Windows.

In this context, SpringCard's PC/SC SDK (https://www.springcard.com/en/download/find/file/pcsc-sdk) has been updated, so that it now enables developers to write PC/SC applications in C#/.NET, that can execute on Windows, as well as on Linux and Mac OS X platforms.

Read More

SpringCard PC/SC solution for Android has been released

SpringCard R&D team is proud to release a simple software solution to add support for SpringCard USB PC/SC Couplers to Android tablets (or smartphone).

nexus9-with-springcard-pcsc-reader

A Nexus 9 Android tablet, with a SpringCard Prox'N'Roll PC/SC reader on the USB port, and a Desfire contactless smartcard

The software is made of two parts:

googleplaystore

The SpringCard USB PC/SC Service's page on Google Play store

This software suite is compliant with all SpringCard USB PC/SC Couplers, for instance SpringCard Prox'N'Roll PC/SC, Prox'N'Roll HSP PC/SC, TwistyWriter HSP, CrazyWriter HSP, CSB HSP... Note that the current version of the Service and Library allows to work only with the Coupler's contactless slot. Don't hesitate to contact us if you have an interest into addressing the smartcard / SAM slots of the Couplers.

To communicate with a USB PC/SC Coupler -which is basically a USB device, the Android tablet (or smartphone) must provide a USB Host stack. This should be the case of all tablets running Android 3.1 and higher. We recommend Nexus 7 and Nexus 9 tablets, running Android 5.0 or 5.1, which are the reference platforms we use to develop and test the solution. An adapter cable is required to connect the Coupler if your tablet doesn't provide a full-size USB host connector.

usb-adapter-for-tablets-proxnroll

The USB adapter to use a SpringCard USB PC/SC smartcard reader with a tablet featuring only an USB on-the-go (OTG) mini type B female port

Tip: if you're not sure whether your tablet supports USB Host or not, just install the Service and the Demo application from Google Play, and check that your SpringCard Coupler is correctly activated by your tablet's system. Remember that the Coupler will be powered by the tablet's battery. Some tablets could be powered (by their mains adapter) even when an USB device is present, but most don't; choose your tablet accordingly if you're designing a kiosk or public-use system that should be mains-powered 24/7).

Icon of the SpringCard PC/SC Service for Android

Icon of the SpringCard PC/SC Service for Android

To develop your own application using a SpringCard Coupler from Android, download the library (and the sample Demo application) from GitHub, and follow the Quick Start Guide (ref. SpringCard PMD15240) which is included in the GitHub project, or available directly here.

github

The SpringCard SDK for PC/SC on Android is an open-source project hosted on GitHub

We welcome your feedback!

 

scpcsc_feed completes MultiConf

scpcsc_feed is a command-line utility for Windows which is a companion-tool for MultiConf in case you need to configure numerous SpringCard PC/SC couplers in batch mode, or change the settings quickly without a needing a full-featured GUI.

scpcsc_feed is available at https://files.springcard.com/pub/scpcsc_cfg.zip. Just unzip the archive in the folder you want, and open a command prompt (cmd.exe) in this folder to use the tool from the command line.

Connect a SpringCard PC/SC coupler to your computer, and invoke scpsc_feed without any parameter to see the integrated help:

C:\springcard>scpcsc_feed
SpringCard -- scpcsc_feed
-------------------------
Read/write data in the non-volatile memory of a SpringCard PC/SC Reader

Build : Apr 15 2015
Copyright (c) 2010-2013 Pro Active SAS, France
Go to www.springcard.com for information and updates.

Connected through PC/SC.
Connected, device : SpringCard Prox'N'Roll HSP 2.00 [1]
Firmware features : 0073232F

Usage: scpcsc_feed -d            dump configuration registers
scpcsc_feed -r XX         show value of register XX
scpcsc_feed -s XX=YYYY... write register XX with value YYYY...
scpcsc_feed -e            erase all configuration registers
scpcsc_feed -sf FILE      write register(s) from config FILE
scpcsc_feed -t XX=YYYY... set temporarily register XX with value YYYY...
scpcsc_feed -tf FILE      set temporarily register(s) from config FILE

C:\springcard>

A few interesting commands

Read-back the current configuration

scpcsc_feed -d

Restore the factory configuration (blank all registers)

scpcsc_feed -e

Apply the configuration from a MultiConf project

scpcsc_feed -sf [file.multiconf]

New firmware for all SpringCard PC/SC couplers based on the H663 core

SpringCard has just released a new firmware version, tagged 2.00, for its H663 core.

The H663 core is a versatile contactless+contact module, which supports virtually all proximity/RFID HF chip cards (ISO 14443 & ISO 15693 standards, including Mifare, Calypso, etc), NFC-enabled mobile phones or other objects (ISO 18092, peer-to-peer in initiator mode, passive communication scheme), and could also accept up to 5 contact smartcards (ISO 7816, one ID-1 card and up to 4 SIM/SAM ID-000 cards).

SpringCard H663 is the foundation of the largest family of RFID/NFC USB PC/SC readers on the market:

  • The H663S and H663A "bare" modules (designed respectively for either a Symetrical - balanced or an Asymetrical - unbalanced antenna)
  • The H663-USB OEM PC/SC ready-to-use contactless coupler (H663 core + antenna)
  • The CrazyWriter HSP, a complete multi-slot contactless+5 contact PC/SC coupler made for OEMs
  • The TwistyWriter HSP, a contactless+ID-000 PC/SC coupler made for OEMs
  • The CSB HSP, a desktop PC/SC coupler featuring contactless, 1 smartcard slot and 3 ID-000 slots
  • The Prox'N'Roll HSP, a brand new version of SpringCard's best selling desktop contactless coupler.

This new firmware version provides only a few new features, but introduces a new software architecture based on FreeRTOS which dramatically increases the device's performance for a better transaction time - particulary when accessing numerous slots in the same transaction.

freertos

How to upgrade

To upgrade your H663-based product with this new version, please refer to our H663/H512 Firmware Upgrade Procedure.

The 2.00 firmware file is here: uc3b0256_rc663_h663_2-00.hex

(note for future readers: please always use the latest firmware version using this permanent link).

From 30/04/2015, all H663-based products will ship with this version (instead of earlier 1.81).

Some new feature

Adding the reader's serial number to the slot names under Windows

Starting with version 2.00, the H663 family is able to insert the reader's serial number in the name of the PC/SC readers as exposed by Windows' SCardListReaders API call. On machines with numerous readers attached, this makes it possible to know which physical reader is actually bound to a logical slot without querying the reader through a SCardControl call.

To enable this feature, download the latest version of MultifConf; create a new project for the H663-product you own (CrazyWriter HSP typically), and in this project scroll down to "Misc. tricks". Then find the "Insert the serial number in the name of the slots" entry and turn it ON. apply the configuration to the reader(s) (Project -> Write Configuration into Reader), restart the reader, and enjoy!

multiconf-h663-tricks

 

 

Using Mifare Classic EV1 with SpringCard PC/SC readers

NXP has recently started shipping a new generation of Mifare Classic chips, called Mifare Classic EV1 (part numbers MF1S50yyX/V1 for Mifare Classic EV1 1K and MF1S70yyX/V1 for Mifare Classic EV1 4K).

The chips are 100% compliant with earlier Mifare Classic 1K and 4K, with 2 subtle differences:

  • the kind of protocol-level ID to be used must be configured once for all during the pre-personalisation step. Possible choices are 7-byte UID, 4-byte fixed but non-unique ID, and 4-byte random ID,
  • the load modulation level could be set to 'high' or 'low'.

In this short article we'll show how to configure both the kind of ID and the load modulation.

Personalize UID usage

This command can be only issued once. The choosen configuration is then locked forever. If you have ordered Mifare Classic EV1 with a specific configuration, the command has been issued in factory and will always fail adterwards.

The Mifare Classic EV1' "personalize UID usage" allows to select one of four different modes:

  1. UIDF0 (value 0x00): anti-collision and selection with the 7-B UID
  2. UIDF1 (value 0x40): anti-collision and selection with the 7-B UID plus a possible shortcut (select only the 4 first bytes and read block 0, bypassing the second step of the selection)
  3. UIDF2 (value 0x20): anti-collision and selection with a 4-B random ID
  4. UIDF3 (value 0x60): anti-collision and selection with a 4-B non-unique ID (calculated out of the 7-B UID)

The command code is 0x40 and must be sent in a CRYPTO1-ciphered stream, after a successfull authentication on sector 0.

To do so, here's the sequence of commands that must be send to the reader in a SCardTransmit stream (you may for instance write a script for csScriptor). We assume that the card is in transport condition, i.e. that the key A of sector 0 (as well as all other sectors) is the transport key FF FF FF FF FF FF and gives full access to the sector.

# Load the transport key in the reader's volatile memory
FF 82 00 00 06 FF FF FF FF FF FF

# Get authenticated over sector 0 using the transport key as key A
FF 86 00 00 05 01 00 03 60 00

# Check that the authentication is OK by reading block 0
FF B0 00 00 10

# Send the 'personalize UID' command within an ENCAPSULATE APDU
# P1 = 0x01 -> ISO 14443-3
# P2 = 0x08 -> timeout = 125ms
# The last byte is the value to be set, here we choose 0x60 for UIDF3
FF FE 01 08 02 40 60

The reader returns 90 00 if the card acknowledges the command.

If you receive 6F 02 instead (CRC error), it is likely that the card has sent a NACK, meaning that the configuration has already been set and is therefore locked.

Set modulation strength

The Mifare Classic EV1's "set modulation strength" command allows configuring the chip for either the strong modulation strength (default, value 0x01), or the weak modulation strength (value 0x00).

The command code is 0x43 and must be sent in a CRYPTO1-ciphered stream, after a successfull authentication on sector 0.

To do so, here's the sequence of commands that must be send to the reader in a SCardTransmit stream (you may for instance write a script for csScriptor). We assume that the card is in transport condition, i.e. that the key A of sector 0 (as well as all other sectors) is the transport key FF FF FF FF FF FF and gives full access to the sector.

# Load the transport key in the reader's volatile memory
FF 82 00 00 06 FF FF FF FF FF FF

# Get authenticated over sector 0 using the transport key as key A
FF 86 00 00 05 01 00 03 60 00

# Check that the authentication is OK by reading block 0
FF B0 00 00 10

# Send the 'set modulation strength' command within an ENCAPSULATE APDU
# P1 = 0x01 -> ISO 14443-3
# P2 = 0x08 -> timeout = 125ms
# The last byte is the value to be set, here we choose 0x00 for weak strength
FF FE 01 08 02 43 00

rfidscan-tool : driving your Prox'N'Roll RFID Scanner's LEDs and buzzer

The rfidscan-tool command line

The rfidscan-tool command line application is available for any OS that supports libusb, HID-API or hidraw.

We've tested it on:

  • Windows XP / Vista / 7 / 8
  • Mac OS X
  • Linux (Ubuntu, Debian, etc)
  • Raspberry Pi (on Raspbian distro)

rfidscan-tool has been inspired by blink1-tool, the command-line application that controls the blink(1) USB notification light. Most of the source code comes from this application. and therefore we use the same licence model.

Note for Mac OS X: currently the tool is able to send commands to the RFID Scanner, but fails to receive its response (IOHIDDeviceGetReport always returns a timeout error -- without waiting). This issue is under investigation.

Binary download

To get rfidscan-tool for your machine, visit our github releases page, and search for a version supported by your OS / target CPU.

Here's 4 direct links to the first public version (v14.11):

Source code download

To compile your own version of rfidscan-tool, just checkout the rfidscan project from github and compile the rfidscan-tool subproject. Something like the below will work 99% of the time:


# git clone https://github.com/springcard/rfidscan-tool.git
# cd rfidscan-tool
# make

For a Windows target, we provide .SLN projects to be opened with the (free of charge) Microsoft Visual C++ 2010 Express IDE.

Usage

On Windows, you may invoke the binary from any command line box without restriction.

On MacOS X and on most versions of Linux (including on Raspberry Pi), you will need to either run as root (sudo rfidscan-tool <...>) or install udev rules as described in https://github.com/springcard/rfidscan-tool/blob/master/51-rfidscan.rules.

When running rfidscan-tool without any argument, it will print a help page like the one below.

rfidscan-tool-win

Here's the detail of all commands:

rfidscan-tool <cmd> [options]

rfidscan-tool --list

List all connected RFID Scanners.

rfidscan-tool --version

Show the RFID Scanner's firmware version.

rfidscan-tool --test

Perform a routine test on the RFID Scanner(s).

rfidscan-tool --leds <red>,<green>,<blue> [--during <time_ms>]

Drive the RFID Scanner's LEDs. Allowed values for the red, green and blue parameters are

  • off : the LED is switched OFF
  • on : the LED is switched ON
  • slow : slow blinking
  • fast : fast blinking
  • heart : "heart beat"
  • slowinv : slow blinking, inverted
  • fastinv : fast blinking, inverted
  • heartinv : "heart beat", inverted

The during parameter is optionnal ans specify how long (in milliseconds) the specified value remains active, before the RFID Scanner goes back to the default sequence.

If this parameter is missing, the LED command lasts forever (at least until another LED command is issued).

rfidscan-tool --leds-default

Let the RFID Scanner drives its LEDs itself as usual.

rfidscan-tool --beep [--during <time_ms>]

Switch ON the RFID Scanner's buzzer for the specified time (in milliseconds).

rfidscan-tool --read <addr>

Read the configuration register at the specified address.

rfidscan-tool --write <addr>=<value>

Write the specified value into the configuration register at the specified address. Leavevalue empty to erase the register.

rfidscan-tool --dump

Dump all the configuration registers.

Note: the "sensitive" registers (keys for the Master Card and password) are hidden by "XX" chars.

rfidscan-tool --write-conf <filename>

Write the configuration registers from the specified file (use a file produced by MultiConf software).

Usage options

Values for [options] are

  • -d <device num> --devices <device num> : perform the command only to this device (from --list), default is all devices (same as -d all)
  • -q --quiet : suppress most output messages
  • -v --verbose : verbose debugging messages
  • -r --reset : reset the RFID Scanner (to apply the new configuration)
  • -p --password <password> : to access a RFID Scanner that is password-protected

Other tool

On this page you will find a Python script used to control the LEDs and Buzzer of a Prox'N'Roll (thanks Armel Esnault)

Accessing Reader's configuration from command line and in batch mode

All SpringCard PC/SC Readers feature a set of Configuration Registers that allow to alter the Reader behaviour to match a particular hardware setup or end-user requirement.

Editing the configuration is easy thanks to MultiConf, the new versatile configuration tool that covers all SpringCard products. But MultiConf is a GUI-application. When it comes to configuring numerous readers at once (with the same settings of course), a command-line tool, suitable to operate in batch mode, could be preferred.

This is typically the aim of pcscconf, a simple command-line utility (targetting Windows systems).

Getting started with pcscconf

Download pcscconf (and its companion tool pcscinfo) (ZIP)

Extract the ZIP archive in the directory of the choice. There are 3 files in the archive:

  • pcscconf.exe, the tool we'll be using
  • pcscinfo.exe, a software to retrieve all information regarding the connected readers (version, serial numbers, etc)
  • pcsctool.dll, the library that makes both software work.

Open a command-line box in the directory where you've extracted the archive, and at the prompt enter

pcscconf

pcscconf-1
pcscconf-2

Reading current configuration

Enter

pcscconf -d

to dump the current configuration.

pcscconf-3

It is also possible to enter

pcscconf -d <Filename>

to dump the configuration to a file. pcscconf uses the same file format as MultiConf.

If the file already exists, use

pcscconf -df <Filename>

to force the overwrite.

Changing a configuration register

Use syntax

pcscconf -s <RegisterAddress>=<RegisterValue>

 

pcscconf-4

To erase a register (i.e. restore product's default value), use syntax

pcscconf -s <RegisterAddress>

Applying a new configuration from a file

Use syntax

pcscconf -u <Filename>

to upload the configuration from the file into the reader.

There's no confirmation prompt or 'Are you sure' dialog box. Be sure to double-check the content of your file before uploading it into the reader.

pcscconf-5

Do not forget...

Changing a reader's configuration will change its behaviour! You're using this software at one risk. Always refer to the reader's detailed Developer's Guide or use MultiConf to choose the appropriate values.

Some registers play a special role and are therefore protected before delivery. This is the case of registers C0 and F0 to FF. Trying to write in one of these registers will always fail.

pcscconf targets the SpringCard PC/SC Readers only (and not the RFID Scanners, /RDR family and access control readers, nor the Legacy products).

pcscconf is able to work with only one PC/SC Reader at once. If you run pcscconf with two readers or more connected to your computer, the software will issue a warning and exit.