cards: Add support for sysmo-isim-sja2

The sysmo-isim-sja2 cards are not yet supported by pysim. Lets add
support for writing KI and OPC in ADF.USIM and ADF.ISIM as well as the
remaining common simcard parameters.

Related: SYS#4466
Change-Id: I23e2b46eac0e0dbc2b271983d448999f6a459ecf
This commit is contained in:
Philipp Maier
2019-12-31 17:55:47 +01:00
parent 07cd481954
commit 0ad5bcfbc1
4 changed files with 199 additions and 1 deletions

View File

@@ -107,6 +107,10 @@ class SimCardCommands(object):
rv.append(data)
return rv
def select_adf(self, aid):
aidlen = ("0" + format(len(aid)/2, 'x'))[-2:]
return self._tp.send_apdu_checksw(self.cla_byte + "a4" + "0404" + aidlen + aid)
def read_binary(self, ef, length=None, offset=0):
if not hasattr(type(ef), '__iter__'):
ef = [ef]