Topic: card removal detection
Hi,
I am doing an application for which one I need to be able to detect removes of cards. I actually deactivate the field and do a new select iteration to check cards that are staying on the reader, by comparing this list with the previous I am obtaining card removed list.
Here is a part of my current code :
if (dll_nfc_configure(mDevice, NDO_ACTIVATE_FIELD, false))
if (dll_nfc_configure(mDevice, NDO_ACTIVATE_FIELD, true))
TeSleep(100); // In ms
while (dll_nfc_initiator_select_tag(mDevice, NM_ISO14443A_106, NULL, 0, &cardInfo))
{
}It works well but I have few questions on validity of this solution :
1) deactivating field is it really instantaneous? Or I also need add a little sleep?
2) is there a way to know real delay of field activation? Maybe by using a function that test it?
My goal is to reduce the delay between card events.
I think their is an other way to explore. It may be possible to test write on a specific sector often and wait an error synonymous of card removal but I fear to alter fast card memory. It certainly very limited in write cycles, and after risk to obtaining write corruptions will increase hugely.