androidaudiomagnetic-cardscredit-card-track-data

Get Raw Magstripe Data with audio jack reader


So i have recently acquired a few paypal magstripe card readers for free. My goal is to use this to get the raw data via the audio jack on an android device. My best guess at how to do this would be to use the AudioRecord stuff in android, then decode the audio signal. Would this be the best way? Anyone else tackle stuff like this? Examples?


Solution

  • This is not as simple as you might first imagine.

    1. Record Audio. You will have to continuously read audio and place it into a buffer.
    2. Decode Audio, save as 16bit PCM encoded, sampled at 44100hz. You will have to note when zero crossings occur and based on it generate a binary string. Then convert that binary string to ASCII.
    3. Once you are this far you have your track 1 or track 2 data! From here you can follow the ISO 7813 format if you are parsing credit cards. It fairly easy to parse, once you understand the spec.

    Check out these resources. Good luck! AUDIO TO TRACK DATA: http://www.instructables.com/id/Read-any-magnetic-strip-card-with-a-Square-reader-/

    TRACK DATA:
    http://en.wikipedia.org/wiki/ISO/IEC_7813 http://www.gae.ucm.es/~padilla/extrawork/tracks.html