6

I am newbie in the field of Magnetic-Stripe cards. But if I don't have any idea about the structure of these kind of cards, I can't develop software for them also.

Searching a lot, gave me this information only :

This cards have 3 different Tracks named Track-1, Track-2 and Track-3 in their black bar. And the density of data on each Track is different from the others.

The questions that I have :

  1. Is there any difference between Mag-Stripe card reader and writer? Or like smart cards reader, the reader do the writing also?

  2. Does all the readers[/writers] can read from[/write on] all the three tracks by default and we choose that which track is our target on the program? or some readers [/writers] are for Track-1, some other for Track-2 and some other for Track-3? In the other word, does the device need three different head(Is it a head?) for working with different Tracks or a single head are for all the three Tracks?

  3. Are these three Tracks both readable and writable or some are only readable for example?

  4. Does we need fresh cards to writing data on them or we can clear an already used card and rewrite new data on its Tracks?

  5. There is a device named Encoder in the list of devices for Mag-Stripe card. What is this Encoder for? What's the difference between Encoder and Reader or Writer?

  6. Why the density of data and the type of data (Alphabetic or Numeric) is different for different Tracks?

  7. Any tool, document, specification, standard, library or tutorial for getting started?

halfer
  • 18,701
  • 13
  • 79
  • 158
Abraham
  • 5,544
  • 10
  • 40
  • 95
  • 1
    Too broad! but yes, can be a Wiki question. –  Apr 13 '15 at 12:34
  • 1
    @User1-St It is no longer possible to ask wiki questions. Even when it was, they did not mean that you could ignore the rules. You're right, though -- this is too broad: it's seven questions, not one. – Jeremy May 12 '15 at 23:52

1 Answers1

7

First, you'll want to read up on ISO-7811 and ISO-7812 mag card standards.

Then, you'll need to learn how to wire up a minimal working example (MWE) system. Fortunately, card readers are easy to come by, and you can just wire them up directly to something like an Arduino.

For at least one example, the format for bank cards is:

% "ASCII string on track 1" ?; "ACSII string on track 2" ?; "ASCII string on track 3" ?

It's just a serial stream that is provided, so "packets" will be different for different types of cards. Since this is just a reader, treat all data as read-only.

You can also find some existing code examples for pulling the data off of the card.

You can also find "blank" cards on SparkFun as well, but you'll need to put in some more money for a writer setup. Also, all sort of mag swipe cards have security features these days, including universities, credit cards, etc, so that portions of the mag stripes are hard to read or are read-only, etc.

If you're planning on doing something shady, these tools won't work, and rightfully so.

If you're planning on making your own security system for a lab or school, these cards are easily cloned and cracked by a clever person.

If you're just trying to have some fun learning a new topic, the above advice will be helpful.

Cheers!

  • Thanks. Am I need a reader and a writer, or a device do both reading and writing? What is encoder? – Abraham Apr 13 '15 at 12:42
  • Can I do something _formatting_ on all the already written cards and make them fresh cards to another data? Or I need some key or something? – Abraham Apr 13 '15 at 12:45
  • _hard to read or are read-only_ : How? Is not that black bar a magnetic field only? How they can make it hard to read or read-only? Why they make it hard to read?! – Abraham Apr 13 '15 at 12:46
  • In our country there are some credit cards that have an expiration date (The related account to that card will expire in that date). I want to know if it is possible to reuse the expired cards for another purpose by formatting them and rewriting new data on them or not? – Abraham Apr 13 '15 at 17:58
  • And is there any standard or library to work with mag-stripe reader / encoders and program for communication with them? (Something like PC/SC in smart card readers) – Abraham Apr 13 '15 at 18:02
  • And my last one :D : Why they make the card in a way that the density of date on different Tracks are different from the others? – Abraham Apr 13 '15 at 18:03
  • 1
    Thanks. Why it is illegal?! I don't think it is illegal in my country. Here the expired card goes to recycle bin! – Abraham Apr 13 '15 at 19:53
  • Just to be sure : you said that some manufacturers make some tracks readable only (and not writable) and some make all tracks readable/writable. It depends on the manufacturer and there is no standard. right? – Abraham Apr 13 '15 at 19:55
  • Where are the answers to these comments? I have these questions! – alias51 Mar 15 '16 at 18:19