- // Iceman: use piwi's faster nonce collecting part in hardnested.\r
- if (!have_uid) { // need a full select cycle to get the uid first\r
- iso14a_card_select_t card_info;\r
- if(!iso14443a_select_card(uid, &card_info, &cuid, true, 0, true)) {\r
- if (OLD_MF_DBGLEVEL >= 1) Dbprintf("ChkKeys: Can't select card");\r
- --i; // try same key once again\r
- continue;\r
- }\r
- switch (card_info.uidlen) {\r
- case 4 : cascade_levels = 1; break;\r
- case 7 : cascade_levels = 2; break;\r
- case 10: cascade_levels = 3; break;\r
- default: break;\r
- }\r
- have_uid = true;\r
- } else { // no need for anticollision. We can directly select the card\r
- if(!iso14443a_select_card(uid, NULL, NULL, false, cascade_levels, true)) {\r
- if (OLD_MF_DBGLEVEL >= 1) Dbprintf("ChkKeys: Can't select card (UID)");\r
- --i; // try same key once again\r
- continue;\r
- }\r
+ LED_B_ON();\r
+ if (res >= 0) {\r
+ cmd_send(CMD_ACK, 1, 0, 0, keyIndex, 80);\r
+ } else {\r
+ cmd_send(CMD_ACK, 0, 0, 0, NULL, 0);\r