if(!TagIsActive) { // no need to try decoding tag data if the reader is sending
uint8_t readerdata = (previous_data & 0xF0) | (*data >> 4);
if(MillerDecoding(readerdata, (sniffCounter-1)*4)) {
- LED_C_INV();
+ LED_B_ON();
+ LED_C_OFF();
+
if (MfSniffLogic(receivedCmd, Uart.len, Uart.parity, Uart.bitCount, true)) break;
/* And ready to receive another command. */
DemodReset();
}
ReaderIsActive = (Uart.state != STATE_UNSYNCD);
+ TagIsActive = !ReaderIsActive;
}
if(!ReaderIsActive) { // no need to try decoding tag data if the reader is sending
uint8_t tagdata = (previous_data << 4) | (*data & 0x0F);
if(ManchesterDecoding(tagdata, 0, (sniffCounter-1)*4)) {
- LED_C_INV();
+ LED_B_OFF();
+ LED_C_ON();
if (MfSniffLogic(receivedResponse, Demod.len, Demod.parity, Demod.bitCount, false)) break;
UartInit(receivedCmd, receivedCmdPar);
}
TagIsActive = (Demod.state != DEMOD_UNSYNCD);
+ ReaderIsActive = !TagIsActive;
}
}
sniffBuf[12] = 0xFF;\r
sniffBuf[13] = 0xFF;\r
LogTrace(sniffBuf, 14, 0, 0, NULL, TRUE);\r
- } // intentionally no break;\r
- case SNF_CARD_CMD:{ \r
- LogTrace(data, len, 0, 0, NULL, TRUE);\r
- sniffState = SNF_CARD_RESP;\r
- timerData = GetTickCount();\r
- break;\r
- }\r
- case SNF_CARD_RESP:{\r
- LogTrace(data, len, 0, 0, NULL, FALSE);\r
sniffState = SNF_CARD_CMD;\r
+ } // intentionally no break;\r
+ case SNF_CARD_CMD:{ \r
+ LogTrace(data, len, 0, 0, NULL, reader);\r
timerData = GetTickCount();\r
break;\r
}\r