How agg-kantas/rfid-unlocker works
RFID Unlocker scans a card on a Pico, sends its UID as an integer over USB serial, and has a Linux daemon compare that value with an authorized UID before requesting the current session be unlocked. The graph separates the reader driver, scan-and-emit stage, daemon control loop, comparison, and unlock action. The README documents the cross-device serial workflow; source excerpts show the local calls and command. The systemd service file is omitted because it configures deployment rather than implementing the product workflow.
Main entry points: unlocker.py Daemon loop · main.py Scan and emit UID · mfrc522.py MFRC522 driver
Components 9
Pico scanning
- MFRC522 driver
pico/mfrc522.py - Scan and emit UID
pico/main.py
Host daemon
- Daemon loop
daemon/unlocker.py - Read serial UID
daemon/unlocker.py - Compare authorized UID
daemon/unlocker.py
Session unlock
- Request session unlock
daemon/unlocker.py
Other components
- RFID card
- RC522 reader
- Linux login session
Connections 9
- RFID card → RC522 reader: tapped at
README.md - Scan and emit UID → MFRC522 driver: calls reader API
pico/main.py - MFRC522 driver → RC522 reader: communicates via SPI
README.md - Scan and emit UID → Read serial UID: sends UID over USB serial
README.md - Daemon loop → Read serial UID: reads line
daemon/unlocker.py - Daemon loop → Compare authorized UID: calls compare
daemon/unlocker.py - Daemon loop → Request session unlock: calls unlock
daemon/unlocker.py - Compare authorized UID → Request session unlock: sets authorization state
daemon/unlocker.py - Request session unlock → Linux login session: runs loginctl unlock
daemon/unlocker.py