How to define payload type when writing NDEF message to tag using NXP NFC Reader Library

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to define payload type when writing NDEF message to tag using NXP NFC Reader Library

399 Views
eMKa94
Contributor I

I'm using the NXP NFC Reader Library ported to OpenWRT Linux platform.

(Version ) NXP NFC Reader Library  v07.09.00

 

The NFC Reader HW I'm using is PN5180


Everything works quite fine. I'm able to run the examples and face no issues.

But the examples do not cover writing NDEF messages at all...

I reworked the discovery loop example to write NDEF message to the NFC Card when detected:

Detected card type ( logs from console

 

Card detected and activated successfully...
Technology : Type V / ISO 15693 / T5T

 


The code I'm using to write:

 

status = phalTop_WriteNdef(palTop, (uint8_t*)ndefMessageToBeWritten, strlen(ndefMessageToBeWritten));
CHECK_STATUS(status);

 

Where ndefMessageToBeWritten is a simple "Test" string.

This works fine because when I put the card again on the reader I'm able to read the same message back.

But... 

When testing the card with the TagWritter app on Android and trying to read this message I get the "EMPTY"  Content field.

If I write anything with this app (with choosing the payload type as plain text or Url) and read it back the content is recognized correctly. 

So my question is: How can I provide such information with the NXP NFC Reader library?

What API Layers are responsible for that?

In comparison, other NFC stacks I know are quite straightforward and provide some higher level API functions where I can simply specify the type and magic happens under the cover like.

 

writeNdef(type, payload, length);

 

 

Why there is no such API in this (quite complex) library??

 

The Library documentation is !@#$%^.... 

 

Please help!

0 Kudos
Reply
2 Replies

356 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

Hope you are doing well. Maybe this video could help you with the NFC Reader Library concept. Design and Implement NFC applications 4: NFC Reader Library – support for NFC frontend solutions | N...

 

If you are interested in working with NDEF, I would recommend checking the NDEF specification to build your application layer.

 

Regards,

Ricardo

0 Kudos
Reply

337 Views
eMKa94
Contributor I

@Ricardo_Zamora 

Thank You for reply.

So this library itself does not provide this kind of application layer ? I should create some "NDEF Record creator" myself according to the NDEF specification is that right?

 

I found some doc here:
https://freemindtronic.com/wp-content/uploads/2022/02/NFC-Data-Exchange-Format-NDEF.pdf
But it is dated as 2006... Will it be still valid ?

 

The docs from NFC Forum seem to not be free

0 Kudos
Reply