From 10d8ae13cac4644756b21d60774dbdbd3e2e45dc Mon Sep 17 00:00:00 2001 From: ry4000 <154689120+ry4000@users.noreply.github.com> Date: Tue, 26 Nov 2024 18:08:48 +1100 Subject: [PATCH 1/3] R&Y: Added GRB Tap-N-Go to aid_desfire.json - Added GRB Tap-N-Go F21201 and F21202 to aid_desfire.json. Thank you. -R&Y. Signed-off-by: ry4000 <154689120+ry4000@users.noreply.github.com> --- client/resources/aid_desfire.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/client/resources/aid_desfire.json b/client/resources/aid_desfire.json index 565c51b0e..53cb47992 100644 --- a/client/resources/aid_desfire.json +++ b/client/resources/aid_desfire.json @@ -1151,6 +1151,22 @@ "Description": "FIDs 02: Card Balance; 04: Refill History; 08: Card Information; 0E: Trip History", "Type": "transport" }, + { + "AID": "F21201", + "Vendor": "Green Bay Metro Transit via Genfare", + "Country": "US", + "Name": "Tap-N-Go Card (GRB)", + "Description": "GRB Tap-N-Go Card", + "Type": "transport" + }, + { + "AID": "F21202", + "Vendor": "Green Bay Metro Transit via Genfare", + "Country": "US", + "Name": "Tap-N-Go Card (GRB)", + "Description": "GRB Tap-N-Go Card", + "Type": "transport" + }, { "AID": "F21360", "Vendor": "INIT", From f0b93405fa12299c37d86db8d566dc246c266dda Mon Sep 17 00:00:00 2001 From: douniwan5788 Date: Wed, 27 Nov 2024 00:01:15 +0800 Subject: [PATCH 2/3] fix Hitag S concatbits and `lf em 410x clone --hts` --- client/src/cmdlfem410x.c | 1 + common/commonutil.c | 4 ++-- include/hitag.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/src/cmdlfem410x.c b/client/src/cmdlfem410x.c index ebcd9ee8c..10ad41369 100644 --- a/client/src/cmdlfem410x.c +++ b/client/src/cmdlfem410x.c @@ -732,6 +732,7 @@ static int CmdEM410xClone(const char *Cmd) { packet.cmd = HTSF_82xx; memcpy(packet.pwd, "\xBB\xDD\x33\x99", HITAGS_PAGE_SIZE); + packet.mode = HITAGS_UID_REQ_FADV; SendCommandNG(CMD_LF_HITAGS_WRITE, (uint8_t *)&packet, sizeof(packet)); if (WaitForResponseTimeout(CMD_LF_HITAGS_WRITE, &resp, 4000) == false) { PrintAndLogEx(WARNING, "timeout while waiting for reply."); diff --git a/common/commonutil.c b/common/commonutil.c index ad867be86..7ed34067f 100644 --- a/common/commonutil.c +++ b/common/commonutil.c @@ -554,8 +554,8 @@ size_t concatbits(uint8_t *dest, int dest_offset, const uint8_t *src, int src_of end = nbits; step = 1; } else { - i = nbits; - end = 0; + i = nbits - 1; + end = -1; step = -1; } diff --git a/include/hitag.h b/include/hitag.h index 451952ce4..e63b8c448 100644 --- a/include/hitag.h +++ b/include/hitag.h @@ -161,7 +161,7 @@ typedef struct { uint8_t logdata_1[4]; uint8_t nonce[4]; - //Hitag s section + // Hitag S section uint8_t mode; } PACKED lf_hitag_data_t; From 639f16ba3b0f43e6f6766474523b0b9b7c38b184 Mon Sep 17 00:00:00 2001 From: ANTodorov Date: Thu, 28 Nov 2024 10:55:54 +0200 Subject: [PATCH 3/3] added JEDEC information for SPI flash W25Q64JV added some "extrapolated" but logical matches by Manufacturer/Device ID only some reordering --- CHANGELOG.md | 1 + common_arm/flashmem.h | 41 +++++++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdfab6688..b4afc52ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] +- Added JEDEC information for SPI flash W25Q64JV (@ANTodorov) - Added special iclass legacy config cards in `hf iclass configcard` (@antiklesys) - Added simulation function to `hf iclass legrec` (@antiklesys) diff --git a/common_arm/flashmem.h b/common_arm/flashmem.h index b28989646..616575e49 100644 --- a/common_arm/flashmem.h +++ b/common_arm/flashmem.h @@ -146,28 +146,33 @@ typedef struct { static const spi_flash_t SpiFlashTable[] = { // first element is the default of 4 * 64kB pages (256kB) - { 0x00, 0x00, 0x0000, 4, "unknown" }, // 256k + { 0x00, 0x00, 0x0000, 4, "unknown" }, // 256k // Manufacturer: Puya - { 0x85, 0x00, 0x6015, 32, "P25Q16H" }, // 2048k - /// Manufacturer: Renesas - { 0x1F, 0x46, 0x0000, 32, "AT25XE161D" }, // 2048k - { 0x1F, 0x47, 0x0000, 64, "AT25XE321D" }, // 4096k + { 0x85, 0x14, 0x6015, 32, "P25Q16H" }, // 2048k // Manufacturer: Winbond - { 0xEF, 0x00, 0x3012, 4, "W25X20BV" }, // 256k - { 0xEF, 0x00, 0x3013, 8, "W25X40BV" }, // 512k + { 0xEF, 0x00, 0x3012, 4, "W25X20BV" }, // 256k + { 0xEF, 0x00, 0x3013, 8, "W25X40BV" }, // 512k - { 0xEF, 0x00, 0x4013, 8, "W25Q40BV" }, // 512k - { 0xEF, 0x00, 0x4014, 16, "W25Q80BV" }, // 1024k - { 0xEF, 0x14, 0x4015, 32, "W25Q16BV" }, // 2048k - { 0xEF, 0x15, 0x4016, 64, "W25Q32BV" }, // 4096k + { 0xEF, 0x00, 0x4013, 8, "W25Q40BV" }, // 512k + { 0xEF, 0x00, 0x4014, 16, "W25Q80BV" }, // 1024k + { 0xEF, 0x14, 0x4015, 32, "W25Q16BV" }, // 2048k + { 0xEF, 0x15, 0x4016, 64, "W25Q32BV" }, // 4096k - { 0xEF, 0x21, 0x7022, 4, "W25Q02JV" }, - // identified by Manufacturer /Device ID -// { 0xEF, 0x05, 0x0000, 1, "Winbond!!!" }, - { 0xEF, 0x10, 0x0000, 2, "W25*10BV!!!" }, // 128k - { 0xEF, 0x11, 0x0000, 4, "W25*20BV" }, // 256k - { 0xEF, 0x12, 0x0000, 8, "W25*40BV" }, // 512k - { 0xEF, 0x13, 0x0000, 16, "W25*80BV" } // 1024k + { 0xEF, 0x16, 0x7017, 128, "W25Q64JV" }, // 8192k + { 0xEF, 0x21, 0x7022, 4, "W25Q02JV" }, + + // identified by Manufacturer /Device ID only + /// Manufacturer: Renesas + { 0x1F, 0x46, 0x0000, 32, "AT25XE161D" }, // 2048k + { 0x1F, 0x47, 0x0000, 64, "AT25XE321D" }, // 4096k +// { 0xEF, 0x05, 0x0000, 1, "Winbond!!!" }, // 64k (too small !!!) + { 0xEF, 0x10, 0x0000, 2, "W25*10BV!" }, // 128k (small !!!) + { 0xEF, 0x11, 0x0000, 4, "W25*20BV" }, // 256k + { 0xEF, 0x12, 0x0000, 8, "W25*40BV" }, // 512k + { 0xEF, 0x13, 0x0000, 16, "W25*80BV" }, // 1024k + { 0xEF, 0x14, 0x0000, 32, "W25*16*" }, // 2048k + { 0xEF, 0x15, 0x0000, 64, "W25*32*" }, // 4096k + { 0xEF, 0x16, 0x0000, 128, "W25*64*" } // 8192k }; extern uint8_t spi_flash_pages64k;