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
This commit is contained in:
Philipp Maier
2023-07-21 12:59:17 +02:00
parent da078c090b
commit 1f77d673e2

View File

@@ -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", LOGCI(ci, LOGL_NOTICE, "%s Resetting card in reader...\n",
reset == COLD_RESET ? "Cold" : "Warm"); reset == COLD_RESET ? "Cold" : "Warm");
osim_card_reset(card, reset == COLD_RESET ? true : false); 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; last_status_flags = flags;