From 1f77d673e2d9fda38b69b937dd457fd25fd16536 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 21 Jul 2023 12:59:17 +0200 Subject: [PATCH] simtrace2-cardem-pcsc: mark reset events in GSMTAP trace At the moment only APDUs are logged to GSMTAP. It is not uncommon that a card is resetted by the UE multiple times during normal operation. When the trace lacks the reset events (ATR) it becomes difficult to follow in which state the card actually is. Let't mark reset events by sending the ATR via GSMTAP (like simtrace2_sniff already does it) Related: OS#6094 Change-Id: I6b4d82b6ee369c95eeca8f7d59478452395fbe54 --- host/src/simtrace2-cardem-pcsc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/host/src/simtrace2-cardem-pcsc.c b/host/src/simtrace2-cardem-pcsc.c index 374966d4..4acf268d 100644 --- a/host/src/simtrace2-cardem-pcsc.c +++ b/host/src/simtrace2-cardem-pcsc.c @@ -106,6 +106,9 @@ static void update_status_flags(struct osmo_st2_cardem_inst *ci, uint32_t flags) LOGCI(ci, LOGL_NOTICE, "%s Resetting card in reader...\n", reset == COLD_RESET ? "Cold" : "Warm"); osim_card_reset(card, reset == COLD_RESET ? true : false); + + /* Mark reset event in GSMTAP wireshark trace */ + osmo_st2_gsmtap_send_apdu(GSMTAP_SIM_ATR, card->atr, card->atr_len); } last_status_flags = flags;