I am experimenting with the PN7160 (after using PN7150 for years) and have the following question : after having discovered a NFC Tag (and thus in state RFST_POLL_ACTIVE), will the PN7160 notify me somehow of the Tag being removed ?
I would like to have a simple state machine telling me when a tag was found (RF_INTF_ACTIVATED_NTF) and also when it was removed..
If I deactivate from the DH, and the restart discovery, I will detect the same tag again if it is still present. This is how I did it with the PN7150 driver, but now I'd like to do a cleaner driver design.
In my tests, I am not getting any notification when a tag is removed, but maybe there are some settings needed in the PN7160 to activate this..
Hello Eduardo, thanks for helping me.
Yes I know the NCI stateMachine from Chapter 12 very well, as I have implemented this already for my PN7150 driver.
This stateMachine shows transistions out of POLL_ACTIVE into IDLE or DISCOVERY, with several _NTF notifications, but those notifiications are not sent by the PN7150/PN7160 when the tag is removed from the reader... So I have no way of knowing if the tag is removed.
There is a proprietary RF_PRES_CHECK message, which allows to ask the PN7160 is the tag is still there, but this only works for ISO-DEP or NFC-DEP (See manual chapter 9.3.3), and I need a solution for all tags..
I could reverse engineer the example project to see how it is done there.. but this will take a lot of time and I decided to ask it here first.
This is how I currently solved this:
It's not that difficult, but I'd prefer to get an NCI message when the tag is removed, I don't understand why the NFC Forum did not put this in the standard, it's a no-brainer that this would be needed in almost all implementations.
Then
with to DISCOVERY with a message
Hi,
Perhaps I could recommend you referring to NxpNci_PresenceCheck(NxpNci_RfIntf_t) API from the NXP-NCI examples (project > NfcLibrary > NxpNci20 > src > NxpNxi20.c) for the implementation used in our examples.
Regards,
Eduardo.
Hello @Strooom,
Hope you are doing well.
Could you please take a look at the PN7160 NFC controller User Manual, Chapter 12? This chapter contains the overall RF Discovery concepts applied in PN7160 and defined the general RF state machine.
If you are using the PN7160 NXP-NCI MCUXpresso Example Project, you will see that "RW" project waits for card removal by implementing NxpNci_ProcessReaderMode(RfInterface, PRESENCE_CHECK) API.
Regards,
Eduardo.