laforge has submitted this change. (
https://gerrit.osmocom.org/c/pysim/+/38163?usp=email
)
Change subject: pySim-prog: treat --imsi and --iccid equally
......................................................................
pySim-prog: treat --imsi and --iccid equally
When using a CSV file, we can either read the IMSI or ICCID from the
CSV file before programming. However, should also be possible to
supply both manually to identify the CSV file entry using the --imsi
or --iccid option. This currently only works for the IMSI, but not
for the ICCID.
Related: SYS#4120
Change-Id: Id3083c7794a7bd59501997f22afdc23bad3069e6
---
M pySim-prog.py
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim-prog.py b/pySim-prog.py
index e238b66..cd7ac74 100755
--- a/pySim-prog.py
+++ b/pySim-prog.py
@@ -732,12 +732,12 @@
if opts.source == 'cmdline':
cp = gen_parameters(opts)
elif opts.source == 'csv':
- imsi = None
- iccid = None
if opts.read_iccid:
(res, _) = scc.read_binary(['3f00', '2fe2'], length=10)
iccid = dec_iccid(res)
- elif opts.read_imsi:
+ else:
+ iccid = opts.iccid
+ if opts.read_imsi:
(res, _) = scc.read_binary(EF['IMSI'])
imsi = swap_nibbles(res)[3:]
else:
--
To view, visit
https://gerrit.osmocom.org/c/pysim/+/38163?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Id3083c7794a7bd59501997f22afdc23bad3069e6
Gerrit-Change-Number: 38163
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>