The Capability container is 4 bytes long and the NDEF data can be found
right after that. The offset for the static memory on a dynamic tag
should thus be the length of the CC and not more.
{
struct type1_tag *t1_tag = data;
struct type1_cmd t1_cmd;
-
uint8_t *tagdata;
uint8_t *pndef;
size_t data_length;
tagdata = near_tag_get_data(t1_tag->tag, &data_length);
- /* Skip un-needed bytes */
+ /* Skip capability container bytes */
pndef = cc + 4; /* right after CC bytes */
- pndef = pndef + 5; /* skip TLV Lock bits bytes */
- pndef = pndef + 5; /* skip TLV ControlIT bytes */
/*
* Save first NFC bytes to tag memory
struct t1_cookie *cookie = data;
struct near_tag *tag;
struct type1_tag *t1_tag;
-
uint8_t *cc;
int err = -EOPNOTSUPP;