https://osmocom.org/https://osmocom.org/favicon.ico?16647414092020-02-20T21:09:05ZOpen Source Mobile Communicationsosmo-remsim - Bug #4409: osmo-remsim-client-st2 (or firmware?) gets stuck on PTShttps://osmocom.org/issues/4409?journal_id=175132020-02-20T21:09:05Zlaforge
<ul><li><strong>Subject</strong> changed from <i>osmo-remsim-client-st2 (or firmware?) gets stuc on PTS</i> to <i>osmo-remsim-client-st2 (or firmware?) gets stuck on PTS</i></li><li><strong>Category</strong> set to <i>remsim-client</i></li></ul><p>Observed with remsim-client 0.2.2.46.3598</p> osmo-remsim - Bug #4409: osmo-remsim-client-st2 (or firmware?) gets stuck on PTShttps://osmocom.org/issues/4409?journal_id=175262020-02-21T20:05:32Zlaforge
<ul></ul><p>Serial Console output at the time this happens:</p>
<pre>
-I- 0: ATR set: 3b 7d 94 00 00 55 55 53 0a 74 86 93 0b 24 7c 4d 54 68
-I- 0: De-asserting modem reset
-I- 0: RST released
-I- 0: RST asserted
-I- 0: VCC activated
-I- 0: CLK activated
-I- 0: RST released
-I- 0: computed Fi(1) Di(1) ratio: 372
-I- 0: computed Fi(9) Di(4) ratio: 64
-I- 0: send_tpdu_header: 00 a4 00 04 02
-I- 0: flush_rx_buffer (5)
</pre>
<p>So based on this we can see that the firmware <strong>thinks</strong> it has sent the heaer of the first APDU after the PTS, but somehow the simtrace2 host software doesn't claim to know anything about it.</p> osmo-remsim - Bug #4409: osmo-remsim-client-st2 (or firmware?) gets stuck on PTShttps://osmocom.org/issues/4409?journal_id=175282020-02-21T20:37:55Zlaforge
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>20</i></li></ul><p>Doing a usbmon/tshark capture shows the following message on the USB BULK IN endpoint:<br /><pre>
010600000000130001000000050000a4000402
</pre></p>
<p>This clearly contains the APDU header of the first APDU after the PTS. so it appears to be the remsim-client software that's somehow loosing/dropping it.</p> osmo-remsim - Bug #4409: osmo-remsim-client-st2 (or firmware?) gets stuck on PTShttps://osmocom.org/issues/4409?journal_id=175292020-02-21T20:41:51Zlaforge
<ul><li><strong>File</strong> <a href="/attachments/4031">20200221-qmod-pts.pcapng</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4031/20200221-qmod-pts.pcapng">20200221-qmod-pts.pcapng</a> added</li></ul> osmo-remsim - Bug #4409: osmo-remsim-client-st2 (or firmware?) gets stuck on PTShttps://osmocom.org/issues/4409?journal_id=175302020-02-21T21:00:30Zlaforge
<ul></ul><p>problem can be avoided by the following patch:</p>
<pre>
diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c
index 2929574..08f37ea 100644
--- a/src/client/simtrace2-remsim_client.c
+++ b/src/client/simtrace2-remsim_client.c
@@ -1164,6 +1164,9 @@ static void main_body(struct cardem_inst *ci, struct client_config *cfg)
allocate_and_submit_irq(ci);
allocate_and_submit_in(ci);
+ allocate_and_submit_in(ci);
+ allocate_and_submit_in(ci);
+ allocate_and_submit_in(ci);
while (!g_leave_main) {
osmo_select_main(false);
</pre>
<p>This ensures multiple URB are submitted and we're never starving the device of IN EP URBs.</p> osmo-remsim - Bug #4409: osmo-remsim-client-st2 (or firmware?) gets stuck on PTShttps://osmocom.org/issues/4409?journal_id=175312020-02-21T21:12:16Zlaforge
<ul><li><strong>% Done</strong> changed from <i>20</i> to <i>80</i></li></ul><p>Patch submitted in <a class="external" href="https://gerrit.osmocom.org/c/osmo-remsim/+/17243">https://gerrit.osmocom.org/c/osmo-remsim/+/17243</a></p> osmo-remsim - Bug #4409: osmo-remsim-client-st2 (or firmware?) gets stuck on PTShttps://osmocom.org/issues/4409?journal_id=175362020-02-22T21:41:09Zlaforge
<ul></ul><p>I'm again observing this despite the four submitted URBs :(</p> osmo-remsim - Bug #4409: osmo-remsim-client-st2 (or firmware?) gets stuck on PTShttps://osmocom.org/issues/4409?journal_id=176332020-03-04T21:15:45Zlaforge
<ul></ul><p>As an interim work-around we can of course simply advertise an ATR that supports only lower speeds.. but I don't really like that and would prefer a proper solution.</p> osmo-remsim - Bug #4409: osmo-remsim-client-st2 (or firmware?) gets stuck on PTShttps://osmocom.org/issues/4409?journal_id=187042020-06-13T18:04:34Zlaforge
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Stalled</i></li></ul> osmo-remsim - Bug #4409: osmo-remsim-client-st2 (or firmware?) gets stuck on PTShttps://osmocom.org/issues/4409?journal_id=211092021-02-06T08:55:27Zlaforge
<ul><li><strong>Assignee</strong> changed from <i>laforge</i> to <i>Hoernchen</i></li><li><strong>Priority</strong> changed from <i>High</i> to <i>Low</i></li></ul>