Quick Setup To Read A Magnetic Card
================================================================================
1. Extract
2. Check microphone levels
3. Double click the jar, or from a commandline "java -jar Magstripper-0.3.jar"
4. Click the "Start mic input" toolbar button
5. Swipe a card
For command line only, swap step 3 for "java -jar Magstripper-0.3-alpha.jar -c"
This automatically sets the levels and starts reading input so have your card
plugged in before you launch it. if it's not able to decode the ASCII it will
just be blank (like the GUI).
How To Set Microphone Levels
================================================================================
1. Hookup your magnetic card reader to the microphone input.
2. Unmute the microphone and turn off microphone boost.
3. Open audacity or similar audio editor, and start recording.
4. Swipe a card somewhat fast. Use a HICO card if you will be using one.
5. Looking at the waveform, Adjust the microphone level so the waveform reaches
~60% of the maximum level. A lower level is better than it clipping.
Requirements
================================================================================
Non-suck computer (800 mhz or so?)
Microphone input for live card reading
Java JRE 5.0
RXTX libraries for strike control
Features
================================================================================
Decode a magnetic stripe from the microphone, or from stored wav files
Save the raw waveform from magnetic swipes
Save and Load features for the user table
Hashed and salted card data that is stored in the user table
Test lock
Linear weighted moving average of last 5 gaps for binary decoding
Dynamic zero level for decoding
Dynamic independent thresholds for decoding
Automatic recalculation of zero level and thresholds
1 bit corrections on LRC/CRC fail, multibit CRC/LRC detection
Missing peak correction
Saveable system log, and console logs for each swipe
Audio, track, and decode stats
Tables for 7 bit and 5 bit character sets
Screen lock feature
Command Line support
Other less important preferences, and shiny GUI things
Hardware
================================================================================
There are two types of hardware that Magstripper can use; magnetic card reader,
and a magnetic strike.
Magnetic Card Reader
Almost any magnetic card reader will work because the hardware included in most
readers is totally bypassed. Solder a 3.5mm mono audio jack directly to the
magnetic head. Normally there are three terminals on a magnetic head, solder to
the left and right terminals (not the ground), polarity does not matter. Simply
plug the 3.5mm mono jack into a microphone input of a computer.
Recommended Card Readers
XXX ~$25 Omron V3B-4k. If you are only getting one reader get this. You can
move the magnetic head to tracks 1 and 3 with screws.
Cheapest place I've found
XXX ~$15 BGMICRO TRACK 2 READER. Good Cheap reader, track 2 only.
Cheapest place I've found
Shims
There are up to 3 tracks on standard cards, track one being closest to
the edge. Shims allow you to prevent the magnetic card from being
inserted all the way into the reader, changing the track the magnetic
head is alligned on. This allows you to read multiple tracks without
having a multitrack reader, and without physically moving the maghead.
You can only read tracks lower than where your maghead is mounted at
without a shim in place. So using 2 shims you can read all tracks with a
maghead mounted at track 3.
XXX Acidus has a good video explaining how to make one
Magnetic Strike
This is used for the access control aspect of this program, and is not required
to decode magnetic cards. Magstripper can control a magnetic strike via a serial
port with the help of RXTX.org libraries. There is a hardware schematic of a
simple circuit that connects a serial port to a magnetic strike distributed with
magstripper (hardware.png). Parts list I used to build this circuit.
1 circuit board or breadboard
1 12v 500mA Power Brick (other sources work, check the strike's specs)
1 Electric Strike http://www.nokey.com/noname1.html
1 Photovoltaic Relay, Digikey:PVN012-ND
1 Diode, Digikey:1N4148T-73CT-ND
1 1.00K Ohm resistor, Digikey:PPC1.00KZCT-ND
1 D-Sub 9 female connector
Installing Java
================================================================================
Download JRE 5.0 or newer from Sun
http://java.sun.com/javase/downloads/index_jdk5.jsp
Follow click through instructions
Installing RXTX Libraries
================================================================================
See rxtx.org for more info, or if these direct links dont work.
For Windows
Download the latest RXTX drivers without Sun�s CommAPI namespace
ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip
Extract the zip file
Copy rxtxSerial.dll from EXTRACTEDPATH\Windows\i368-mingw32\
to c:\Program Files\Java\JREFOLDER\bin
Copy RXTXcomm.jar from EXTRACTEDPATH\Windows\i368-mingw32\
to c:\Program Files\Java\JREFOLDER\lib\ext\
For Linux
Download the latest RXTX drivers without Sun�s CommAPI namespace
ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip
Extract the zip file
Determine which Linux binary distribution you need based on your architecture
i686-unknown-linux-gnu
ia64-unkown-linux-gnu (misspelled in the distribution)
x86_64-unknown-linux-gnu
Copy librxtxSerial.so from EXTRACTEDPATH/Linux/ARCHITECTURE/
to /usr/local/Java/JREFOLDER/bin
Copy RXTXcomm.jar from EXTRACTEDPATH/Linux/ARCHITECTURE/
to /usr/local/Java/JREFOLDER/lib/ext
Troubleshooting
================================================================================
Q. I get an "Open With" dialog when double clicking the jar file, what program
do I open this with?
A. You shouldn't have to select a program to open magstripper with, make sure
you have java installed correctly and associated with .jar files. If you aren't
able to select java when trying to "open with" you can also run this from a
command line, "java -jar Magstripper-0.2.jar" (you must be in the same directory)
Q. When I swipe a card there are lots of warning messages, and I don�t get a
good decoding.
A. You should stop playing any other audio through your computer when running
magstripper. Try swiping the card slower, especially on higher density tracks 1
and 3. Check your system's microphone levels to make sure your microphone isn�t
peaking, and disable microphone boost.
Q. I swipe a card and there are no warning messages, but I still don't
understand what magstripper decoded.
A. There are special characters used on magnetic cards such as start sentinels,
end sentinels, field separators, etc. These are decoded as their ASCII character
symbols. Check out a chart of the different character sets to get a better
understanding. See charactersets.txt
Q. Whenever I start the microphone input to read a card, magstripper shows
swipes without me swiping a card.
A. This happens when your systems microphone level is not set correctly and the
noise on the line constantly jumps in and out of the threshold range. You can
either increase the "Microphone Thresholds" in preferences, or lower your
system's microphone level.
Q. Whenever I swipe a card, nothing happens.
A. Make sure you have clicked "Start Mic Input", and you are not swiping the
card too slowly. You can also increase your system's microphone level, and
decrease the "Microphone Thresholds" in preferences.
Q. I have my lock hooked up but when I swipe a card the lock is not unlocked.
A. Make sure both the user and card you are swiping are enabled (checkbox). Make
sure the card was decoded correctly (otherwise see the above question). You can
also test your lock by clicking "Test Lock" on the toolbar.
Q. I don�t understand all this output in the swipe / system log.
A. Yeah me either, I have to work on that. Originally they were just messages
for me to bugtest my program. Later I categorized them, and slightly cleaned
them up. Eventually I'll have them make sense. For now you'll just have to read
the code to figure them out, or for a specific message post in the forums.
Q. I found a bug, or I have something you should change / add.
A. Feel free to add a bug report or feature request on sourceforge. I have a lot
of stuff I want to do to magstripper so I might not get to it soon.