Library and command line utils to use MSR605 magnetic card reader/writer
Project description
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’)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file msrx-0.3.tar.gz
.
File metadata
- Download URL: msrx-0.3.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e8390192281b7013ee084bfa2399eac6795c7c57e5f7ede7a1e05e19321d941 |
|
MD5 | 2cede79a5d728001d53b96de71019a41 |
|
BLAKE2b-256 | bd9623df5544b166d54ae1b478d358c818cb2f7e143b2a7447ace7bc92a73fc0 |
File details
Details for the file msrx-0.3-py3-none-any.whl
.
File metadata
- Download URL: msrx-0.3-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cff8475b8abbf530c570aba641abd02ab49955c94288ab51289a5aae9a4d282 |
|
MD5 | c0e03b331011eaabfd4bc8631459292d |
|
BLAKE2b-256 | 8baee8ef35bd8f308a15ee1414ae542ab610a746807a66c0584c624063703751 |