laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37134?usp=email )
Change subject: pySim.apdu.ts_102_221: Decode FETCH and TERMINAL RESPONSE body ......................................................................
pySim.apdu.ts_102_221: Decode FETCH and TERMINAL RESPONSE body
This gives a meaningful decode during pySim-trace.
Change-Id: Ifa410e1fefc25e87ffa8e3a2230af80180a36a18 --- M pySim/apdu/ts_102_221.py M pySim/cat.py 2 files changed, 20 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/pySim/apdu/ts_102_221.py b/pySim/apdu/ts_102_221.py index 5636da2..eaac868 100644 --- a/pySim/apdu/ts_102_221.py +++ b/pySim/apdu/ts_102_221.py @@ -464,10 +464,12 @@ # TS 102 221 Section 11.2.3 / TS 102 223 class Fetch(ApduCommand, n='FETCH', ins=0x12, cla=['80']): _apdu_case = 2 + _tlv_rsp = cat.ProactiveCommand
# TS 102 221 Section 11.2.3 / TS 102 223 class TerminalResponse(ApduCommand, n='TERMINAL RESPONSE', ins=0x14, cla=['80']): _apdu_case = 3 + _tlv = cat.TerminalResponse
# TS 102 221 Section 11.3.1 class RetrieveData(ApduCommand, n='RETRIEVE DATA', ins=0xCB, cla=['8X', 'CX', 'EX']): diff --git a/pySim/cat.py b/pySim/cat.py index a14f4e2..2a830c3 100644 --- a/pySim/cat.py +++ b/pySim/cat.py @@ -1196,6 +1196,13 @@ def to_bytes(self, context: dict = {}): return self.decoded.to_tlv()
+# TS 101 223 Section 6.8.0 +class TerminalResponse(TLV_IE_Collection, + nested=[CommandDetails, DeviceIdentities, Result, + Duration, TextString, ItemIdentifier, + #TODO: LocalInformation and other optional/conditional IEs + ]): + pass
# reasonable default for playing with OTA # 010203040506070809101112131415161718192021222324252627282930313233