From 5d0a30c19c26418c427a12e702fc3c2636069cee Mon Sep 17 00:00:00 2001 From: herlesupreeth Date: Tue, 29 Sep 2020 09:44:24 +0200 Subject: Move programminig of ePDG Id to generic USIM class Change-Id: I198d2d3303343b24ec92ba73cce21257213f6f89 --- pySim/cards.py | 8 ++++++-- 1 file 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) -- cgit v1.2.3