Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mifare DESFire tag emulation support #287

Merged
merged 10 commits into from
Oct 19, 2020
Prev Previous commit
Next Next commit
Re-enabling some of the more verbose logging for DF configs with LIVE…
… logging
  • Loading branch information
maxieds committed Oct 18, 2020
commit 3400d1f585c5b74f302788d209c5ce0da2a02faf
2 changes: 2 additions & 0 deletions Firmware/Chameleon-Mini/Application/MifareDESFire.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ uint16_t MifareDesfireProcess(uint8_t* Buffer, uint16_t BitCount) {
ISO14443AAppendCRCA(Buffer, BitCount);
BitCount += 2;
}
LogEntry(LOG_INFO_DESFIRE_OUTGOING_DATA, Buffer, BitCount);
return BitCount * BITS_PER_BYTE;
}
else {
Expand All @@ -218,6 +219,7 @@ uint16_t MifareDesfireProcess(uint8_t* Buffer, uint16_t BitCount) {

uint16_t MifareDesfireAppProcess(uint8_t* Buffer, uint16_t BitCount) {
size_t ByteCount = (BitCount + BITS_PER_BYTE - 1) / BITS_PER_BYTE;
LogEntry(LOG_INFO_DESFIRE_INCOMING_DATA, Buffer, ByteCount);
if(ByteCount >= 8 && DesfireCLA(Buffer[0]) && Buffer[2] == 0x00 &&
Buffer[3] == 0x00 && Buffer[4] == ByteCount - 8) {
return MifareDesfireProcess(Buffer, BitCount);
Expand Down