diff --git a/host/include/osmocom/simtrace2/simtrace2_api.h b/host/include/osmocom/simtrace2/simtrace2_api.h index d31fb85e..012b96c5 100644 --- a/host/include/osmocom/simtrace2/simtrace2_api.h +++ b/host/include/osmocom/simtrace2/simtrace2_api.h @@ -48,6 +48,7 @@ int osmo_st2_cardem_request_pb_and_tx(struct osmo_st2_cardem_inst *ci, uint8_t p int osmo_st2_cardem_request_sw_tx(struct osmo_st2_cardem_inst *ci, const uint8_t *sw); int osmo_st2_cardem_request_set_atr(struct osmo_st2_cardem_inst *ci, const uint8_t *atr, unsigned int atr_len); +int osmo_st2_cardem_request_config(struct osmo_st2_cardem_inst *ci, uint32_t features); int osmo_st2_modem_reset_pulse(struct osmo_st2_slot *slot, uint16_t duration_ms); diff --git a/host/lib/simtrace2_api.c b/host/lib/simtrace2_api.c index b2b2829f..b3e4e38a 100644 --- a/host/lib/simtrace2_api.c +++ b/host/lib/simtrace2_api.c @@ -204,6 +204,21 @@ int osmo_st2_cardem_request_set_atr(struct osmo_st2_cardem_inst *ci, const uint8 return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_SET_ATR); } +int osmo_st2_cardem_request_config(struct osmo_st2_cardem_inst *ci, uint32_t features) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_config *cfg; + + cfg = (struct cardemu_usb_msg_config *) msgb_put(msg, sizeof(*cfg)); + + printf("<= %s(%08x)\n", __func__, features); + + memset(cfg, 0, sizeof(*cfg)); + cfg->features = features; + + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_BD_CEMU_CONFIG); +} + /*********************************************************************** * Modem Control protocol ***********************************************************************/