NxpNfcRdLib, Tag 4 B, CLRC663, NDEF

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

NxpNfcRdLib, Tag 4 B, CLRC663, NDEF

1,581 Views
bioshazard
Contributor I

Hello,

I have now, for several days been trying to use the NxpNfc library
to use an CLRC663 plus with a K64F microcontroller.
I want to read and write NDEF messages on a Type 4 B Tag.

First the problem was, that all the available tutorials for porting 
the library to the K64F are either deprecated or plainly wrong.
Especially the step where it says to add the SDK as a project
is as far as I understand not correct. It has to be added as a folder instead,
and even then the rest of the tutorial is not strictly correct.

After wasting working almost a week on Porting the library (due to the tutorials not being correct) I got the 
NfcrdlibEx1_BasicDiscoveryLoop example to work on the K64F. After taking another day figuring out that the
tutorial I was using was missing several lines of code that had actually to be added. 

It is now able to detect the Type 4 B tag correctly.
Since the PUPI is correctly displayed, some communication obviously takes place.

The example prints " \n\r Card detected and activated successfully... \n\r" so I would assume the card is now active,
even though the phacDiscLoop_ActivateCard function has not been called?
I am unsure what that means for a type 4 B card though.
Does that mean the card is in the READY-DECLARED or in the PROTOCOL state?

Any further communication function I call

phpalI14443p3b_Exchange or
phpall14443p4_Exchange
returns 0x0201, which I think is "HAL_TIMEOUT"?

I have read ISO14443-3, ISO14443-4 and ISO7816,
as well as UM10802.

But the way the library is written, I still have to constantly read up on everything.

Since the functions practically only take uint8_t and uint16_t arguments,
I can barely get any support/auto-complete help by the IDE!

Could someone please please PLEASE! provide me with a complete example,
or at least the list of functions in the nxpnfc library I have to call in order to:

!USING THE CLRC663 PLUS!


1) Detect a Type 4 B tag (there will always only be at most one tag in the field at one time),

? )Activate / Switch it to the PROTOCOL state it if this step is necessary ?

?) Select the NDEF application if this step is necessary ?

2) Switch communication speed to 424kbit/s in both directions

?) Read the NDEF Capability container (not really needed, since I already know the file properties)

3) Select an NDEF file on the tag (I need to switch between different files)

4) Read/write NDEF messages to/from the tag?

It took less than 2 hours to accomplish this using an Android app.
How can it be this much more difficult (currently at around 40 hours) to do this using the nxpnfc library?!

In case it helps, I attached all the available information about the tag I want to read/write NDEF messages to/from.
I am totally frustrated by now...
Please help me out!  : (

0 Kudos
3 Replies

1,376 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

1) Detect a Type 4 B tag (there will always only be at most one tag in the field at one time)

3) Select an NDEF file on the tag (I need to switch between different files)

4) Read/write NDEF messages to/from the tag?

We do not have an specific example for the type B tags, the basic discovery loop will be able to activate the type B tag, you will need to use as a base the MIFARE Classic (type A) example as a base for what you are trying to do.

 

2) Switch communication speed to 424kbit/s in both directions

Could you please check the PHAC_DISCLOOP_ACT_POS_BIT_MASK_424.

 

Regards,
Estephania

0 Kudos

1,376 Views
bioshazard
Contributor I

Sorry,

>>2) Switch communication speed to 424kbit/s in both directions

>>Could you please check the PHAC_DISCLOOP_ACT_POS_BIT_MASK_424.

The PICC I intend to interface supports 106kbits, 212kbits and 424kbits.

PHAC_DISCLOOP_ACT_POS_BIT_MASK_424 sounds more like I am scanning for an active 424kbit capable device.

If I understand the ISO14443 (B) correctly,
the PICC should answer to the REQB at 106kbit and indicate that it also supports 212kbits and 424kbits in the ATQB.
Then the PCD should decide/instruct the PICC to switch to 424kbit (in the ATTRIB)

Which the PICC will do after responding to the ATTRIB still at 106kbits.

Will setting the PHAC_DISCLOOP_ACT_POS_BIT_MASK_424 bit in...
Where would I even set that flag, I mean to which variable or to which function call would I provide that value?


From the API it looks like it belongs to the the mask reporting the found technologies.

So will the library when activating a tag by discovery loop always activate type B
tags with the highest supported data rate?

0 Kudos

1,376 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

As mentioned before, the NXP NFC Reader Library does not have implementation for the type B card. You might detect it but the implementation will be up to every customer.

If you follow the specification of the tag you are using and enable the desired speed in the examples .

You can use as a  base the UM10663 for your development , the chapter 2.3 PAL: ISO/IEC14443-3A shows in a basic  way.

Also, please check the load protocol as mentioned here https://community.nxp.com/thread/498036 

Regards,

Estephania

0 Kudos