]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlft55xx.c
Applied Holiman's fixes for iclass.c and CSNs
[proxmark3-svn] / client / cmdlft55xx.c
index 513eb0ef668683334191f388243951ba5567cfc3..78d90e7cda17ee9f80f25daa030ce0e8bff91d29 100644 (file)
@@ -46,18 +46,17 @@ int CmdReadBlk(const char *Cmd)
        SendCommand(&c);\r
        WaitForResponse(CMD_ACK, NULL);\r
        \r
-//     uint8_t data[LF_TRACE_BUFF_SIZE] = {0x00};\r
+       uint8_t data[LF_TRACE_BUFF_SIZE] = {0x00};\r
        \r
-       // GetFromBigBuf(data,LF_TRACE_BUFF_SIZE,3560);  //3560 -- should be offset..\r
-       // WaitForResponseTimeout(CMD_ACK,NULL, 1500);\r
-\r
-       // for (int j = 0; j < LF_TRACE_BUFF_SIZE; j++) {\r
-               // GraphBuffer[j] = (int)data[j];\r
-       // }\r
-       // GraphTraceLen = LF_TRACE_BUFF_SIZE;\r
-       CmdSamples("12000");\r
+       GetFromBigBuf(data,LF_TRACE_BUFF_SIZE,3560);  //3560 -- should be offset..\r
+       WaitForResponseTimeout(CMD_ACK,NULL, 1500);\r
+\r
+       for (int j = 0; j < LF_TRACE_BUFF_SIZE; j++) {\r
+               GraphBuffer[j] = (int)data[j];\r
+       }\r
+       GraphTraceLen = LF_TRACE_BUFF_SIZE;\r
        ManchesterDemod(block);\r
-       // RepaintGraphWindow();\r
+       RepaintGraphWindow();\r
   return 0;\r
 }\r
 \r
@@ -321,7 +320,7 @@ int CmdDump(const char *Cmd){
                        return 0;\r
                }\r
        }\r
-\r
+       \r
        for ( int i = 0; i <8; ++i){\r
                memset(s,0,sizeof(s));\r
                if ( hasPwd ) {\r
@@ -352,6 +351,7 @@ int ManchesterDemod(int blockNum){
        if (!HasGraphData()) return 0;\r
                \r
        uint8_t sizebyte = 32;\r
+       // the value 5 was selected during empirical studies of the decoded data. Some signal noise to skip.\r
        uint8_t offset = 5;\r
        uint32_t blockData;\r
        uint8_t  bits[LF_BITSSTREAM_LEN] = {0x00};\r
Impressum, Datenschutz