diff options
author | Supreeth Herle <herlesupreeth@gmail.com> | 2020-03-24 13:26:53 +0100 |
---|---|---|
committer | herlesupreeth <herlesupreeth@gmail.com> | 2021-01-05 10:06:19 +0100 |
commit | acc222f9f082983b642c60120fd941e34638d81a (patch) | |
tree | fa1a3f83ad1079fbcc3f6e158ffacf26f3ae5cd4 | |
parent | f964df4eb51465d7b00ac3fcb25661e45a3e5be7 (diff) |
sysmoISIM-SJA2: Enable Service 106 and 107 after successfully programming EF.ePDGId and EF.ePDGSelection
Service 106 and 107 must be set available in order to ME to consider as supported in USIM:
1. ePDG configuration Information support
2. ePDG configuration Information configured
Change-Id: Ica067915b9d06ba67f53da7d628f8bacde1ab80e
-rw-r--r-- | pySim/cards.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pySim/cards.py b/pySim/cards.py index dc612df..1036717 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -302,6 +302,13 @@ class UsimCard(Card): else: return ([None, None], sw) + def update_ust(self, service, bit=1): + (res, sw) = self._scc.read_binary(EF_USIM_ADF_map['UST']) + if sw == '9000': + content = enc_st(res, service, bit) + (res, sw) = self._scc.update_binary(EF_USIM_ADF_map['UST'], content) + return sw + class _MagicSimBase(Card): """ @@ -1216,6 +1223,17 @@ class SysmoISIMSJA2(UsimCard): print("Programming ePDGSelection failed with code %s"%sw) + # After successfully programming EF.ePDGId and EF.ePDGSelection, + # Set service 106 and 107 as available in EF.UST + if self.file_exists(EF_USIM_ADF_map['UST']): + if p.get('epdgSelection') and p.get('epdgid'): + sw = self.update_ust(106, 1) + if sw != '9000': + print("Programming UST failed with code %s"%sw) + sw = self.update_ust(107, 1) + if sw != '9000': + print("Programming UST failed with code %s"%sw) + return |