diff --git a/lib/nfc/protocols/type_4_tag/type_4_tag.h b/lib/nfc/protocols/type_4_tag/type_4_tag.h index 9c19fd92e..199953bcd 100644 --- a/lib/nfc/protocols/type_4_tag/type_4_tag.h +++ b/lib/nfc/protocols/type_4_tag/type_4_tag.h @@ -6,6 +6,8 @@ extern "C" { #endif +#define TYPE_4_TAG_MF_DESFIRE_NDEF_SIZE (2048U - sizeof(uint16_t)) + typedef enum { Type4TagErrorNone, Type4TagErrorNotPresent, diff --git a/lib/nfc/protocols/type_4_tag/type_4_tag_i.h b/lib/nfc/protocols/type_4_tag/type_4_tag_i.h index 18b46679a..f47d75236 100644 --- a/lib/nfc/protocols/type_4_tag/type_4_tag_i.h +++ b/lib/nfc/protocols/type_4_tag/type_4_tag_i.h @@ -56,7 +56,7 @@ #define TYPE_4_TAG_BUF_SIZE (256U - 3U - 2U) // Read returns 2 byte status trailer, write sends 5 byte command header #define TYPE_4_TAG_CHUNK_LEN MIN(TYPE_4_TAG_BUF_SIZE - 5U, TYPE_4_TAG_ISO_RW_CHUNK_LEN) -#define TYPE_4_TAG_DEFAULT_NDEF_SIZE (2048U - sizeof(uint16_t)) +#define TYPE_4_TAG_DEFAULT_NDEF_SIZE TYPE_4_TAG_MF_DESFIRE_NDEF_SIZE extern const uint8_t type_4_tag_iso_mf_name[TYPE_4_TAG_ISO_NAME_LEN]; extern const uint8_t type_4_tag_iso_df_name[TYPE_4_TAG_ISO_NAME_LEN]; diff --git a/lib/nfc/protocols/type_4_tag/type_4_tag_poller_i.c b/lib/nfc/protocols/type_4_tag/type_4_tag_poller_i.c index 4722a169d..25a9f8aaa 100644 --- a/lib/nfc/protocols/type_4_tag/type_4_tag_poller_i.c +++ b/lib/nfc/protocols/type_4_tag/type_4_tag_poller_i.c @@ -418,7 +418,7 @@ Type4TagError type_4_tag_poller_create_cc(Type4TagPoller* instance) { instance->data->chunk_max_read = 0x3A; instance->data->chunk_max_write = 0x34; instance->data->ndef_file_id = TYPE_4_TAG_T4T_NDEF_EF_ID; - instance->data->ndef_max_len = TYPE_4_TAG_DEFAULT_NDEF_SIZE; + instance->data->ndef_max_len = TYPE_4_TAG_MF_DESFIRE_NDEF_SIZE; instance->data->ndef_read_lock = TYPE_4_TAG_T4T_CC_RW_LOCK_NONE; instance->data->ndef_write_lock = TYPE_4_TAG_T4T_CC_RW_LOCK_NONE; instance->data->is_tag_specific = true;