]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/mifarecmd.c
ADD: marshmellows new lf command and DetectClock. (works great!)
[proxmark3-svn] / armsrc / mifarecmd.c
index b9b8098a403c1d346858f42cdc1fa9f781d82c9a..1352215e2314df9488cfb8e64eecb1f62b7bbeaf 100644 (file)
@@ -601,7 +601,7 @@ void MifareNested(uint32_t arg0, uint32_t arg1, uint32_t calibrate, uint8_t *dat
                        nttmp = prng_successor(nt1, 100);                               //NXP Mifare is typical around 840,but for some unlicensed/compatible mifare card this can be 160\r
                        for (i = 141; i < 1200; i++) {\r
                                nttmp = prng_successor(nttmp, 1);\r
-                               if (nttmp == nt2) {break;}\r
+                               if (nttmp == nt2) break;\r
                        }\r
 \r
                        if (i != 1200) {\r
@@ -945,8 +945,8 @@ void MifareCSetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai
        uint8_t* receivedAnswer = get_bigbufptr_recvrespbuf();\r
        uint8_t *receivedAnswerPar = receivedAnswer + MAX_FRAME_SIZE;\r
        \r
+       // reset FPGA and LED\r
        if (workFlags & 0x08) {\r
-               // clear trace\r
                iso14a_clear_trace();\r
                iso14a_set_tracing(TRUE);\r
 \r
@@ -956,16 +956,18 @@ void MifareCSetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai
                LED_B_OFF();\r
                LED_C_OFF();\r
        \r
-               SpinDelay(300);\r
-               FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);\r
-               SpinDelay(100);\r
-               FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_ISO14443A | FPGA_HF_ISO14443A_READER_MOD);\r
+               //SpinDelay(300);\r
+               //FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);\r
+               //SpinDelay(100);\r
+               //FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_ISO14443A | FPGA_HF_ISO14443A_READER_MOD);\r
        }\r
 \r
        while (true) {\r
+\r
                // get UID from chip\r
                if (workFlags & 0x01) {\r
                        if(!iso14443a_select_card(uid, NULL, &cuid)) {\r
+                               Dbprintf("ICE");\r
                                if (MF_DBGLEVEL >= 1)   Dbprintf("Can't select card");\r
                                break;\r
                        };\r
@@ -1041,7 +1043,6 @@ void MifareCSetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai
        LED_B_OFF();\r
 \r
        if ((workFlags & 0x10) || (!isOK)) {\r
-               // Thats it...\r
                FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);\r
                LEDsoff();\r
        }\r
@@ -1082,10 +1083,10 @@ void MifareCGetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai
                LED_B_OFF();\r
                LED_C_OFF();\r
        \r
-               SpinDelay(300);\r
-               FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);\r
-               SpinDelay(100);\r
-               FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_ISO14443A | FPGA_HF_ISO14443A_READER_MOD);\r
+               // SpinDelay(300);\r
+               // FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);\r
+               // SpinDelay(100);\r
+               // FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_ISO14443A | FPGA_HF_ISO14443A_READER_MOD);\r
        }\r
 \r
        while (true) {\r
Impressum, Datenschutz