From 2ed0c90e36dcbb3f4afd69b5e203ef6fe177a26c Mon Sep 17 00:00:00 2001 From: WillyJL <49810075+WillyJL@users.noreply.github.com> Date: Sat, 10 May 2025 01:16:06 +0100 Subject: [PATCH] CLI: Fix temporary `nfc apdu` command iso15693-3 poller is not exposed to api so wont work with cli also this command is temporary and will be replaced with full nfc cli so it doesnt matter much also apdus arent found on iso15693-3 that often --- CHANGELOG.md | 1 + applications/main/nfc/nfc_cli.c | 19 ++----------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22254914a..c31e51f59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Fix crash when opening CLI/qFlipper/WebUpdater if some unexpected files are present in `/ext/apps_data/cli/plugins` (by @WillyJL) - FIx crash with `ir universal` command (by @WillyJL) - Fix crash with `date` command (by @WillyJL) + - Fix temporary `nfc apdu` command (by @WillyJL) - OFW: Fix subghz chat command (by @GameLord2011) - BadKB: Fix key combos main keys being case sensitive (by @WillyJL) - Sub-GHz: diff --git a/applications/main/nfc/nfc_cli.c b/applications/main/nfc/nfc_cli.c index 5b54d38db..2b4cdf6d3 100644 --- a/applications/main/nfc/nfc_cli.c +++ b/applications/main/nfc/nfc_cli.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include @@ -15,13 +14,12 @@ #define FLAG_EVENT (1 << 10) #define NFC_MAX_BUFFER_SIZE (256) -#define NFC_BASE_PROTOCOL_MAX (3) +#define NFC_BASE_PROTOCOL_MAX (2) #define POLLER_DONE (1 << 0) #define POLLER_ERR (1 << 1) static NfcProtocol BASE_PROTOCOL[NFC_BASE_PROTOCOL_MAX] = { NfcProtocolIso14443_4a, - NfcProtocolIso14443_4b, - NfcProtocolIso15693_3}; + NfcProtocolIso14443_4b}; typedef struct ApduContext { BitBuffer* tx_buffer; BitBuffer* rx_buffer; @@ -88,19 +86,6 @@ static NfcCommand trx_callback(NfcGenericEvent event, void* context) { furi_thread_flags_set(apdu_context->thread_id, POLLER_ERR); return NfcCommandStop; } - } else if(NfcProtocolIso15693_3 == event.protocol) { - Iso15693_3Error err = iso15693_3_poller_send_frame( - event.instance, - apdu_context->tx_buffer, - apdu_context->rx_buffer, - ISO15693_3_FDT_POLL_FC); - if(Iso15693_3ErrorNone == err) { - furi_thread_flags_set(apdu_context->thread_id, POLLER_DONE); - return NfcCommandContinue; - } else { - furi_thread_flags_set(apdu_context->thread_id, POLLER_ERR); - return NfcCommandStop; - } } else { // should never reach here furi_crash("Unknown protocol");