Codebase list ifd-gempc / HEAD
HEAD

Tree @HEAD (Download .tar.gz)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
Gemplus GemPC 410 and GemPC 430 IFD Handler
===========================================

This package provides the source code for the GemPC 410 (serial) and
GemPC 430 (usb) smart card familly readers PC/SC ifd handler.

Both readers use a GemCore chip and the same set of commands. Only the
low level transport layer is different.


See README.410 for GemPC410 specific comments.
See README.430 for GemPC430 specific comments.


Authors:
========

- David Corcoran for the original headers and empty ifdhandler.c file
- Jean-Luc Giraud for the main part of GemPC430/ and half of common/
- Ludovic Rousseau for the main part of GemPC410/ and half of common/


Supported readers:
==================

- GemPC 410
  . normal GemPC 410 (GemCore-R1.21-GM)
  . IBM 410p (v1.21)
  . GemPC 410-SL (GemCore-R1.21-GM)

- GemPC 412
  . GCR412 FirstUSA (GemCore-R1.21-GM)

- GemPC 413
  . EMV complient (GemCore-R1.32-GK)

- GemPC 415
  . VISA and American Express 415 (unkown)

- GemPC 430
  . normal GemPC 430 (GemUsb-R1.04-GM)

- GemPC 432
  . target.com (GemUsb-R1.04-WM)

- GemPC 435
  . American Express Blue Card reader (GemUsb-R1.04-A)

The number in () is the GemCore version as seen in the logs generated by
the driver. Like in "(GemPC430) OS string: GemUsb-R1.04-GM" or
"(GemPC410) OS string: GemCore-R1.21-I"


Unsupported GemCore based readers:
==================================

- GCR400
  Very old version of the GemPC410.

- GCR410
  Old version of the GemPC410. This reader uses a GemCore version 1.118
  or 1.10. With this firmware the case 4 commands (both input and output
  data) will not work.


Licences:
=========

The files in GemPC410/ are under GNU General Public Licence.

The files in GemPC430/ are under a BSD-like licence (except main.c which
is under GPL but is not needed to build the driver).

The files in common/ are under a double licence BSD-like and GNU General
Public Licence. except the files ifdhandler.c, ifdhandler.h and
pcscdefines.h which are originally written by David Corcoran and are
under the BSD-like licence.

That means that the GemPC 410 driver is under GNU General Public
Licence, and that the GemPC 430 driver is the BSD-like licence or the
GNU General Public Licence at your choice.


Supported pcsc-lite versions
============================

pcsc-lite 1.1.2beta4 and later
    You can get the latest pcsc-lite version from
    http://linuxnet.com/middle.html or from
    http://pcsclite.alioth.debian.org/

Get pcsc-lite higher than 1.2.0 if you want to use /etc/reader.conf
DEVICENAME fields managed by the new API IFDHCreateChannelByName()


History:
========

1.0.8 - 14 December 2017, Ludovic Rousseau
    - fix typo in log message

1.0.7 - 8 April 2012, Ludovic Rousseau
    - add GemPC430/50-pcscd-ifd-gempc.rules udev file
    - Use CFLAGS and LDFLAGS in Makefile (Debian bug #667931)


1.0.6 - 16 June 2010, Ludovic Rousseau
    - fix an error in opening a serial port
      Thanks to Joerg Hartenberger for the patch

    - fix spelling error

1.0.5 - 12 April 2009, Ludovic Rousseau
    - correctly manage LDFLAGS 
      Thanks to Arfrever Frehtes Taifersar Arahesis for the patch

    - correct compilation warnings

1.0.4 - 15 October 2008, Ludovic Rousseau
    - Allow the header to be read in several calls

      Previously, if the header was not read in a single read() calls,
      there was an error. This is an issue because some commands return
      the two first bytes, then a small pause, then the rest of the
      header ...

      At least this happens on a gci410emv connected thru an usb adapter
      ...  Now it works fine.

      Patch from Sylvain Munaut

    - Fix powerup sequence when switching to ISO mode
        
      If somehow the reader/card was in EMV mode, we need to switch it
      to ISO. This was done but the final attemp to powerup tried to
      power it up in EMV mode ... most likely a typo.
	    
      Patch from Sylvain Munaut

1.0.3 - 14 August 2007, Ludovic Rousseau
    - correct a big bug unnoticed for many years and declared on PowerPC
      with gcc 4.x (Debian bug #428323)
    - do not strip the library so we have debug symbols if needed.
      strip should be called by the package build process (if needed)

1.0.2 - 29 June 2007, Ludovic Rousseau
    - correctly handle empty response from the GemPC410 reader

1.0.1 - 9 February 2006, Ludovic Rousseau
    - remove a useless "POUET" debug message
    - allow compilation with pcsc-lite-1.2.9-beta10. The check script
      was buggy for beta > 9
    - fix some compilation warnings with gcc 4.0

1.0.0 - 17 June 2005, Ludovic Rousseau
    - use new pcscd log function with dynamic level
    - use `pkg-config libpcsclite --variable=usbdropdir` to know where
      to install the driver

0.9.3 - 8 August 2004, Ludovic Rousseau
    - maintainance release to make it compile using gcc-3.4

0.9.2 - 25 July 2004, Ludovic Rousseau
    - use the header files provided by pcsc-lite 1.2.9-beta
    - use pkg-config to know the where to find the pcsc-lite include
      files
    - minium pcsc-lite version is 1.2.9-beta5

0.9.1 - 27 February 2004, Ludovic Rousseau
    - add a compilation flag AUTOMATIC_PPS to activate automatic PPS
      negociation by the reader firmware. I received many bug reports
      with some cards. The card works until some APDU returns a
      "invalid procedure byte" error. By default the automatic PPS
      negociation is now NOT performed. Uncomment a line in
      GemPC4?0/Config.h to revert to the previous behavior and choose
      speed versus safety
    - GemPC430/libusb_wrap.c: use pcsc-lite new
      IFDHCreateChannelByName() scheme: usb:vendor/product
      In 0.9.0 the driver failed when used with a CVS version of
      pcsc-lite. Thanks to Dr Russel Winder for the bug report
    - common/GCCmds.h: the GemCore error message now contains the file,
      function and line number of the command with error and not of the
      error printing function
    - add two GemCore error code descriptions: 0x15 and 0xE4

0.9.0 - 22 January 2004, Ludovic Rousseau
    - add support of IFDHCreateChannelByName() (from pcsc-lite > 1.2.0)
    - GemPC430/libusb_wrap.c: reset the reader in case of timeout on
      write (reader freeze?). Thanks to Patrick Valsecchi for the patch.
    - use asymetric timeout for USB read and write. The reader/card may
      be busy when we read (long timeout) but should be OK when we write
      (short timeout)

0.8.2 - 22 Octobre 2003, Ludovic Rousseau
    - Remove support for multi slot. The code was never used and is now
      broken under revent pcsc-lite versions. The error under pcsc-lite is:
        readerfactory.c:1391 RFInitializeReader: Attempting startup of GemPC430 0 0.
        readerfactory.c:1133 RFBindFunctions: Loading IFD Handler 2.0
        ifdhandler.c:87 (GemPC43x) Entering IFDHCreateChannel (lun: 0)
        GCCmds.c:394 (GemPC43x) GCCmdSetMode
        GCCmds.c:319 (GemPC43x) GCCmdGetOSVersion
        GemPC430Utils.c:51 (GemPC43x) OS string: GemUsb-R1.04-GM 
        ifdhandler.c:158 (GemPC43x) entering IFDHGetCapabilities (lun: 0)
        ifdhandler.c:158 (GemPC43x) entering IFDHGetCapabilities (lun: 0)
        readerfactory.c:1391 RFInitializeReader: Attempting startup of GemPC430 0 1.
        readerfactory.c:925 RFLoadReader: Warning library pointer not NULL
        readerfactory.c:1133 RFBindFunctions: Loading IFD Handler 2.0
        ifdhandler.c:87 (GemPC43x) Entering IFDHCreateChannel (lun: 1)
        libusb_wrap.c:106 (GemPC43x) USB driver with lun 1 already in use
        GemPC430Utils.c:30 (GemPC43x) OpenUSB failed
        ifdhandler.c:102 (GemPC43x) OpenReader failed
        readerfactory.c:1428 RFInitializeReader: Open Port 200000 Failed
        readerfactory.c:423 RFAddReader: GemPC430 init failed.
        hotplug_libusb.c:344 Adding USB device: 002:002
        readerfactory.c:119 RFAddReader: Duplicate reader found.
        hotplug_libusb.c:344 Adding USB device: 002:002
        readerfactory.c:119 RFAddReader: Duplicate reader found.
        [...]
      The reader told pcsc-lite that it supported two slots and
      pcsc-lite wanted to start two readers (one for each slot).
    - add support for 7 new GemCore error codes
    - check: Explain how to tell check to look elsewhere than just /usr/
      and /usr/local/

0.8.1 - 2 Septembre 2003, Ludovic Rousseau
    - ./check: uses paths defined in the Makefiles (if libusb is not
      installed in /usr or /usr/local)
    - common/GCCmds.c: add support of GemCore "Parity error during
      exchange"
    - GemPC410/devfs/libgempc410.devfsd.conf: use $devpath instead of
      $devname otherwise we have /dev/pcsc/1 -> tts/0 instead of
      /dev/pcsc/1 -> /dev/tts/0
    - GemPC430/Info.plist: use new <array></array> style
    - common/ifdhandler.c: FDHGetCapabilities() add support of tag
      TAG_IFD_SLOTS_NUMBER. All the readers I have/know have only one
      slot so this does not bring any new real functionnality.
    - Makefiles: do not exit with failure if makedepend(1) does not
      exist
    - update build and distclean rules.

0.8.0 - 12 April 2003, Ludovic Rousseau
    - Add support for GemPC 413 reader. That reader uses GemCore 2000
      and is EMV complient (different powerup sequence).
    - Add support for driver aliasing for USB drivers. Allows to connect
      different readers like a 430 and a 432 at the same time. You will
      need pcsc-lite-1.1.2beta4 for that.
    - change USB timeout from 10 to 60 seconds.
    - check: do not use /usr/local/include by default since cpp will
      warning on some systems (recent RedHat systems).
    - optimize Makefile to limit restarting unnecessary check and building.
    - driver filename for USB is now versioned (ie libGemPC430.so.0.8.0).

0.7.4 - 20 November 2002, Ludovic Rousseau
    - add comment on how to compile the USB driver (install libusb, etc.)
    - add the ./check script (MacOS X is not concerned here).
      Many users add problems with a "undefined symbol: debug_msg" error
      when starting pcscd. It will now NOT be possible to compile the
      drivers unless the _minimum_ versions of libusb and pcsc-lite are
      installed.

0.7.3 - 18 October 2002, Ludovic Rousseau
    - The GemPC430 driver under Linux now support hotplug. With the
      previous versions the reader(s) needed to be plugged _before_
      pcscd is started.

0.7.2 - 15 October 2002, Ludovic Rousseau
    - very very small modification. The previous compilation problem was
      not corrected.

0.7.1 - 15 October 2002, Ludovic Rousseau
    - very small modification to ease or allow compilation on some
      platforms (all 11 Debian supported platforms except i386)

0.7.0 - 13 October 2002, Jean-Luc Giraud, Ludovic Rousseau
    - the drivers are now shipped with low level debug messages OFF
    - do not depend on makedepend(1) anymore. Use it if present only.
    - GemPC410:
      - retry the last command if GBP returns a wrong first byte (NAD).
        This will help some GemPC410 to work. Before pcscd had to be
        started a second time.
      - add support for GemCore Repeat requests
    - GemPC410/devfs/ contains configuration files for devfs Linux systems
    - README.430: add a note about /proc/bus/usb/ directory under Linux
    - usbserial_mosx.c:
      - better stability and multiple reader support
      - the productId is now read from the Info.plist. This allow to
        support readers like the 432 and 435 without recompiling the
        library
    - libusb_wrap.[c|h] new files to use libusb under Linux and other
      systems supported by libusb. The USB driver _should_ work under
      FreeBSD and OpenBSD but in fact does not.

0.6.5 - 16 August 2002, Ludovic Rousseau
    - update README with the new readers supported (412, 415, 432, 435)
    - we now use the debug facilities from pcscd. see "Supported
      pcsc-lite" section
    - GemPC410/gbpserial.c: the serial initialisation should work
    - GemPC430/usbserial_linux.c: support for 432 and 435 readers

0.6.4 - 21 May 2002, Ludovic Rousseau
    - common/GCCmds.c: perform a powerup without PPS managment if the
      powerup with PPS managment failed
    - */Makefile: correctly remove .dependencies files
    - change sys_errlist[errno] to strerror(errno) to be (more) ready
      for the Hurd

0.6.3 - 9 May 2002, Ludovic Rousseau
    - README.410: Add info on /dev/pcsc/ for OpenBSD and FreeBSD
    - Case1 APDUs are converted in ISO IN commands (with length=0)
      instead of ISO OUT commands
    - some code cleanup

0.6.2 - 01 Apr 2002, Ludovic Rousseau, Jean-Luc Giraud
    - Add support for TAG_IFD_SIMULTANEOUS_ACCESS in IFDHGetCapabilities
    - Restore automatic PPS management compatible with Cyberflex
    - GemPC430/usbserial_mosx.c: fixes for multi-reader support
    - GemPC410/gbpserial.c: complete reimplementation of serial port
      configuration

0.6.1 - 11 Mar 2002, Ludovic Rousseau
    - GemPC410/gbpserial.c:
      . modified again the port BAUDS setting during open().

0.6.0 - 7 Mar 2002, Ludovic Rousseau
    - GemPC410/gbpserial.c:
      . modified the port BAUDS setting during open().
      . Changed the timeout delay from 2 to 10 seconds
    - common/ifdhandler.c: IFDHTransmitToICC: now manages case 1 APDU
      (only CLA, INS, P1, P2) as an outgoing APDU (CLA, INS, P1, P2, 0)
    - add a debug level: PERIODIC for... periodic calls. Do not define
      DEBUG_LEVEL_PERIODIC in GemPC4?0/Config.h if you don't want to see
      periodic logs from GCCmdCardStatus(), IFDHSetCapabilities() and
      IFDHICCPresence()
    - add a note about support of the IBM-410p reader.

0.5.10 - 3 Mar 2002, Ludovic Rousseau, Jean-Luc Giraud
    - fix bug with some kind of Cyberflex Access cards:
      . disable PPS management
      . the reader stays at 9600 bauds in all cases
    - fix bug when more than 252 output bytes are expected and less than
      that are available (which is the case when the card sends an error)
    - modify install: rule to include release version number in
      filename, create symlinks, remove execution right on the .so lib
    - README.410: Add a script to create the /dev/pcsc/? links
    - GemPC430/GemPC430Utils.c, GemPC410/GemPC410Utils.c,
      common/GCCmds.c: guarantee that the os_string is \0 terminated
    - GemPC410/resetGemPC410.c, GemPC410/gbpserial.c: use
      cfgetospeed()/cfsetospeed() instead of accessing directly the
      termios structure
      . the driver now works under OpenBSD
    - common/ifdhandler.c: also log APDU results

0.5.9 - 30 Nov 2001, Jean-Luc Giraud
    - fix bug in GCUtils.c/gemcore_ISO_EXCHANGE_processing()
    - added ProjectBuilder folder for MacOS X

0.5.8 - 27 Nov 2001, Ludovic Rousseau
    - MANIFEST: do not contain non existing files
        include create_distrib.sh
    - create_distrib.sh: exit in case of error
        mkdir creates the parents directories if needed, 

0.5.7 - 27 Nov 2001, Ludovic Rousseau
    - GemPC430/usblinux.c: crashed with two readers and no root
      priviledges
    - GemPC410/main.c: test code now support ISO 7816 case 1, 2, 3 and 4
      using Jean-Luc ReaderTest Java applet (not included here)
    - common/GCUtils.c: add support for IFD_ICC_NOT_PRESENT GemCore
      error status
    - GemPC410/gbpserial.c: prepare to support multi serial readers
    - GemPC430/usbserial_mosx.c: prepare to support multi USB readers
    - GemPC410/gbpserial.c: use explain_gbp() to log a descriptive GBP
      level error message
    - MANIFEST: add README.410
    - GemPC410/GemPC410Utils.c: log "OS string" at CRITICAL level to
      always have it the logs
    - GemPC430/GemPC430Utils.c: log "OS string" at CRITICAL level to
      always have it the logs
    - common/ifdhandler.c: Add APDU logging
    - common/GCdebug.h: add DEBUG_COMM3() and DEBUG_CRITICAL3() which is
      typically used to log error messages like "blabla /foo/bar: file not
      found"

0.5.6 - 15 Nov 2001, Ludovic Rousseau
    - all: migrate the type return value from RESPONSECODE to ifd_t,
      status_t or gcore_t
    - GCCmds.c: migrate from low level GCSendCommand() use to higer
      level and simpler GCMakeCommand()
    - libGemPC410 now supports long commands

0.5.5 - 7 Nov 2001, Ludovic Rousseau
    include Jean-Luc modifications to add a new protocol layer
    patch GemPC410 to support this layer
    include patches from the Debian package

0.5.4 - 28 Oct 2001, Ludovic Rousseau
    first public release
    I clarified the licences

0.5.3 - 26 Oct 2001, Ludovic Rousseau
    GemPC 410 and GemPC 430 compiles and runs

0.5.2bis - 23 Oct 2001, Jean-Luc Giraud
    Jean-Luc starts to dispatch ifdhandler.c

0.5.2 - 22 Oct 2001, Ludovic Rousseau
    first release containing GemPC410/ GemPC430/ and common/

0.5 - 14 Oct 2001, Jean-Luc Giraud
    complete release containing the code for the GemPC 430

?.? - 25 Sep 2001, Jean-Luc Giraud
    release of ifdhandler.{c,h} and GemCore.h

$Id: README,v 1.42 2017/12/14 17:50:29 rousseau Exp $

 vim:ts=20