Skip to content

rfid-cli v2.0.0

Choose a tag to compare

@github-actions github-actions released this 10 Nov 00:56
· 4 commits to main since this release

RFID Access Control v2.0.0

This release replaces the Python CLI with rfid-cli, a Rust binary for
Windows, Linux and macOS, and ships firmware 1.2.0. The serial protocol and
users.bin format remain compatible with v1.0.1.

Highlights

  • rfid-cli replaces the Python CLI. One self-contained binary, no Python
    environment or pip install.
  • Faster bulk operations. Imports and syncs use raw binary records.
    --json-transport remains available as a fallback.
  • Firmware 1.2.0 fixes renewal dates, import recovery, UID handling and
    watchdog issues.
  • 51 automated tests cover the binary codec, validation, retries, import,
    export, sync and the interactive shell. CI runs them on Windows, Linux and
    macOS.

Downloads

The release contains CLI archives only. The firmware is built separately by
the firmware workflow.

Platform Archive
Windows 10/11 x64 rfid-cli-2.0.0-x86_64-pc-windows-msvc.zip
Linux x64 rfid-cli-2.0.0-x86_64-unknown-linux-gnu.tar.gz
macOS Apple silicon rfid-cli-2.0.0-aarch64-apple-darwin.tar.gz
macOS Intel rfid-cli-2.0.0-x86_64-apple-darwin.tar.gz

Each archive has a matching .sha256 file. Verify it before running the
binary. The binaries are not code-signed; see the installation guide for the
Windows and macOS first-run notes.

Upgrade notes

Python CLI users

The Python CLI was removed. Install rfid-cli from this release and replace
old commands like:

python cli.py status

with:

rfid-cli status

Most subcommand names are unchanged. Some flags and defaults differ:

  • export chooses JSON, CSV or binary from the file extension. The old CLI
    treated every non-.bin file as JSON.
  • convert SRC DST replaces the standalone convert.py.
  • sync preserves existing device dates for undated, non-admin entries. Use
    --restamp for the old behavior.
  • A failed automatic backup now aborts remove --force and import --clear.
  • Raw transfers are single-attempt; reconnect and retry after a stall.
  • import --dry-run works without a device.

Repository layout

The sketch is now firmware/firmware.ino. The Rust crate is in cli/, and the
host helper scripts are under firmware/. The old root-level firmware files and
python_cli/ are gone.

Firmware compatibility

rfid-cli 2.0.0 works with firmware 1.1.0, but the full feature set requires
1.2.0. In particular, firmware 1.1.0 does not have import_abort or the
continuous scan flag.

Firmware 1.2.0 keeps the existing database format. A pre-1.0.1 users.json is
still migrated automatically on first boot and kept as users.json.bak. No
data conversion is needed when upgrading from v1.0.1.

If you use the Python CLI, keep it on v1.0.1 and do not mix it with the new
workflow unless you have tested that combination. The current tool is
rfid-cli.

CLI changes

  • New convert subcommand for JSON, CSV and .bin conversion.
  • .csv export support.
  • sync --stats timing output and sync --restamp.
  • --backup-format ask|json|bin for remove --force and import --clear.
  • Global --baud, --verbose and --no-color; RFID_PORT and RFID_BAUD
    environment variables.
  • Progress bars, hidden Wi-Fi password input on a terminal, and TAB completion
    in the shell.
  • Offline import --dry-run, and the import capacity check now runs before
    --clear wipes anything.
  • remove --except refuses when none of the keep UIDs exist.
  • find --name runs on the device; older firmware falls back to list.
  • Device reports now include db_crc32, firmware and protocol versions.

Fixed in the CLI

  • sync no longer renews undated badges on every run.
  • Invalid dates, odd-length UIDs, nan validity and pre-1970 dates are rejected
    while parsing instead of crashing mid-import.
  • Non-JSON boot output no longer causes command resends.
  • Card events are queued instead of being mistaken for command replies.
  • Late replies to retried requests are drained.
  • rename no longer reports success for an unknown UID after a retry.
  • A failed import sends import_abort when firmware supports it.
  • A failed backup no longer allows a destructive wipe to continue.
  • Timezone offsets with a 30-minute component print correctly.

Firmware 1.2.0

  • Tag renewal uses the correct local date, refuses each card when NTP is not
    synced, skips admin badges, and reports failures with the UID.
  • import_bin and sync_apply allocate before sending the raw-transfer ok
    line, so an allocation failure cannot be mistaken for a successful setup.
  • import_abort and a two-minute idle timeout recover the reader after a host
    disappears mid-import.
  • list and find_name preserve fractional valid_days instead of rounding
    them to two decimals.
  • removeAllExcept sorts the keep list, uses binary search, and feeds the
    watchdog.
  • Offline timezone changes are applied immediately.
  • The PN532 UID buffer handles 10-byte triple-size UIDs.
  • Continuous scan mode no longer counts a card presented between re-arms as an
    access attempt.

Requirements

  • Prebuilt CLI: none beyond the matching platform.
  • Building the CLI: Rust 1.90 or newer.
  • Firmware: Arduino IDE 2.x or arduino-cli, ESP32 board package 3.x,
    Adafruit PN532, LiquidCrystal I2C, and ArduinoJson 7.x.

Verification

  • cargo +1.90.0 test --locked: 51 passed.
  • cargo +stable test --locked: 51 passed.
  • cargo +1.90.0 build --release --locked: passed.
  • Firmware compiles in CI for the ESP32-S3.
  • The firmware diff applies cleanly to the 1.1.0 sources under firmware/.

The CLI tests use an in-memory firmware simulator. Card reads, renewal, scan,
import and sync should still be smoke-tested on the target board before
deployment.

Known limitations

  • Replies do not carry a request ID. Retry safety relies on idempotency rules
    and the post-retry drain.
  • import --json-transport is much slower than the binary path.
  • The firmware checks binary record shape and CRC, but not calendar dates. Use
    the CLI or validate generated files before importing them.

Documentation

Full Changelog: v1.0.1...v2.0.0