CINT Smartcard Project

sourceforge logo


What is CINT Smartcard?

The CINT Smartcard is a a collection of tools and libraries to communicate with smart card. It is based on CINT, a C/C++ interpreter, written by Masaharu Goto. The main audience and user of CINT Smartcard shall be tester and developer in smart card operating system and embedded application domain.
Besides CINT itself, the CINT Smartcard project currently consists of two libraries. One is pcsclib, to provide smartcard reader support in CINT environment through PC/SC interface. The other is gsmlib, to provide GSM commands mainly for dealing with SIM card. The initial version of gsmlib supports all GSM 11.11 commands, I shall focus on it to add GSM 11.14 and maybe more functionalities.
In the gsmlib implementation, a new approach is introduced for parameter communication between main application and subroutine in C/C++. In brief, a single string parameter, which is concatenation of parameter units in keyword-value or keyword-variable format, is passed on to subroutine. The string parameter is then parsed and processed in subroutine by a special design pattern. By using this technique, main application gains significant improvement in readability and maintainability.
More libraries or tools, which are with same or similar technique, may be added into the project in the future.

How does CINT Smartcard work?

Currently it works in command line manner. For example, a test script might look like this:

//HelloSIM.cpp
#include "pcsclib.dll"
#include "gsmlib.dll"

void main()
{
    ICC_On();
    Select("(file 3f00)");
    ICC_Off();
}

It is run under CINT interpreter as follows:

C:\CINTSmartcard\demo>cint HelloSIM.cpp
Reader 1: OMNIKEY CardMan 3121 0
ICC On
Select
         C-APDU:      A0 A4 00 00 02 3F 00                                    . . . . . ? .
         R-APDU:      9F 19                                                   . .
        SW1 SW2:      9F 19                                                   Error: 00
ICC Off

In the future, GUI tool may be added into the project.
(animated Under Construction)


Last update 20 May 2007