FFGCR121StartComm - FFGCR121StopComm - FFGCR121Reset - FFGCR121FirmVers - FGCR121Led
GemCore 1.21-based SmartCard Reader management

Prototype

Put the following prototype in the prototypes section of the application program header file:

int   ( __stdcall *pfnFFGCR121StartComm )( int );
void  ( __stdcall *pfnFFGCR121StopComm )( void );
int   ( __stdcall *pfnFFGCR121Reset )( void );
char* ( __stdcall *pfnFFGCR121FirmVers )( void );
int   ( __stdcall *pfnFFGPC410Led )( int );

Purpose

Basic operations with the GemPlus GemPC410 SmartCard reader.

Description and use

FFGCR121StartComm and FGCR121StopComm are used to engage and disengage communications with the SmartCard reader on the serial port. Win2000 and WinXP have the bad habit of installing their silly system software and to reserve the serial port where the SmartCart reader is attached to as soon as you attach it... For this reason FFGCR121StartComm fails unless you uninstall the silly system software (Computer's Resources -> Properties -> Hardware -> Peripherals handling -> select the SmartCard reader from the hardware tree -> uninstall it -> close all the opened windows).

FFGCR121Reset, as the word says, is used to reset the reader.

FFGCR121FirmVers retrieves the firmware version from the reader.

FGCR121Led manages the LED of the reader. You can power the LED on or off, or make it blink.

Specification

GemPlus GemPC410 is a SmartCard reader of the GemCore 1.21 family. It is a very basic, but cheap, reader that you can use in your apps to deal with SmartCards. Please read my old
article about this topic.

Parameters
  • FFGCR121StartComm:
    • serial port number (1, 2, 3 or 4)
  • FFGCR121Reset:
    • (no parameters)
  • FFGCR121FirmVers:
    • (no parameters)
  • FFGCR121Led:
    • 0: LED off
    • 1: LED on
    • 2: LED blink
  • FFGCR121StopComm:
    • (no parameters)

Return value

  • FFGCR121StartComm:
    • 0: serial port successfully initialized
    • 1: serial port not found or busy
  • FFGCR121Reset:
    • 0: the reader has been reset
    • 1: the reader has not been reset
  • FFGCR121FirmVers:
    • pointer to an ASCIIZ string that contains the firmware version
  • FFGCR121Led:
    • (no return value)
  • FFGCR121StopComm:
    • (no return value)

Application example
  • complete example where all the functions are tested; the example is carried out using a GemPlus GPM2K memory SmartCard

See also

Notes