
It has be over 6 years since someone wrote something of substance about
magstripe interfacing. The uncommented source code that you can find out
there, is so horribly dated that it will not run on any modern Windows OS
(NT, 2K, XP). My goal is to explain in detail interfacing magstripes to a
computer, explain how to control it, and present easily ported source code
that people can use.
-
MagStripe Interfacing - A Lost Art
Published in 2600 in the summer of 2004, this is the main feature. Topics discussed include: magstripe theory, detailed building approach and parts list, wiring diagrams, explaination of source code, and future options.
Available Formats (You will need the source code. as well)- Plain TXT - Be sure to grab Figures 1, 2, and 3, or download an archive of the TXT, figures and source code here
-
Adobe Acrobat PDF
-
OpenOffice Writer
-
Source Code
I've collected and written some source code that will process a raw bit stream from a TTL reader, provided it was wired as shown in Figure 1.
Available Formats- swipeCard.bas - Visual Basic - Acidus, 4/2004 - This is the source code distributed with the article. It is heavily commented and easy to port. This is not a free standing application, but simply a function that returns the contents of a magstripe. If use on Win2K or XP machines, you will need Inpout32.dll, which allows direct port access. This is GNU GPL code.
- Stripe Snoop - C and Visual Basic - Acidus, 4/2004, 6/2004 - This is the source code for a full application, Stripe Snoop, which is based on the function in swipeCard.bas, distributed with the article. This is GNU GPL code.
- mag.pas - PASCAL - Patrick Gueulle, 1997 - I extracted Patrick's source code from his PDF, and present it here. It will only work under DOS, Win 3.x, and Win 9x.
-
Binaries
Here are some compiled programs that will work if the reader is wired as shown in Figure 1.- Stripe Snoop - Acidus, 4/2004, 6/2004 - DOS Windows 9x, ME, NT 2K and XP binary. This is GNU GPL code.
- Mag.exe - Patrick Gueulle, 1997 - A compiled version of Patricks PASCAL code, shown above. This is freeware.
-
References
Here are links to the references made in the Article.-
[1] Card-O-Rama: Magnetic Stripe Technology and Beyond - Count Zero
The Definitive guide on magstripes: Formats, encoding, and reading. Local Copy -
[2] Magnetic Stripe reader/writer - Luis Padilla Visdomine
An excellent web page, Luis builds a mag reader and writer from scratch. Lots of examples of card formats, rather advanced. -
[3] Interface a TTL Magcard Read to the PC Games Port - Patrick Gueulle
A very short paper on PC interfacing with PASCAL Source Code. Local copy -
[4] Logix 4 U Homepage
Contains the inpout32.dll needed to directly access IO ports using INP and OUT on Win2k and XP machines.
-
[1] Card-O-Rama: Magnetic Stripe Technology and Beyond - Count Zero
© Copyright 2002 - 2008 Most Significant Bit Labs. All Rights Reserved