laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/33569 )
Change subject: pySim-shell: Support USIM specific methods/commands on unknown UICC
......................................................................
pySim-shell: Support USIM specific methods/commands on unknown UICC
So far, if no known programmable card (like sysmoISIM) has been found,
we were using the SimCard base class. However, once we detect an UICC,
we should have switched to the UsimCard class, as otherwise the various
methods called by USIM/ISIM specific commands don't exist and we get
weird 'SimCard' object has no attribute 'update_ust' execptions.
The entire auto-detection and the legacy SimCard / UsimCard classes
are showing the legacy of the code base and should probably be
re-architected. However, let's fix the apparent bug for now.
Change-Id: I5a863198084250458693f060ca10b268a58550a1
Closes: OS#6055
---
M pySim-shell.py
1 file changed, 27 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim-shell.py b/pySim-shell.py
index e5cc0c3..3161844 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -49,7 +49,7 @@
from pySim.exceptions import *
from pySim.commands import SimCardCommands
from pySim.transport import init_reader, ApduTracer, argparse_add_reader_args, ProactiveHandler
-from pySim.cards import card_detect, SimCard
+from pySim.cards import card_detect, SimCard, UsimCard
from pySim.utils import h2b, b2h, i2h, swap_nibbles, rpad, JsonEncoder, bertlv_parse_one, sw_match
from pySim.utils import sanitize_pin_adm, tabulate_str_list, boxed_heading_str, Hexstr
from pySim.card_handler import CardHandler, CardHandlerAuto
@@ -127,6 +127,12 @@
profile.add_application(CardApplicationHPSIM())
profile.add_application(CardApplicationARAM())
profile.add_application(CardApplicationISD())
+ # We have chosen SimCard() above, but we now know it actually is an UICC
+ # so it's safe to assume it supports USIM application (which we're adding above).
+ # IF we don't do this, we will have a SimCard but try USIM specific commands like
+ # the update_ust method (see https://osmocom.org/issues/6055)
+ if generic_card:
+ card = UsimCard(scc)
# Create runtime state with card profile
rs = RuntimeState(card, profile)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/33569
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5a863198084250458693f060ca10b268a58550a1
Gerrit-Change-Number: 33569
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: merlinchlosta <merlin.chlosta(a)rub.de>
Gerrit-MessageType: merged
Attention is currently required from: Hoernchen.
laforge has uploaded a new patch set (#3) to the change originally created by Hoernchen. ( https://gerrit.osmocom.org/c/gapk/+/33620 )
Change subject: aarch64: add get_cycles
......................................................................
aarch64: add get_cycles
borrowed from arch/arm64/include/asm/arch_timer.h
Change-Id: I489fb8346fbc7440f40695f01d80a89b90761165
---
A .checkpatch.conf
M include/osmocom/gapk/get_cycles.h
2 files changed, 22 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/gapk refs/changes/20/33620/3
--
To view, visit https://gerrit.osmocom.org/c/gapk/+/33620
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: I489fb8346fbc7440f40695f01d80a89b90761165
Gerrit-Change-Number: 33620
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: Hoernchen.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/gapk/+/33620 )
Change subject: aarch64: add get_cycles
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
the proper solution for the V-1 would be to add project-specific linter config as described here: https://osmocom.org/projects/cellular-infrastructure/wiki/Linting#Osmocom-s…
--
To view, visit https://gerrit.osmocom.org/c/gapk/+/33620
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: I489fb8346fbc7440f40695f01d80a89b90761165
Gerrit-Change-Number: 33620
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 09 Jul 2023 08:04:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: pespin, dexter.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33634 )
Change subject: S1AP_Templates: fix tr_S1AP_SetupResp
......................................................................
Patch Set 1:
(1 comment)
File library/s1ap/S1AP_Templates.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33634/comment/9f39ee31_d75e…
PS1, Line 116: *, {
> Same, add a new line.
I don't know if the protocolIEs field ends up being a "set of" or "record of" in TTCN3. If it was "set of", we could use the "superset" matching mechanism, which would basically make sure that any protocolIEs would match, in any order, just as long as they contain each of the ones we specify here.
Also/Unrelated: IF the spec says there is only *one* intermediate IE permitted, we better use "?" instead of "*", as the latter matches any number of intermediate IEs.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33634
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I07513743142f519481530801d4e1185d55f6ea4b
Gerrit-Change-Number: 33634
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 09 Jul 2023 08:00:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin, dexter.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33633 )
Change subject: S1AP_Templates: fix tr_S1AP_SetupReq
......................................................................
Patch Set 1:
(1 comment)
File library/s1ap/S1AP_Templates.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33633/comment/5a2a5b3d_2dba…
PS1, Line 72: }, *, {
> please add it as a separate line, otherwise it is hidden and may cause some headaches :)
IF the spec says (I didn't read it) there is only *one* intermediate IE permitted, we better use "?" instead of "*", as the latter matches any number of intermediate IEs.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33633
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id4b52921053884e79349301598b75c264b7f058c
Gerrit-Change-Number: 33633
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 09 Jul 2023 08:00:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment