summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/nfctype1.c4
-rw-r--r--plugins/nfctype2.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/plugins/nfctype1.c b/plugins/nfctype1.c
index 83fe498..e166dba 100644
--- a/plugins/nfctype1.c
+++ b/plugins/nfctype1.c
@@ -248,6 +248,7 @@ static int meta_recv(uint8_t *resp, int length, void *data)
/* Check Static or Dynamic memory model */
if (resp[OFFSET_HEADER_ROM] == HR0_TYPE1_STATIC) {
DBG("READ Static complete");
+ near_tag_set_memory_layout(tag, NEAR_TAG_MEMORY_STATIC);
err = near_tlv_parse(t1_tag->tag, t1_tag->cb,
cc + LEN_CC_BYTES, TAG_T1_DATA_LENGTH(cc));
if (err < 0)
@@ -255,7 +256,8 @@ static int meta_recv(uint8_t *resp, int length, void *data)
g_free(t1_tag);
} else if ((resp[OFFSET_HEADER_ROM] & 0xF0) == HR0_TYPE2_HIGH) {
- err = read_dynamic_tag(cc, length, t1_tag);
+ near_tag_set_memory_layout(tag, NEAR_TAG_MEMORY_DYNAMIC);
+ err = read_dynamic_tag(cc, length, t1_tag);
} else {
err = -EOPNOTSUPP ;
}
diff --git a/plugins/nfctype2.c b/plugins/nfctype2.c
index 32ae537..4a78fa3 100644
--- a/plugins/nfctype2.c
+++ b/plugins/nfctype2.c
@@ -201,6 +201,8 @@ static int meta_recv(uint8_t *resp, int length, void *data)
else
near_tag_set_ro(tag, FALSE);
+ near_tag_set_memory_layout(tag, NEAR_TAG_MEMORY_STATIC);
+
err = data_read(t2_tag);
out: