aboutsummaryrefslogtreecommitdiffstats
path: root/pySim/cards.py
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-03-21 12:05:30 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2017-04-06 00:38:22 +0200
commit4146086d2fd2e1ffae06dfa5c1dece3b742e7648 (patch)
tree81491a305ce953efc04221e9fd8575b33a3421ec /pySim/cards.py
parent3ce84d9a4478768a619a0875dc87319415fdf0a1 (diff)
Fix select control parameter
sysmo-usim-sjs1 requires P2 to be set to 0x0C (request FCI) when using the USIM application commands. The FCI is not used by pysim anyway and might even cause problems with other cards. This commit adds a pair of get/set methods to the SimCardCommands class in order to set a default for the selection control parameters (P1, P2). (Similar to the set/get methods for the class byte) The SysmoUSIMSJS1 class now calls the setter method for the selection control parameters inside of its constructuor and sets the selection control parameter default to "000C". This way we can be sure that we only change the behaviour for sysmo-usim-sjs1 and do not break support for any other cards. Change-Id: I1993a267c952bf37d5de1cb4e1107f445614c17b
Diffstat (limited to 'pySim/cards.py')
-rw-r--r--pySim/cards.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/pySim/cards.py b/pySim/cards.py
index 23352a7..fafc55f 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -425,6 +425,7 @@ class SysmoUSIMSJS1(Card):
def __init__(self, ssc):
super(SysmoUSIMSJS1, self).__init__(ssc)
self._scc.cla_byte = "00"
+ self._scc.sel_ctrl = "000C"
@classmethod
def autodetect(kls, scc):