From 77f3f9ff5c43523632b7728b12b1648a5232c2e1 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 16 Nov 2016 17:44:08 +0100 Subject: [PATCH] CHG: "hf mf hardnested" device side should empty bigbuff? --- armsrc/mifarecmd.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index b933fc7b..f906099c 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -641,13 +641,17 @@ void MifareAcquireEncryptedNonces(uint32_t arg0, uint32_t arg1, uint32_t flags, LED_A_ON(); LED_C_OFF(); + BigBuf_free(); BigBuf_Clear_ext(false); + clear_trace(); + set_tracing(FALSE); + if (initialize) { iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN); - clear_trace(); - set_tracing(FALSE); } + LED_C_ON(); + uint8_t dummy_answer = 0; uint16_t num_nonces = 0; bool have_uid = false; for (uint16_t i = 0; i <= USB_CMD_DATA_SIZE - 9; ) { @@ -698,7 +702,6 @@ void MifareAcquireEncryptedNonces(uint32_t arg0, uint32_t arg1, uint32_t flags, } // send a dummy byte as reader response in order to trigger the cards authentication timeout - uint8_t dummy_answer = 0; ReaderTransmit(&dummy_answer, 1, NULL); timeout = GetCountSspClk() + AUTHENTICATION_TIMEOUT; @@ -727,7 +730,7 @@ void MifareAcquireEncryptedNonces(uint32_t arg0, uint32_t arg1, uint32_t flags, if (field_off) { FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); LEDsoff(); - //set_tracing(FALSE); + set_tracing(FALSE); } } -- 2.39.5