flipperzero-firmware
flipperzero-firmware copied to clipboard
NFC Plugin Interface Expansions
Describe the enhancement you're suggesting.
Would there be interest in expanding the scope of NFC plugins? read
, verify
, and parse
cover the base cases of course, but it's easy to imagine instances where one might wish to implement custom subscenes (eg, a better organized parse
for cards with lots of data, rather than just one very long FuriString
, like nfc_scene_emv_more_info
) or custom submenu items for write / edit capabilities (eg, editing card values with the aid of known fields / field types / lookup values / etc).
All of the above is of course achievable with custom, separate FAPs, but feels inelegant to have no way to integrate. Few possible integration approaches would be:
- Addition of an optional
fap
field to the existingNfcSupportedCardsPlugin
interface, linking a fully custom FAP (defined locally or as an EXT fap) that replaces / reimplements thenfc_scene_saved_menu
and anything deeper into the menus. Exits back to NFC app. Most flexible, but maximal flexibility may not be desired for something intended as part of amain
app. - Addition of dynamically attached menu item scenes, a la
nfc_protocol_support
'snfc_protocol_has_feature
branched menu logic, just with custom feature / submenu entry names. A middle road between a custom linked FAP for all specific-plugin-card logic, and completely prescribed scenes / methods. Would eliminate some duplicated code a fully custom FAP-per-expanded-NFC-plugin would call for. - A prescriptive format for the above additional use cases (expanded parsed output & custom write/edit methods), a la some unifying framework for specifying fields / field types / field value mappings for the sake of both parsing into sub-scenes & editing, as enabled / specified for each field designated. The most labor intensive, but would keep plugins the most "containerized" & uniform in format and scope.
Anything else?
No response
I'd say that in general we don't want to overload NFC app with niche stuff. Specialized actions should go to specialized apps. Plugins for NFC solves very specific subset of problems and it make no sense to overcomplicate their interface.
@gornekich what do you think?