From a2374e93a95f567c7c9cb10457e7ca51729c37bd Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 27 Aug 2026 17:06:14 +0200 Subject: [PATCH] fix missing log entries for sim module communications --- armsrc/sam_common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/armsrc/sam_common.c b/armsrc/sam_common.c index 2bfb06fe8..8afbc64f7 100644 --- a/armsrc/sam_common.c +++ b/armsrc/sam_common.c @@ -226,6 +226,11 @@ int sam_rxtx(const uint8_t *data, uint16_t n, uint8_t *resp, uint16_t *resplen) if (resp[*resplen - 2] == 0x61 || resp[*resplen - 2] == 0x9F) { more_len = resp[*resplen - 1]; + + // The GET RESPONSE round below is ours, not the caller's, so log both + // halves of it. Without this the trace shows a case 3 command coming + // back with a full data answer, which T=0 cannot do. + LogTrace(resp, *resplen, 0, 0, NULL, false); } else { // we done, return goto out; @@ -239,6 +244,7 @@ int sam_rxtx(const uint8_t *data, uint16_t n, uint8_t *resp, uint16_t *resplen) } uint8_t cmd_getresp[] = {0x00, ISO7816_GET_RESPONSE, 0x00, 0x00, more_len}; + LogTrace(cmd_getresp, sizeof(cmd_getresp), 0, 0, NULL, true); res = I2C_BufferWrite(cmd_getresp, sizeof(cmd_getresp), I2C_DEVICE_CMD_SEND_T0, I2C_DEVICE_ADDRESS_MAIN); if (res == false) {