From 9b5dfc2708dc690269e6d1790d8b0ead3984d48f Mon Sep 17 00:00:00 2001 From: Federico Cerutti Date: Thu, 27 Dec 2018 00:16:34 +0100 Subject: [PATCH] Updated EM4233 header and example dump We thought that the user had access to 64 blocks, while in EM4233 factsheet it's stated that only 52 blocks are available --- Dumps/EM4233_example.dmp | Bin 352 -> 292 bytes Firmware/Chameleon-Mini/Application/EM4233.h | 23 ++++++++---------- .../Chameleon-Mini/Application/ISO15693-A.h | 5 +--- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Dumps/EM4233_example.dmp b/Dumps/EM4233_example.dmp index e9f4caaa5851d6022b8c6f217498f1dc7ec28296..4387c6ee17d99fcb848b2ae1fbf8e97a322d9b3d 100644 GIT binary patch delta 13 UcmaFBw1jEGg-MJqlLHt904Cc6v;Y7A delta 65 hcmZ3&^nhu?1p_5CV2lPB(7?nCE)zfSOcr4j006ZA3{wCA diff --git a/Firmware/Chameleon-Mini/Application/EM4233.h b/Firmware/Chameleon-Mini/Application/EM4233.h index e1d370b..a7efbee 100644 --- a/Firmware/Chameleon-Mini/Application/EM4233.h +++ b/Firmware/Chameleon-Mini/Application/EM4233.h @@ -11,25 +11,24 @@ #include "Application.h" #define EM4233_STD_UID_SIZE ISO15693_GENERIC_UID_SIZE -#define EM4233_STD_MEM_SIZE 208 // Bytes +#define EM4233_STD_MEM_SIZE 0xD0 // Bytes #define EM4233_BYTES_PER_BLCK 0x04 #define EM4233_BLCKS_PER_PAGE 0x04 #define EM4233_NUMBER_OF_BLCKS ( EM4233_STD_MEM_SIZE / EM4233_BYTES_PER_BLCK ) #define EM4233_NUMBER_OF_PAGES ( EM4233_STD_MEM_SIZE / (EM4233_BYTES_PER_BLCK * EM4233_BLCKS_PER_PAGE) ) -#define EM4233_IC_REFERENCE 0x02 +#define EM4233_IC_REFERENCE 0x02 // From EM4233SLIC datasheet and checked against real tags -#define EM4233_USR_MEM_SIZE 64 // Bytes, guessed, not described anywere -#define EM4233_MEM_UID_ADDRESS 0x0100 // From 0x0100 to 0x0107 - UID -#define EM4233_MEM_AFI_ADDRESS 0x0108 // AFI byte address -#define EM4233_MEM_DSFID_ADDRESS 0x0109 // DSFID byte adress -#define EM4233_MEM_INF_ADDRESS 0x010C // Some status bits +#define EM4233_MEM_UID_ADDRESS 0xD0 // From 0x0100 to 0x0107 - UID +#define EM4233_MEM_AFI_ADDRESS 0xD8 // AFI byte address +#define EM4233_MEM_DSFID_ADDRESS 0xD9 // DSFID byte adress +#define EM4233_MEM_INF_ADDRESS 0xDC // Some status bits -#define EM4233_MEM_LSM_ADDRESS 0x0110 // From 0x0108 to 0x0149 - Lock status masks -#define EM4233_MEM_PSW_ADDRESS 0x0150 // From 0x0150 to 0x0153 - Password -#define EM4233_MEM_KEY_ADDRESS 0x0154 // From 0x0120 to 0x0127 - Encryption Key +#define EM4233_MEM_LSM_ADDRESS 0xE0 // From 0xE0 to 0x0113 - Lock status masks +#define EM4233_MEM_PSW_ADDRESS 0x0114 // From 0x0114 to 0x0117 - 32 bit Password +#define EM4233_MEM_KEY_ADDRESS 0x0118 // From 0x0118 to 0x0123 - 96 bit Encryption Key -#define EM4233_SYSINFO_BYTE 0x0F // DSFID - AFI - VICC mem size - IC ref are present +#define EM4233_SYSINFO_BYTE 0x0F // == DSFID - AFI - VICC mem size - IC ref are present /* Bit masks */ #define EM4233_MASK_READ_PROT ( 1 << 2 ) // For lock status byte @@ -37,8 +36,6 @@ #define EM4233_MASK_AFI_STATUS ( 1 << 0 ) #define EM4233_MASK_DSFID_STATUS ( 1 << 1 ) -#define EM4233_TOT_MEM_SIZE ( EM4233_STD_MEM_SIZE + EM4233_USR_MEM_SIZE ) - /* Custom command code */ #define EM4233_CMD_SET_EAS 0xA2 #define EM4233_CMD_RST_EAS 0xA3 diff --git a/Firmware/Chameleon-Mini/Application/ISO15693-A.h b/Firmware/Chameleon-Mini/Application/ISO15693-A.h index afe6691..2d43f6b 100644 --- a/Firmware/Chameleon-Mini/Application/ISO15693-A.h +++ b/Firmware/Chameleon-Mini/Application/ISO15693-A.h @@ -72,10 +72,7 @@ #define ISO15693_CRC16_POLYNORMAL 0x8408 #define ISO15693_CRC16_PRESET 0xFFFF -/* - * The byte used for the lock status has its bits addressed as follow: - * - */ +/* The lock status byte has bits assigned as follow */ #define ISO15693_MASK_UNLOCKED ( 0 << 0 ) #define ISO15693_MASK_USER_LOCK ( 1 << 0 ) #define ISO15693_MASK_FACTORY_LOCK ( 1 << 1 )