Jump to content

z0rro

Active Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by z0rro

  1. I realize this is a very old thread but I came across this today and thought I would share:

    http://web.archive.org/web/20070214070116/http://www.timmatheson.com/91/

    "In this project, the software does all the heavy lifting. The “dab” utility included in this article takes the raw DSP data from your sound card, decodes the FSK (frequency shift keying - a.k.a. Atkin Biphase) modulation from the magnetic stripe, and outputs the binary data. Additionally, you can decode the binary data using the “dmsb” utility to output the ASCII characters and perform an LRC check to verify the integrity of the data, provided that the stripe conforms to the specifications described in ISO 7811, 7813, and optionally ISO 4909 (for the uncommon Track 3). Becoming familiar with these specifications will help you understand the contents of the magnetic stripe when viewing the decoded data.

    The provided software is more proof-of-concept than production code, and should be treated as such. That said, it does its job well. It is open source and released under the MIT license. Feel free to contribute.
    Requirements
    - Linux (or the desire to port to another operating system)
    - A configured 16-bit sound card
    - Access to the /dev/dsp device
    - libsndfile
    Note that “dab” can also take input from any audio file supported by libsndfile. However, it must be a clean sample that starts at the beginning of the file. This is useful to eliminate the requirement of a sound card and allow samples to be recorded from another device (e.g., an MP3 player/recorder) and decoded at another time.
    Download
    dab.c (v0.7)- Decode Atkin Biphase
    dmsb.c (v0.1)- Decode (standard) Magnetic Stripe Binary
    Compiling
    Edit any configuration #defines near the top of the dab.c file and proceed to compile the source with the following commands:
    cc dab.c -o dab -lsndfile
    cc dmsb.c -o dmsb
    Usage
    Usage: dab [OPTIONS]

    -a, –auto-thres Set auto-thres percentage
    (default: 30)
    -d, –device Device to read audio data from
    (default: /dev/dsp)
    -f, –file File to read audio data from
    (use instead of -d)
    -h, –help Print help information
    -m, –max-level Shows the maximum level
    (use to determine threshold)
    -s, –silent No verbose messages
    -t, –threshold Set silence threshold
    (default: automatic detect)
    -v, –version Print version information

    Usage: dmsb [OPTIONS]

    -V, –verbose Verbose messages

    -h, –help Print help information
    -v, –version Print version information

    dmsb will wait on stdin for raw magnetic stripe data (string of 0s and 1s
    followed by a newline) and print the decoded data to stdout.
    Be sure that the mic is set as the recording device for your sound card (using a utility such as aumix or your preferred mixer). Standard usage on the command line with the hardware interfaced directly to the sound card (mic in) will be as follows with standard cards:
    ./dab | ./dmsb "

×
×
  • Create New...