osmo-remsim/src
Harald Welte 38d990b0be client: Work around "stock on PTS" problem
I can occasionally see osmo-remsim-client-st2 get stuck when the Modem
(in this case a Quectel EC20) is performing PTS with the card.

In the log of osmo-remsim-client-st2 I can see:

SIMtrace => PTS req: ff 10 94 7b 00 00
SIMtrace -> 01 07 00 00 00 00 15 00 04 ff 10 94 7b 00 00 ff 10 94 7b
SIMtrace => PTS req: ff 10 94 7b 00 00
SIMtrace IRQ 01 04 00 00 00 00 15 00 13 00 00 00 00 00 09 04 0a 80 25 00 00

after which the communication doesn't proceed. After a long time, the
modem seems to retry without PTS and then proceeds with normal SIM card
communication.

Interestingly, both the firmware and a usbmon trace agree that the first
APDU header after the PTS is actually sent in an USB IN transfer:

-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)

usbmon shows 010600000000130001000000050000a4000402

It's unclear why the host program doesn't get the data from the IN
transfer.  However, if multiple asynchronous IN EP URB are submited,
the problem can be reproducibly avoided.  Let's do that.

Change-Id: I2fa5f71869b124b73e0c312befce1ca268e9a9a2
Closes: OS#4409
2020-02-21 22:09:45 +01:00
..
bankd remsim-client: move from common 'src' directory to 'src/client' 2020-02-16 15:41:12 +01:00
client client: Work around "stock on PTS" problem 2020-02-21 22:09:45 +01:00
rspro RSPRO: Add new ResetState{Req,Res} 2019-12-04 21:52:58 +01:00
server server: Don't accept out-of-range bank/client/slot numbers on REST 2020-02-20 18:52:24 +01:00
Makefile.am remsim-client: move from common 'src' directory to 'src/client' 2020-02-16 15:41:12 +01:00
asn1c_helpers.c Add asn1c_helpers.c file to get type/enum/choice names for printing 2019-03-09 20:19:28 +01:00
asn1c_helpers.h Add asn1c_helpers.c file to get type/enum/choice names for printing 2019-03-09 20:19:28 +01:00
debug.c add missing copyright / license headers everywhere 2019-03-09 13:11:56 +01:00
debug.h slotmap: Log file/line when changing state 2019-03-07 21:15:32 +01:00
rspro_client_fsm.c rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server 2020-02-18 23:02:51 +01:00
rspro_client_fsm.h rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server 2020-02-18 23:02:51 +01:00
rspro_util.c rspro_util: Add functions generating {Bank,Client}SlotStatusInd 2019-12-17 13:31:20 +01:00
rspro_util.h rspro_util: Add functions generating {Bank,Client}SlotStatusInd 2019-12-17 13:31:20 +01:00
slotmap.c bankd: Implement new ResetStateReq 2019-12-04 22:25:37 +01:00
slotmap.h bankd: Implement new ResetStateReq 2019-12-04 22:25:37 +01:00