From 2c57f2a476c1209a87cb7df2855c8053d3b31d90 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 19 Jan 2023 11:31:16 +0100 Subject: [PATCH] sysmo_usim: program EF.AD in DF.GSM and ADF.USIM Since september 2021 EF.AD no longer exists as a single file that is represented as a link in DF.GSM and ADF.USIM it is necessary to program both locations individually. --- sysmo_usim.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sysmo_usim.py b/sysmo_usim.py index 414038d..fea756f 100644 --- a/sysmo_usim.py +++ b/sysmo_usim.py @@ -187,16 +187,29 @@ class Sysmo_usim: print(" * Error: mnclen value must consist of a single byte!") return + print(" * Programming ...") + + # EF.AD in DF.GSM self.sim.select(GSM_SIM_DF_GSM) self.sim.select(GSM_SIM_EF_AD) res = self.sim.read_binary(4) new_ad = res.apdu[0:3] + mnclen - print(" * Programming...") self.sim.update_binary(new_ad) print("") + # EF.AD in ADF.USIM + self.sim.card.SELECT_ADF_USIM() + self.sim.select(GSM_SIM_EF_AD) + + res = self.sim.read_binary(4) + new_ad = res.apdu[0:3] + mnclen + + self.sim.update_binary(new_ad) + + print("") + # Show installed applications (AIDs) def show_aid(self):