diff options
author | herlesupreeth <herlesupreeth@gmail.com> | 2020-09-29 09:44:24 +0200 |
---|---|---|
committer | herlesupreeth <herlesupreeth@gmail.com> | 2020-09-29 09:44:24 +0200 |
commit | 5d0a30c19c26418c427a12e702fc3c2636069cee (patch) | |
tree | 1f460447fc96bf84803d88477da8ca4ce7b817ec /pySim | |
parent | 3409ae7eeae150035fd9502a7cc996ffbda93bee (diff) |
Move programminig of ePDG Id to generic USIM class
Change-Id: I198d2d3303343b24ec92ba73cce21257213f6f89
Diffstat (limited to 'pySim')
-rw-r--r-- | pySim/cards.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pySim/cards.py b/pySim/cards.py index 8835cc9..f2a3d2a 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -264,6 +264,11 @@ class UsimCard(Card): data, sw = self._scc.update_binary(EF_USIM_ADF_map['EHPLMN'], ehplmn) return sw + def update_epdgid(self, epdgid): + epdgid_tlv = enc_epdgid(epdgid) + data, sw = self._scc.update_binary( + EF_USIM_ADF_map['ePDGId'], epdgid_tlv) + return sw class _MagicSimBase(Card): @@ -1164,8 +1169,7 @@ class SysmoISIMSJA2(UsimCard): # update EF.ePDGId in ADF.USIM if self.file_exists(EF_USIM_ADF_map['ePDGId']): if p.get('epdgid'): - sw = self._scc.update_binary( - EF_USIM_ADF_map['ePDGId'], enc_epdgid(p['epdgid'])) + sw = self.update_epdgid(p['epdgid']) if sw != '9000': print("Programming ePDGId failed with code %s"%sw) |