How to understand NFC reader library

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

How to understand NFC reader library

7,666 Views
smiwa
Contributor III

Hi,

I have started to develop the NFC reader/writer product using PN5180. For the starter, I am now reviewing the NFC library code running on the evaluation board PNEV5180B_V2.0.

At first, I am not the expert in this field and still studying everything required for NFC and PN5180. So please allow me to write very elementary questions..

My first question is how I can get the tag application data such as user written information. By using library software: Basicdiscovery, I can read tag information like card type, UID, etc. But it seems that it does not support to get those application data. So could you let me know what variable or structure the application data is stored and what function stores them form receiving buffer. As I think the variables are provided respectively to the protocol, I need the information for 14443A, 14443B, Felica, and 15693 .

Best regards,

  S. Miwa

Labels (2)
8 Replies

3,690 Views
smiwa
Contributor III

Hi Li san,

Addition to my last question, I would like to ask one thing.

Can you provide me one application layer sample source of MAIFARE ULTRALIGHT same as MAIFARE CLASSIC. I want to remake MAIFARE CLASSIC to MAIFARE ULTRALIGHT and I have tried to modify it. And I found it too difficult in LPCXpresso for me. I suppose previously MAIFARE ULTRALIGHT was provided and now deleted

Tha nk you very much!

S. Miwa

0 Kudos

3,690 Views
smiwa
Contributor III

Hi Li san,

By using  "NfcrdlibEx4_MIFAREClassic" demo libray, I am understanding the read/write procedure and trying to read/write MAIFARE ULTRALIGHT. Now I have some questions.

  1. Can phalMfc_Read()(phalMfc_Write()) read/write the data from/to MAIFARE ULTRALIGHT tag? I tried it and result is;

         -- Write: only 4bytes can be written to tag    -- Read:consecutive 12 bytes can be read 

      And phalMfc_GetVersion returned error.

     So, functions for MAIFARE Classic cannot be applicable to MAIFARE ULTRALIGHT handling?

 2. To incorporate functions for ULTRALIGHT into "NfcrdlibEx4_MIFAREClassic", I included the header file "phalMful.h" and add some code using phalMful_Read()(phalMful_Write(). But compiler shows error 'undefined reference to `phalMful_Read'. is there any setting ti make the path to files?

3. I want to combine  NfcrdlibEx1_basicDIscoveryLoop and other read/write process. For example, what should I do to combine NfcrdlibEx1_basicDIscoveryLoop and NfcrdlibEx4_MIFAREClassic? I am not sure how to handling the pointer structure such as 'pDataParams'. There are too many similar pointer structures and I am confused...

I appreciate your support!

S. Miwa

0 Kudos

3,690 Views
smiwa
Contributor III

Hi Li san,

Thank you for your kind support and for NDEF data, I can read and write now because the procedure for NDEF is relatively simple than others. But 14443A/B and Felica is not easy. Question now is;

Are there the read/write function like NDEF phalTop_ReadNdef(&salTop, baSnepAppBuffer, &wDataLength) for 14443A/B and Felica? If yes, please tell me how to use them?

(As the scope of our product is supposed to support all types of tag.)

Thank you very much!

S. Miwa

0 Kudos

3,690 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi S.Miwa,

Mifare uses ISO14443A/B protocol, so you may refer to the demo of "NfcrdlibEx4_MIFAREClassic" for details. Felica just support card detection, read/write operation is Sony's patent.

Please kindly refer to "NFCReaderLibraryForPNEV5180B-04.030.00.011627\NFC_Reader_Library\NxpNfcRdLib\docs\12_user_doc" for more details.


Wish it helps.

Have a great day,
Kan Li
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

3,690 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi S. Miwa,

Please kindly refer to the attached documents for details.

Wish it helps.

Have a great day,
Kan Li
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

3,690 Views
smiwa
Contributor III

Hi Li san,

A lot of thanks for the detail tech. information! It looks they will help me greatly.

After studying them, I may ask something later and please kindly guide me.

Best regards,

S. Miwa

0 Kudos

3,690 Views
smiwa
Contributor III

Hi Li san,

With your help, now I am getting understood the library structure and what the functions implement. So I clarify my question.

What I want to do is to merge basic discovery loop and individual protocol procedure. For example, after detecting ISO14443A card in basic discovery loop, I want to read its application data subsequently. I am not sure that the variables/structures in NfcrdlibEx1_BasicDiscoveryLoop.c hold the necessary information to handle with functions defined in phpalI14443p4.c.

So, could you show me some sample code how to call the function which read teh Rx buffer (maybe phStatus_t phpalI14443p4_Exchange()?)

I appreciate your help!

Best regards,

   S. Miwa

0 Kudos

3,690 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi S,Miwa,

You may find the examples using phpalI14443p4_Exchange() in project of "NfcrdlibEx7_EMVCo_Polling" and "NfcrdlibEx6_EMVCo_Loopback".

Wish it helps.

 

Have a great day,
Kan Li
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos