HCE T4T Example not working with NXP NFC Library v07.08.00 in Linux and PN5180

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

HCE T4T Example not working with NXP NFC Library v07.08.00 in Linux and PN5180

752 Views
javiermartin
Contributor I

Hi,

we have a custom Linux platform where we have succesfully integrated the NXP NFC Library 7.8 based on the cmake Raspberry PI integration with the PN5180.

We have managed to execute several examples and even added our custom code to read our application on top of Mifare Classic, Plus and DESFire cards so it looks like communication issues with the PN5180 and platform related ports are out of the question here.

When we run the NfcrdlibEx8_HCE_T4T binary we have the following behavior:

Card Emulation Application...
Reader Library thread started...
Application thread started...

When we try to read the NDEF Tag with an Android phone and the NFC Tools application we don't get any reads and the example seems to receive a wrong RATS during the autocollision step: length is 37 instead of 2 and the content doesn't make sense either. Status is 0x0F06.

Sometimes we get the following error instead of a wrong RATS which seems like an RF communication error:

Line: 380 Error - (0x0210) has occurred : 0xCCEE CC-Component ID, EE-Error code. Refer-ph_Status.h

When using an ACR122 USB NFC reader + pcsc_scan we get the same issues but, on the contrary, sometimes we get spurious type F, type B tags read (which don't make much sense since as I understand the example tries to emulate a Type A tag):

 

Wed Jul 12 16:28:28 2023
Reader 0: ACS ACR122U PICC Interface 00 00
Event number: 31
Card state: Card inserted,
ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 11 00 3B 00 00 00 00 42

ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 11 00 3B 00 00 00 00 42
+ TS = 3B --> Direct Convention
+ T0 = 8F, Y(1): 1000, K: 15 (historical bytes)
TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0
-----
TD(2) = 01 --> Y(i+1) = 0000, Protocol T = 1
-----
+ Historical bytes: 80 4F 0C A0 00 00 03 06 11 00 3B 00 00 00 00
Category indicator byte: 80 (compact TLV data object)
Tag: 4, len: F (initial access data)
Initial access data: 0C A0 00 00 03 06 11 00 3B 00 00 00 00
+ TCK = 42 (correct checksum)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B 8F 80 01 80 4F 0C A0 00 00 03 06 11 00 3B 00 00 00 00 42
3B 8F 80 01 80 4F 0C A0 00 00 03 06 .. 00 3B 00 00 00 00 ..
FeliCa (as per PCSC std part3)
3B 8F 80 01 80 4F 0C A0 00 00 03 06 11 00 3B 00 00 00 00 42
RFID - FeliCa (generic) (as per PCSC std part3)
Suica public transit card (Japan IC system)
(also: Hayakaken, ICOCA, Kitaca, manaca, nimoca, PASMO, PiTaPa, SUGOCA, TOICA)
https://en.wikipedia.org/wiki/Suica
Octopus, MTR network from Hong Kong, 2014

Wed Jul 12 16:28:28 2023
Reader 0: ACS ACR122U PICC Interface 00 00
Event number: 32
Card state: Card removed,

Wed Jul 12 16:28:36 2023
Reader 0: ACS ACR122U PICC Interface 00 00
Event number: 33
Card state: Card inserted,
ATR: 3B 80 80 01 01

ATR: 3B 80 80 01 01
+ TS = 3B --> Direct Convention
+ T0 = 80, Y(1): 1000, K: 0 (historical bytes)
TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0
-----
TD(2) = 01 --> Y(i+1) = 0000, Protocol T = 1
-----
+ Historical bytes:
+ TCK = 01 (correct checksum)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B 80 80 01 01
ISO 14443 Type B without historical bytes
Electronic Passport
Spanish passport (2012)
Canadian Passport
Venez_Prox

Wed Jul 12 16:28:37 2023
Reader 0: ACS ACR122U PICC Interface 00 00
Event number: 34
Card state: Card removed,

 

If we plug our NFC Antenna+PN5180 to the NFC Cockpit evaluation board + software we can successfully read the www.nxp.com NDEF tag with the phone and everything works as expected so it does not seem like an antenna or chip issue either.

 

Are there any known issues with the example in this setup or something else I could try to make it work? Unfortunately I don't have an NFC sniffer available to dig more into the issue.

 

Regards,

Javier.

 

 

0 Kudos
Reply
2 Replies

718 Views
javiermartin
Contributor I

Just to let you know, I tried with an older version of the NXP NFC Library (v05.19.00) and I'm getting the same issues.

0 Kudos
Reply

662 Views
Fabian_R
NXP TechSupport
NXP TechSupport

Hello sir,
I'm very sorry for not answering back earlier.
We haven't had any other similar cases with PN5180. For this reason, I haven't provided a recommendation.
Could you please clarify if the test you are performing is with our Evaluation board and, please specify if you are connected directly from the Raspberry Pi to the PN5180 or, from the Raspberry Pi to the LPC of the board?

I understand that you are able to R/W MIFARE cards, but, in order to discard an Antenna issue, could you please share with us the Smith chart of the solution when the antenna is loaded and unloaded?

Best Regards,
Fabian
0 Kudos
Reply