\r
void printT5xxHeader(uint8_t page){\r
PrintAndLog("Reading Page %d:", page); \r
- PrintAndLog("blk | hex data | binary");\r
- PrintAndLog("----+----------+---------------------------------"); \r
+ PrintAndLog("blk | hex data | binary | ascii");\r
+ PrintAndLog("----+----------+---------------------------------+-------"); \r
}\r
\r
int CmdT55xxSetConfig(const char *Cmd) {\r
bits[i - config.offset] = DemodBuffer[i];\r
\r
blockData = PackBits(0, 32, bits);\r
+ uint8_t bytes[4] = {0};\r
+ num_to_bytes(blockData, 4, bytes);\r
\r
- PrintAndLog(" %s | %08X | %s", blockNum, blockData, sprint_bin(bits,32));\r
+ PrintAndLog(" %s | %08X | %s | %s", blockNum, blockData, sprint_bin(bits,32), sprint_ascii(bytes,4));\r
}\r
\r
int special(const char *Cmd) {\r
uint32_t blockData = 0;\r
uint8_t bits[32] = {0x00};\r
\r
- PrintAndLog("OFFSET | DATA | BINARY");\r
- PrintAndLog("----------------------------------------------------");\r
+ PrintAndLog("OFFSET | DATA | BINARY | ASCII");\r
+ PrintAndLog("-------+-------+------------------------------------+------");\r
int i,j = 0;\r
for (; j < 64; ++j){\r
\r
// bit1 = page to read from\r
// arg1: which block to read\r
// arg2: password\r
- \r
uint8_t arg0 = (page<<1) | pwdmode;\r
UsbCommand c = {CMD_T55XX_READ_BLOCK, {arg0, block, password}};\r
- \r
clearCommandBuffer();\r
SendCommand(&c);\r
- if ( !WaitForResponseTimeout(CMD_ACK,NULL,2500) ) {\r
+ if ( !WaitForResponseTimeout(CMD_ACK, NULL, 2500) ) {\r
PrintAndLog("command execution time out");\r
return 0;\r
}\r
\r
- uint8_t got[12000];\r
- GetFromBigBuf(got,sizeof(got),0);\r
- WaitForResponse(CMD_ACK,NULL);\r
+ uint8_t got[12288];\r
+ GetFromBigBuf(got, sizeof(got), 0);\r
+ if ( !WaitForResponseTimeout(CMD_ACK, NULL, 8000) ) {\r
+ PrintAndLog("command execution time out");\r
+ return 0;\r
+ }\r
setGraphBuf(got, sizeof(got));\r
return 1;\r
}\r