laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/43350?usp=email )
Change subject: simtrace2-cardem-pcsc: use new API osmo_apdu_segment_in2() to fix GP GET DATA
......................................................................
simtrace2-cardem-pcsc: use new API osmo_apdu_segment_in2() to fix GP GET DATA
The old osmo_apdu_segment_in() could not parse GP GET DATA correctly
and will fail when parsing a GP GET DATA case 2 with an Le != 0.
Related: SYS#8147
Change-Id: Id5642cb76da4fcbcdd318d41691415781bf0bc50
---
M host/src/simtrace2-cardem-pcsc.c
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/host/src/simtrace2-cardem-pcsc.c b/host/src/simtrace2-cardem-pcsc.c
index f26698e..1f5c46d 100644
--- a/host/src/simtrace2-cardem-pcsc.c
+++ b/host/src/simtrace2-cardem-pcsc.c
@@ -159,7 +159,7 @@
/*! \brief Process a RX-DATA indication message from the SIMtrace2 */
static int process_do_rx_da(struct osmo_st2_cardem_inst *ci, uint8_t *buf, int len)
{
- static struct osmo_apdu_context ac;
+ static struct osmo_apdu_context ac, prev_ac;
struct cardemu_usb_msg_rx_data *data;
int rc;
@@ -168,8 +168,8 @@
LOGCI(ci, LOGL_INFO, "=> DATA: flags=0x%02x (%s), %s\n ", data->flags,
cemu_data_flags2str(data->flags), osmo_hexdump(data->data, data->data_len));
- rc = osmo_apdu_segment_in(&ac, data->data, data->data_len,
- data->flags & CEMU_DATA_F_TPDU_HDR);
+ rc = osmo_apdu_segment_in2(&ac, &prev_ac, data->data, data->data_len,
+ data->flags & CEMU_DATA_F_TPDU_HDR);
if (rc < 0) {
/* At this point the communication is broken. We cannot keep running, as we
* don't know if we should continue transmitting or receiving. Only a successful
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/43350?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: Id5642cb76da4fcbcdd318d41691415781bf0bc50
Gerrit-Change-Number: 43350
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Attention is currently required from: lynxis lazus.
laforge has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/simtrace2/+/43350?usp=email )
Change subject: simtrace2-cardem-pcsc: use new API osmo_apdu_segment_in2() to fix GP GET DATA
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/43350?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: Id5642cb76da4fcbcdd318d41691415781bf0bc50
Gerrit-Change-Number: 43350
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Sat, 22 Aug 2026 08:15:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/43347?usp=email )
Change subject: remsim_client: only set usb parameters if given by arguments
......................................................................
remsim_client: only set usb parameters if given by arguments
When calling osmo-remsim-client-st2 without setting the usb address (-A),
previous libusb_claim_interface() was called with an usb address of 255,
which is not valid on usb.
Only set arguments to libusb_claim_interface() when given.
Change-Id: I30f27b166db72fa8796aa4da98f9fc01e348c87a
---
M src/client/user_simtrace2.c
1 file changed, 12 insertions(+), 6 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/client/user_simtrace2.c b/src/client/user_simtrace2.c
index 2535efb..5d7d3c9 100644
--- a/src/client/user_simtrace2.c
+++ b/src/client/user_simtrace2.c
@@ -415,12 +415,18 @@
bc->cardem = ci;
memset(ifm, 0, sizeof(*ifm));
- ifm->vendor = cfg->usb.vendor_id;
- ifm->product = cfg->usb.product_id;
- ifm->configuration = cfg->usb.config_id;
- ifm->interface = cfg->usb.if_num;
- ifm->altsetting = cfg->usb.altsetting;
- ifm->addr = cfg->usb.addr;
+ if (cfg->usb.vendor_id > 0)
+ ifm->vendor = cfg->usb.vendor_id;
+ if (cfg->usb.product_id > 0)
+ ifm->product = cfg->usb.product_id;
+ if (cfg->usb.config_id > 0)
+ ifm->configuration = cfg->usb.config_id;
+ if (cfg->usb.if_num > 0)
+ ifm->interface = cfg->usb.if_num;
+ if (cfg->usb.altsetting > 0)
+ ifm->altsetting = cfg->usb.altsetting;
+ if (cfg->usb.addr > 0)
+ ifm->addr = cfg->usb.addr;
if (cfg->usb.path)
osmo_strlcpy(ifm->path, cfg->usb.path, sizeof(ifm->path));
transp->udp_fd = -1;
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/43347?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I30f27b166db72fa8796aa4da98f9fc01e348c87a
Gerrit-Change-Number: 43347
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Attention is currently required from: lynxis lazus.
laforge has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-remsim/+/43347?usp=email )
Change subject: remsim_client: only set usb parameters if given by arguments
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/43347?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I30f27b166db72fa8796aa4da98f9fc01e348c87a
Gerrit-Change-Number: 43347
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Sat, 22 Aug 2026 08:15:08 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: lynxis lazus.
laforge has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-remsim/+/43352?usp=email )
Change subject: handle_options(): exit(2) if an unparsed argument was given
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/43352?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I84658bda7614d9463bd7d20eb584da8e7050f1e5
Gerrit-Change-Number: 43352
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Sat, 22 Aug 2026 08:15:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: lynxis lazus.
laforge has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-remsim/+/43352?usp=email )
Change subject: handle_options(): exit(2) if an unparsed argument was given
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/43352?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I84658bda7614d9463bd7d20eb584da8e7050f1e5
Gerrit-Change-Number: 43352
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Sat, 22 Aug 2026 08:15:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: lynxis lazus.
laforge has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-remsim/+/43347?usp=email )
Change subject: remsim_client: only set usb parameters if given by arguments
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/43347?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I30f27b166db72fa8796aa4da98f9fc01e348c87a
Gerrit-Change-Number: 43347
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Sat, 22 Aug 2026 08:14:37 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes