int res = ExchangeRAW14a(cmd1, sizeof(cmd1), true, true, data, sizeof(data), &datalen);\r
if (res) {\r
PrintAndLog("ERROR exchande raw error: %d", res);\r
+ DropField();\r
return 2;\r
}\r
\r
\r
if (datalen < 3) {\r
PrintAndLog("ERROR: card response length: %d", datalen);\r
+ DropField();\r
return 3;\r
}\r
\r
if (data[0] != 0x0a || data[1] != 0x00) {\r
PrintAndLog("ERROR: card response. Framing error. :%s", sprint_hex(data, 2));\r
+ DropField();\r
return 3;\r
}\r
\r
if (data[2] != 0x90) {\r
PrintAndLog("ERROR: card response error: %02x", data[2]);\r
+ DropField();\r
return 3;\r
}\r
\r
if (datalen != 19) {\r
PrintAndLog("ERROR: card response must be 16 bytes long instead of: %d", datalen);\r
+ DropField();\r
return 3;\r
}\r
\r