.NET Developer

Saturday, June 24, 2006

Smart Card Readers

Hi All...

The day when I started learning what the computer is a really confusing and I really got demoralized that I can not cope up with all these stuff...., but now I am a successful developer so far...

Lets come to business... :)

At that time the USB concept is very new to us. Everything is connected via Serial or Parallel Ports. After sometime USB became very useful for the software world for its connectivity.

You may think that what is this...Says SamrtCard information but talks something different???

yah, I am coming to that point only. The above said thing is how we can connect and communicate a device to the computer system (PC). The device may be connected using serial Port or an USB port.

SmartCard readers can be connected using Serial Port or USB to communicate.

The readers work on software interrupts.

If you are a C or C++ developers you might have heard about the interrupts. At least if you know how the telephone is dialed using the PC, the same concept is used to communicate with the SamrtCard Readers.
Here the concept means not the same commands. I said earlier that each device may have its own interrupt command. Telephone usually dialed using modem connected to the PC.

Have you ever used the Hyper terminal in the Communications in Windows. It is used to connect the external devices which are connected via Serial / Parallel ports and we can control them using the interrupt commands.

Smart Cards Readers

luckily I have got my first assignment to develop an attendance application using SmartCard reader. Every employee will be given a smart Card which will have all the data related to an employee. I was working in a small company where my boss has taken this project and collected all the required equipment for the same. But as usual what every smart Card Reader buyer he forgot to ask for the SDK, which is very crucial for the development.

You has to remember when you want to develop something related to Smart Cards, if SDK is not shipped with the device, at least you ask him for the command set, which will have Input and Output Commands.

When I am working with this concept, I don't have any information how to interact with the device.
My assignment was Data Capturing Module, which involves the following things,


  • Providing the interface to communicate with the device.

  • When the user swipes a SmartCard, it should generate a .NET Event.

  • The data, which is available in the card should be supplied to the .NET Event via EventArgs (Which I have achieved by writing custom EventArgs Class).

  • Using that data the required validations and attendance processing should be done.

  • The Technology Used

    At that time I am some what strong in VB 6.0.

    I have got some information that the readers can be connected via Serial Ports and can be controlled using the command by sending them from the MSComm control.

    It works on concept called Polling. So, I need to check the Serial Port Data very frequently.

    Because the response time from the reader may vary based on the Command. So, you have to collect the data when the reader completely sent to the Serial Port. A timer is used to poll the Serial Port.

    This has given me a great breakthrough to write a .NET Component, which uses .NET Interopability to MSComm (ActiveX) Assemblies.

    I tested all the commands including Input and Output commands using Hyper Terminal application. Based on the trail and error method I have prepared some properties which will capture the data available at Serial Port.

    I have written a Custom Class for EventArgs which holds the SamrtCard information in it and sends along with the event.

    Thats it, it has successfully implemented in some local organizations.

    For any help on this please put some comments on this blog here, I'll answer.

    - PanduKovur

cerebral palsy
cerebral palsy