Mag Stripe Card Info


[Document Version: 1.10] [Last Updated: 3/26/94]

Chapter 1) Technical Info on a SR&D reader

(From K. Khan)

Summary of information on the SR&D MCR-175-1R-0803 mag stripe card reader. Due to the large volume of summary requests I received, I am posting this summary instead of mailing it. It's somewhat long, so hit 'n' now if you're not interested in this stuff.

[Editor's Note: The following is a concatenation of the replies I received to a net.request about my mag stripe card reader. After the replies I have included some software that I threw together to play with the card reader. This file contains all the information I have on this subject. Additions are most welcome.

You'll notice I didn't get any farther than simply reading the raw signal from the card; of the two card readers I ordered, one was completely DOA, and the other had a faulty clock output (at least I assume that it was a clock output; I was never able to read any sort of signal from that line). Someone with a fully functional reader can easily extend what I wrote to get it to decode the actual data content of the card. If you do decide to make modifications and/or extensions, I'd appreciate a copy of whatever changes you make (email to Enjoy!]

"Finally, there are 5 wires coming from the assembly and terminating in a small connector similar to power supply connectors for 3.5" floppy drives. The wires are red, yellow, green, blue, and black."

If its anything like the units I worked with, I think you will find that the five wires are:

Card detected

But I don't know active levels, or which wire is what.

Chapter 2) Technical Info on MAGTEK reader

I picked few week ago a magnetic credit card reader from a another surplus outfit. It cost about the sam es yours. My card reader was made by MAGTEK and was diffrent from your reder in many ways. The reader I have has 4 ICs and some of them are standard TTL chip, so I could easily quess the power requiments (5V) and power connectors. My card reader had 6 pin connector. I put the power to the reader and started to examine the signals with multimeter and a little crystal earphone (my favourite electronics hacking tool). I found that output signals were something like that: data out, data clock out, data readable and and card ath the end of the reader. Then I connected the reader to the joystick port of my 386SX and made a little Turbo Pascal program for reading the card.

Spare printer port is the interface I use very often to connect diffrent hardware circuit to my computer. This time I decided to use game port because it can also provide the power to the user.

My program simply prints out the bits from the card. I have not found the way to decode the bits to corresponding numbers. The program so prints all 237 bits form the card to screen. If you have any information about data coding, I an interested in hearing about it.

Here is the meanings of the bytes in port $201:

D7: 0 -> card pushed to the end of the reader
D6: the read data from card
D5: 0 -> data stream readable
D4: the data clock


Wiring color code for the SR&D MCR-175-1R-0803 mag stripe card reader:

   Red:         +5V
 Black:         Gnd
Yellow:         /Card Detect
 Green:         Clock (?? - non-functional on the unit I have)
  Blue:         /Data
The leading '/' indicates an active low TTL signal.

Chapter 3) Quick 'n Dirty guide to the enclosed reader software

Hooking the SR&D MCR-175-1R-0803 card reader to your PC:

The included software is written specifically for the following configuration; if your wiring is different, you'll need to make corresponding changes to the software. Note also that the port address is hard-coded to look for LPT2's status port (at address 0x279). If you're using a different port address, be sure to change the port address value.

SR&D Wire       Printer Port Pin        Port Bit        Signal
---------       ----------------        --------        ------
Yellow          11                      7               /CARD DETECT
Blue            10                      6               /DATA
Black           18                      N/A             (Ground)
Power to the reader was provided by a separate power supply, basically one of those black plastic DC power packs fed through a 7805 regulator chip.

Compiling the software:

Compile SWIPE.C (using SMALL memory model), assemble SWIPEISR.ASM, and link the two together.

Using the software:

To use SWIPE.EXE, simply hook the reader up to your LPT2: port, power it up, then run SWIPE. When you're ready, press the ENTER key, and swipe a card through the reader. The program will read the data from the card and store it in a buffer (but will not decode the data; that is left as an excercise ;-). After the card has been read, press ENTER again and the contents of the buffer will be dumped to stdout. To save the card data to a file, simply redirect SWIPE's output on the command line, e.g.

SWIPE > citibank.out

Please let me know of any changes, bug fixes, or improvements you make to this code. Send email to

Thanks, and have fun!


Please check attribution section for Author of this document! This article was written by [mailto]. The most recent version is available on the WWW server [Copyright] [Disclaimer]