Depending on the card profile the sysmoUSIM-SJA2 may come with an USIM
application or with an USIM and an ISIM application installed. If the
ISIM application is not present the related application must not get
selected and the related files must not accessed. At the moment the
presence of the ISIM application is detected by checking the ATR,
however the ATR only identifies a certain OS version or type, not an
application. Lets look at the EF.DIR first and dtermine the presence of
the applications by looking for the related AID.
Related: SYS#4817
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
The file EF.AD contains the length of the MNC, this allows to phone to
distinguish where MCC/MNC end and where the MSIN number of the IMSI
begins. All cards are shipped with an MNC length of 2, which is fine for
the most situations, but when a MNC with 3 digits is needed the MNC
length value has to be updated. Otherwise the phone will recognize the
third digit of the MNC as part of the MSIN.
Related: OS#3850
When working in an environment with multiple card terminals, then it
might be helpful to make sure that only the intended target simcard
(sysmo-usim-sjs1) is accessed.
- Add atr parameter to the ICC, SIM and USIM classes. When no atr
is given, then ICC will pick any card as it was before
- Make sure to pass the ATR when the sim object is created
Change-Id: I874aae92d29a7e1051e4cebefd85592c5fb78a2e
Related: OS#3376
There are quite complete python utilities already out there as part
of Benoit Micuhau's 'card' python library. They support plenty of
SIM, UICC and USIM related bits. Let's use them rather than re-
inventing the wheel here.
If the user submints a wrong ADM1 key with the commandline, the
authentication will fail. However, by the output of the program
it mey not be clear to the user that the reason for the failure
was a wrong ADM1 key. The user might try the same command with
the same parameters a few time and lock down the card.
This commit fixes that by failing gracefully with a very clear
error message. Furthermore, if a decreased authentication counter
is detected, no further authentication attempts will be made
until the user supplies the option -f (--force).
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.