From 6c26f11034e1d713c5ad481761ec8bd6de3ea0b7 Mon Sep 17 00:00:00 2001 From: kormax <3392860+kormax@users.noreply.github.com> Date: Thu, 16 Apr 2026 18:34:58 +0300 Subject: [PATCH] Parse I2C protocol support for Mifare Prime GetVersion --- client/src/cmdhfmfdes.c | 6 +++++- client/src/cmdhfmfp.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index d56d5c71a..721b323f0 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -254,7 +254,7 @@ static char *getCardSizeStr(uint8_t fsize) { static char *getProtocolStr(uint8_t id, bool hw) { - static char buf[50] = {0x00}; + static char buf[64] = {0x00}; char *retStr = buf; if (id == 0x04) { @@ -264,6 +264,10 @@ static char *getProtocolStr(uint8_t id, bool hw) { snprintf(retStr, sizeof(buf), "0x%02X ( " _YELLOW_("ISO 14443-2, 14443-3") " )", id); else snprintf(retStr, sizeof(buf), "0x%02X ( " _YELLOW_("ISO 14443-3, 14443-4") " )", id); + } else if (id == 0x20) { + snprintf(retStr, sizeof(buf), "0x%02X ( " _YELLOW_("I2C") " )", id); + } else if (id == 0x25) { + snprintf(retStr, sizeof(buf), "0x%02X ( " _YELLOW_("I2C and ISO/IEC 14443-4") " )", id); } else { snprintf(retStr, sizeof(buf), "0x%02X ( " _YELLOW_("Unknown") " )", id); } diff --git a/client/src/cmdhfmfp.c b/client/src/cmdhfmfp.c index 27ee1e41e..96eb38f51 100644 --- a/client/src/cmdhfmfp.c +++ b/client/src/cmdhfmfp.c @@ -71,7 +71,7 @@ static char *getCardSizeStr(uint8_t fsize) { static char *getProtocolStr(uint8_t id, bool hw) { - static char buf[50] = {0x00}; + static char buf[64] = {0x00}; char *retStr = buf; if (id == 0x04) { @@ -81,6 +81,10 @@ static char *getProtocolStr(uint8_t id, bool hw) { snprintf(retStr, sizeof(buf), "0x%02X ( " _YELLOW_("ISO 14443-2, 14443-3") " )", id); else snprintf(retStr, sizeof(buf), "0x%02X ( " _YELLOW_("ISO 14443-3, 14443-4") " )", id); + } else if (id == 0x20) { + snprintf(retStr, sizeof(buf), "0x%02X ( " _YELLOW_("I2C") " )", id); + } else if (id == 0x25) { + snprintf(retStr, sizeof(buf), "0x%02X ( " _YELLOW_("I2C and ISO/IEC 14443-4") " )", id); } else { snprintf(retStr, sizeof(buf), "0x%02X ( " _YELLOW_("Unknown") " )", id); }