https://github.com/oxplot/msrx
Library and command line utils to use MSR605 magnetic card reader/writer
https://github.com/oxplot/msrx
Last synced: 7 months ago
JSON representation
Library and command line utils to use MSR605 magnetic card reader/writer
- Host: GitHub
- URL: https://github.com/oxplot/msrx
- Owner: oxplot
- License: bsd-3-clause
- Created: 2014-08-03T03:04:07.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-07-01T03:05:14.000Z (over 2 years ago)
- Last Synced: 2025-04-10T00:04:47.473Z (7 months ago)
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 32
- Watchers: 5
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Intro
=====
MSR605 is a very well built and popular magnetic card reader/writer.
msrx is a library and a command line utility that allows talking to this
device.
Features
========
* msrx python module compatible with python 2.7+ and python 3
* Command line utility with read, write and erase functionality
Installation
============
$ pip install msrx
Usage
=====
Ensure you've plugged a 9V supply to the power injector on the USB cable
before continuing.
To read a card's data, run the following and swipe a card:
$ msrx read
%PA1VSBUTT0 .8W11(BT003423342?|;943300000002342?:|
The output is a pipe ('|') separated track data in ISO-7811 format. In
the above example, only tracks 1 and 2 have data in them.
To erase a card, run the following and swipe a card (**WARNING** this is
non-reversible):
$ msrx erase -t 1,3
The above erases tracks 1 and 3. To erase all tracks, leave out `-t`.
To write to a card, run the following and swipe a card:
$ echo '%HAPPY?||;99?' | msrx write
This writes to tracks 1 and 3 because we left track 2 data empty. Note
that restrictions apply as to what set of characters and in what format
may be stored in each track. Consult ISO-7811 parts 2 and 6 for more
information.
To see other options, run msrx with `-h` option.
To use msrx as a library:
import msrx
mymsrx = msrx.MSRX('/dev/ttyUSB0')