3

I have a web application where I would like the card reader to scan our school's student ID cards and come out with their ID number. Our original system for managing this with the relevant card readers already has it preset to work, however, now I am trying to use the card reader for web browser forms.

I have coded my pages using Classic ASP and have the data linked to a MS Access Database. The card reader I am using is linked to a program application called Campus Online which manages our student ID cards and data. I am using an ACR122U card reader which works perfectly with our Campus Database.

Simply put, I want to be able to first open the homepage where the scan would need to take place. Scan the student ID card with the card reader in which the desired data (Student ID) will appear in the form field and submit. I've been searching for a couple of days now for a solution but there doesn't seem to be any clear answers to this. I am aware of the post at: How to read a mifare 1k card through ACR122U NFC Tag reader connected to local machine in a web application but it has clearly not answered my question on how to integrate the card reader with my web pages. It only shows demos that do not work with my card reader.

If there is any reference of code, online services that are available to do this or a method on how to integrate the ACR122U card reader with web pages, that would be best.

Thanks for the assistance.

Community
  • 1
  • 1
Jason
  • 93
  • 1
  • 4
  • 11

2 Answers2

4

You probably wanting to look into using ACR122U NFC Contactless Smart Card Reader Software Development Kit

How ever you look at this you will have to build some client application to facilitate the action of detecting the card, reading it and then outputting the Student ID to the Web Application window. There is no quick fix I'm afraid.

Luckily your card reader is PC/SC compliant which will make it easier to write something that can interface in a standard way to facilitate your required function. You want to look at using the winscard.dll to use the PC/SC functions built into the Windows OS.

Summary of what you need

Build an application (C++, .Net, Java or some other mainstream programming language that can access the PC/SC APIs in Windows) to do the following;

  1. Detect the card reader.
  2. Detect the card.
  3. Detect the web application window (be it a browser window, custom app etc).
  4. Read the Student ID (depending on whether you are talking about the UID of the card, you may need to perform some key based authentication of the card).
  5. Pass-through the value (active window and injecting standard output).
Community
  • 1
  • 1
user692942
  • 16,398
  • 7
  • 76
  • 175
  • Dear Lankymart, thanks for your response. I am unsure as to what you meant by using the winscard.dll file. I have located the file which appears to be in multiple locations in my C: Drive. In what application should I open this file? What file location should this file be located to work? Thanks for providing a summary of steps, now my concern is how to technically get the card to be read through the card reader to the web application. It seems it is very difficult to find a solution for doing this. Do you have any references I can relate to do this? I do have the ACR122U kit btw. – Jason Feb 20 '14 at 04:42
  • You mention you already have the `SDK`, this should be your starting point as it will likely contain samples in various popular programming languages for accessing and using the Smartcard API. Failing that you would have to build it yourself using the library of functions in the `winscard.dll`. Forgive me but the fact you don't seem to understand the purpose of the DLL or how to use it concerns me. To give you a taste of what would be needed [here](http://ludovicrousseau.blogspot.co.uk/2010/11/pcsc-sample-in-c.html?m=1) is a link to resource I found useful when first researching this topic. – user692942 Feb 20 '14 at 07:35
  • I am still new to the SDK interface, the program I have written worked great with barcode scanners, but now as we transition into MiFare card readers, that opened a whole new ball park with full of surprises. I am disappointed how complicated and complex the MiFare card reader is as it should be an easier process. I will need to not only convert my site to a .NET coded interface, but also learn a lot more about the language that the NFC reader uses. Forgive me if I do not understand that as I have never came across this before. I will look at the site you provided and see from there. Thanks! – Jason Feb 21 '14 at 08:59
  • @Jason It is a completely different concept, barcode readers usually respond to standard output so as long as you select a given control and scan a barcode the reader will fire the result through standard output to the focused control. Contactless Card technology does not work like that, `MiFare` is extremely complex and with good reason each card contains it's own eprom which is like a mini computer that can perform simple calculations, perform cryptographic functions and handle asynchronous communication with a device (i.e reader/writer). – user692942 Feb 21 '14 at 09:28
0

Well this is quite old, but i was strugling with figuring it out too so I've decided to create some sort of "deamon" in .NET - you can create service, small app running in the background.

Then i've connected it to the websocket, and subscribed socket messages in my web application. now when i use card in my reader, the deamon reads it, and sens message to web socket. then web socket sends it to the app and voila

Karol Pawlak
  • 440
  • 4
  • 15