Attention is currently required from: fixeria, jolly, laforge, pespin.
Hello Jenkins Builder, jolly, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmocom-bb/+/34912?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by jolly, Code-Review+1 by laforge, Code-Review+1 by pespin, Verified+1 by Jenkins Builder
Change subject: mobile: clarify TCH I/O {handler,format} naming
......................................................................
mobile: clarify TCH I/O {handler,format} naming
Before we add handling of TCH I/O for data calls, let's rename the
existing voice related symbols and struct fields to have 'voice'
in their names.
Change-Id: If6c799d11e225ad00ca5da5ae63dca20568a0ce0
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/common/settings.h
M src/host/layer23/src/common/settings.c
M src/host/layer23/src/mobile/gapk_io.c
M src/host/layer23/src/mobile/gsm48_rr.c
M src/host/layer23/src/mobile/voice.c
M src/host/layer23/src/mobile/vty_interface.c
6 files changed, 92 insertions(+), 78 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/12/34912/3
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34912?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: If6c799d11e225ad00ca5da5ae63dca20568a0ce0
Gerrit-Change-Number: 34912
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria, jolly, laforge.
Hello Jenkins Builder, jolly, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmocom-bb/+/34911?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by jolly, Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: mobile: rename 'audio' node to 'tch-voice' node
......................................................................
mobile: rename 'audio' node to 'tch-voice' node
Change-Id: I2cab597c5de92ecb343cad7aaaa48035ca5f8365
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/mobile/vty.h
M src/host/layer23/src/mobile/vty_interface.c
2 files changed, 37 insertions(+), 20 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/11/34911/3
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34911?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I2cab597c5de92ecb343cad7aaaa48035ca5f8365
Gerrit-Change-Number: 34911
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: jolly, laforge.
Hello Jenkins Builder, jolly, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmocom-bb/+/34762?usp=email
to look at the new patch set (#7).
The following approvals got outdated and were removed:
Code-Review+1 by jolly, Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: mobile: add support for Circuit Switched Data calls
......................................................................
mobile: add support for Circuit Switched Data calls
This patch implements the signalling part for mobile originating
and mobile terminating CSD calls. The user plane interface is
to be implemented in follow-up patches.
Change-Id: I1995fa0a7a68d9b980852b664d472d4633777ac6
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/common/settings.h
M src/host/layer23/include/osmocom/bb/common/support.h
M src/host/layer23/include/osmocom/bb/mobile/mncc_ms.h
M src/host/layer23/src/common/settings.c
M src/host/layer23/src/common/support.c
M src/host/layer23/src/mobile/gsm48_rr.c
M src/host/layer23/src/mobile/mnccms.c
M src/host/layer23/src/mobile/vty_interface.c
8 files changed, 530 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/62/34762/7
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34762?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I1995fa0a7a68d9b980852b664d472d4633777ac6
Gerrit-Change-Number: 34762
Gerrit-PatchSet: 7
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria, jolly, laforge, pespin.
Hello Jenkins Builder, jolly, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmocom-bb/+/34914?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by jolly, Code-Review+1 by pespin, Code-Review+2 by laforge, Verified+1 by Jenkins Builder
The change is no longer submittable: Code-Review and Verified are unsatisfied now.
Change subject: mobile: gsm_settings_init(): set TCH frame format explicitly
......................................................................
mobile: gsm_settings_init(): set TCH frame format explicitly
Change-Id: I4660b07977b6701ad5dc4bf25f12cba374101f8b
Related: OS#4396
---
M src/host/layer23/src/common/settings.c
1 file changed, 11 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/14/34914/3
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34914?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I4660b07977b6701ad5dc4bf25f12cba374101f8b
Gerrit-Change-Number: 34914
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria, jolly, laforge, pespin.
Hello Jenkins Builder, jolly, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmocom-bb/+/34917?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Code-Review+2 by pespin, Verified+1 by Jenkins Builder
The change is no longer submittable: Code-Review and Verified are unsatisfied now.
Change subject: mobile: rename voice.[ch] to tch.[ch]
......................................................................
mobile: rename voice.[ch] to tch.[ch]
Also take a chance to change the 'tch_' prefix for all functions.
Change-Id: I05e1ae777add73672db61565c77c68d8ab2b08f0
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/mobile/Makefile.am
A src/host/layer23/include/osmocom/bb/mobile/tch.h
D src/host/layer23/include/osmocom/bb/mobile/voice.h
M src/host/layer23/src/mobile/Makefile.am
M src/host/layer23/src/mobile/app_mobile.c
M src/host/layer23/src/mobile/gapk_io.c
M src/host/layer23/src/mobile/gsm44068_gcc_bcc.c
M src/host/layer23/src/mobile/gsm48_cc.c
R src/host/layer23/src/mobile/tch.c
9 files changed, 43 insertions(+), 31 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/17/34917/3
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34917?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I05e1ae777add73672db61565c77c68d8ab2b08f0
Gerrit-Change-Number: 34917
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria, jolly.
Hello Jenkins Builder, jolly, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmocom-bb/+/34916?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: mobile: cosmetic: rename gsm48_rr_tx_{voice->traffic}()
......................................................................
mobile: cosmetic: rename gsm48_rr_tx_{voice->traffic}()
Not only this function can be used to transmit a voice frame,
but also a data frame during a CSD call.
Change-Id: I920300ae477e3c3d7c413cd1a35f2bc385266960
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
M src/host/layer23/src/mobile/gsm48_rr.c
M src/host/layer23/src/mobile/voice.c
3 files changed, 16 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/16/34916/3
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34916?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I920300ae477e3c3d7c413cd1a35f2bc385266960
Gerrit-Change-Number: 34916
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34762?usp=email )
Change subject: mobile: add support for Circuit Switched Data calls
......................................................................
Patch Set 6:
(2 comments)
File src/host/layer23/include/osmocom/bb/common/settings.h:
https://gerrit.osmocom.org/c/osmocom-bb/+/34762/comment/9e06fb6e_ac01a9bd
PS6, Line 101: enum data_call_ce {
> what is 'ce' mean in this context? I'd appreciate at least a comment above the enum to explain that. […]
Done
File src/host/layer23/src/mobile/gsm48_rr.c:
https://gerrit.osmocom.org/c/osmocom-bb/+/34762/comment/23ee3228_6b999a79
PS6, Line 379: LOGP(DRR, LOGL_ERROR,
> at first sigt it looks like trhose lines don't need to be wrapped within 120chars?
I was aiming for consistence with the existing code in this function, but at least the format strings can be on the same line with `LOGP`. Marking as resolved.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34762?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I1995fa0a7a68d9b980852b664d472d4633777ac6
Gerrit-Change-Number: 34762
Gerrit-PatchSet: 6
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 03 Nov 2023 06:44:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34956?usp=email )
Change subject: pySim-shell: Move init_card() function to new pySim.app module
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34956?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Icf557ed3064ef613ed693ce28bd3514a97a938bd
Gerrit-Change-Number: 34956
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 03 Nov 2023 06:07:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34923?usp=email )
Change subject: sccp: Introduce test TC_cr_timeout_cc_too_late
......................................................................
Patch Set 3:
(1 comment)
File library/SCCP_Templates.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34923/comment/d1394c82_7c2d…
PS3, Line 120: calling_enc
Now why this template becomes a function? I may be missing something, but to me it looks like there is no need to turn this template into a function. Otherwise a comment explaining why would be welcome.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34923?usp=email
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: If4b53565f1fa19894ca24fa71e02ae7b1941411e
Gerrit-Change-Number: 34923
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 03 Nov 2023 05:42:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/34956?usp=email )
Change subject: pySim-shell: Move init_card() function to new pySim.app module
......................................................................
pySim-shell: Move init_card() function to new pySim.app module
The point of this is to move generic code out of pySim-shell.py,
paving the way for more/other executables using the full power of
our class model without having to reinvent the wheel.
Change-Id: Icf557ed3064ef613ed693ce28bd3514a97a938bd
---
M pySim-shell.py
A pySim/app.py
2 files changed, 132 insertions(+), 94 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/56/34956/1
diff --git a/pySim-shell.py b/pySim-shell.py
index 0c559f9..795276a 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -2,7 +2,7 @@
# Interactive shell for working with SIM / UICC / USIM / ISIM cards
#
-# (C) 2021-2022 by Harald Welte <laforge(a)osmocom.org>
+# (C) 2021-2023 by Harald Welte <laforge(a)osmocom.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -48,111 +48,20 @@
from pprint import pprint as pp
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, SimCardBase, UiccCardBase
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, dec_iccid
from pySim.utils import is_hexstr_or_decimal, is_hexstr, is_decimal
from pySim.card_handler import CardHandler, CardHandlerAuto
-from pySim.filesystem import CardDF, CardADF, CardModel, CardApplication
-from pySim.runtime import RuntimeState
-from pySim.profile import CardProfile
-from pySim.cdma_ruim import CardProfileRUIM
-from pySim.ts_102_221 import CardProfileUICC
+from pySim.filesystem import CardDF, CardADF
from pySim.ts_102_222 import Ts102222Commands
from pySim.gsm_r import DF_EIRENE
from pySim.cat import ProactiveCommand
-# we need to import this module so that the SysmocomSJA2 sub-class of
-# CardModel is created, which will add the ATR-based matching and
-# calling of SysmocomSJA2.add_files. See CardModel.apply_matching_models
-import pySim.sysmocom_sja2
-
-# we need to import these modules so that the various sub-classes of
-# CardProfile are created, which will be used in init_card() to iterate
-# over all known CardProfile sub-classes.
-import pySim.ts_31_102
-import pySim.ts_31_103
-import pySim.ts_31_104
-import pySim.ara_m
-import pySim.global_platform
-import pySim.euicc
-
from pySim.card_key_provider import CardKeyProviderCsv, card_key_provider_register, card_key_provider_get_field
-
-def init_card(sl):
- """
- Detect card in reader and setup card profile and runtime state. This
- function must be called at least once on startup. The card and runtime
- state object (rs) is required for all pySim-shell commands.
- """
-
- # Create command layer
- scc = SimCardCommands(transport=sl)
-
- # Wait up to three seconds for a card in reader and try to detect
- # the card type.
- print("Waiting for card...")
- try:
- sl.wait_for_card(3)
- except NoCardError:
- print("No card detected!")
- return None, None
- except:
- print("Card not readable!")
- return None, None
-
- generic_card = False
- card = card_detect(scc)
- if card is None:
- print("Warning: Could not detect card type - assuming a generic card type...")
- card = SimCardBase(scc)
- generic_card = True
-
- profile = CardProfile.pick(scc)
- if profile is None:
- print("Unsupported card type!")
- return None, card
-
- # ETSI TS 102 221, Table 9.3 specifies a default for the PIN key
- # references, however card manufactures may still decide to pick an
- # arbitrary key reference. In case we run on a generic card class that is
- # detected as an UICC, we will pick the key reference that is officially
- # specified.
- if generic_card and isinstance(profile, CardProfileUICC):
- card._adm_chv_num = 0x0A
-
- print("Info: Card is of type: %s" % str(profile))
-
- # FIXME: this shouldn't really be here but somewhere else/more generic.
- # We cannot do it within pySim/profile.py as that would create circular
- # dependencies between the individual profiles and profile.py.
- if isinstance(profile, CardProfileUICC):
- for app_cls in CardApplication.__subclasses__():
- constr_sig = inspect.signature(app_cls.__init__)
- # skip any intermediary sub-classes such as CardApplicationSD
- if len(constr_sig.parameters) != 1:
- continue
- profile.add_application(app_cls())
- # 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 = UiccCardBase(scc)
-
- # Create runtime state with card profile
- rs = RuntimeState(card, profile)
-
- CardModel.apply_matching_models(scc, rs)
-
- # inform the transport that we can do context-specific SW interpretation
- sl.set_sw_interpreter(rs)
-
- return rs, card
+from pySim.app import init_card
class Cmd2Compat(cmd2.Cmd):
diff --git a/pySim/app.py b/pySim/app.py
new file mode 100644
index 0000000..073e5d1
--- /dev/null
+++ b/pySim/app.py
@@ -0,0 +1,116 @@
+# (C) 2021-2023 by Harald Welte <laforge(a)osmocom.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+import inspect
+from typing import Tuple
+
+from pySim.transport import LinkBase
+from pySim.commands import SimCardCommands
+from pySim.filesystem import CardModel, CardApplication
+from pySim.cards import card_detect, SimCardBase, UiccCardBase
+from pySim.runtime import RuntimeState
+from pySim.profile import CardProfile
+from pySim.cdma_ruim import CardProfileRUIM
+from pySim.ts_102_221 import CardProfileUICC
+
+# we need to import this module so that the SysmocomSJA2 sub-class of
+# CardModel is created, which will add the ATR-based matching and
+# calling of SysmocomSJA2.add_files. See CardModel.apply_matching_models
+import pySim.sysmocom_sja2
+
+# we need to import these modules so that the various sub-classes of
+# CardProfile are created, which will be used in init_card() to iterate
+# over all known CardProfile sub-classes.
+import pySim.ts_31_102
+import pySim.ts_31_103
+import pySim.ts_31_104
+import pySim.ara_m
+import pySim.global_platform
+import pySim.euicc
+
+def init_card(sl: LinkBase) -> Tuple[RuntimeState, SimCardBase]:
+ """
+ Detect card in reader and setup card profile and runtime state. This
+ function must be called at least once on startup. The card and runtime
+ state object (rs) is required for all pySim-shell commands.
+ """
+
+ # Create command layer
+ scc = SimCardCommands(transport=sl)
+
+ # Wait up to three seconds for a card in reader and try to detect
+ # the card type.
+ print("Waiting for card...")
+ try:
+ sl.wait_for_card(3)
+ except NoCardError:
+ print("No card detected!")
+ return None, None
+ except:
+ print("Card not readable!")
+ return None, None
+
+ generic_card = False
+ card = card_detect(scc)
+ if card is None:
+ print("Warning: Could not detect card type - assuming a generic card type...")
+ card = SimCardBase(scc)
+ generic_card = True
+
+ profile = CardProfile.pick(scc)
+ if profile is None:
+ print("Unsupported card type!")
+ return None, card
+
+ # ETSI TS 102 221, Table 9.3 specifies a default for the PIN key
+ # references, however card manufactures may still decide to pick an
+ # arbitrary key reference. In case we run on a generic card class that is
+ # detected as an UICC, we will pick the key reference that is officially
+ # specified.
+ if generic_card and isinstance(profile, CardProfileUICC):
+ card._adm_chv_num = 0x0A
+
+ print("Info: Card is of type: %s" % str(profile))
+
+ # FIXME: this shouldn't really be here but somewhere else/more generic.
+ # We cannot do it within pySim/profile.py as that would create circular
+ # dependencies between the individual profiles and profile.py.
+ if isinstance(profile, CardProfileUICC):
+ for app_cls in CardApplication.__subclasses__():
+ constr_sig = inspect.signature(app_cls.__init__)
+ # skip any intermediary sub-classes such as CardApplicationSD
+ if len(constr_sig.parameters) != 1:
+ continue
+ profile.add_application(app_cls())
+ # 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 = UiccCardBase(scc)
+
+ # Create runtime state with card profile
+ rs = RuntimeState(card, profile)
+
+ CardModel.apply_matching_models(scc, rs)
+
+ # inform the transport that we can do context-specific SW interpretation
+ sl.set_sw_interpreter(rs)
+
+ return rs, card
+
+
+
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34956?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Icf557ed3064ef613ed693ce28bd3514a97a938bd
Gerrit-Change-Number: 34956
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34946?usp=email )
Change subject: pySim-shell: Validate that argument to 'apdu' command is proper hexstr
......................................................................
Patch Set 2:
(1 comment)
File pySim/utils.py:
https://gerrit.osmocom.org/c/pysim/+/34946/comment/75ddfb44_d8428a9d
PS1, Line 1476: if not all(c in string.hexdigits for c in instr):
> you can probably return is_hexstr here.
nice idea, but the error strings would then be potentially confusing. Like getting "Input must be hexadecimal" when calling is_hexstr_or_decimal, which currently states "Input must be [hexa]decimal"...
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34946?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I58465244101cc1a976e5a17af2aceea1cf9f9b54
Gerrit-Change-Number: 34946
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 02 Nov 2023 23:46:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/34938?usp=email )
Change subject: docs: shell: Re-order the command sections/classes
......................................................................
docs: shell: Re-order the command sections/classes
the generic pysim command should precede those from specs like ISO7816
Change-Id: I11e66757f10cc28fda547244ae09d51dacd70824
---
M docs/shell.rst
1 file changed, 122 insertions(+), 110 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/docs/shell.rst b/docs/shell.rst
index 12c0493..13d71bb 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -55,6 +55,117 @@
to learn about those.
+pySim commands
+--------------
+
+Commands in this category are pySim specific; they do not have a 1:1 correspondence to ISO 7816
+or 3GPP commands. Mostly they will operate either only on local (in-memory) state, or execute
+a complex sequence of card-commands.
+
+desc
+~~~~
+Display human readable file description for the currently selected file.
+
+
+dir
+~~~
+.. argparse::
+ :module: pySim-shell
+ :func: PySimCommands.dir_parser
+
+Example:
+::
+
+ pySIM-shell (00:MF)> dir
+ MF
+ 3f00
+ .. ADF.USIM DF.SYSTEM EF.DIR EF.UMPC
+ ADF.ARA-M DF.EIRENE DF.TELECOM EF.ICCID MF
+ ADF.ISIM DF.GSM EF.ARR EF.PL
+ 14 files
+
+
+export
+~~~~~~
+.. argparse::
+ :module: pySim-shell
+ :func: PySimCommands.export_parser
+
+Please note that `export` works relative to the current working
+directory, so if you are in `MF`, then the export will contain all known
+files on the card. However, if you are in `ADF.ISIM`, only files below
+that ADF will be part of the export.
+
+Furthermore, it is strongly advised to first enter the ADM1 pin
+(`verify_adm`) to maximize the chance of having permission to read
+all/most files.
+
+
+tree
+~~~~
+Display a tree of the card filesystem. It is important to note that this displays a tree
+of files that might potentially exist (based on the card profile). In order to determine if
+a given file really exists on a given card, you have to try to select that file.
+
+Example:
+::
+
+ pySIM-shell (00:MF)> tree --help
+ EF.DIR 2f00 Application Directory
+ EF.ICCID 2fe2 ICC Identification
+ EF.PL 2f05 Preferred Languages
+ EF.ARR 2f06 Access Rule Reference
+ EF.UMPC 2f08 UICC Maximum Power Consumption
+ DF.TELECOM 7f10 None
+ EF.ADN 6f3a Abbreviated Dialing Numbers
+ ...
+
+
+
+verify_adm
+~~~~~~~~~~
+Verify the ADM (Administrator) PIN specified as argument. This is typically needed in order
+to get write/update permissions to most of the files on SIM cards.
+
+Currently only ADM1 is supported.
+
+
+reset
+~~~~~
+Perform card reset and display the card ATR.
+
+intro
+~~~~~
+[Re-]Display the introductory banner
+
+
+equip
+~~~~~
+Equip pySim-shell with a card; particularly useful if the program was
+started before a card was present, or after a card has been replaced by
+the user while pySim-shell was kept running.
+
+bulk_script
+~~~~~~~~~~~
+.. argparse::
+ :module: pySim-shell
+ :func: PysimApp.bulk_script_parser
+
+
+echo
+~~~~
+.. argparse::
+ :module: pySim-shell
+ :func: PysimApp.echo_parser
+
+
+apdu
+~~~~
+.. argparse::
+ :module: pySim-shell
+ :func: PysimApp.apdu_cmd_parser
+
+
ISO7816 commands
----------------
@@ -243,116 +354,6 @@
:func: CardProfileUICC.AddlShellCommands.resume_uicc_parser
-pySim commands
---------------
-
-Commands in this category are pySim specific; they do not have a 1:1 correspondence to ISO 7816
-or 3GPP commands. Mostly they will operate either only on local (in-memory) state, or execute
-a complex sequence of card-commands.
-
-desc
-~~~~
-Display human readable file description for the currently selected file.
-
-
-dir
-~~~
-.. argparse::
- :module: pySim-shell
- :func: PySimCommands.dir_parser
-
-Example:
-::
-
- pySIM-shell (00:MF)> dir
- MF
- 3f00
- .. ADF.USIM DF.SYSTEM EF.DIR EF.UMPC
- ADF.ARA-M DF.EIRENE DF.TELECOM EF.ICCID MF
- ADF.ISIM DF.GSM EF.ARR EF.PL
- 14 files
-
-
-export
-~~~~~~
-.. argparse::
- :module: pySim-shell
- :func: PySimCommands.export_parser
-
-Please note that `export` works relative to the current working
-directory, so if you are in `MF`, then the export will contain all known
-files on the card. However, if you are in `ADF.ISIM`, only files below
-that ADF will be part of the export.
-
-Furthermore, it is strongly advised to first enter the ADM1 pin
-(`verify_adm`) to maximize the chance of having permission to read
-all/most files.
-
-
-tree
-~~~~
-Display a tree of the card filesystem. It is important to note that this displays a tree
-of files that might potentially exist (based on the card profile). In order to determine if
-a given file really exists on a given card, you have to try to select that file.
-
-Example:
-::
-
- pySIM-shell (00:MF)> tree --help
- EF.DIR 2f00 Application Directory
- EF.ICCID 2fe2 ICC Identification
- EF.PL 2f05 Preferred Languages
- EF.ARR 2f06 Access Rule Reference
- EF.UMPC 2f08 UICC Maximum Power Consumption
- DF.TELECOM 7f10 None
- EF.ADN 6f3a Abbreviated Dialing Numbers
- ...
-
-
-
-verify_adm
-~~~~~~~~~~
-Verify the ADM (Administrator) PIN specified as argument. This is typically needed in order
-to get write/update permissions to most of the files on SIM cards.
-
-Currently only ADM1 is supported.
-
-
-reset
-~~~~~
-Perform card reset and display the card ATR.
-
-intro
-~~~~~
-[Re-]Display the introductory banner
-
-
-equip
-~~~~~
-Equip pySim-shell with a card; particularly useful if the program was
-started before a card was present, or after a card has been replaced by
-the user while pySim-shell was kept running.
-
-bulk_script
-~~~~~~~~~~~
-.. argparse::
- :module: pySim-shell
- :func: PysimApp.bulk_script_parser
-
-
-echo
-~~~~
-.. argparse::
- :module: pySim-shell
- :func: PysimApp.echo_parser
-
-
-apdu
-~~~~
-.. argparse::
- :module: pySim-shell
- :func: PysimApp.apdu_cmd_parser
-
Linear Fixed EF commands
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34938?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I11e66757f10cc28fda547244ae09d51dacd70824
Gerrit-Change-Number: 34938
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/34939?usp=email )
Change subject: docs: Fix docstring syntax to avoid warnings
......................................................................
docs: Fix docstring syntax to avoid warnings
pySim/tlv.py:docstring of pySim.tlv.IE.from_bytes:1: ERROR: Unknown target name: "part".
pySim/tlv.py:docstring of pySim.tlv.IE.to_bytes:1: ERROR: Unknown target name: "part".
Change-Id: I170176910c4519005b9276dbe5854aaaecb58efb
---
M pySim/tlv.py
1 file changed, 14 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/pySim/tlv.py b/pySim/tlv.py
index 827972f..7f20559 100644
--- a/pySim/tlv.py
+++ b/pySim/tlv.py
@@ -178,7 +178,7 @@
"""Convert the internal representation to entire IE including IE header."""
def to_bytes(self) -> bytes:
- """Convert the internal representation _of the value part_ to binary bytes."""
+ """Convert the internal representation *of the value part* to binary bytes."""
if self.is_constructed():
# concatenate the encoded IE of all children to form the value part
out = b''
@@ -189,7 +189,7 @@
return super().to_bytes()
def from_bytes(self, do: bytes):
- """Parse _the value part_ from binary bytes to internal representation."""
+ """Parse *the value part* from binary bytes to internal representation."""
if self.nested_collection:
self.children = self.nested_collection.from_bytes(do)
else:
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34939?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I170176910c4519005b9276dbe5854aaaecb58efb
Gerrit-Change-Number: 34939
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/34944?usp=email )
Change subject: pySim-shell: Use argparser for verify_adm to support --help
......................................................................
pySim-shell: Use argparser for verify_adm to support --help
Let's add a proper argparser instance for the 'verify_adm' command,
avoiding situations where the user types 'verif_adm --help' and then
--help is interpreted as the PIN value, removing one more attempt from
the failed ADM1 counter.
Let's use that opportunity to improve the documentation of the command.
Change-Id: I3321fae66a11efd00c53b66c7890fce84796e658
---
M docs/shell.rst
M pySim-shell.py
2 files changed, 32 insertions(+), 7 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/docs/shell.rst b/docs/shell.rst
index f437495..d8c0967 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -137,10 +137,11 @@
verify_adm
~~~~~~~~~~
-Verify the ADM (Administrator) PIN specified as argument. This is typically needed in order
-to get write/update permissions to most of the files on SIM cards.
-Currently only ADM1 is supported.
+.. argparse::
+ :module: pySim-shell
+ :func: PySimCommands.verify_adm_parser
+
Example (successful):
::
diff --git a/pySim-shell.py b/pySim-shell.py
index c02555f..7aaa234 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -776,11 +776,19 @@
else:
self._cmd.poutput("no description available")
- def do_verify_adm(self, arg):
- """VERIFY the ADM1 PIN"""
- if arg:
+ verify_adm_parser = argparse.ArgumentParser()
+ verify_adm_parser.add_argument('ADM1', nargs='?', type=str,
+ help='ADM1 pin value. If none given, CSV file will be queried')
+
+ @cmd2.with_argparser(verify_adm_parser)
+ def do_verify_adm(self, opts):
+ """Verify the ADM (Administrator) PIN specified as argument. This is typically needed in order
+to get write/update permissions to most of the files on SIM cards.
+
+Currently only ADM1 is supported."""
+ if opts.ADM1:
# use specified ADM-PIN
- pin_adm = sanitize_pin_adm(arg)
+ pin_adm = sanitize_pin_adm(opts.ADM1)
else:
# try to find an ADM-PIN if none is specified
result = card_key_provider_get_field(
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34944?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I3321fae66a11efd00c53b66c7890fce84796e658
Gerrit-Change-Number: 34944
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/34942?usp=email )
Change subject: docs: shell: Various documentation updates/extensions
......................................................................
docs: shell: Various documentation updates/extensions
* examples for export, verify_adm, reset, apdu
* explain CSV option for verify_adm
* fix 'tree' example (--help shouldn't be there)
Change-Id: I6ed8d8c5cf268ad3534e988eff9501f388b8d80f
---
M docs/shell.rst
1 file changed, 90 insertions(+), 1 deletion(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/docs/shell.rst b/docs/shell.rst
index ab67738..81e84d2 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -101,6 +101,19 @@
all/most files.
+Example:
+::
+
+ pySIM-shell (00:MF)> export --json > /tmp/export.json
+ EXCEPTION of type 'RuntimeError' occurred with message: 'unable to export 50 elementary file(s) and 2 dedicated file(s), also had to stop early due to exception:6e00: ARA-M - Invalid class'
+ To enable full traceback, run the following command: 'set debug true'
+ pySIM-shell (00:MF)>
+
+The exception above is more or less expected. It just means that 50 files which are defined (most likely as
+optional files in some later 3GPP release) were not found on the card, or were invalidated/disabled when
+trying to SELECT them.
+
+
tree
~~~~
Display a tree of the card filesystem. It is important to note that this displays a tree
@@ -110,7 +123,7 @@
Example:
::
- pySIM-shell (00:MF)> tree --help
+ pySIM-shell (00:MF)> tree
EF.DIR 2f00 Application Directory
EF.ICCID 2fe2 ICC Identification
EF.PL 2f05 Preferred Languages
@@ -129,11 +142,62 @@
Currently only ADM1 is supported.
+Example (successful):
+::
+
+ pySIM-shell (00:MF)> verify_adm 11111111
+ pySIM-shell (00:MF)>
+
+In the above case, the ADM was successfully verified. Please make always sure to use the correct ADM1 for the
+specific card you have inserted! If you present a wrong ADM1 value several times consecutively, your card
+ADM1 will likely be permanently locked, meaning you will never be able to reach ADM1 privilege level.
+For sysmoUSIM/ISIM products, three consecutive wrong ADM1 values will lock the ADM1.
+
+Example (erroneous):
+::
+
+ pySIM-shell (00:MF)> verify_adm 1
+ EXCEPTION of type 'RuntimeError' occurred with message: 'Failed to verify chv_no 0x0A with code 0x31FFFFFFFFFFFFFF, 2 tries left.'
+ To enable full traceback, run the following command: 'set debug true'
+
+If you frequently work with the same set of cards that you need to modify using their ADM1, you can put a CSV
+file with those cards ICCID + ADM1 values into a CSV (comma separated value) file at ``~/.osmocom/pysim/card_data.csv``. In this case,
+you can use the ``verify_adm`` command *without specifying an ADM1 value*.
+
+Example (successful):
+
+::
+
+ pySIM-shell (00:MF)> verify_adm
+ found ADM-PIN '11111111' for ICCID '898821190000000512'
+ pySIM-shell (00:MF)>
+
+In this case, the CSV file contained a record for the ICCID of the card (11111111) and that value was used to
+successfully verify ADM1.
+
+
+Example (erroneous):
+::
+
+ pySIM-shell (00:MF)> verify_adm
+ EXCEPTION of type 'ValueError' occurred with message: 'cannot find ADM-PIN for ICCID '898821190000000512''
+ To enable full traceback, run the following command: 'set debug true'
+
+In this case there was no record for the ICCID of the card in the CSV file.
+
reset
~~~~~
Perform card reset and display the card ATR.
+Example:
+::
+
+ pySIM-shell (00:MF)> reset
+ Card ATR: 3b9f96801f878031e073fe211b674a357530350259c4
+ pySIM-shell (00:MF)> reset
+
+
intro
~~~~~
[Re-]Display the introductory banner
@@ -165,6 +229,18 @@
:module: pySim-shell
:func: PysimApp.apdu_cmd_parser
+Example:
+
+::
+
+ pySIM-shell (00:MF)> apdu 00a40400023f00
+ SW: 6700
+
+In the above case the raw APDU hex-string ``00a40400023f00`` was sent to the card, to which it responded with
+status word ``6700``. Keep in mind that pySim-shell has no idea what kind of raw commands you are sending to the
+card, and it hence is unable to synchronize its internal state (such as the currently selected file) with the
+card. The use of this command should hence be constrained to commands that do not have any high-level support
+in pySim-shell yet.
ISO7816 commands
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34942?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6ed8d8c5cf268ad3534e988eff9501f388b8d80f
Gerrit-Change-Number: 34942
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34944?usp=email )
Change subject: pySim-shell: Use argparser for verify_adm to support --help
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34944?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I3321fae66a11efd00c53b66c7890fce84796e658
Gerrit-Change-Number: 34944
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 02 Nov 2023 23:42:56 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34943?usp=email )
Change subject: pySim-shell: Add copyright statement and link to online manual to banner
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34943?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie86822e73bccb3c585cecc818d4462d4ca6e43c2
Gerrit-Change-Number: 34943
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 02 Nov 2023 23:42:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34944?usp=email )
Change subject: pySim-shell: Use argparser for verify_adm to support --help
......................................................................
Patch Set 3:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/pysim/+/34944/comment/295f1204_cfedb8e4
PS1, Line 7: pySim-shell: Use arparser for verify_adm to support --help
> argparser
Done
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34944?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I3321fae66a11efd00c53b66c7890fce84796e658
Gerrit-Change-Number: 34944
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:46:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/34935?usp=email )
Change subject: docs: shell: Clarify various different card support
......................................................................
docs: shell: Clarify various different card support
Change-Id: Ibf8e3538aa3c954df72c11ec0a2f885031b54b0e
---
M docs/shell.rst
1 file changed, 11 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/docs/shell.rst b/docs/shell.rst
index de30ae7..c7e788a 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -1,7 +1,8 @@
pySim-shell
===========
-pySim-shell is an interactive command line shell for all kind of interactions with SIM cards.
+pySim-shell is an interactive command line shell for all kind of interactions with SIM cards,
+including classic GSM SIM, GSM-R SIM, UICC, USIM, ISIM, HPSIM and recently even eUICC.
The interactive shell provides command for
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34935?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ibf8e3538aa3c954df72c11ec0a2f885031b54b0e
Gerrit-Change-Number: 34935
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/34936?usp=email )
Change subject: docs: shell: By now we have encoders/decoders for most files
......................................................................
docs: shell: By now we have encoders/decoders for most files
Change-Id: Ia771f9969ae7eb0094d1768af3f7f54cc9d0d581
---
M docs/shell.rst
1 file changed, 11 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/docs/shell.rst b/docs/shell.rst
index c7e788a..2a16965 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -11,9 +11,9 @@
* CHV/PIN management (VERIFY, ENABLE, DISABLE, UNBLOCK)
* decoding of SELECT response (file control parameters)
* reading and writing of files and records in raw, hex-encoded binary format
-* for some files where related support has been developed:
+* for most files (where related file-specific encoder/decoder classes have been developed):
- * decoded reading (display file data in JSON format)
+ * decoded reading (display file data represented in human and machine readable JSON format)
* decoded writing (encode from JSON to binary format, then write)
By means of using the python ``cmd2`` module, various useful features improve usability:
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34936?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia771f9969ae7eb0094d1768af3f7f54cc9d0d581
Gerrit-Change-Number: 34936
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/34937?usp=email )
Change subject: docs: shell: link to cmd2 documentation
......................................................................
docs: shell: link to cmd2 documentation
Change-Id: I532cb33781f95fe847db7fae7a5264b5d9c416de
---
M docs/shell.rst
1 file changed, 12 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved; Verified
diff --git a/docs/shell.rst b/docs/shell.rst
index 2a16965..12c0493 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -50,7 +50,9 @@
cmd2 basics
-----------
-FIXME
+As pySim-shell is built upon ``cmd2``, some generic cmd2 commands/features are available. You may
+want to check out the `cmd2 Builtin commands <https://cmd2.readthedocs.io/en/stable/features/builtin_commands.html>`_
+to learn about those.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34937?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I532cb33781f95fe847db7fae7a5264b5d9c416de
Gerrit-Change-Number: 34937
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34936?usp=email )
Change subject: docs: shell: By now we have encoders/decoders for most files
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34936?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia771f9969ae7eb0094d1768af3f7f54cc9d0d581
Gerrit-Change-Number: 34936
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:44:20 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34935?usp=email )
Change subject: docs: shell: Clarify various different card support
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34935?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ibf8e3538aa3c954df72c11ec0a2f885031b54b0e
Gerrit-Change-Number: 34935
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:44:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/34950?usp=email )
Change subject: context_map_sccp: Fix assert hit due to missing ev handling
......................................................................
context_map_sccp: Fix assert hit due to missing ev handling
This was being triggered recently by
HNBGW_Tests.TC_ranap_cs_mo_disconnect in osmo-ttcn3-hacks.git.
Change-Id: Idaad11eaa3c2e56de792f80bab1f1d8435ef9b68
---
M src/osmo-hnbgw/context_map_sccp.c
1 file changed, 13 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/osmo-hnbgw/context_map_sccp.c b/src/osmo-hnbgw/context_map_sccp.c
index 9b4837d..4a78337 100644
--- a/src/osmo-hnbgw/context_map_sccp.c
+++ b/src/osmo-hnbgw/context_map_sccp.c
@@ -452,6 +452,7 @@
handle_rx_sccp(fi, ranap_msg);
return;
+ case MAP_SCCP_EV_RAN_LINK_LOST:
case MAP_SCCP_EV_USER_ABORT:
case MAP_SCCP_EV_CN_LINK_LOST:
/* Stop waiting for RLSD, send RLSD now. */
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34950?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Idaad11eaa3c2e56de792f80bab1f1d8435ef9b68
Gerrit-Change-Number: 34950
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/34954?usp=email )
Change subject: repo-install-test: fix ca-certificates-java error
......................................................................
repo-install-test: fix ca-certificates-java error
The repo-install-test started to fail on debian 10 with the following
error. Apparently this happens when installing ca-certificates-java
after installing java. Add a workaround.
Setting up ca-certificates-java (20190405) ...
head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory
Exception in thread "main" java.lang.InternalError: Error loading java.security file
Change-Id: I00b9c97d9d85fb37ba33a48caa732cd50de99683
---
M scripts/repo-install-test/run-inside.sh
1 file changed, 20 insertions(+), 1 deletion(-)
Approvals:
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/scripts/repo-install-test/run-inside.sh b/scripts/repo-install-test/run-inside.sh
index b45d76d..e08338f 100755
--- a/scripts/repo-install-test/run-inside.sh
+++ b/scripts/repo-install-test/run-inside.sh
@@ -185,8 +185,10 @@
case "$DISTRO" in
debian10)
- # Can't access https://osmocom.org otherwise
+ # libgnutls30: can't access https://osmocom.org otherwise
+ # ca-certificates-java: fails if installed after java
apt-get install -y --no-install-recommends \
+ ca-certificates-java \
libgnutls30
;;
esac
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/34954?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I00b9c97d9d85fb37ba33a48caa732cd50de99683
Gerrit-Change-Number: 34954
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/34955?usp=email )
Change subject: repo-install-test: ignore limesuite-images
......................................................................
repo-install-test: ignore limesuite-images
Don't attempt to install limesuite-images. It runs a post-install script
that downloads files from an external server and fails currently, as
there are no images for 23.10. While we have limesuite-images packages
in our OBS repository, this is just a side-effect of building limesuite.
What we are really interested in is liblimesuite for osmo-trx, as I
understand.
Add --no-install-recommends to the apt-get install line in
install_repo_packages_debian, because the main limesuite package has
limesuite-images in recommends and would pull it in otherwise.
Change-Id: I237408c805977c831f352a57a301ea45753d1ac1
---
M scripts/repo-install-test/blacklist_debian10.txt
M scripts/repo-install-test/blacklist_debian11.txt
M scripts/repo-install-test/blacklist_debian12.txt
M scripts/repo-install-test/run-inside.sh
4 files changed, 29 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/scripts/repo-install-test/blacklist_debian10.txt b/scripts/repo-install-test/blacklist_debian10.txt
index 6570de6..93dac75 100644
--- a/scripts/repo-install-test/blacklist_debian10.txt
+++ b/scripts/repo-install-test/blacklist_debian10.txt
@@ -19,6 +19,10 @@
osmocom-nitb
osmocom-nitb-dbg
+# Not relevant for the test
+limesuite-images
+limesuite-images23.10
+
# SoapySDR is not used anymore (see OS#3542)
soapysdr-module-lms7
soapysdr0.6-module-lms7
diff --git a/scripts/repo-install-test/blacklist_debian11.txt b/scripts/repo-install-test/blacklist_debian11.txt
index 53187dc..c962ffc 100644
--- a/scripts/repo-install-test/blacklist_debian11.txt
+++ b/scripts/repo-install-test/blacklist_debian11.txt
@@ -31,6 +31,8 @@
libulfius2.7-dbgsym
libyder2.0-dbgsym
limesuite-dbgsym
+limesuite-images
+limesuite-images23.10
soapysdr0.7-module-lms7-dbgsym
# Depends on specific verions 0.5.4.38.0847 of rtl-sdr, which we won't install
diff --git a/scripts/repo-install-test/blacklist_debian12.txt b/scripts/repo-install-test/blacklist_debian12.txt
index b470d44..9b5f5e7 100644
--- a/scripts/repo-install-test/blacklist_debian12.txt
+++ b/scripts/repo-install-test/blacklist_debian12.txt
@@ -32,6 +32,8 @@
libulfius2.7-dbgsym
libyder2.0-dbgsym
limesuite-dbgsym
+limesuite-images
+limesuite-images23.10
soapysdr0.7-module-lms7
soapysdr0.7-module-lms7-dbgsym
soapysdr-module-lms7
diff --git a/scripts/repo-install-test/run-inside.sh b/scripts/repo-install-test/run-inside.sh
index e08338f..d7730ff 100755
--- a/scripts/repo-install-test/run-inside.sh
+++ b/scripts/repo-install-test/run-inside.sh
@@ -329,7 +329,7 @@
cat osmocom_packages_all.txt
filter_packages_txt
- apt install -y $(cat osmocom_packages.txt)
+ apt-get install -y --no-install-recommends $(cat osmocom_packages.txt)
}
install_repo_packages_centos() {
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/34955?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I237408c805977c831f352a57a301ea45753d1ac1
Gerrit-Change-Number: 34955
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: dexter, keith, neels, osmith.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email )
Change subject: vty and log: also show local port for RTP conns
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib89a6779e1d68c6600f00699d4303f6c0ee07132
Gerrit-Change-Number: 34150
Gerrit-PatchSet: 4
Gerrit-Owner: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: keith <keith(a)rhizomatica.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:41:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: dexter, keith, neels, osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email )
Change subject: vty and log: also show local port for RTP conns
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib89a6779e1d68c6600f00699d4303f6c0ee07132
Gerrit-Change-Number: 34150
Gerrit-PatchSet: 4
Gerrit-Owner: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: keith <keith(a)rhizomatica.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 02 Nov 2023 19:25:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: dexter, neels, osmith.
keith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email )
Change subject: vty and log: also show local port for RTP conns
......................................................................
Patch Set 3: Code-Review+1
(1 comment)
Patchset:
PS3:
Thanks for dealing with this! Dropping the RTCP port is good, as is the C vs 0x part.
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib89a6779e1d68c6600f00699d4303f6c0ee07132
Gerrit-Change-Number: 34150
Gerrit-PatchSet: 3
Gerrit-Owner: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 02 Nov 2023 18:42:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment