dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34903?usp=email )
Change subject: WIP: transport: print reader device/number on init
......................................................................
Patch Set 5:
This change is ready for review.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34903?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: Ibe296d51885b1ef5f9c9ecaf1d28da52014dcc4b
Gerrit-Change-Number: 34903
Gerrit-PatchSet: 5
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Thu, 26 Oct 2023 11:51:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: dexter, laforge, lynxis lazus.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34884?usp=email )
Change subject: pySim-shell: don't get trapped in applications without file system
......................................................................
Patch Set 4:
(2 comments)
File pySim-shell.py:
https://gerrit.osmocom.org/c/pysim/+/34884/comment/19dba537_a38a2ae9
PS4, Line 66: from pySim.ts_31_102 import ADF_USIM
: from pySi
you're importing but not using these?
https://gerrit.osmocom.org/c/pysim/+/34884/comment/98603e83_0677d53f
PS4, Line 605: parent = self._cmd.lchan.selected_file.get_selectables()[".."]
may be worth moving this into a separate function, to improve readability
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34884?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: Ia2fdd65f430c07acb1afdaf265d24c6928b654e0
Gerrit-Change-Number: 34884
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 26 Oct 2023 10:17:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: dexter, laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34902?usp=email )
Change subject: filesystem: add flag to tell whether an ADF supports an FS or not
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34902?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: Ifd0f7c34164685ea18d8a746394e55416fa0aa66
Gerrit-Change-Number: 34902
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 26 Oct 2023 10:14:00 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34686?usp=email )
Change subject: transport: print reader device/number on init
......................................................................
Patch Set 10:
(1 comment)
Patchset:
PS10:
> I don't like the --verbose idea - at leat not for this particular topic. […]
I see, it wouldn't work that well anyway since we would need add the --verbose option in all pySim-xyz applications, which is not practical. An environment variable makes more sense here.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34686?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: I5c08995fcd55bd9bb173adc2acd9722e438a164b
Gerrit-Change-Number: 34686
Gerrit-PatchSet: 10
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 26 Oct 2023 09:51:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, lynxis lazus.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34884?usp=email )
Change subject: pySim-shell: don't get trapped in applications without file system
......................................................................
Patch Set 4:
(1 comment)
This change is ready for review.
File pySim-shell.py:
https://gerrit.osmocom.org/c/pysim/+/34884/comment/bfa9df8b_7c051cdc
PS2, Line 620: "a0000000871002", "a0000000871004"]:
> I have now changed the code so that it does no longer use the hardcoded identifiers. Also not "ADF. […]
With the help of the fixed selected_adf and the new has_fs flag in the ADF classes (see patches before this one) I managed to get a generic solution.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34884?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: Ia2fdd65f430c07acb1afdaf265d24c6928b654e0
Gerrit-Change-Number: 34884
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Thu, 26 Oct 2023 09:30:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/34902?usp=email )
Change subject: filesystem: add flag to tell whether an ADF supports an FS or not
......................................................................
filesystem: add flag to tell whether an ADF supports an FS or not
An ADF may or may not support a file system. For example ADF.ARA-M does
not have any filesystem support, which means the SELECT we may use from
this ADF is limited and an can only select a different application. To
know about this in advance let's add a flag that we set when we
instantiate an ADF.
Change-Id: Ifd0f7c34164685ea18d8a746394e55416fa0aa66
Related: OS#5418
---
M pySim/filesystem.py
M pySim/ts_31_102.py
M pySim/ts_31_103.py
M pySim/ts_31_104.py
4 files changed, 24 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/02/34902/1
diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 5950ad1..bddb9a7 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -505,11 +505,12 @@
class CardADF(CardDF):
"""ADF (Application Dedicated File) in the smart card filesystem"""
- def __init__(self, aid: str, **kwargs):
+ def __init__(self, aid: str, has_fs: bool=False, **kwargs):
super().__init__(**kwargs)
# reference to CardApplication may be set from CardApplication constructor
self.application = None # type: Optional[CardApplication]
self.aid = aid # Application Identifier
+ self.has_fs = has_fs # Flag to tell whether the ADF supports a filesystem or not
mf = self.get_mf()
if mf:
mf.add_application_df(self)
diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index cd0d99c..7c9a63c 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -1369,9 +1369,9 @@
class ADF_USIM(CardADF):
- def __init__(self, aid='a0000000871002', name='ADF.USIM', fid=None, sfid=None,
+ def __init__(self, aid='a0000000871002', has_fs=True, name='ADF.USIM', fid=None, sfid=None,
desc='USIM Application'):
- super().__init__(aid=aid, fid=fid, sfid=sfid, name=name, desc=desc)
+ super().__init__(aid=aid, has_fs=has_fs, fid=fid, sfid=sfid, name=name, desc=desc)
# add those commands to the general commands of a TransparentEF
self.shell_commands += [self.AddlShellCommands()]
diff --git a/pySim/ts_31_103.py b/pySim/ts_31_103.py
index 4327a1a..5268c70 100644
--- a/pySim/ts_31_103.py
+++ b/pySim/ts_31_103.py
@@ -258,9 +258,9 @@
class ADF_ISIM(CardADF):
- def __init__(self, aid='a0000000871004', name='ADF.ISIM', fid=None, sfid=None,
+ def __init__(self, aid='a0000000871004', has_fs=True, name='ADF.ISIM', fid=None, sfid=None,
desc='ISIM Application'):
- super().__init__(aid=aid, fid=fid, sfid=sfid, name=name, desc=desc)
+ super().__init__(aid=aid, has_fs=has_fs, fid=fid, sfid=sfid, name=name, desc=desc)
files = [
EF_IMPI(),
diff --git a/pySim/ts_31_104.py b/pySim/ts_31_104.py
index 0adafba..239acbf 100644
--- a/pySim/ts_31_104.py
+++ b/pySim/ts_31_104.py
@@ -30,9 +30,9 @@
class ADF_HPSIM(CardADF):
- def __init__(self, aid='a000000087100A', name='ADF.HPSIM', fid=None, sfid=None,
+ def __init__(self, aid='a000000087100A', has_fs=True, name='ADF.HPSIM', fid=None, sfid=None,
desc='HPSIM Application'):
- super().__init__(aid=aid, fid=fid, sfid=sfid, name=name, desc=desc)
+ super().__init__(aid=aid, has_fs=has_fs, fid=fid, sfid=sfid, name=name, desc=desc)
files = [
EF_ARR(fid='6f06', sfid=0x06),
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34902?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: Ifd0f7c34164685ea18d8a746394e55416fa0aa66
Gerrit-Change-Number: 34902
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange