LEDsoff();
// init trace buffer
iso14a_clear_trace();
+ iso14a_set_tracing(TRUE);
// We won't start recording the frames that we acquire until we trigger;
// a good trigger condition to get started is probably when we see a
// C(red) A(yellow) B(green)
LEDsoff();
// init trace buffer
- iso14a_clear_trace();
+ iso14a_clear_trace();
+ iso14a_set_tracing(TRUE);
// The command (reader -> tag) that we're receiving.
// The length of a received command will in most cases be no more than 18 bytes.
int blockLen = 0;\r
int num = 0;\r
int pckNum = 0;\r
- uint8_t uid[8];\r
+ uint8_t uid[7];\r
+ uint8_t uid_len;\r
uint8_t atqa[2];\r
uint8_t sak;\r
bool isTag;\r
bufPtr += 4;\r
len = bufPtr[0];\r
bufPtr++;\r
- if ((len == 14) && (bufPtr[0] = 0xff) && (bufPtr[1] = 0xff)) {\r
+ if ((len == 14) && (bufPtr[0] == 0xff) && (bufPtr[1] == 0xff)) {\r
memcpy(uid, bufPtr + 2, 7);\r
memcpy(atqa, bufPtr + 2 + 7, 2);\r
+ uid_len = (atqa[0] & 0xC0) == 0x40 ? 7 : 4;\r
sak = bufPtr[11];\r
\r
- PrintAndLog("tag select uid:%s atqa:%02x %02x sak:0x%02x", sprint_hex(uid, 7), atqa[0], atqa[1], sak);\r
+ PrintAndLog("tag select uid:%s atqa:0x%02x%02x sak:0x%02x", \r
+ sprint_hex(uid + (7 - uid_len), uid_len),\r
+ atqa[1], \r
+ atqa[0], \r
+ sak);\r
if (wantLogToFile || wantDecrypt) {\r
- FillFileNameByUID(logHexFileName, uid, ".log", 7);\r
+ FillFileNameByUID(logHexFileName, uid + (7 - uid_len), ".log", uid_len);\r
AddLogCurrentDT(logHexFileName);\r
} \r
if (wantDecrypt) mfTraceInit(uid, atqa, sak, wantSaveToEmlFile);\r