ADD: added the ETU and Frame wait time based on the Frame wait integer value.

This commit is contained in:
iceman1001 2016-03-23 14:02:50 +01:00
parent 06eb3b1a8c
commit 186ad6037c

View file

@ -210,6 +210,11 @@ int CmdHF14BCmdRaw (const char *Cmd) {
}
// print full atqb info
// bytes
// 0,1,2,3 = application data
// 4 = bit rate capacity
// 5 = max frame size / -4 info
// 6 = FWI / Coding options
static void print_atqb_resp(uint8_t *data, uint8_t cid){
//PrintAndLog(" UID: %s", sprint_hex(data+1,4));
PrintAndLog(" App Data: %s", sprint_hex(data,4));
@ -232,17 +237,28 @@ static void print_atqb_resp(uint8_t *data, uint8_t cid){
else if (maxFrame == 8) maxFrame = 256;
else maxFrame = 257;
PrintAndLog ("Max Frame Size: %u%s",maxFrame, (maxFrame == 257) ? "+ RFU" : "");
PrintAndLog("Max Frame Size: %u%s bytes",maxFrame, (maxFrame == 257) ? "+ RFU" : "");
uint8_t protocolT = data[5] & 0xF;
PrintAndLog(" Protocol Type: Protocol is %scompliant with ISO/IEC 14443-4",(protocolT) ? "" : "not " );
PrintAndLog ("Frame Wait Int: %u", data[6]>>4);
uint8_t fwt = data[6]>>4;
if ( fwt < 16 ){
uint32_t etus = (32 << fwt);
uint32_t fwt_time = (302 << fwt);
PrintAndLog("Frame Wait Integer: %u - %u ETUs | %u µS", fwt, etus, fwt_time);
} else {
PrintAndLog("Frame Wait Integer: %u - RFU", fwt);
}
PrintAndLog(" App Data Code: Application is %s",(data[6]&4) ? "Standard" : "Proprietary");
PrintAndLog(" Frame Options: NAD is %ssupported",(data[6]&2) ? "" : "not ");
PrintAndLog(" Frame Options: CID is %ssupported",(data[6]&1) ? "" : "not ");
PrintAndLog("Tag :");
PrintAndLog (" Max Buf Length: %u (MBLI) %s",cid>>4, (cid & 0xF0) ? "" : "not supported");
PrintAndLog (" Cid : %u", cid & 0x0f);
PrintAndLog(" Max Buf Length: %u (MBLI) %s", cid>>4, (cid & 0xF0) ? "" : "chained frames not supported");
PrintAndLog(" CDI : %u", cid & 0x0f);
return;
}