Releases: Hyacinthe-primus/RFID_Access_Control
Release list
RFID Access Control v1.0.1
RFID Access Control v1.0.1
Bug-fix and performance release. No breaking changes to the on-disk data your users already have, existing users.json databases migrate automatically on first boot. The serial baud rate changed (921600 → 2000000): update the Python CLI alongside the firmware, or commands will get garbled output.
Highlights
- User database format switched from JSON to a fixed-width binary format (
users.bin) -- imports, exports, and saves are dramatically faster, with per-record and whole-database CRC32 integrity checks. - New
synccommand: makes the device match a local file exactly via a remove/add/replace diff, instead of import's additive-or-destructive model. - User limit raised 10,000 → 70,000 entries.
- Five real crash/reboot bugs fixed, including two device reboots that only showed up at high user counts.
Bug Fixes
save()no-file crash window: a power loss mid-save could leave the device with no database file at all. Finalization is now a single atomic rename with pre-write CRC verification, instead of remove-then-rename.save()stack overflow: the flush buffer moved from an 8KB stack array (which alone nearly exhausted the 8KB loop task stack) to a PSRAM heap allocation.- TWDT reboot every ~10.25s:
loop()never fed the Task Watchdog Timer once subscribed. Fixed withesp_task_wdt_reset()at the top ofloop(). listreboots the device above ~15,000 users: streaming the full list in oneloop()iteration could outrun the watchdog timeout. Fixed by resetting the watchdog every 256 users during the stream.removeUser()build error on some cores:fs::File::truncate()doesn't exist on this toolchain. Removal now falls back to a full rewrite instead of failing to compile.import/export.binhandling:.binfiles were silently misparsed as CSV on import, and.binexports were missing their 7-byte header and failed to re-import. Both fixed and verified round-trip clean.
New Features
synccommand – device-side manifest diff (uid + per-record CRC32), one binary transfer for the whole delta, finaldb_crc32comparison to confirm the databases actually match.- Binary user database (
users.bin) replacing NDJSON, with automatic migration from existingusers.json(kept as.bak). - Sorted array + targeted saves –
users_stays physically sorted by UID; rename/renew get a true single-record write,addUser()rewrites only the suffix from the insertion point. - Raw binary import/export sub-protocol (
import_bin/export_bin) – no JSON framing or parsing for bulk transfers. CLI uses this by default;--json-transportfalls back to the old pipeline. - CRC32 fingerprint skip – re-importing a file the device already has now skips the transfer and save entirely.
find --uid(O(log n) binary search, device-side) andfind --name(device-side substring match); only matching records cross serial.- Backup format prompt –
remove --forceandimport --clearnow ask for JSON or.binbefore wiping;--no-backupskips it. - File encoding fallback for import (utf-8-sig → cp1252 → latin-1), fixing failures on Excel-exported CSVs from Windows/French locales.
Changed
- User limit: 10,000 → 70,000 entries (PSRAM-backed allocator).
- Serial baud rate: 921,600 → 2,000,000. Update the CLI alongside the firmware.
- Line buffer: 4096 → 16384 bytes, supporting ~100 users per
batch_addline. - Batch import size: 15 → 100 users per round-trip.
- CLI boot-wait timeout: 15s → 45s, covering first-boot
LittleFS.format()on the 12MB partition. partitions.csv: coredump partition added (64KB).
Python CLI
Now 17 subcommands (added sync). All existing v1.0.0 commands are unchanged in behavior; import/export default to the faster binary transport automatically.
Requirements
Same as v1.0.0 – Arduino IDE 2.x, ESP32 board package v3.x, Adafruit PN532, LiquidCrystal I2C, ArduinoJson v7.x, Python 3.9+. prompt-toolkit and rich remain required for the interactive shell.
Full diff: see CHANGELOG for complete technical detail on every fix and feature above.
Full Changelog: v1.0.0...v1.0.1
RFID Access Control v1.0.0
RFID Access Control v1.0.0
First stable release of the standalone ESP32-S3 RFID access controller. Runs fully offline (no PC required); a Python CLI is included for administration.
Hardware
- ESP32-S3 dev board (8MB Octal PSRAM, 16MB Flash)
- PN532 NFC/RFID module, hardware SPI mode
- 16x2 I2C LCD (PCA8574 backpack, address
0x27or0x3F) - Passive buzzer on GPIO 6 (PWM tone feedback)
- Wi-Fi (2.4GHz) for NTP time sync
Core Features
- User database up to 10,000 entries, PSRAM-backed allocator
- Expiration checking against NTP-synced clock (
registered+valid_days) - Fail-safe behavior: every card denied with "No Time Sync" if NTP hasn't synced
- Admin badges: no expiration, work even without NTP sync
- Audible feedback: ascending tone on grant, descending tone on deny
- Anti-brute-force lockout after
MAX_CONSECUTIVE_DENIALSconsecutive denials, configurableLOCKOUT_DURATION_MS - Wi-Fi provisioning and timezone (offset + DST) configurable at runtime via CLI, no reflash needed
- Newline-delimited JSON serial protocol at 921600 baud
Python CLI (17 subcommands)
- User management:
add,remove(incl.--force,--except),rename,find,list - Batch import/export (JSON or CSV), with
--dry-runand--clear - Automatic timestamped backup before any destructive operation
- Tag renewal mode:
tag-renewwith quota control - UID scan mode:
scan,scan --infinite - Device diagnostics:
status,netstatus,ntp-time,ntp-sync - Port auto-detection with manual override (
--port,list-ports)
Storage
- LittleFS + newline-delimited JSON
- Custom 16MB partition layout, 12MB LittleFS cap
Requirements
- Arduino IDE 2.x, ESP32 board package v3.x
- Libraries: Adafruit PN532, LiquidCrystal I2C, ArduinoJson v7.x
- Python 3.9+ for the CLI