NFC NDEF Message with multiple Records

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

NFC NDEF Message with multiple Records

8,401件の閲覧回数
cabletie
Contributor I

Hi,

  Am trying to create/write a NDEF Message containing multiple Records and cannot seem to find an answer to my question:  Is the TLV TERMINATOR for each RECORD or just the MESSAGE; such that each RECORD gets a TERMINATOR (0xfe)  (i.e. 3 RECORDS = 3 TERMINATORS)  or is it   ONE MESSAGE = ONE TERMINATOR??????   Thanks!!

Best Regards.

0 件の賞賛
返信
6 返答(返信)

8,333件の閲覧回数
Jonathan_Iglesias
NXP TechSupport
NXP TechSupport

@cabletie 

I think there are wrong size of the  NDEF and the header of it. 

can you check this  thread where I explained the structure of it and maybe you can test this  example  as well.

https://community.nxp.com/t5/NFC/Are-there-different-encoding-requirements-for-iOS-vs-Android/m-p/88...

BR

 

Jonathan

0 件の賞賛
返信

8,320件の閲覧回数
cabletie
Contributor I

For tag_1:

Payload Len
3B = 59 bytes, from ( [00d] byte:0 ) to ( [01b] byte:2 ), byte:3=0xfe
FOUND INCORRECT COUNT HERE
______________________________________________________________

For tag_2:

NDEF
Tlv tLv
03 89 NDEF length = 137 bytes ( NOT counting 0xfe terminator )
FOUND INCORRECT COUNT HERE
--------------
RECORD 2

payload LENGTH
19 = 25 bytes, from ([020] byte:2 ) to ([026] byte:2 )
FOUND INCORRECT COUNT HERE
_________________________________________________________________

Length errors have been corrected per your advise.
In testing I noticed (with no app running) when the phone scans the
NXP-NFC-Explorer board, an app picker opens. The tag in the Explorer
board uses a Smart Poster configuration, and it appears the last
record is an AAR for com.nxp.ntagi2cdemo... but it never opens automatically,
I thought that was the purpose of the AAR ((or was this left as an exercise?? ))
and this leads me to question the validity of my RTD, AAR and TYPE names.
The FORMAT of tag_2.png AAR and that of the Explorer board Smart Poster
AAR seem to match (at least to me, they do).

I am doing something incorrectly with the AAR, or the RTD/TYPE names??
Your example uses only a single character for the RTD, I did try to follow
the NFC Forum spec document for tag_1.png EXTERNAL type, length = 26 : 0x1a
--> blackfeathersystems.com:pr though it is not explained on HOW to
use it, only this is how it is intended for it to appear.

thanks! I do appreciate your assistance.

0 件の賞賛
返信

8,278件の閲覧回数
Jonathan_Iglesias
NXP TechSupport
NXP TechSupport

I think the best here would be that you tell me what you want to achieve, like having a recod saying hello world and other doing other thing so I can do an example and you can follow that, I ask this because if you are following the NDEF standard by NFC forum this should be clear so maybe I can do an example so you can focus on it.

 

BR

 

Jonathan

0 件の賞賛
返信

8,266件の閲覧回数
cabletie
Contributor I

NFC_pics_2.png

Hi, Thank you for responding. I hope your are doing very well.

I have had partial success!! My app is started with TAG_DISCOVERED and TECH_DISCOVERED manifest intents. Much trouble with NDEF_DISCOVERED! PIC attached of my tag configuration and the results of different manifest <intent-filter> settings.

The goal is to have only my app started with only my tag. I thought NDEF was possibly the only solution.

Maybe I can do this with the TECH filter, and maybe just check for a byte sequence on the tag before inflating the UI?

Thank you, I appreciate your assistance.

EDIT #1:  corrected picture.  

 

0 件の賞賛
返信

8,354件の閲覧回数
cabletie
Contributor I

Hi, thank you for your reponse I found it very informative; but, it leads me to more questions:

The tag_1.png is a (the) first instance of my tag configuration: a single record NDEF message (I think).
tag_2.png is another (completely separate) instance of my tag configuration: a single NDEF message with two records. (I think)

the payload for tag_1.png NDEF message is comprised of bytes which represent bitfields. (only 16 are filled at this point)

the payload for tag_2.png NDEF message record 1 is comprised of bytes which represent bitfields. (again only 16 populated)
the payload for tag_2.png NDEF message record 2 is comprised of (I think) an Android Application Record...
...or at least is is supposed to be.


From your example I see the RTD is a single character... (payload encoding is ascii enGLISH encoded text)
am I formatting incorrectly -- the way I have my RTDs and payload types set??
How to correctly match which tag field(s) to the Android Manifest <intent-filter> contents??

Thank you, I appreciate your assistance.

 

0 件の賞賛
返信

8,385件の閲覧回数
Jonathan_Iglesias
NXP TechSupport
NXP TechSupport

Hi @cabletie 

hope you are doing great, well  there is only one terminator, it is important that if you have different  records you configure correctly the header  you can look this NTAG I used for demonstration I stored 3 NDEF records  with plain text, one says  "First"  then "second" and "third"

you can use our taginfo app as I did to read the tags  

 

** TagInfo scan (version 4.24.7) 2021-02-15 15:25:08 **
Report Type: External

-- IC INFO ------------------------------

# IC manufacturer:
NXP Semiconductors

# IC type:
NTAG216

# NFC Forum NDEF-compliant tag:
Type 2 Tag

-- NDEF ------------------------------

# NFC data set information:
NDEF message containing 3 records
Current message size: 37 bytes
Maximum message size: 238 bytes
NFC data set access: Read & Write
Can be made Read-Only

# Record #1: Text record:
Type Name Format: NFC Forum well-known type
Short Record
type: "T"
encoding: UTF-8
lang: "en"
text: "first"
Payload length: 8 bytes
Payload data:

[0] 02 65 6E 66 69 72 73 74                         |.enfirst        |


# Record #2: Text record:
Type Name Format: NFC Forum well-known type
Short Record
type: "T"
encoding: UTF-8
lang: "en"
text: "second"
Payload length: 9 bytes
Payload data:

[0] 02 65 6E 73 65 63 6F 6E 64                      |.ensecond       |


# Record #3: Text record:
Type Name Format: NFC Forum well-known type
Short Record
type: "T"
encoding: UTF-8
lang: "en"
text: "third"
Payload length: 8 bytes
Payload data:

[0] 02 65 6E 74 68 69 72 64                         |.enthird        |


# NDEF message:
[00] 91 01 08 54 02 65 6E 66 69 72 73 74 11 01 09 54 |...T.enfirst...T|

[10] 02 65 6E 73 65 63 6F 6E 64 51 01 08 54 02 65 6E |.ensecondQ..T.en|

[20] 74 68 69 72 64                                  |third           |


# NDEF Capability Container (CC):
Mapping version: 1.0
Maximum NDEF data size: 888 bytes
NDEF access: Read & Write
 E1 10 6F 00                                     |..o.            |


-- EXTRA ------------------------------

# Memory size:
888 bytes user memory
* 222 pages, with 4 bytes per page

# IC detailed information:
Full product name: NT2H1611G0DUx
Capacitance: 50 pF

# Version information:
Vendor ID: NXP
Type: NTAG
Subtype: 50 pF
Major version: 1
Minor version: V0
Storage size: 888 bytes
Protocol: ISO/IEC 14443-3

# Configuration information:
ASCII mirror disabled
NFC counter: disabled
No limit on wrong password attempts
Strong load modulation enabled

# Originality check:
Signature verified with NXP public key

-- FULL SCAN ------------------------------

# Technologies supported:
ISO/IEC 14443-3 (Type A) compatible
ISO/IEC 14443-2 (Type A) compatible

# Android technology information:
Tag description:
* TAG: Tech [android.nfc.tech.NfcA, android.nfc.tech.MifareUltralight, android.nfc.tech.Ndef]
* Maximum transceive length: 253 bytes
* Default maximum transceive time-out: 618 ms


# Detailed protocol information:
ID: 04:D2:0A:1A:E0:35:84
ATQA: 0x4400
SAK: 0x00

# Memory content:
[00] *  04:D2:0A 54 (UID0-UID2, BCC0)
[01] *  1A:E0:35:84 (UID3-UID6)
[02] .  4B 48 00 00 (BCC1, INT, LOCK0-LOCK1)
[03] .  E1:10:6F:00 (OTP0-OTP3)
[04] .  03 25 91 01 |.%..|
[05] .  08 54 02 65 |.T.e|
[06] .  6E 66 69 72 |nfir|
[07] .  73 74 11 01 |st..|
[08] .  09 54 02 65 |.T.e|
[09] .  6E 73 65 63 |nsec|
[0A] .  6F 6E 64 51 |ondQ|
[0B] .  01 08 54 02 |..T.|
[0C] .  65 6E 74 68 |enth|
[0D] .  69 72 64 FE |ird.|
[0E] .  00 00 00 00 |....|
[0F] .  00 00 00 00 |....|
[10] .  00 00 00 00 |....|
[11] .  00 00 00 00 |....|
[12] .  00 00 00 00 |....|
[13] .  00 00 00 00 |....|
[14] .  00 00 00 00 |....|
[15] .  00 00 00 00 |....|
[16] .  00 00 00 00 |....|
[17] .  00 00 00 00 |....|
[18] .  00 00 00 00 |....|
[19] .  00 00 00 00 |....|
[1A] .  00 00 00 00 |....|
[1B] .  00 00 00 00 |....|
[1C] .  00 00 00 00 |....|
[1D] .  00 00 00 00 |....|
[1E] .  00 00 00 00 |....|
[1F] .  00 00 00 00 |....|
[20] .  00 00 00 00 |....|
[21] .  00 00 00 00 |....|
[22] .  00 00 00 00 |....|
[23] .  00 00 00 00 |....|
[24] .  00 00 00 00 |....|
[25] .  00 00 00 00 |....|
[26] .  00 00 00 00 |....|
[27] .  00 00 00 00 |....|
[28] .  00 00 00 00 |....|
[29] .  00 00 00 00 |....|
[2A] .  00 00 00 00 |....|
[2B] .  00 00 00 00 |....|
[2C] .  00 00 00 00 |....|
[2D] .  00 00 00 00 |....|
[2E] .  00 00 00 00 |....|
[2F] .  00 00 00 00 |....|
[30] .  00 00 00 00 |....|
[31] .  00 00 00 00 |....|
[32] .  00 00 00 00 |....|
[33] .  00 00 00 00 |....|
[34] .  00 00 00 00 |....|
[35] .  00 00 00 00 |....|
[36] .  00 00 00 00 |....|
[37] .  00 00 00 00 |....|
[38] .  00 00 00 00 |....|
[39] .  00 00 00 00 |....|
[3A] .  00 00 00 00 |....|
[3B] .  00 00 00 00 |....|
[3C] .  00 00 00 00 |....|
[3D] .  00 00 00 00 |....|
[3E] .  00 00 00 00 |....|
[3F] .  00 00 00 00 |....|
[40] .  00 00 00 00 |....|
[41] .  00 00 00 00 |....|
[42] .  00 00 00 00 |....|
[43] .  00 00 00 00 |....|
[44] .  00 00 00 00 |....|
[45] .  00 00 00 00 |....|
[46] .  00 00 00 00 |....|
[47] .  00 00 00 00 |....|
[48] .  00 00 00 00 |....|
[49] .  00 00 00 00 |....|
[4A] .  00 00 00 00 |....|
[4B] .  00 00 00 00 |....|
[4C] .  00 00 00 00 |....|
[4D] .  00 00 00 00 |....|
[4E] .  00 00 00 00 |....|
[4F] .  00 00 00 00 |....|
[50] .  00 00 00 00 |....|
[51] .  00 00 00 00 |....|
[52] .  00 00 00 00 |....|
[53] .  00 00 00 00 |....|
[54] .  00 00 00 00 |....|
[55] .  00 00 00 00 |....|
[56] .  00 00 00 00 |....|
[57] .  00 00 00 00 |....|
[58] .  00 00 00 00 |....|
[59] .  00 00 00 00 |....|
[5A] .  00 00 00 00 |....|
[5B] .  00 00 00 00 |....|
[5C] .  00 00 00 00 |....|
[5D] .  00 00 00 00 |....|
[5E] .  00 00 00 00 |....|
[5F] .  00 00 00 00 |....|
[60] .  00 00 00 00 |....|
[61] .  00 00 00 00 |....|
[62] .  00 00 00 00 |....|
[63] .  00 00 00 00 |....|
[64] .  00 00 00 00 |....|
[65] .  00 00 00 00 |....|
[66] .  00 00 00 00 |....|
[67] .  00 00 00 00 |....|
[68] .  00 00 00 00 |....|
[69] .  00 00 00 00 |....|
[6A] .  00 00 00 00 |....|
[6B] .  00 00 00 00 |....|
[6C] .  00 00 00 00 |....|
[6D] .  00 00 00 00 |....|
[6E] .  00 00 00 00 |....|
[6F] .  00 00 00 00 |....|
[70] .  00 00 00 00 |....|
[71] .  00 00 00 00 |....|
[72] .  00 00 00 00 |....|
[73] .  00 00 00 00 |....|
[74] .  00 00 00 00 |....|
[75] .  00 00 00 00 |....|
[76] .  00 00 00 00 |....|
[77] .  00 00 00 00 |....|
[78] .  00 00 00 00 |....|
[79] .  00 00 00 00 |....|
[7A] .  00 00 00 00 |....|
[7B] .  00 00 00 00 |....|
[7C] .  00 00 00 00 |....|
[7D] .  00 00 00 00 |....|
[7E] .  00 00 00 00 |....|
[7F] .  00 00 00 00 |....|
[80] .  00 00 00 00 |....|
[81] .  00 00 00 00 |....|
[82] .  00 00 00 00 |....|
[83] .  00 00 00 00 |....|
[84] .  00 00 00 00 |....|
[85] .  00 00 00 00 |....|
[86] .  00 00 00 00 |....|
[87] .  00 00 00 00 |....|
[88] .  00 00 00 00 |....|
[89] .  00 00 00 00 |....|
[8A] .  00 00 00 00 |....|
[8B] .  00 00 00 00 |....|
[8C] .  00 00 00 00 |....|
[8D] .  00 00 00 00 |....|
[8E] .  00 00 00 00 |....|
[8F] .  00 00 00 00 |....|
[90] .  00 00 00 00 |....|
[91] .  00 00 00 00 |....|
[92] .  00 00 00 00 |....|
[93] .  00 00 00 00 |....|
[94] .  00 00 00 00 |....|
[95] .  00 00 00 00 |....|
[96] .  00 00 00 00 |....|
[97] .  00 00 00 00 |....|
[98] .  00 00 00 00 |....|
[99] .  00 00 00 00 |....|
[9A] .  00 00 00 00 |....|
[9B] .  00 00 00 00 |....|
[9C] .  00 00 00 00 |....|
[9D] .  00 00 00 00 |....|
[9E] .  00 00 00 00 |....|
[9F] .  00 00 00 00 |....|
[A0] .  00 00 00 00 |....|
[A1] .  00 00 00 00 |....|
[A2] .  00 00 00 00 |....|
[A3] .  00 00 00 00 |....|
[A4] .  00 00 00 00 |....|
[A5] .  00 00 00 00 |....|
[A6] .  00 00 00 00 |....|
[A7] .  00 00 00 00 |....|
[A8] .  00 00 00 00 |....|
[A9] .  00 00 00 00 |....|
[AA] .  00 00 00 00 |....|
[AB] .  00 00 00 00 |....|
[AC] .  00 00 00 00 |....|
[AD] .  00 00 00 00 |....|
[AE] .  00 00 00 00 |....|
[AF] .  00 00 00 00 |....|
[B0] .  00 00 00 00 |....|
[B1] .  00 00 00 00 |....|
[B2] .  00 00 00 00 |....|
[B3] .  00 00 00 00 |....|
[B4] .  00 00 00 00 |....|
[B5] .  00 00 00 00 |....|
[B6] .  00 00 00 00 |....|
[B7] .  00 00 00 00 |....|
[B8] .  00 00 00 00 |....|
[B9] .  00 00 00 00 |....|
[BA] .  00 00 00 00 |....|
[BB] .  00 00 00 00 |....|
[BC] .  00 00 00 00 |....|
[BD] .  00 00 00 00 |....|
[BE] .  00 00 00 00 |....|
[BF] .  00 00 00 00 |....|
[C0] .  00 00 00 00 |....|
[C1] .  00 00 00 00 |....|
[C2] .  00 00 00 00 |....|
[C3] .  00 00 00 00 |....|
[C4] .  00 00 00 00 |....|
[C5] .  00 00 00 00 |....|
[C6] .  00 00 00 00 |....|
[C7] .  00 00 00 00 |....|
[C8] .  00 00 00 00 |....|
[C9] .  00 00 00 00 |....|
[CA] .  00 00 00 00 |....|
[CB] .  00 00 00 00 |....|
[CC] .  00 00 00 00 |....|
[CD] .  00 00 00 00 |....|
[CE] .  00 00 00 00 |....|
[CF] .  00 00 00 00 |....|
[D0] .  00 00 00 00 |....|
[D1] .  00 00 00 00 |....|
[D2] .  00 00 00 00 |....|
[D3] .  00 00 00 00 |....|
[D4] .  00 00 00 00 |....|
[D5] .  00 00 00 00 |....|
[D6] .  00 00 00 00 |....|
[D7] .  00 00 00 00 |....|
[D8] .  00 00 00 00 |....|
[D9] .  00 00 00 00 |....|
[DA] .  00 00 00 00 |....|
[DB] .  00 00 00 00 |....|
[DC] .  00 00 00 00 |....|
[DD] .  00 00 00 00 |....|
[DE] .  00 00 00 00 |....|
[DF] .  00 00 00 00 |....|
[E0] .  00 00 00 00 |....|
[E1] .  00 00 00 00 |....|
[E2] .  00 00 00 BD (LOCK2-LOCK4, CHK)
[E3] .  04 00 00 FF (CFG, MIRROR, AUTH0)
[E4] .  00 05 -- -- (ACCESS)
[E5] +P FF FF FF FF (PWD0-PWD3)
[E6] +P 00 00 -- -- (PACK0-PACK1)

  *:locked & blocked, x:locked,
  +:blocked, .:un(b)locked, ?:unknown
  r:readable (write-protected),
  p:password protected, -:write-only
  P:password protected write-only

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

0 件の賞賛
返信