From 659d7c11caddb827cdfb8b41ee630a3b3fce8f84 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 10 Jul 2023 22:25:58 +0200 Subject: [PATCH] cards: all UICC should use sel_ctrl="0400" and SIM "0000" Hence move this from the derived classes into the respective base classes SimCardBase and UiccCardBase Change-Id: Iad197c2b560c5ea05c54a122144361de5742aafd --- pySim/cards.py | 2 ++ pySim/legacy/cards.py | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pySim/cards.py b/pySim/cards.py index 772ea522..c6a68fcc 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -86,6 +86,7 @@ class SimCardBase(CardBase): def __init__(self, scc: LinkBase): super(SimCardBase, self).__init__(scc) self._scc.cla_byte = "A0" + self._scc.sel_ctrl = "0000" def probe(self) -> bool: df_gsm = DF_GSM() @@ -98,6 +99,7 @@ class UiccCardBase(SimCardBase): def __init__(self, scc: LinkBase): super(UiccCardBase, self).__init__(scc) self._scc.cla_byte = "00" + self._scc.sel_ctrl = "0004" # request an FCP # See also: ETSI TS 102 221, Table 9.3 self._adm_chv_num = 0xA0 diff --git a/pySim/legacy/cards.py b/pySim/legacy/cards.py index d4e5862e..e64b5c32 100644 --- a/pySim/legacy/cards.py +++ b/pySim/legacy/cards.py @@ -893,7 +893,6 @@ class SysmoUSIMSJS1(UsimCard): def __init__(self, ssc): super(SysmoUSIMSJS1, self).__init__(ssc) - self._scc.sel_ctrl = "0004" # request an FCP @classmethod def autodetect(kls, scc): @@ -1205,7 +1204,6 @@ class WavemobileSim(UsimCard): def __init__(self, ssc): super(WavemobileSim, self).__init__(ssc) self._adm_chv_num = 0x0A - self._scc.sel_ctrl = "0004" # request an FCP @classmethod def autodetect(kls, scc): @@ -1297,10 +1295,6 @@ class SysmoISIMSJA2(UsimCard, IsimCard): name = 'sysmoISIM-SJA2' - def __init__(self, ssc): - super(SysmoISIMSJA2, self).__init__(ssc) - self._scc.sel_ctrl = "0004" # request an FCP - @classmethod def autodetect(kls, scc): try: