Sep 25, 2015 0 Comments in Learning, Peripheral, Smartcard by
Smartcard reader ISO/IEC 7816

This product can be bought at our shop as:

The Smartcard reader ISO/IEC 7816 is a Cosino’s peripheral useful to read several smartcard types ISO/IEC 7816 compliant. It is based on Maxim TSC12xxF CCID-DFU chip version 2.10.

This module is connected with the Cosino core module by USB bus and is powered up by the extension where is connected to. The reader has also:

  • a smartcard interface compatible with ISO/IEC 7816/EMV, protocol T0/T1;
  • ESD protection integrated;
  • stack software CCID-USB on firmware.


You need a Cosino core module plugged in into a Cosino’s extension with a preformatted microSD in order to have a running system. You must connect this peripheral with your extension’s Connector-A.

Also, if you need system’s console, you must connect a type B-micro USB cable to the serial console connector. Please, refer to your extension documentation in order to know where the serial console connector and Connector-A are located.

Connector Pinout

In the table below is the connector pinout.

Description Pin Description
VBus 1 2 Not Used
D- 3 4 Not Used
D+ 5 6 Not Used
GND 7 8 Not Used
Not Used 9 10 Not Used

Checking the hardware

If the smartcard reader is correctly connected using the following command you should see that the device is listed by the system:

Checking the software

If you are using the microSD on Cosino’s e-shop you already have all needed software and you can skip this section, otherwise you must install the software by using the command:

When finished you must patch by hands the file /etc/libccid_Info.plist as follow:

If everything works well, after issuing the following command you should be able to use the following command without any problems:

Now we can retry to detect the device:

Monitoring card plug/unpluging events

With command pcsc_scan you have a simple monitor on what your smartcard reader is doing, so by plugging a card you should see:

Accessing the smartcard in C

Here a simple example about how to get access to a smartcard by using the C language. We provide a ready-to-use program on our GitHub site, so just clone it with:

and then copy pcsc_demo file into your Cosino:

Now go to the /opt directory and execute:

You can obtain the sources on our GitHub site, just cloning the peripherals repository as follow:

and then, inside your Cosino, compile the code with:

warning Note: you can freely use the above commands only if you are using the microSD on Cosino’s e-shop, otherwise you need to install the compiling tools (gccmakegitlibpcsclite-dev, etc.) into your microSD.

Accessing the reader in Python

Python testing program is on our GitHub site. Clone it with:

and then, inside your Cosino, execute it with:

Note: as above, you can freely use the above commands only if you are using the microSD on Cosino’s e-shop, otherwise you need to install Python tools (pythonpython-pyscard, etc.) into your microSD.


Leave a Reply

Your email address will not be published. Required fields are marked *

48 + = 51