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. Note also that there was another summary post in recent days with information on how the data on the cards is encoded. See article kms26oINNojs@network.ucsd.edu for this info.
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 firstname.lastname@example.org). Enjoy!]
If its anything like the units I worked with, I think you will find that the five wires are:
But I don't know active levels, or which wire is what.
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
Red: +5V Black: Gnd Yellow: /Card Detect Green: Clock (?? - non-functional on the unit I have) Blue: /DataThe leading '/' indicates an active low TTL signal.
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 email@example.com.
Thanks, and have fun!