return 0;\r
}\r
int usage_t55xx_detectP1(){\r
- PrintAndLog("Usage: lf t55xx page1detect [1] [p <password>]");\r
+ PrintAndLog("Command: Detect Page 1 of a t55xx chip");\r
+ PrintAndLog("Usage: lf t55xx p1detect [1] [p <password>]");\r
PrintAndLog("Options:");\r
PrintAndLog(" 1 - if set, use Graphbuffer otherwise read data from tag.");\r
PrintAndLog(" p <password> - OPTIONAL password (8 hex characters)");\r
PrintAndLog("");\r
PrintAndLog("Examples:");\r
- PrintAndLog(" lf t55xx page1detect");\r
- PrintAndLog(" lf t55xx page1detect 1");\r
- PrintAndLog(" lf t55xx page1detect p 11223344");\r
+ PrintAndLog(" lf t55xx p1detect");\r
+ PrintAndLog(" lf t55xx p1detect 1");\r
+ PrintAndLog(" lf t55xx p1detect p 11223344");\r
PrintAndLog("");\r
return 0;\r
}\r
}\r
}\r
clk = GetNrzClock("", false, false);\r
- if (clk>0) {\r
+ if (clk>8) { //clock of rf/8 is likely a false positive, so don't use it.\r
if ( NRZrawDemod("0 0 1", false) && test(DEMOD_NRZ, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
tests[hits].modulation = DEMOD_NRZ;\r
tests[hits].bitrate = bitRate;\r
if (!testBitRate(bitRate, clk)) continue;\r
} else { //extended mode bitrate = same function to calc bitrate as em4x05\r
if (EM4x05_GET_BITRATE(bitRate) != clk) continue;\r
+\r
}\r
//test modulation\r
if (!testModulation(mode, modread)) continue;\r
int printConfiguration( t55xx_conf_block_t b){\r
PrintAndLog("Chip Type : %s", (b.Q5) ? "T5555(Q5)" : "T55x7");\r
PrintAndLog("Modulation : %s", GetSelectedModulationStr(b.modulation) );\r
- PrintAndLog("Bit Rate : %s", GetBitRateStr(b.bitrate, (b.block0 & T55x7_X_MODE)) );\r
+ PrintAndLog("Bit Rate : %s", GetBitRateStr(b.bitrate, (b.block0 & T55x7_X_MODE && (b.block0>>28==6 || b.block0>>28==9))) );\r
PrintAndLog("Inverted : %s", (b.inverted) ? "Yes" : "No" );\r
PrintAndLog("Offset : %d", b.offset);\r
PrintAndLog("Seq. Term. : %s", (b.ST) ? "Yes" : "No" );\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
- setGraphBuf(got, sizeof(got));\r
+ getSamples(12000,true);\r
return 1;\r
}\r
\r