int password = 0xFFFFFFFF; //default to blank Block 7\r
\r
char cmdp = param_getchar(Cmd, 0);\r
- if (cmdp == 'h' || cmdp == 'H')\r
- return usage_t55xx_read();\r
+ if (cmdp == 'h' || cmdp == 'H') return usage_t55xx_read();\r
\r
int res = sscanf(Cmd, "%d %x", &block, &password);\r
\r
- if ( res < 1 || res > 2 )\r
- return usage_t55xx_read();\r
-\r
+ if ( res < 1 || res > 2 ) return usage_t55xx_read();\r
\r
if ((block < 0) | (block > 7)) {\r
PrintAndLog("Block must be between 0 and 7");\r
DemodBufferLen = 0x00;\r
\r
//trim 1/2 a clock from beginning\r
- snprintf(cmdStr, sizeof(buf),"%d", bitRate[config.bitrate]/2 );\r
- CmdLtrim(cmdStr);\r
+ //snprintf(cmdStr, sizeof(buf),"%d", bitRate[config.bitrate]/2 );\r
+ //CmdLtrim(cmdStr);\r
switch( config.modulation ){\r
case DEMOD_FSK:\r
snprintf(cmdStr, sizeof(buf),"%d %d", bitRate[config.bitrate], config.inverted );\r
\r
// detect configuration?\r
bool tryDetectModulation(){\r
- char cmdStr[8] = {0};\r
+ //char cmdStr[8] = {0};\r
uint8_t hits = 0;\r
t55xx_conf_block_t tests[15];\r
int bitRate=0;\r
save_restoreGB(1);\r
if (GetFskClock("", FALSE, FALSE)){ \r
fskClocks(&fc1, &fc2, &clk, FALSE);\r
- sprintf(cmdStr,"%d", clk/2);\r
- CmdLtrim(cmdStr);\r
+ //sprintf(cmdStr,"%d", clk/2);\r
+ //CmdLtrim(cmdStr);\r
if ( FSKrawDemod("0 0", FALSE) && test(DEMOD_FSK, &tests[hits].offset, &bitRate)){\r
tests[hits].modulation = DEMOD_FSK;\r
if (fc1==8 && fc2 == 5)\r
}\r
} else {\r
clk = GetAskClock("", FALSE, FALSE);\r
- \r
if (clk>0) {\r
- sprintf(cmdStr,"%d", clk/2);\r
- CmdLtrim(cmdStr);\r
+ //sprintf(cmdStr,"%d", clk/2);\r
+ //CmdLtrim(cmdStr);\r
if ( ASKDemod("0 0 0", FALSE, FALSE, 1) && test(DEMOD_ASK, &tests[hits].offset, &bitRate)) {\r
tests[hits].modulation = DEMOD_ASK;\r
tests[hits].bitrate = bitRate;\r
save_restoreGB(0);\r
clk = GetNrzClock("", FALSE, FALSE);\r
if (clk>0) {\r
- sprintf(cmdStr,"%d", clk/2);\r
- CmdLtrim(cmdStr);\r
+ //sprintf(cmdStr,"%d", clk/2);\r
+ //CmdLtrim(cmdStr);\r
if ( NRZrawDemod("0 0 1", FALSE) && test(DEMOD_NRZ, &tests[hits].offset, &bitRate)) {\r
tests[hits].modulation = DEMOD_NRZ;\r
tests[hits].bitrate = bitRate;\r
save_restoreGB(0);\r
clk = GetPskClock("", FALSE, FALSE);\r
if (clk>0) {\r
- PrintAndLog("clk %d",clk);\r
- sprintf(cmdStr,"%d", clk/2);\r
- CmdLtrim(cmdStr); \r
+ //PrintAndLog("clk %d",clk);\r
+ //sprintf(cmdStr,"%d", clk/2);\r
+ //CmdLtrim(cmdStr); \r
if ( PSKDemod("0 0 1", FALSE) && test(DEMOD_PSK1, &tests[hits].offset, &bitRate)) {\r
tests[hits].modulation = DEMOD_PSK1;\r
tests[hits].bitrate = bitRate;\r
\r
if (block > 7) {\r
PrintAndLog("Block number must be between 0 and 7");\r
- return 2;\r
+ return 1;\r
}\r
\r
UsbCommand resp;\r