diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index 9abecc666..bdc6dbf1e 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -1015,11 +1015,13 @@ void MifareAcquireNonces(const mf_acquire_nonces_t *payload) { while (num_nonces < MFC_MAX_NONCES) { // Test if the action was cancelled - if (BUTTON_PRESS()) { + if (BUTTON_PRESS() || data_available()) { isOK = PM3_EOPABORTED; field_off = true; break; } + + WDT_HIT(); if (!have_uid) { // need a full select cycle to get the uid first iso14a_card_select_t card_info; @@ -1144,12 +1146,14 @@ void MifareAcquireEncryptedNonces(const mf_acquire_nonces_t *payload) { while (num_pairs < MFC_MAX_NONCE_PAIRS) { // Test if the action was cancelled - if (BUTTON_PRESS()) { + if (BUTTON_PRESS() || data_available()) { isOK = PM3_EOPABORTED; field_off = true; break; } + WDT_HIT(); + if (have_uid == false) { // need a full select cycle to get the uid first iso14a_card_select_t card_info; if (iso14443a_select_card(uid, &card_info, &cuid, true, 0, true) == 0) {