Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Choosing A Card Read

Status
Not open for further replies.

PaulHInstincticve

Programmer
May 31, 2006
45
GB
I have been approached by a client to amend my application to allow it to read data embedded on cards to determine whether or not the card holder is permitted to go any further with transactions. The card will allow the holder to book onto activities if their card registers privileges for those activities but if the privileges are taken away, for example due to bad behaviour, then they will not be allowed to book for a period.

At this stage, although I have been working on this VFP9 app for the best part of 10 years, it is predominantly a self contained database and does not interface externally with anything like barcodes, magnetic strip readers etc so I am totally in the dark about the technology and how to use it from within VFP. My customer is also in the dark a little and does not yet have a card system. He has seen cards in the educational environment where a student is able to charge a card up with cash and then use various facilities around a campus with the credits on his card and is envisaging something along those lines but that is as far as it goes at this stage.

Can anyone recommend a cheap and cheerful card read / write system that I can purchase to get to grips with the technology and see how I can use it within VFP and then perhaps list one or two different types of card system and manufacturers to obtain something here in the UK and explain the pros and cons of each system so that if a more expensive system is required, I will have at least cut my teeth on the cheap and cheerful system and then can get the client to buy me the more expensive system once I am confident of what I am talking about. At this stage I think my app only needs to read the card and I assume that the card manufacturer will provide his own software for setting the card up. Many thanks

Paul
 
Hmm. Where to start...

I have worked with mag stripe and smart cards. I'll see if I can spew some generalizations and maybe save you a little research time here.

Mag cards usually have three tracks you can write to or read from. They don't contain much data though. I think the most you can squeeze on tracks 2 and 3 is around 256 bytes. Not kb, but bytes. Track 1 is (I believe) about 1/3 that.

Track 1 is usually one instance of data, whereas tracks 2 and 3 are usually 3 repeated instances of data for CRC checking functionality. The three tracks don't have to be the same data, but most readers will only stuff their internal buffer with data from only one of the tracks at a time.
All of the tracks have start and stop characters wrapped around the data.

Also, they are quite easily read and written to, so unless you store encrypted data, it wouldn't be that hard to tweak the data. Keep that in mind when it comes to security. You would probably be better of storing nothing but maybe an account number on them and keeping all other pertinent data on a server.

Finding a stand-alone cheap and cheerful mag stripe writer may be a challenge. They are usually contained within a card printer of some sort. The card printer prints whatever you want on the front of a card be it an image, a name, whatever, and simultaneously writes the mag stripe as it passes over the head.
One of the card printers we use for our own internal ID badge system is The Datacard SP35 Card Printer from I'm not trying to promote a particular product, it's just the one we bought.

As for readers, those aren't as hard to come by. The ones we use are the 3200 Series Card Readers from this company:
Which have a mag stripe reader and smart chip writer/writer.

Ahh, smart chips? Let me elaborate.
If you're wanting to store data on a card without requiring a direct connection to a server all the time, you may want to use 'Smart' cards instead. Here is a write-up I did on those:

Give that thread a look too.

Let me know if I can expound on any of this, I was trying to be somewhat brief, but I hope it helps a little anyway.




-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Dave,

Thanks for the intro. Looks like the smart card will be a lot more flexible than a stripe card. Its a shame you are not in the UK as the sites you recommend provide little in terms of pricing details and I would prefer to pick up a phone to a local supplier to find out a bit more. The coding also seems a little lower level than I had expected. It would be nice to find a card reader that comes with USB and an OCX, dll or similar that someone has already used with VFP 9 so that I can simply plug and play with this technology rather than get too bogged down in the technology for something that is just a small addition to may main application and not something I want to invest too much time in at this stage.

Your comments have, however, shed some light on what is involved and got me off the starting blocks so to speak so thanks for that.
 
Or is it a shame you're not in the U.S.? [wink]

I'm sure with a little poking around, someone has a canned package out there.
We have some very specialized and proprietary applications and platforms here so we had to get into the nuts and bolts of the stuff.
But an application where you are merely slide a card in and query a set of tables wouldn't be too big of a deal. It would be similar to a barcode scanner or something, just to stuff the keyboard.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top