2015-11-23 05:43 AM
HI,
How can I write two or more records of same type to Dynamic NFC tag?E.g if I want to write WriteEmail,SMS,URI or any such Data can I call it twice? like TT4_WriteVcard() TT4_WriteVcard()or
TT4_WriteSMS() TT4_WriteSMS()and so on..
Kindly advice.! what is the maximum number of such similiar records can be written.Can they be read in same fashion? Rgds. Rp #m24sr #nfc #m24sr #multiple-ndefSolved! Go to Solution.
2015-12-18 08:09 AM
Hi,
The first FIRST_RECORD_OFFSET constant is used to point to the ndef data in the buffer array. The bytes before FIRST_RECORD_OFFSET are used to store the length of the NDEF message. The exemple given with NDEF_AddAAR function can help you how to write a function to add records in NDEF message. For the NDEF header, here is the details MB = Message Begin ME = Message End CF = Chunk Flag (indicating that this is either the first record chunk or a middle record chunk of a chunked payload) SR = Short Record (if set, that the PAYLOAD_LENGTH field is a single octet) IL = ID_LENGTH field is present TNF = Type Name Format TNF Field Values: Empty 0x00 NFC Forum well-known type [NFC RTD] 0x01 Media-type as defined in RFC 2046 [RFC 2046] 0x02 Absolute URI as defined in RFC 3986 [RFC 3986] 0x03 NFC Forum external type [NFC RTD] 0x04 Unknown 0x05 Unchanged 0x06 Reserved 0x07 CF is used only if you need to split your record in multiple records, you used the SR flag so it indicates you don't need to split it in chunks. So in your example it gives: /* MB ME CF SR IL TNF for first Record in the NDEF message */ 1 0 0 1 0 0x02 Payload type name length Payload length Payload type name Payload /* MB ME CF SR IL TNF for Second Record in the NDEF message */ 0 1 0 1 0 0x06 Payload type name length - None Payload length (same as the payload length of first Record) Payload type name - None Payload starts here for Second Record. Hope this helps you. Have nice day.2015-11-27 05:12 AM
Hi,
This feature is not directly managed by the NDEF library supplied with the X-CUBE-NFC software package. The WriteData function allows you to write data at any offset in the memory. So for example you need to update the code and add an offset parameter for TT4_WriteVcard or TT4_WriteSMS or ... (and in the functions of NDEF lib also called) in order to manage multiple NDEF messages. Kind Regards, Have a nice day.2015-12-08 04:38 AM
2015-12-09 02:43 AM
http://www.eet-china.com/ARTICLES/2006AUG/PDF/NFCForum-TS-NDEF.pdf
Thanks in advance.Rp2015-12-18 08:09 AM
Hi,
The first FIRST_RECORD_OFFSET constant is used to point to the ndef data in the buffer array. The bytes before FIRST_RECORD_OFFSET are used to store the length of the NDEF message. The exemple given with NDEF_AddAAR function can help you how to write a function to add records in NDEF message. For the NDEF header, here is the details MB = Message Begin ME = Message End CF = Chunk Flag (indicating that this is either the first record chunk or a middle record chunk of a chunked payload) SR = Short Record (if set, that the PAYLOAD_LENGTH field is a single octet) IL = ID_LENGTH field is present TNF = Type Name Format TNF Field Values: Empty 0x00 NFC Forum well-known type [NFC RTD] 0x01 Media-type as defined in RFC 2046 [RFC 2046] 0x02 Absolute URI as defined in RFC 3986 [RFC 3986] 0x03 NFC Forum external type [NFC RTD] 0x04 Unknown 0x05 Unchanged 0x06 Reserved 0x07 CF is used only if you need to split your record in multiple records, you used the SR flag so it indicates you don't need to split it in chunks. So in your example it gives: /* MB ME CF SR IL TNF for first Record in the NDEF message */ 1 0 0 1 0 0x02 Payload type name length Payload length Payload type name Payload /* MB ME CF SR IL TNF for Second Record in the NDEF message */ 0 1 0 1 0 0x06 Payload type name length - None Payload length (same as the payload length of first Record) Payload type name - None Payload starts here for Second Record. Hope this helps you. Have nice day.