From 4e5a8b98481f02e0830aa17843bb10c1ab7a87e5 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 12 Feb 2025 15:46:12 +0100 Subject: [PATCH] 4A emulation: warn if chaining command received --- armsrc/iso14443a.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/armsrc/iso14443a.c b/armsrc/iso14443a.c index ad21732bc..f7153fa94 100644 --- a/armsrc/iso14443a.c +++ b/armsrc/iso14443a.c @@ -4050,7 +4050,7 @@ void SimulateIso14443aTagAID(uint8_t tagType, uint16_t flags, uint8_t *uid, dynamic_response_info.response_n = 0; dynamic_response_info.modulation_n = 0; - // Check for ISO 14443A-4 compliant commands, look at left nibble + // Check for ISO 14443A-4 compliant commands, look at left byte (PCB) uint8_t offset = 0; switch (receivedCmd[0]) { case 0x0B: // IBlock with CID @@ -4136,12 +4136,15 @@ void SimulateIso14443aTagAID(uint8_t tagType, uint16_t flags, uint8_t *uid, break; default: { - // Never seen this command before + // Never seen this PCB before LogTrace(receivedCmd, Uart.len, Uart.startTime * 16 - DELAY_AIR2ARM_AS_TAG, Uart.endTime * 16 - DELAY_AIR2ARM_AS_TAG, Uart.parity, true); if (g_dbglevel >= DBG_DEBUG) { Dbprintf("Received unknown command (len=%d):", len); Dbhexdump(len, receivedCmd, false); } + if ((receivedCmd[0] & 0x10) == 0x10) { + Dbprintf("Warning, reader sent a chained command but we lack support for it. Ignoring command."); + } // Do not respond dynamic_response_info.response_n = 0; }