A cross-platform Python CLI tool for interfacing with Arduino RFID Reader/Writer devices.
- Read and save RFID card data
- Write data to RFID cards
- Associate UUIDs with custom text
- Output card data or associated text as keyboard input
- Persistent storage of cards and associations
- Cross-platform support: Windows, macOS (Intel/Apple Silicon), Linux
- Standalone executables: No Python installation required for end users
Download the appropriate executable for your platform from the Releases page:
- Windows:
RFIDVault_windows.zip - macOS Intel:
RFIDVault_macos_intel.zip - macOS Apple Silicon:
RFIDVault_macos_arm64.zip - Linux:
RFIDVault_linux.zip
- Extract the ZIP file
- Run the launcher:
- Windows: Double-click
LAUNCH.bat - macOS/Linux: Run
./LAUNCH.sh
- Windows: Double-click
- Python 3.6 or higher
- pip (Python package installer)
- Arduino with RFID module and appropriate firmware
scripts/init_env.batchmod +x scripts/init_env.sh
./scripts/init_env.shscripts/run.bat --port COM3 <COMMAND>chmod +x scripts/run.sh
./scripts/run.sh --port /dev/ttyUSB0 <COMMAND>-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- Windows:
venv\Scripts\activate.bat - Linux/macOS:
source venv/bin/activate
- Windows:
-
Install required packages:
pip install -r requirements.txt
# Build for current platform
make build
# Build for all platforms
make build-all
# Build for specific platform
make build-windows
make build-macos-intel
make build-macos-arm64
make build-linux# Create a new release (triggers GitHub Actions)
make release VERSION=1.0.0
# Or use the Python script directly
python scripts/release.py 1.0.0The project includes automated GitHub Actions that:
- Build executables for all platforms
- Create GitHub releases with downloads
- Upload platform-specific ZIP files
To enable automatic releases, ensure your repository has the following settings:
-
Repository Settings → Actions → General
- Set "Workflow permissions" to "Read and write permissions"
- Enable "Allow GitHub Actions to create and approve pull requests"
-
Repository Settings → Actions → General → Workflow permissions
- Check "Allow GitHub Actions to create and approve pull requests"
Trigger by pushing a version tag: git tag v1.0.0 && git push origin v1.0.0
If you just want to test builds without creating releases, use the "Build Only" workflow that triggers on pushes to main branch.
# Monitor for card reads
python rfidvault.py --port COM3 monitor
# Monitor with keyboard output
python rfidvault.py --port COM3 monitor --keyboard
# Write data to card
python rfidvault.py --port COM3 write "Hello World"
# List saved cards
python rfidvault.py --port COM3 list-cards
# List associations
python rfidvault.py --port COM3 list-associations
# Associate UUID with text
python rfidvault.py --port COM3 associate "12345678" "My Card"
# Delete saved card
python rfidvault.py --port COM3 delete-card "12345678"
# Delete association
python rfidvault.py --port COM3 delete-association "12345678"- Windows: Use
COM3,COM4, etc. - Linux: Use
/dev/ttyUSB0,/dev/ttyACM0, etc. - macOS: Use
/dev/tty.usbserial-*,/dev/tty.usbmodem*, etc.
The application works on:
- Windows 10/11 (x64)
- macOS 10.15+ (Intel x64 and Apple Silicon ARM64)
- Linux (x64, glibc-based distributions)
Standalone executables are available for all platforms and don't require Python installation.
When using the --keyboard flag with the monitor command, the tool will:
- Automatically type the associated text for known cards
- Type the card data for unknown cards (if data is not "EMPTY")
- Use pynput library for keyboard simulation
The tool creates two JSON files for persistent storage:
rfid_cards.json: Stores card UUIDs, data, timestamps, and read countsrfid_associations.json: Stores UUID-to-text associations
- Microcontroller Board:
- Arduino: Uno, Nano, Mega, or compatible board
- ESP32: Any ESP32 development board (DOIT DEVKIT V1, NodeMCU-32S, etc.)
- ESP8266: NodeMCU or compatible board
- RFID Module: MFRC522 RFID Reader/Writer module
- RFID Cards: MIFARE Classic 1K cards (or compatible)
- Breadboard and Jumper Wires: For prototyping
For Arduino Boards:
- VCC → 3.3V
- GND → GND
- SDA/SS → Digital Pin 5
- SCK → Digital Pin 13
- MOSI → Digital Pin 11
- MISO → Digital Pin 12
- RST → Digital Pin 9 (or any available digital pin)
For ESP32 Boards:
- VCC → 3.3V
- GND → GND
- SDA/SS → GPIO 5
- SCK → GPIO 18
- MOSI → GPIO 23
- MISO → GPIO 19
- RST → GPIO 21
For ESP8266 Boards:
- VCC → 3.3V
- GND → GND
- SDA/SS → D4 (GPIO 2)
- SCK → D5 (GPIO 14)
- MOSI → D7 (GPIO 13)
- MISO → D6 (GPIO 12)
- RST → D3 (GPIO 0)
- Download Arduino IDE: Visit arduino.cc and download the latest version
- Install Arduino IDE: Follow the installation instructions for your operating system
- Install Board Support (for ESP32/ESP8266):
- ESP32: Go to
File → Preferencesand addhttps://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.jsonto Additional Board Manager URLs - ESP8266: Go to
File → Preferencesand addhttp://arduino.esp8266.com/stable/package_esp8266com_index.jsonto Additional Board Manager URLs - Install ESP32/ESP8266 board support via
Tools → Board → Boards Manager
- ESP32: Go to
- Install Required Libraries: Open Arduino IDE and go to
Tools → Manage Libraries:- Search for "MFRC522v2" and install the latest version by GithubCommunity
- Search for "MFRC522" and install the latest version (backup option)
- Connect Board: Connect your microcontroller board to your computer via USB
- Select Board: In Arduino IDE, go to
Tools → Boardand select your board:- Arduino: Select your specific Arduino board (Uno, Nano, Mega, etc.)
- ESP32: Select your ESP32 board (DOIT DEVKIT V1, NodeMCU-32S, etc.)
- ESP8266: Select your ESP8266 board (NodeMCU 1.0, etc.)
- Select Port: Go to
Tools → Portand select the correct port:- Windows: COM3, COM4, etc.
- Linux/macOS:
/dev/ttyUSB0,/dev/ttyACM0, etc.
- Open Sketch: Open the
serialRFID.inofile in Arduino IDE - Upload: Click the upload button (→) or press
Ctrl+U(Windows/Linux) /Cmd+U(macOS)
Note: For ESP32/ESP8266, you may need to hold the BOOT button during upload if it fails initially.
The Arduino firmware provides:
- Read Mode: Automatically reads RFID cards and sends data via serial
- Write Mode: Accepts commands to write data to RFID cards
- Serial Communication: Uses 115200 baud rate for fast data transfer
- Error Handling: Provides authentication and read/write error messages
- Mode Switching: Responds to
START_WRITEcommand to switch modes
The Arduino communicates with the Python application using a specific protocol:
- Card Detection: Automatically detects when a card is placed on the reader
- Data Format:
START_CARD-{UUID}_CARRIED-{DATA}- UUID: 8-byte card identifier in hex format (e.g.,
04:A3:B6:2E:1F:8C:9D:7A) - DATA: 16-character string stored on the card (or "EMPTY" if no data)
- UUID: 8-byte card identifier in hex format (e.g.,
- Enter Write Mode: Send
START_WRITEcommand - Send Data: Send the text string to write (max 16 characters)
- Write to Card: Place card on reader to write the data
- Status Messages:
Data written successfully to cardFailed to write data to card
-
Port Not Found:
- Check USB connection
- Install Arduino drivers if needed
- Try different USB cable
- ESP32/ESP8266: Install CP210x or CH340 drivers if needed
-
Upload Fails:
- Verify correct board selection
- Check port selection
- Ensure no other program is using the port
- ESP32/ESP8266: Hold BOOT button during upload if it fails
-
RFID Module Not Working:
- Verify wiring connections
- Check power supply (3.3V required)
- Ensure proper library installation
- ESP32: Verify SPI pins are correctly assigned
- ESP8266: Check that pins don't conflict with boot mode
-
Communication Errors:
- Verify baud rate is set to 115200
- Check serial monitor settings
- Ensure no conflicting serial communication
- ESP32/ESP8266: Check that pins aren't used by other functions
-
Library Compatibility Issues:
- Use MFRC522v2 library for best compatibility
- Check library version compatibility with your board
- Refer to Random Nerd Tutorials ESP32 MFRC522 Guide for detailed setup
- Open Serial Monitor: In Arduino IDE, go to
Tools → Serial Monitor - Set Baud Rate: Ensure it's set to 115200
- Test Read: Place an RFID card on the reader - you should see output like:
START_CARD-04:A3:B6:2E:1F:8C:9D:7A_CARRIED-EMPTY - Test Write: Type
START_WRITEin serial monitor, then send test data, and place a card
Your microcontroller must be programmed to:
- Send card data in format:
START_CARD-{UUID}_CARRIED-{DATA} - Respond to
START_WRITEcommand for writing mode - Accept data strings for writing to cards
- Send success/failure messages for write operations
- Use 115200 baud rate for serial communication
- Random Nerd Tutorials ESP32 MFRC522 Guide: Comprehensive guide for ESP32 with MFRC522
- Arduino MFRC522 Library Documentation: Official library documentation
- ESP32 Arduino Core Documentation: ESP32 board support documentation
- Permission denied on Linux/macOS: Add your user to the
dialoutgroup - Port not found: Check device manager (Windows) or
ls /dev/tty*(Linux/macOS) - Keyboard output not working: Ensure pynput is installed and you have appropriate permissions