A native GTK4 application for Ubuntu to read, write, and manage magnetic stripe cards using the MSR605X device.
MSR605X Utility is an open source alternative to the Windows utility for the MSR605X magnetic card reader/writer. The application is designed to work natively on Ubuntu and other Linux distributions compatible with GTK4.
Tested with firmware: REVH7.31
- Read: Read all 3 tracks (ISO and raw data)
- Write: Write data to all 3 tracks
- Erase: Selective track erasure
- Clone: Clone cards (read + write)
- Plug & Play: Device is automatically detected and connected
- Hot-plug: Automatic detection when device is plugged/unplugged
- No Connect button: Simplified interface, connection is handled automatically
- ISO 7811 - International standard for magnetic cards
- Raw Data - Direct bit access
- Coercivity: Hi-Co (2750-4000 Oe) / Lo-Co (300 Oe)
- BPI: 75 or 210 bits per inch per track
- BPC: 5, 7, or 8 bits per character per track
- Save data in JSON format
- Save data in CSV format
- Load data from file
- Modern design with GTK4 and libadwaita
- Automatic light/dark theme support
- LED status indicators
- Real-time operation log
- Toast notifications for immediate feedback
- Operating System: Ubuntu 22.04+ (or other Linux distributions with GTK4)
- Python: 3.10 or higher
- Hardware: MSR605X device connected via USB
The easiest way to install the application on Ubuntu/Debian:
# Download the .deb package from the Releases page
wget https://github.com/Sam4000133/msr605x-ubuntu/releases/latest/download/msr605x-utility_1.0.0-1_all.deb
# Install the package
sudo dpkg -i msr605x-utility_1.0.0-1_all.deb
# Install any missing dependencies
sudo apt-get install -fAfter installation, the application will be available in the applications menu.
# Clone the repository
git clone https://github.com/Sam4000133/msr605x-ubuntu.git
cd msr605x-ubuntu
# Run the installation script
chmod +x install.sh
sudo ./install.shsudo apt update
sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-4.0 gir1.2-adw-1 libhidapi-hidraw0 libhidapi-devgit clone https://github.com/Sam4000133/msr605x-ubuntu.git
cd msr605x-ubuntupip install -r requirements.txtpip install -e .# Copy udev rules
sudo cp data/99-msr605x.rules /etc/udev/rules.d/
# Reload rules
sudo udevadm control --reload-rules
sudo udevadm trigger
# Add your user to the plugdev group
sudo usermod -aG plugdev $USERImportant: Log out and log back in to apply the group changes.
# From terminal
python -m src.main
# Or after installation
msr605x-guiThe application will also be available in the applications menu as "MSR605X Utility".
- Connection: The device is automatically detected and connected when plugged via USB
- Reading:
- Go to the "Read Card" panel
- Select the format (ISO or Raw)
- Click "Read Card" and swipe the card
- Writing:
- Go to the "Write Card" panel
- Enter data for each track (without sentinels %, ;, ? - they are added automatically)
- Click "Write Card" and swipe a blank card
- Erasing:
- Go to the "Erase Card" panel
- Select the tracks to erase
- Confirm and swipe the card
- Settings:
- Configure coercivity (Hi-Co/Lo-Co)
- Run diagnostic tests on the device
msr605x-ubuntu/
├── src/
│ ├── main.py # Entry point
│ ├── app.py # GtkApplication class
│ ├── window.py # Main window
│ ├── msr605x/ # Device communication module
│ │ ├── device.py # USB HID communication
│ │ ├── commands.py # High-level commands
│ │ ├── constants.py # Protocol constants
│ │ └── parser.py # Track data parser
│ ├── ui/ # Interface components
│ │ ├── read_panel.py # Read panel
│ │ ├── write_panel.py # Write panel
│ │ ├── erase_panel.py # Erase panel
│ │ └── settings_panel.py # Settings panel
│ └── utils/
│ └── file_io.py # File management
├── data/
│ ├── com.github.msr605x.desktop # Desktop entry
│ ├── com.github.msr605x.svg # Icon
│ ├── style.css # CSS styles
│ └── 99-msr605x.rules # Udev rules
├── tests/
│ └── test_parser.py # Unit tests
├── pyproject.toml # Project configuration
├── requirements.txt # Python dependencies
├── install.sh # Installation script
├── LICENSE # MIT License
└── README.md # This file
| Track | BPI | BPC | Max Characters | Data Type |
|---|---|---|---|---|
| Track 1 | 210 | 7 | 79 | Alphanumeric |
| Track 2 | 75 | 5 | 40 | Numeric |
| Track 3 | 210 | 5 | 107 | Numeric |
| Command | Description |
|---|---|
| ESC a | Reset device |
| ESC e | Communication test |
| ESC v | Firmware version |
| ESC r | ISO read |
| ESC m | Raw read |
| ESC w | ISO write |
| ESC n | Raw write |
| ESC c | Erase (mask: 0x01=T1, 0x02=T2, 0x04=T3) |
| ESC x | Set Hi-Co |
| ESC y | Set Lo-Co |
- Sentinels: Do NOT include sentinels (%, ;, ?) in write data - the device adds them automatically
- ISO Write Format:
ESC w ESC s ESC 01 [data] ESC 02 [data] ESC 03 [data] ? FS - HID Protocol: 64-byte packets with header (bit7=first, bit6=last, bits0-5=length)
-
Hi-Co (High Coercivity): 2750-4000 Oe
- More resistant to demagnetization
- Used for cards requiring greater durability
-
Lo-Co (Low Coercivity): 300 Oe
- Standard for most cards
- Easier to encode
-
Verify the device is connected:
lsusb | grep -i "0801:0003"
-
Check permissions:
ls -la /dev/hidraw* -
Make sure udev rules are installed:
cat /etc/udev/rules.d/99-msr605x.rules
-
Reload udev rules:
sudo udevadm control --reload-rules sudo udevadm trigger
Make sure you are in the plugdev group:
groups $USER
sudo usermod -aG plugdev $USER
# Log out and log back inVerify that GTK4 and libadwaita are installed:
sudo apt install gir1.2-gtk-4.0 gir1.2-adw-1- Clean the reader head
- Swipe the card at a constant speed
- Verify the card is not damaged
- Try changing the coercivity in settings
# Install development dependencies
pip install pytest pytest-cov
# Run tests
pytest tests/- Fork the repository
- Create a branch for your feature (
git checkout -b feature/NewFeature) - Commit your changes (
git commit -m 'Add new feature') - Push the branch (
git push origin feature/NewFeature) - Open a Pull Request
This project is released under the MIT License. See the LICENSE file for details.
- Inspired by projects eucalyp/MSR605 and bentbot/MSR605-GUI
- Original UI design and icons
This software is provided solely for educational and legitimate purposes. Users are responsible for ensuring compliance with all applicable laws and regulations regarding the use of magnetic stripe card technology.
- Repository: https://github.com/Sam4000133/msr605x-ubuntu
- Issues: https://github.com/Sam4000133/msr605x-ubuntu/issues
Developed with ❤️ for the Linux community