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
return 0;\r
}\r
}\r
-\r
+ \r
for ( int i = 0; i <8; ++i){\r
memset(s,0,sizeof(s));\r
if ( hasPwd ) {\r
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
\r
int i = start;\r
int j = len-1;\r
+ if (len > 32) {\r
+ return 0;\r
+ }\r
uint32_t tmp = 0;\r
for (; j >= 0; --j, ++i){\r
tmp |= bits[i] << j;\r
{"rdpwd", CmdReadBlkPWD, 0, "<block> <password> -- Read T55xx block data with password mode"},\r
{"wr", CmdWriteBlk, 0, "<data> <block> -- Write T55xx block data (page 0)"},\r
{"wrpwd", CmdWriteBlkPWD, 0, "<data> <block> <password> -- Write T55xx block data with password"},\r
- {"trace", CmdReadTrace, 0, "[1] Read T55xx traceability data (page 1 / blk 0-1) "},\r
- {"info", CmdInfo, 0, "[1] Read T55xx configuration data (page0 /blk 0)"},\r
+ {"trace", CmdReadTrace, 0, "[1] Read T55xx traceability data (page 1/ blk 0-1)"},\r
+ {"info", CmdInfo, 0, "[1] Read T55xx configuration data (page 0/ blk 0)"},\r
{"dump", CmdDump, 0, "[password] Dump T55xx card block 0-7. optional with password"},\r
{"fsk", CmdIceFsk, 0, "FSK demod"},\r
{"man", CmdIceManchester, 0, "Manchester demod (with SST)"},\r