Skip to content

Loading builds...

Changes

#2152 (May 21, 2026, 8:50:10 AM)

pySim/ara_m, cosmetic: swap --nfc-always and --nfc-never options

The commandline options --nfc-always and --nfc-never appear in the
opposite order when compared to --apdu-never and --apdu-always.

Let's swap the options to make the helpscreen and the code more
consistent.

Change-Id: I7289c3628b1b8dd3eec2f1c8f2132e3015422960
Related: SYS#6959
pmaier@sysmocom.de at

#2149 (May 19, 2026, 8:15:09 AM)

pySim/scp: migrate to pySimLogger

The module scp.py predates the existence of the pySimLogger and still
uses an individually created logger. Let's migrate to pySimLogger to
avoid unexpected effects and to be uniform with the other modules.

Related: SYS#6959
Change-Id: I5db7180f93f116dd2d99c33da264f74ea16a1a37
pmaier@sysmocom.de at

#2141 (May 13, 2026, 1:20:06 PM)

card_key_provider: move boiler-plate code into helper functions

in pySim-shell.py we add the commandline options for the card key
provider and do the setup accordingly. Let's put this boilerplate
code into helper functions instead, so that we can re-use it in
other pySim programs as well. Let's use pySim.transport as a
pattern.

Related: SYS#6959
Change-Id: I6d095cbb644e608f4a751a1d0749b1484cdc781d
pmaier@sysmocom.de at
card_key_provider: pass CardKeyFieldCryptor to constructor

We currently create the CardKeyFieldCryptor object inside the constructor
of the concrete CardKeyProvider classes. There is currently no problem
with that, but when we create the CardKeyFieldCryptor object first and
then pass it as parameter to the constructor, we gain more flexibility
in case we want to support other CardKeyFieldCryptor variants in the
future.

Related: SYS#6959
Change-Id: If43552740aadacab9126f8a002749a9582eef8f4
pmaier@sysmocom.de at
card_key_provider: add a static method to parse --column-keys args

The contents of the --column-keys arguments are currently parsed
in init_card_key_provider. Let's add a static method in
CardKeyFieldCryptor to simplify re-usage of the CardKeyFieldCryptor

Related: SYS#6959
Change-Id: Ic955f271b1de1b1b855b21c82ed10343044e45fa
pmaier@sysmocom.de at
pySimLogger: fix default log format string

In format string we prepend when we log in verbose mode. We use %(module)s
as format string quaifier. This qualifier is replaced with the name of the
module from where the logger was called. This is mostly equal to the logger
name (__name__) we pass when we create the logger.

However, this is not the behavior we actually want. We want to log the
logger name that we passed when the logger was created. For this, we must
use %(name)s as qualifier.

Related: SYS#6959
Change-Id: I3951a70ad6ce864a7158b093cba46ae9fc1cb5bd
pmaier@sysmocom.de at
pySim/app: use pySimLogger instead of print

let's replace the stray print statements with proper logger calls.

Related: SYS#6959
Change-Id: I95b4536cc8853e7ba6a5dd573b903dfb85e56b9a
pmaier@sysmocom.de at
pySim/filesystem: use pySimLogger instead of print

let's replace the stray print statements with proper logger calls.

Related: SYS#6959
Change-Id: I3a7188ad33706df66b2113e15cc7d06004c9bc39
pmaier@sysmocom.de at

#2122 (Apr 29, 2026, 7:50:48 PM)

pySim-prog/cards: fix programming of EF.SMSP

The legacy code found in legacy/cards.py does not use the modern
construct based encoder (pySim-read uses it). The card classes either
use their own implementation of update_smsp or use the generic method
provided by the SimCard class. The latter one is true for FairwavesSIM
and WavemobileSim.

Unfortunately the implementation found in the SimCard is wrong. It
adds padding at the end of the file instead of the beginning. This
completely messes up the contents of EF.SMSP for the cards using this
method. To fix this, let's use the leftpad feature provided by
the update_record. This will ensure a correct alignment of the file
contents.

Related: SYS#7765
Change-Id: Ie112418f1f1461762d61365d3863181ca6be7245
laforge at
ts_51_011/EF.SMSP: fix handling of 'alpha_id' field

The field 'alpha_id' is technically not an optional field, even though
the specification describes it as optional. Once the card manufacturer
decides that the field should be present, it must be always present and
vice versa.

(see code comment for a more detailed description)

Related: SYS#7765
Change-Id: I0ec99b2648b22c56f9145345e4cd8776f9217701
laforge at

#2121 (Apr 29, 2026, 7:35:08 PM)

pySim/transport: fix GET RESPONSE behaviour

The current behavior we implement in the method __send_apdu_T0 is
incomplete. Some details discussed in ETSI TS 102 221,
section 7.3.1.1.4, clause 4 seem to be not fully implemented. We
may also end up sending a GET RESPONSE in other APDU cases than
case 4 (the only case that uses the GET RESPONSE command).

Related: OS#6970
Change-Id: I26f0566af0cdd61dcc97f5f502479dc76adc37cc
laforge at