diff --git a/Firmware/Chameleon-Mini/Codec/SniffISO14443-2A.c b/Firmware/Chameleon-Mini/Codec/SniffISO14443-2A.c index ca3ab4b..6d4b996 100644 --- a/Firmware/Chameleon-Mini/Codec/SniffISO14443-2A.c +++ b/Firmware/Chameleon-Mini/Codec/SniffISO14443-2A.c @@ -454,7 +454,7 @@ void Sniff14443ACodecTask(void) if (DemodBitCount >= ISO14443A_MIN_BITS_PER_FRAME) { // For logging data - LogEntry(LOG_INFO_CODEC_RX_DATA, CodecBuffer, (DemodBitCount+7)/8); + LogEntry(LOG_INFO_CODEC_SNI_READER_DATA, CodecBuffer, (DemodBitCount+7)/8); LEDHook(LED_CODEC_RX, LED_PULSE); TrafficSource = TRAFFIC_CARD; @@ -515,8 +515,8 @@ void Sniff14443ACodecTask(void) CodecBuffer2[BitCount / 8] = CardSampleR >> (8 - (BitCount % 8)); // BitCount = removeParityBits(CodecBuffer, BitCount); - - LogEntry(LOG_INFO_CODEC_RX_DATA_W_PARITY, CodecBuffer2, (BitCount + 7) / 8); + LEDHook(LED_CODEC_RX, LED_PULSE); + LogEntry(LOG_INFO_CODEC_SNI_CARD_DATA_W_PARITY, CodecBuffer2, (BitCount + 7) / 8); // Disable card sniffing and enable reader sniffing CardSniffDeinit(); diff --git a/Firmware/Chameleon-Mini/Log.h b/Firmware/Chameleon-Mini/Log.h index ce0bbfd..3fd3a31 100644 --- a/Firmware/Chameleon-Mini/Log.h +++ b/Firmware/Chameleon-Mini/Log.h @@ -23,6 +23,14 @@ typedef enum { LOG_INFO_CODEC_RX_DATA_W_PARITY = 0x42, ///< Currently active codec received data. LOG_INFO_CODEC_TX_DATA_W_PARITY = 0x43, ///< Currently active codec sent data. + LOG_INFO_CODEC_SNI_READER_DATA = 0x44, //< Sniffing codec receive data from reader + LOG_INFO_CODEC_SNI_READER_DATA_W_PARITY = 0x45, //< Sniffing codec receive data from reader + + LOG_INFO_CODEC_SNI_CARD_DATA = 0x46, //< Sniffing codec receive data from card + LOG_INFO_CODEC_SNI_CARD_DATA_W_PARITY = 0x47, //< Sniffing codec receive data from card + + + /* App */ LOG_INFO_APP_CMD_READ = 0x80, ///< Application processed read command. LOG_INFO_APP_CMD_WRITE = 0x81, ///< Application processed write command. diff --git a/Software/Chameleon/Log.py b/Software/Chameleon/Log.py index bcf7a24..0614e1b 100644 --- a/Software/Chameleon/Log.py +++ b/Software/Chameleon/Log.py @@ -25,6 +25,12 @@ eventTypes = { 0x42: { 'name': 'CODEC RX W/PARITY', 'decoder': binaryDecoder }, 0x43: { 'name': 'CODEC TX W/PARITY', 'decoder': binaryDecoder }, + 0x44: { 'name': 'CODEC RX SNI READER', 'decoder': binaryDecoder }, + 0x45: { 'name': 'CODEC RX SNI READER W/PARITY', 'decoder': binaryDecoder }, + 0x46: { 'name': 'CODEC RX SNI CARD', 'decoder': binaryDecoder }, + 0x47: { 'name': 'CODEC RX SNI CARD W/PARITY', 'decoder': binaryDecoder }, + + 0x80: { 'name': 'APP READ', 'decoder': binaryDecoder }, 0x81: { 'name': 'APP WRITE', 'decoder': binaryDecoder }, 0x84: { 'name': 'APP INC', 'decoder': binaryDecoder }, diff --git a/Software/chamlog.py b/Software/chamlog.py index e73d503..76dd87e 100755 --- a/Software/chamlog.py +++ b/Software/chamlog.py @@ -19,7 +19,7 @@ def verboseLog(text): def formatText(log): formatString = '{timestamp:0>5d} ms <{deltaTimestamp:>+6d} ms>:' - formatString += '{eventName:<16} ({dataLength:<3} bytes) [{data}]\n' + formatString += '{eventName:<28} ({dataLength:<3} bytes)\t[{data}]\n' text = '' for logEntry in log: