Change in pysim[master]: cards: sysmo-usim-sjs1: add programming of EF.PLMNsel, EF.PLMNwAcT an...

dexter gerrit-no-reply at lists.osmocom.org
Mon Apr 1 13:10:05 UTC 2019


dexter has submitted this change and it was merged. ( https://gerrit.osmocom.org/13340 )

Change subject: cards: sysmo-usim-sjs1: add programming of EF.PLMNsel, EF.PLMNwAcT and EF.OPLMNwAcT
......................................................................

cards: sysmo-usim-sjs1: add programming of EF.PLMNsel, EF.PLMNwAcT and EF.OPLMNwAcT

The files EF.PLMNsel, EF.PLMNwAcT and EF.OPLMNwAcT are currently not
programmed for sysmo-usim-sjs1, lets add them.

Change-Id: I0cac3041f1902383d98d6dc211cf31ae6e3a610b
Related: OS#3850
---
M pySim/cards.py
1 file changed, 20 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved
  Daniel Willmann: Looks good to me, but someone else must approve



diff --git a/pySim/cards.py b/pySim/cards.py
index 3a25040..1012cfd 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -536,7 +536,7 @@
 	def __init__(self, ssc):
 		super(SysmoUSIMSJS1, self).__init__(ssc)
 		self._scc.cla_byte = "00"
-		self._scc.sel_ctrl = "000C"
+		self._scc.sel_ctrl = "0004" #request an FCP
 
 	@classmethod
 	def autodetect(kls, scc):
@@ -575,6 +575,25 @@
 		# write EF.IMSI
 		data, sw = self._scc.update_binary('6f07', enc_imsi(p['imsi']))
 
+		# EF.PLMNsel
+                if p.get('mcc') and p.get('mnc'):
+                        sw = self.update_plmnsel(p['mcc'], p['mnc'])
+                        if sw != '9000':
+				print("Programming PLMNsel failed with code %s"%sw)
+
+                # EF.PLMNwAcT
+                if p.get('mcc') and p.get('mnc'):
+			sw = self.update_plmn_act(p['mcc'], p['mnc'])
+			if sw != '9000':
+				print("Programming PLMNwAcT failed with code %s"%sw)
+
+                # EF.OPLMNwAcT
+                if p.get('mcc') and p.get('mnc'):
+			sw = self.update_oplmn_act(p['mcc'], p['mnc'])
+			if sw != '9000':
+				print("Programming OPLMNwAcT failed with code %s"%sw)
+
+
 		# EF.SMSP
 		r = self._scc.select_file(['3f00', '7f10'])
 		data, sw = self._scc.update_record('6f42', 1, lpad(p['smsp'], 104), force_len=True)

-- 
To view, visit https://gerrit.osmocom.org/13340
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0cac3041f1902383d98d6dc211cf31ae6e3a610b
Gerrit-Change-Number: 13340
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Daniel Willmann <dwillmann at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Kévin Redon <kredon at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-CC: Max <suraev at alumni.ntnu.no>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190401/9e2765da/attachment.html>


More information about the gerrit-log mailing list