mirror of https://gerrit.osmocom.org/pysim
Move parsing of PLMNwAcT to generic Card class
Change-Id: I14d7c2dc51fac6d5cf4a708a77ad23d252ba6094
This commit is contained in:
parent
9efd8ef812
commit
140844052a
|
@ -163,9 +163,9 @@ if __name__ == '__main__':
|
|||
|
||||
# EF.PLMNwAcT
|
||||
try:
|
||||
(res, sw) = scc.read_binary(EF['PLMNwAcT'])
|
||||
(res, sw) = card.read_plmn_act()
|
||||
if sw == '9000':
|
||||
print("PLMNwAcT:\n%s" % (format_xplmn_w_act(res)))
|
||||
print("PLMNwAcT:\n%s" % (res))
|
||||
else:
|
||||
print("PLMNwAcT: Can't read, response code = %s" % (sw,))
|
||||
except Exception as e:
|
||||
|
|
|
@ -96,6 +96,13 @@ class Card(object):
|
|||
data, sw = self._scc.update_binary(EF['OPLMNwAcT'], content + 'ffffff0000' * (size // 5 - 1))
|
||||
return sw
|
||||
|
||||
def read_plmn_act(self):
|
||||
(res, sw) = self._scc.read_binary(EF['PLMNwAcT'])
|
||||
if sw == '9000':
|
||||
return (format_xplmn_w_act(res), sw)
|
||||
else:
|
||||
return (None, sw)
|
||||
|
||||
def update_plmn_act(self, mcc, mnc, access_tech='FFFF'):
|
||||
"""
|
||||
See note in update_hplmn_act()
|
||||
|
|
Loading…
Reference in New Issue