diff --git a/examples/nfc-sam.c b/examples/nfc-sam.c index b2d08f5..830b263 100644 --- a/examples/nfc-sam.c +++ b/examples/nfc-sam.c @@ -124,6 +124,22 @@ int main(int argc, const char* argv[]) { nfc_target_info_t nti; + // Set connected NFC device to initiator mode + nfc_initiator_init(pnd); + + // Drop the field for a while + nfc_configure(pnd,NDO_ACTIVATE_FIELD,false); + + // Let the reader only try once to find a tag + nfc_configure(pnd,NDO_INFINITE_SELECT,false); + + // Configure the CRC and Parity settings + nfc_configure(pnd,NDO_HANDLE_CRC,true); + nfc_configure(pnd,NDO_HANDLE_PARITY,true); + + // Enable field so more power consuming cards can power themselves up + nfc_configure(pnd,NDO_ACTIVATE_FIELD,true); + // Read the SAM's info if (!nfc_initiator_select_tag(pnd,NM_ISO14443A_106,NULL,0,&nti)) { ERR("%s", "Reading of SAM info failed.");