feat(standalone): add standalone modes#432
Open
nieldk wants to merge 10 commits into
Open
Conversation
Fix indentation in exception handling block and remove commented-out code.
Pluggable framework letting the device run workflows without a
connected host - arm with both-button chord, single-button
SettingsButtonFunction config unaffected. Persists selected mode and
per-mode config in FDS (file 0x1010). Seven host commands at CMD
7000-7006 plus a 'standalone' CLI subgroup.
First two modes:
- authtrace: multi-session HF14A reader auth-trace capture,
thin wrapper over the existing CMD 2017 machinery (refactored
to expose hf14a_auth_trace_run() for reuse)
- slot_cycle: timed emulation-slot rotation, no tag interaction
WIP - testing locally before splitting into atomic commits for PR.
…quires the RC522. Framework, slot_cycle, and CLI all build clean on Lite; attempting to select authtrace on Lite returns STATUS_PAR_ERR at runtime.
Built artifacts for commit 5aaf62bFirmwareClient |
Added descriptions for arm, trigger, and disarm gestures.
- CONTRIBUTING_STANDALONE.md: developer guide covering step-by-step mode registration, callback contract, hardware constraints (antenna ownership, FDS alignment, Lite compatibility), and a testing checklist. - mode_template.c: copy-and-fill skeleton for new modes with inline TODO markers and design rule documentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a pluggable framework for running workflows on the device without a
connected host. Configure once over USB/BLE, arm with a both-button chord,
capture/operate using physical buttons, retrieve results when reconnected.
authtrace, multi-session HF14A reader-side auth-trace capture. Thin
wrapper over the existing CMD 2017 machinery;
cmd_processor_hf14a_auth_traceis refactored to expose
hf14a_auth_trace_run()as a reusable function.slot_cycle, timed emulation-slot rotation. Reference implementation
for the
standalone_mode_iface_tcontract; no tag interaction.Chord vocabulary only. Single-button A/B short/long is already owned by
SettingsButtonFunction(CycleSlot, CloneIcUid, etc.).Standalone uses both-short (primary), both-long (arm/disarm toggle),
both-vlong (destructive).
Pre-existing button bug fixed as a side effect. The GPIOTE handler
shares a single debounce timer between buttons A and B; when both change
state within the ~50ms debounce window, only the second event's flag gets
updated. Latent bug, no upstream feature exercised simultaneous-press.
Fixed in
timer_button_event_handlevia a rescue path that samples theother pin's level after the per-pin code. Single-button behavior
unchanged. .
FDS file ID
0x1010, state at key0x0001, per-mode config at0x0100 + mode_id. No collision with existing IDs.Mode IDs are persisted —
STANDALONE_MODE_*enum values must beappended, not renumbered.
CMD IDs 7000–7006 for the seven host commands. Clean range above
the existing 6005.
STANDALONE_FLAG_HOST_OPTED_INgates modes with destructivecapabilities. Reserved for future autoclone/read_replay; neither shipped
mode needs it.
Verified on Ultra v2.1.0:
authtrace sessions against a MIFARE Classic 1K
Three reserved mode IDs (
autoclone,read_replay,dict_check) aredeclared but not implemented.