Skip to main content

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’)

Release files for msrx 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for msrx 0.3
File Size Uploaded
msrx-0.3.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for msrx 0.3
File Interpreter ABI Platform
msrx-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release files / msrx-0.3.tar.gz

Download URL msrx-0.3.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7e8390192281b7013ee084bfa2399eac6795c7c57e5f7ede7a1e05e19321d941
BLAKE2b-256 checksum
How to use checksums
bd9623df5544b166d54ae1b478d358c818cb2f7e143b2a7447ace7bc92a73fc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / msrx-0.3-py3-none-any.whl

Download URL msrx-0.3-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4cff8475b8abbf530c570aba641abd02ab49955c94288ab51289a5aae9a4d282
BLAKE2b-256 checksum
How to use checksums
8baee8ef35bd8f308a15ee1414ae542ab610a746807a66c0584c624063703751
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.2

2 release files

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page