A GPR400 / GemPC400 Linux driver

Introduction

I made this driver to allow me access to lot's of diffrent types of IC cards that I can't read with the original driver written by Jaiger. This driver is an improvement of the original driver and permits me to read synchronous cards for which an "ASIC" driver exists, and of course allow access to microprocessor smartcards, that the original driver provided before.

Download

How does it work ?

First, you need to load the binary file containing the driver for your specific card. Those files are stored in the Icc drivers archive. The following table shows which file is needed for which card. The load sequence is provided by the GPR400_IOCTL_LOAD_MEMORY call provided by the ioctl driver mecanism. (example: gpr400_test.c).

Next, after the SELECT and ACTIVATE ioctl calls, you'll be able to OPEN a SESSION and EXCHANGE APDU commands with your card.

Card typeGPR driver
GAM 226Iccdrv0f.gpr
GFMIccdrv06.gpr
GPM 103Iccdrv07.gpr
GPM 256Iccdrv03.gpr
GPM 271Iccdrv0e.gpr
GPM 276Iccdrv0d.gpr
GPM 416Iccdrv04.gpr
GPM 8K (SLE4418 / SLE4428)Iccdrv08.gpr
GPM 2K (SLE4432 / SLE4442)Iccdrv09.gpr

Tests report

Some cards have been reported to work with this driver and not with the Jaiger's one. Some cards might work with Jaiger's and not with mine too. Actually, tests have been performed with this asynchronous cards too:

Schlumberger Cryptoflex 16Ko  log
Gemplus GemXpresso 211is  log
Gemplus GemXplore Xpresso V3 B1P  log
Gemplus GPK8000  log
MCOS 24k EEPROM  log
Sagem Windows for smart cards  log

Technical informations

Due to a lack of good documentation provided by Gemplus, this driver is a complete reverse engeneering hack. The pdf documentations used to make this possible are:

One must read and re-read those documents to extract the little information to be found. And sometime what you find just doesn't work.

The GPR400 reader is built around two specific components. Of course I don't have the datasheet for them, and asking google doesn't provide me nothing really interesting. So, I will glad if someone can give me them:

This section try to explain how are exactly mapped the datas in the PCMCIA attribute space memory. This information may be inexact, so if anyone can confirm it would be helpful; Gemplus flatly refused.

Offset in AM space Description
0x0000 to 0x00FF GPR400 ROM.
0x0100 to 0x06D3 internal RAM space dedicated to driver's subroutine or new GPR400 commands.
0x06D4 to 0x07CF internal RAM space, no specific usage. The Asic stack space is here.
0x07D0 to 0x07DF The famous SETUP, GENERAL SMARTCARD and CLOCK registers.
You can have a look at the RAM dump output here.

Contact

Pierrick Hascoet