NFC Demo-Projekt PN7150, Mifare Desfire; restarting discovery loop problem

cancel
Showing results for 
Search instead for 
Did you mean: 

NFC Demo-Projekt PN7150, Mifare Desfire; restarting discovery loop problem

1,048 Views
davidwatzinger
Contributor II

Hy,

I´m using the Demoproject „NXP-NCI LPCXpresso example(REV 2.0)“ with a PN7150 NFC Controller. There is a problem with restarting the discovery loop. In the demo app the return value of the function NxpNci_StartDiscovery() is not checked at the end of the infinity loop. I have added this:

// Restart discovery loop

if(NxpNci_StopDiscovery() != NFC_SUCCESS) printf("Error in StopDiscovery()");

if(NxpNci_StartDiscovery(DiscoveryTechnologies,sizeof(DiscoveryTechnologies)) != NFC_SUCCESS) printf("Error in StartDiscovery()");

If there has been a communication with a mifare desfire card before restarting the discovery loop I get the response  0x61 0x06 0x02 0x00 from the PN7150 after calling NxpNci_StartDiscovery(). With other cards I get the expected answer  0x41 0x03 0x01 0x00. Shouldn´t be that independent with which card the communication has been done before?  I have not found something about this in the datasheets in docstore.  However the discovery is restartet and it works fine. But I want to know what this unexpected answer means.

 

Thanks in advance

David

Labels (1)
Tags (2)
0 Kudos
1 Reply

558 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello David Watzinger,

About your question, the data 0x61 0x06 0x02 0x00 0x00 is actually not a RESPONSE message, but a NOTIFICATION message. When calling NxpNci_StopDiscovery(), the host sends the RF_DEACTIVATE_CMD command, then the PN7150 should respond with RF_DEACTIVATE_RSP followed by the RF_DEACTIVATE_NTF notification after the successful deactivation of the RF Interface. You should see the notification with any type of card.

As for the data 0x41 0x03 0x01 0x00, this is indeed a RESPONSE to the RF_DISCOVER_CMD command, and you should see it in the log disregarding of what card was previously detected.

Regards!

Jorge Gonzalez

0 Kudos