cancel
Showing results for 
Search instead for 
Did you mean: 

Why receive extra data from my from tag type 2 of BL654.

Bpana.1
Associate II

I have BL654 as a tag. When reading it from the ST-25 Android app it receives 992 as mentioned below. Whereas the write data size in the tag is only 14 bytes. Can you please explain this behavior?

-- Data receive on ST-25 Android App ---------

NFC type 2 Tag

CCLEN:4

Magic Number 0xE1

Mapping Version 10

Memory size of 992 bytes

Read Access 0

Write Access F

--------------------------------------------------------

Thank You,

Bhavin.

1 ACCEPTED SOLUTION

Accepted Solutions
Olivier L
ST Employee

Hi Bhavin,

I can help to clarify a few things:

  • In the tag, you have a certain amount of memory. Ex: 1024 Bytes.
  • Then you have something called the T2T_AREA. This is a memory area, defined by NFC Forum (https://nfc-forum.org/) for Type 2 tags. This is the area that can contain NDEF data. It can be smaller than the total amount of mémory. Ex: 800 Bytes. In that case, the last 224 are private and are not in the scope of NFC Forum. The user can put whatever he wants in it.
  • Then there is the NDEF TLV. It is contained in the T2T_AREA so its max size is the size of the T2T_AREA. In your case, I think that you have a small NDEF TLV of 14 bytes.

Best regards

Olivier

View solution in original post

12 REPLIES 12
Olivier L
ST Employee

Hi

992 corresponds to the size of the T2T_Area, it comes from the byte CC2 of the CCFile (read Block 3). This tag is not from STMicroelectronics so I'm not able to tell you more.

The 14 bytes that you mention are probably the 14 bytes of the NDEF file contained in this tag, isn't it?

I can see from the Write Access that this tag is Read Only so it is not possible to write it.

Regards

Olivier

HI Olivier,

Here is a link for data format of Nordic BL654. Please help me to identify Why it's send's 992 bytes. As per link i found that TVL blocks contain up to a maximum data size as 992 bytes. But I can not relate it because we only write 14 bytes. Once more thing is that on nordic mobile app it's read only 14 bytes (Please look at link).

As per my limited knowledge in NDEF : I am understanding that all the tag reading software should follow same logic for read NDEF message irrespective of it's manufacturer, So why Nordic and ST25 mobile app work differently.

Thank You,

Bhavin

Olivier L
ST Employee

Hi Bhavin,

I can help to clarify a few things:

  • In the tag, you have a certain amount of memory. Ex: 1024 Bytes.
  • Then you have something called the T2T_AREA. This is a memory area, defined by NFC Forum (https://nfc-forum.org/) for Type 2 tags. This is the area that can contain NDEF data. It can be smaller than the total amount of mémory. Ex: 800 Bytes. In that case, the last 224 are private and are not in the scope of NFC Forum. The user can put whatever he wants in it.
  • Then there is the NDEF TLV. It is contained in the T2T_AREA so its max size is the size of the T2T_AREA. In your case, I think that you have a small NDEF TLV of 14 bytes.

Best regards

Olivier

Hi Oliver,

  • Yes, tag have total memory is 1024 Bytes.
  • As of now i don't know about last 224 Bytes: Please guide me way to identify T2T_AREA.

Please let me know if you need more information.

Thank you,

Bhavin.

Olivier L
ST Employee

Hi,

The values that I gave are examples. I don't know if this tag has 1024 bytes of memory. i used this example to explaine the difference between the total memory, the T2T_Area size and the NDEF TLV size.

I can't tell you more about this tag that is not an STMicroelectronics tag. You might be interested by our ST25TN tag which is also an NFC Type 2 tag: https://www.st.com/en/nfc/st25tn-series-nfc-tags.html

Regards

Olivier

Bpana.1
Associate II

Hi Olivier,

We have to give support to third party tag in already released product it's not in our control.

During this i also have test with STM library and found something use full.

Please look at link.

At line no 163: buffer[16] have 124. So total size become 992 Bytes that's exactly match with ST25 app data.

i have following query based on this findings.

  1. is buffer[16] mins CC2 as per memory map ?
  2. Is buffer[16] value 124 directly receive from tag ?

Thank You,

Bhavin.

Olivier L
ST Employee

Hi Bhavin,

As per NFC Forum Type 2 spec, CC File location is in block 3. CC2 is the third byte of this CCFile block. This is the byte 14 if you look from the beginning of memory.

CC2 contains encoding for the size of the T2T_Area. The actual size of the T2T_Area (in bytes) is calculated with the formula: T2T_Area_Size = Size*8.

We indeed have T2T_Area_size = 124 * 8 = 992.

CC2 value (equal to 124) is received directly from the tag.

Regards

Olivier

HI Olivier,

Is this CC2 value (124 Byte) it's Fixed for all the case? ( if not please describe how it's value change based on tag writing method in context of NDEF standard )

Thank you,

Bhavin

Olivier L
ST Employee

It depends of the tag. I suggest that you contact the manufacturer of this tag to ask them if CC2 can be changed or not for this tag.

If it is not locked in read only mode, you can write it by writing an ordinary block.

Best regards

Olivier