Commit Graph

11 Commits

Author SHA1 Message Date
Harald Welte 76c74c93d5 Fix many python3 compatibility problems
It's 2020, and I'm actually rather shocked to find that this code
was not python3 compatbile a long time ago...
2020-08-31 14:22:27 +02:00
Philipp Maier 8dd52e04ac sja2: Add support for new simcard model
Adding support for the new SJA2 simcard type requires comprensive
refactoring of sysmo-usim-tool. We resolve the commonalities of
both simcard models in a class based approach so that code duplication
is reduced to a minium.

- Refactor sysmo-usim-tool into a class based model
- Add support for SJA2 simcard models
- Add tests for SJA2 simcard models

Change-Id: I0feab71bdaab079b35737bb4e0e2a417c4a1f96b
Related: SYS#4466
2020-01-06 11:09:21 +01:00
Philipp Maier 08623baa4a utils.py: generate multiline hexdumps
At the moment we can only print single line hexdumps. This works fine
for short data. However, if data becomes longer we should be able to
display it over multiple lines.

Related: SYS#4466
Change-Id: Id553df7c579bd648cb724fb1bbf906d9b50a357e
2020-01-03 15:12:14 +01:00
Philipp Maier 925b20e927 utils.py: cosmetic: add missing new line
Change-Id: I69c335c5ac4fc209daa7fcd7e9f8d509eec289b4
2019-11-11 11:39:33 +01:00
Philipp Maier 594bdd8248 utils.py: cosmetic: add comment to int_to_list()
It may not be immediately obvious what int_to_list() does, lets add a
comment to clarify

elated: SYS#4466
Change-Id: I82639a7333c3d805f6242aa58a3d42800a804820
2019-11-11 11:32:10 +01:00
Philipp Maier 8e427d0b68 utils.py: use generic functions to lookup strings in a table
To find out which algorithm ID corresponds to which string and vice
versa we currently use tables and dictionaries. However, this way can be
generalized and other parts of the program can profit from that

Change-Id: I68388ae27d05fcd1bc9de100e040da0c2bb8e799
Related: SYS#4466
2019-11-11 11:29:37 +01:00
Philipp Maier 4cab3bb127 sysmo-usim-tool.sjs1: Add capability to write IMSI
We unconditionally display the IMSI but we still lack support for
writing it. Lets support writing the IMSI as well in order to be more
complete.

- Add support for writing the IMSI

Change-Id: I1b3d1e1aae953663c13e78217de2a8ec3282b969
Related: OS#3376
2018-08-08 12:28:12 +02:00
Harald Welte d7b90f8db7 implement resetting of SQN parameters 2017-08-17 14:38:10 +02:00
Harald Welte 6d5127c89a add list_to_int() utility function to convert byte-lists to integers 2017-08-16 21:14:44 +02:00
Philipp Maier 55bb02bc62 Add ICCID reading/programming feature
sysmo-usim-tool still can't read or program the ICCID. This patch
adds enables reading and writing EF.ICCID
2017-03-21 00:30:34 +01:00
Philipp Maier 4f2e60436b sysmo-usim-tool: Add a tool for sysmosom specific tasks
This commit adds a tool that is intended to be used with sysmo-usim
only if some of the highly propritary parameters, which the regular
pysim can not handle, need to be configured.
2017-02-23 14:47:38 +01:00