PN7150 with libnfc-nci / Same UID for each tag after several read

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

PN7150 with libnfc-nci / Same UID for each tag after several read

1,872 Views
CITIZENGATE
Contributor I

Dear Community,

I'm facing of a problem I were not able to solve myself.

I'm printing the CSN from the onTagArrival callback but after several read I can see the same UID even if i'm using different card with different UID (original Classic EV1 and DESFire EV2).

As you could see below, the card n° 7,8... return the same UID as the card n°6 (but of course the cards 7, 8 and more have a different UID). It seems that the 6th UID is always kept in memory inside the pTagInfo pointer.

CARD1: E6A09E8D
CARD2: 042344D2636280
CARD3: 16A9B18D
CARD4: 94A1D262
CARD5: 94A1D262
CARD6: 45A221D8

CARD7: 45A221D8

CARD8: 45A221D8

...

void onTagArrival(nfc_tag_info_t *pTagInfo){

  for(int i = 0; i < (*pTagInfo).uid_length; i++){
    printf("%02D", (unsigned char) (*pTagInfo).uid[i]);
  }
  printf("\n");
}

I'm using the last libnfc-nci compiled from the github inside a Linux Debian Buster R01 with an I2C Kernel Driver.

Any Idea about how it's possible and where it could come from ?

Thank you in advance for you help

Regards

Tags (1)
0 Kudos
Reply
3 Replies

1,857 Views
Fabian_R
NXP TechSupport
NXP TechSupport

Hello sir,

I hope you are doing great.

Could you please provide a little further information about the Linux implementation you are doing?

There might be something that was missed out. If this isn't the case maybe we could fix it with your help.

1. Did you followed the AN11697?

2. Which were the steps you followed for the building of the library?

3. Could you please provide a log of the NCI Library in order to know what is happening when the UID starts to become a static return value?

4. Have you being able to correctly run the demoApp available in the git project?

 

I'm asking about this because the onTagArrival() implementation that you are posting isn´t the same as the one on the demoApp main file.

Best Regards,
Fabian
0 Kudos
Reply

1,850 Views
CITIZENGATE
Contributor I

Hi Fabian,

Thank you very much for your reply.

Following your questions:

- Yes, I fully followed the AN11697 doc to compile and install the driver and the lib

- The lib has been build without any options (./bootstrap - ./configure - ./make - ./make install)

Parameters of the conf files are:

- HOST_LISTEN_TECH_MASK=0x07

- POLLING_TECH_MASK=0xEF

- P2P_LISTEN_TECH_MASK=0x00

My test source code and debug trace are attached to this thread.

What is just amazing is when the debug mode is activated, I have no trouble and all card are read with the good uid.

I tried the demoApp but in many case I have "NxpFunc: reSelect: timeout waiting for deactivate" so I'm not able to test several cards.

Thank you very much for your help

Regards

0 Kudos
Reply

1,825 Views
Fabian_R
NXP TechSupport
NXP TechSupport

My apologies for the late response.

Please let me know if I understood correctly, when you activate the debug mode everything works fine?

Could it be possible that you aren´t reading the registers correctly or your buffer implementation for the UID writing on the screen isn´t cleaning on each reading?

Best Regards,
Fabian
0 Kudos
Reply