Magstripe Reader Project

Several years ago I bought a surplus $5 mag card reader from electronics goldmine. It was a basic model with just a clock and a data signal line and I believe it was a track 2 only reader. Track 1 is what the majority of the cards (or at least the most common) use only, I think I read in my research at the time.

There was a arduino sketch someone posted at the time to get the arduino to decode the data stream and resend it out the serial port. It worked pretty well, but all the various cards I swiped just tended to have a rather long random series of numbers as your example. Note below in the specs that there is a standard defined ASCII start and end character for the protocol. My sketch showed those start and ending characters, where your serial data version is a higher level unit and may strip off the message start and stop characters.

I suspect that most issurers of these cards just put a long unique random number onto the card that then their central computer systems uses as an ID index into their complete database for the holder of the card. Only my Calif Drivers licence seem to have a simple clear text data which I recall correctly was the license number (same as printed on the front) and my data of birth. So I think most just record straight ASCII number characters on them as you have printed on your posting.

Data packet format??Suitable to all magnetic card reader?
Track 1 start character?? End character??
Track 2 start character?? End character??
Subject Specification
Track standard Comply with ISO7811
Decoding method F2F (FM)
Starting character Track 1“%” Track 2“?” Track 3“+”
Card reading Data bit
Track 1 79
Characters (7-bit)
Track 2 40
Characters(5-bit)
Track 3 107
characters(5-bit)
Card thickness 0.2~0.84 mm
Suitable Voltage DC5V±0.5V
Static current 10mA/5V
Track reading width 1.5mm
Magstripe passing speed 15 - 120 cm/sec (6-50inch/sec)
Magnetic head life span More than 800,000 passes
Error rate Lower than 0.5%
Interface RS232,USB,PS/2 Track 3 start character?? End character??
Enter key is end character of the whole data packet.