Change in pysim[master]: Added feature to program SPN into sysmoUSIM-SJS1 SIM cards

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

herlesupreeth gerrit-no-reply at lists.osmocom.org
Fri Jan 31 14:57:30 UTC 2020


herlesupreeth has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/16941 )

Change subject: Added feature to program SPN into sysmoUSIM-SJS1 SIM cards
......................................................................

Added feature to program SPN into sysmoUSIM-SJS1 SIM cards

Change-Id: Ia0f1a36ecb3898eaa1cf9925864e13369b1f31ce
---
M pySim/cards.py
M pysim-testdata/sysmoUSIM-SJS1.ok
2 files changed, 7 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/pySim/cards.py b/pySim/cards.py
index 9174ad5..faaeca3 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -612,6 +612,10 @@
 			content = "01" + p['opc']
 			data, sw = self._scc.update_binary('00F7', content)
 
+		# set Service Provider Name
+		content = enc_spn(p['name'], True, True)
+		data, sw = self._scc.update_binary('6F46', rpad(content, 32))
+
 		# write EF.IMSI
 		data, sw = self._scc.update_binary('6f07', enc_imsi(p['imsi']))
 
diff --git a/pysim-testdata/sysmoUSIM-SJS1.ok b/pysim-testdata/sysmoUSIM-SJS1.ok
index 5ad34e4..d9a9072 100644
--- a/pysim-testdata/sysmoUSIM-SJS1.ok
+++ b/pysim-testdata/sysmoUSIM-SJS1.ok
@@ -3,9 +3,9 @@
 ICCID: 1122334455667788990
 IMSI: 001010000000102
 SMSP: ffffffffffffffffffffffffffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000
-SPN: 
-Display HPLMN: False
-Display OPLMN: False
+SPN: Magic
+Display HPLMN: True
+Display OPLMN: True
 PLMNsel: fff11fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
 PLMNwAcT:
 	fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia0f1a36ecb3898eaa1cf9925864e13369b1f31ce
Gerrit-Change-Number: 16941
Gerrit-PatchSet: 4
Gerrit-Owner: herlesupreeth <herlesupreeth at gmail.com>
Gerrit-Assignee: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: herlesupreeth <herlesupreeth at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: dexter <pmaier at sysmocom.de>
Gerrit-CC: fixeria <axilirator at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200131/561a28c1/attachment.htm>


More information about the gerrit-log mailing list