dexter has uploaded this change for review. (
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(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/63/38163/1
diff --git a/pySim-prog.py b/pySim-prog.py
index 2e299a6..3470c98 100755
--- a/pySim-prog.py
+++ b/pySim-prog.py
@@ -730,12 +730,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: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Id3083c7794a7bd59501997f22afdc23bad3069e6
Gerrit-Change-Number: 38163
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>