From 2a054438ab2db50f3b40c4be9a8134eed51911e5 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 1 Aug 2019 12:16:33 -0400 Subject: [PATCH] chg: 'hf thinfilm info' - fixed manufacture lookup --- client/cmdhf14a.c | 2 +- client/cmdhfthinfilm.c | 4 +++- client/cmdhfthinfilm.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/cmdhf14a.c b/client/cmdhf14a.c index 0b3749590..d46e9ba07 100644 --- a/client/cmdhf14a.c +++ b/client/cmdhf14a.c @@ -73,7 +73,7 @@ static const manufactureName manufactureMapping[] = { { 0x34, "Mikron JSC Russia" }, { 0x35, "Fraunhofer Institute for Photonic Microsystems Germany" }, { 0x36, "IDS Microchip AG Switzerland" }, - { 0x37, "Kovio USA" }, + { 0x37, "Thinfilm - Kovio USA" }, { 0x38, "HMT Microelectronic Ltd Switzerland" }, { 0x39, "Silicon Craft Technology Thailand" }, { 0x3A, "Advanced Film Device Inc. Japan" }, diff --git a/client/cmdhfthinfilm.c b/client/cmdhfthinfilm.c index bf2260902..9bd8eb3bb 100644 --- a/client/cmdhfthinfilm.c +++ b/client/cmdhfthinfilm.c @@ -27,7 +27,9 @@ static int usage_thinfilm_info(void) { // https://github.com/nfc-tools/libnfc/blob/master/utils/nfc-barcode.c static int print_barcode(uint8_t *barcode, const size_t barcode_len, bool verbose) { - PrintAndLogEx(SUCCESS, " Manufacturer : "_YELLOW_("%s") "[0x%02X]", (barcode[0] == 0xB7) ? "Thinfilm" : "unknown", barcode[0]); + // remove start bit + uint8_t mb = barcode[0] & ~0x80; + PrintAndLogEx(SUCCESS, " Manufacturer : "_YELLOW_("%s") "[0x%02X]", getTagInfo(mb), mb); if (verbose) { PrintAndLogEx(SUCCESS, " Data format : "_YELLOW_("%02X"), barcode[1]); diff --git a/client/cmdhfthinfilm.h b/client/cmdhfthinfilm.h index defe674aa..ed2b0dd89 100644 --- a/client/cmdhfthinfilm.h +++ b/client/cmdhfthinfilm.h @@ -20,6 +20,7 @@ #include "cmdparser.h" #include "util.h" #include "cmdhf.h" // list cmd +#include "cmdhf14a.h" // manufacture int infoThinFilm(bool verbose);