Skip to content

Installation

Hyacinthe-primus edited this page Nov 10, 2026 · 4 revisions

Installation

The CLI and the firmware are independent. You can install the host tool first, flash the board first, or do both at once.

CLI

Prebuilt binary

Download the archive for your platform from the Releases page and put rfid-cli somewhere on your PATH. Each archive has a .sha256 file next to it.

Archive Platform
rfid-cli-<version>-x86_64-pc-windows-msvc.zip Windows 10/11, 64-bit
rfid-cli-<version>-x86_64-unknown-linux-gnu.tar.gz Linux, 64-bit
rfid-cli-<version>-aarch64-apple-darwin.tar.gz macOS on Apple silicon
rfid-cli-<version>-x86_64-apple-darwin.tar.gz macOS on Intel

The binaries are not code-signed. Windows SmartScreen may show a warning on first launch; choose "More info" and then "Run anyway". macOS quarantines downloaded binaries; clear the flag with xattr -d com.apple.quarantine rfid-cli, or build the binary yourself.

The Linux archive is built on Ubuntu 22.04. It needs libudev at runtime. If the binary reports a missing library or fails on an older distribution, build from source against that system.

Build from source

You need Rust 1.90 or newer. Install it from rustup.rs, then:

git clone https://github.com/Hyacinthe-primus/RFID_Access_Control.git
cd RFID_Access_Control/cli
cargo build --release --locked

The binary is target/release/rfid-cli (rfid-cli.exe on Windows). To install it on your PATH instead, run cargo install --path . --locked.

Per-platform build requirements:

Windows. Install the Visual Studio C++ Build Tools. The Rust installer offers to do this on first use.

Linux. Port enumeration needs libudev headers:

sudo apt install libudev-dev pkg-config              # Debian, Ubuntu
sudo dnf install systemd-devel pkgconf-pkg-config    # Fedora
sudo pacman -S systemd pkgconf                       # Arch

macOS. xcode-select --install is enough for the build.

Serial access

The board appears as a USB serial port. Which name it gets depends on the USB bridge: CP210x, CH340/CH343, or the ESP32-S3's native USB.

System Port names Setup
Windows COM5 and similar Install the CP210x or CH34x driver if no port appears
Linux /dev/ttyUSB0, /dev/ttyACM0 Add yourself to dialout (uucp on Arch), then log out and back in
macOS /dev/cu.usbserial-*, /dev/cu.usbmodem*, /dev/cu.wchusbserial* CH34x driver on older macOS versions; use the cu. device, not tty.

Check what the CLI sees:

rfid-cli list-ports

The port tagged as an ESP32 is the one auto-detection chooses. If nothing is found, pass the port explicitly or set RFID_PORT:

$env:RFID_PORT = "COM5"    # current PowerShell session
setx RFID_PORT COM5        # persistent; takes effect in new terminals
export RFID_PORT=/dev/ttyUSB0   # Linux, macOS

Use the UART bridge connector, not the native USB port. The firmware is built with USB CDC On Boot: Disabled, so the CLI talks to the bridge.

Firmware

You need the Arduino toolchain, the ESP32 board package (3.x works), and these libraries:

  • Adafruit PN532
  • LiquidCrystal I2C by Frank de Brabander
  • ArduinoJson 7.x

Arduino IDE 2.x

Install the IDE from arduino.cc. In File > Preferences, add this URL to "Additional boards manager URLs":

https://espressif.github.io/arduino-esp32/package_esp32_index.json

Install esp32 by Espressif Systems from Boards Manager, then install the three libraries from Library Manager. The board options and upload steps are on Firmware Setup.

arduino-cli

Install arduino-cli. On Linux and macOS, the setup script installs the ESP32 core and libraries:

./firmware/uploader.sh --setup

On Windows, configure arduino-cli once by hand:

arduino-cli config init
arduino-cli config add board_manager.additional_urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
arduino-cli core update-index
arduino-cli core install esp32:esp32
arduino-cli lib install "Adafruit PN532" "LiquidCrystal I2C" "ArduinoJson@7.2.1"

After that, use uploader.ps1 on Windows or uploader.sh on Linux and macOS. See Firmware Setup for the exact commands.

Clone this wiki locally