lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

June 2023

  • 1 participants
  • 2480 discussions
[M] Change in pysim[master]: Move "suspend_uicc" command from pySim-shell to ts_102_221.py
by fixeria 06 Jun '23

06 Jun '23
Attention is currently required from: laforge. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/33209 ) Change subject: Move "suspend_uicc" command from pySim-shell to ts_102_221.py ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File pySim-shell.py: https://gerrit.osmocom.org/c/pysim/+/33209/comment/b2ebe222_2408d199 PS1, Line 291: print `self.poutput()`? -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I574348951f06b749aeff986589186110580328bc Gerrit-Change-Number: 33209 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: Tue, 06 Jun 2023 15:49:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in pysim[master]: Fix result parsing of "suspend_uicc"
by fixeria 06 Jun '23

06 Jun '23
Attention is currently required from: laforge. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/33208 ) Change subject: Fix result parsing of "suspend_uicc" ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I981e9d46607193176b28cb574564e6da546501ba Gerrit-Change-Number: 33208 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: Tue, 06 Jun 2023 15:47:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in pysim[master]: pySim-shell: Unregister TS 102 222 commands during 'equip'
by fixeria 06 Jun '23

06 Jun '23
Attention is currently required from: laforge. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/33207 ) Change subject: pySim-shell: Unregister TS 102 222 commands during 'equip' ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33207 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I3567247fe84e928e3ef404c07eff8250ef04dfe9 Gerrit-Change-Number: 33207 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: Tue, 06 Jun 2023 15:47:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in pysim[master]: HPSIM application support
by fixeria 06 Jun '23

06 Jun '23
Attention is currently required from: laforge. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/33183 ) Change subject: HPSIM application support ...................................................................... Patch Set 2: Code-Review+2 (1 comment) File pySim/ts_31_104.py: https://gerrit.osmocom.org/c/pysim/+/33183/comment/0f9f4a08_afa103cc PS1, Line 51: sw_isim > isim -> hpsim? Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2729fd2b88cd13c36d7128753ad8d3e3d08a9b52 Gerrit-Change-Number: 33183 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Tue, 06 Jun 2023 15:47:08 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: osmo-bts-trx: fix recent regression in Tx lchan handlers
by fixeria 06 Jun '23

06 Jun '23
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33156 ) Change subject: osmo-bts-trx: fix recent regression in Tx lchan handlers ...................................................................... Patch Set 2: (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/33156/comment/269e6739_796dde5f PS1, Line 9: Change-Id: I4538a8fe6b29f8d6eca33ad27d4a9852e3a3e86c > Fixes: a0770250bc70024fcba4ec787587006ff508a6dd see next line after the `Change-Id` (I used `--abbrev-commit`) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4538a8fe6b29f8d6eca33ad27d4a9852e3a3e86c Gerrit-Change-Number: 33156 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 06 Jun 2023 15:46:38 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in pysim[master]: pySim-shell: Unregister TS 102 222 commands during 'equip'
by laforge 06 Jun '23

06 Jun '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/33207 ) Change subject: pySim-shell: Unregister TS 102 222 commands during 'equip' ...................................................................... pySim-shell: Unregister TS 102 222 commands during 'equip' This avoids error messages about re-registering the same TS 102 222 commands during executing the 'equip' command. Change-Id: I3567247fe84e928e3ef404c07eff8250ef04dfe9 --- M pySim-shell.py 1 file changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/07/33207/1 diff --git a/pySim-shell.py b/pySim-shell.py index fc825ef..d6d9a64 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -204,7 +204,7 @@ if self.rs: lchan = self.rs.lchan[0] lchan.unregister_cmds(self) - for cmds in [Iso7816Commands, PySimCommands]: + for cmds in [Iso7816Commands, Ts102222Commands, PySimCommands]: cmd_set = self.find_commandsets(cmds) if cmd_set: self.unregister_command_set(cmd_set[0]) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33207 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I3567247fe84e928e3ef404c07eff8250ef04dfe9 Gerrit-Change-Number: 33207 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in pysim[master]: Fix result parsing of "suspend_uicc"
by laforge 06 Jun '23

06 Jun '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/33208 ) Change subject: Fix result parsing of "suspend_uicc" ...................................................................... Fix result parsing of "suspend_uicc" prior to this patch, the suspend_uicc command would always cause a python exception as a list of integers was returned by decode_duration rather than a single integer (that can be used with %u format string). Change-Id: I981e9d46607193176b28cb574564e6da546501ba --- M pySim/commands.py 1 file changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/08/33208/1 diff --git a/pySim/commands.py b/pySim/commands.py index b0f8b39..6acdb2e 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -610,7 +610,7 @@ def decode_duration(enc: Hexstr) -> int: time_unit = enc[:2] - length = h2i(enc[2:4]) + length = h2i(enc[2:4])[0] if time_unit == '04': return length * 10*24*60*60 elif time_unit == '03': -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I981e9d46607193176b28cb574564e6da546501ba Gerrit-Change-Number: 33208 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in pysim[master]: ts_102221: Add "resume_uicc" command
by laforge 06 Jun '23

06 Jun '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/33210 ) Change subject: ts_102221: Add "resume_uicc" command ...................................................................... ts_102221: Add "resume_uicc" command We've had a "suspend_uicc" command since commit ec95053249bc7f9308ca1f659d8ef6ac97a6e393 in 2021, but didn't yet have the corresponding "resume" pair. Note that you cannot really execute this in a reasonable way from within pySim, as it is issuing other commands than those permitted between SUSPEND and RESUME by TS 102 221 Section 11.1.22.3.2 Change-Id: I3322fde74f680e77954e1d3e18a32ef5662759f2 --- M docs/shell.rst M pySim/commands.py M pySim/ts_102_221.py 3 files changed, 47 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/10/33210/1 diff --git a/docs/shell.rst b/docs/shell.rst index 8f85246..cce790a 100644 --- a/docs/shell.rst +++ b/docs/shell.rst @@ -217,6 +217,20 @@ :module: pySim.ts_102_221 :func: CardProfileUICC.AddlShellCommands.suspend_uicc_parser +resume_uicc +~~~~~~~~~~~ +This command allows you to perform the SUSPEND UICC command for the RESUME operation on the card. + +Suspend/Resume is a relatively recent power-saving addition to the UICC specifications, allowing for +suspend/resume while maintaining state, as opposed to a full power-off (deactivate) and power-on +(activate) of the card. + +The pySim command just sends that SUSPEND UICC (RESUME) command and doesn't perform the full related +sequence including the electrical power down. + +.. argparse:: + :module: pySim.ts_102_221 + :func: CardProfileUICC.AddlShellCommands.resume_uicc_parser pySim commands diff --git a/pySim/commands.py b/pySim/commands.py index 6acdb2e..424ed0d 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -631,6 +631,14 @@ resume_token = data[4:] return (negotiated_duration_secs, resume_token, sw) + # ETSI TS 102 221 11.1.22 + def resume_uicc(self, token: str): + """Send SUSPEND UICC (resume) to the card.""" + if len(h2b(token)) != 8: + raise ValueError("Token must be 8 bytes long") + data, sw = self._tp.send_apdu_checksw('8076010008' + token) + negotiated_duration_secs = decode_duration(data[:4]) + def get_data(self, tag: int, cla: int = 0x00): data, sw = self._tp.send_apdu('%02xca%04x00' % (cla, tag)) return (data, sw) diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py index bade9cf..19b63fe 100644 --- a/pySim/ts_102_221.py +++ b/pySim/ts_102_221.py @@ -870,6 +870,14 @@ self._cmd.poutput( 'Negotiated Duration: %u secs, Token: %s, SW: %s' % (duration, token, sw)) + resume_uicc_parser = argparse.ArgumentParser() + resume_uicc_parser.add_argument('token', type=str, help='Token provided during SUSPEND') + + @cmd2.with_argparser(resume_uicc_parser) + def do_resume_uicc(self, opts): + """Perform the REUSME UICC operation. Only supported on some UICC.""" + self._cmd.card._scc.resume_uicc(opts.token) + class CardProfileUICCSIM(CardProfileUICC): """Same as above, but including 2G SIM support""" -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I3322fde74f680e77954e1d3e18a32ef5662759f2 Gerrit-Change-Number: 33210 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in pysim[master]: HPSIM application support
by laforge 06 Jun '23

06 Jun '23
Attention is currently required from: laforge. Hello Jenkins Builder, fixeria, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/33183 to look at the new patch set (#2). Change subject: HPSIM application support ...................................................................... HPSIM application support Support HPSIM as specified in 3GPP TS 31.104 Change-Id: I2729fd2b88cd13c36d7128753ad8d3e3d08a9b52 --- M pySim-shell.py A pySim/ts_31_104.py 2 files changed, 73 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/83/33183/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2729fd2b88cd13c36d7128753ad8d3e3d08a9b52 Gerrit-Change-Number: 33183 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in pysim[master]: Move "suspend_uicc" command from pySim-shell to ts_102_221.py
by laforge 06 Jun '23

06 Jun '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/33209 ) Change subject: Move "suspend_uicc" command from pySim-shell to ts_102_221.py ...................................................................... Move "suspend_uicc" command from pySim-shell to ts_102_221.py The SUSPEND UICC command is a TS 102 221 (UICC) command, so move it to the UICC Card Profile. Also, make sure that any shell command sets specified in the CardProfile are actually installed during equip(). Change-Id: I574348951f06b749aeff986589186110580328bc --- M docs/shell.rst M pySim-shell.py M pySim/ts_102_221.py 3 files changed, 48 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/09/33209/1 diff --git a/docs/shell.rst b/docs/shell.rst index 510f4c6..8f85246 100644 --- a/docs/shell.rst +++ b/docs/shell.rst @@ -199,6 +199,11 @@ :func: Iso7816Commands.close_chan_parser +TS 102 221 commands +------------------- + +These are commands as specified in ETSI TS 102 221, the core UICC specification. + suspend_uicc ~~~~~~~~~~~~ This command allows you to perform the SUSPEND UICC command on the card. This is a relatively @@ -209,8 +214,8 @@ including the electrical power down. .. argparse:: - :module: pySim-shell - :func: Iso7816Commands.suspend_uicc_parser + :module: pySim.ts_102_221 + :func: CardProfileUICC.AddlShellCommands.suspend_uicc_parser diff --git a/pySim-shell.py b/pySim-shell.py index d6d9a64..56083bb 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -219,6 +219,9 @@ self._onchange_conserve_write( 'conserve_write', False, self.conserve_write) self._onchange_apdu_trace('apdu_trace', False, self.apdu_trace) + if self.rs.profile: + for cmd_set in self.rs.profile.shell_cmdsets: + self.register_command_set(cmd_set) self.register_command_set(Iso7816Commands()) self.register_command_set(Ts102222Commands()) self.register_command_set(PySimCommands()) @@ -283,6 +286,10 @@ @cmd2.with_category(CUSTOM_CATEGORY) def do_equip(self, opts): """Equip pySim-shell with card""" + if self.rs.profile: + for cmd_set in self.rs.profile.shell_cmdsets: + print("uninstalling cmd_set", cmd_set) + self.unregister_command_set(cmd_set) rs, card = init_card(sl) self.equip(card, rs) @@ -934,20 +941,6 @@ fcp_dec = self._cmd.lchan.status() self._cmd.poutput_json(fcp_dec) - suspend_uicc_parser = argparse.ArgumentParser() - suspend_uicc_parser.add_argument('--min-duration-secs', type=int, default=60, - help='Proposed minimum duration of suspension') - suspend_uicc_parser.add_argument('--max-duration-secs', type=int, default=24*60*60, - help='Proposed maximum duration of suspension') - - # not ISO7816-4 but TS 102 221 - @cmd2.with_argparser(suspend_uicc_parser) - def do_suspend_uicc(self, opts): - """Perform the SUSPEND UICC command. Only supported on some UICC.""" - (duration, token, sw) = self._cmd.card._scc.suspend_uicc(min_len_secs=opts.min_duration_secs, - max_len_secs=opts.max_duration_secs) - self._cmd.poutput( - 'Negotiated Duration: %u secs, Token: %s, SW: %s' % (duration, token, sw)) class Proact(ProactiveHandler): def receive_fetch(self, pcmd: ProactiveCommand): diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py index b8db5c9..bade9cf 100644 --- a/pySim/ts_102_221.py +++ b/pySim/ts_102_221.py @@ -838,7 +838,8 @@ } super().__init__(name, desc='ETSI TS 102 221', cla="00", - sel_ctrl="0004", files_in_mf=files, sw=sw) + sel_ctrl="0004", files_in_mf=files, sw=sw, + shell_cmdsets = [self.AddlShellCommands()]) @staticmethod def decode_select_response(resp_hex: str) -> object: @@ -852,6 +853,23 @@ def match_with_card(scc: SimCardCommands) -> bool: return match_uicc(scc) + @with_default_category('TS 102 221 Specific Commands') + class AddlShellCommands(CommandSet): + suspend_uicc_parser = argparse.ArgumentParser() + suspend_uicc_parser.add_argument('--min-duration-secs', type=int, default=60, + help='Proposed minimum duration of suspension') + suspend_uicc_parser.add_argument('--max-duration-secs', type=int, default=24*60*60, + help='Proposed maximum duration of suspension') + + # not ISO7816-4 but TS 102 221 + @cmd2.with_argparser(suspend_uicc_parser) + def do_suspend_uicc(self, opts): + """Perform the SUSPEND UICC command. Only supported on some UICC.""" + (duration, token, sw) = self._cmd.card._scc.suspend_uicc(min_len_secs=opts.min_duration_secs, + max_len_secs=opts.max_duration_secs) + self._cmd.poutput( + 'Negotiated Duration: %u secs, Token: %s, SW: %s' % (duration, token, sw)) + class CardProfileUICCSIM(CardProfileUICC): """Same as above, but including 2G SIM support""" -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I574348951f06b749aeff986589186110580328bc Gerrit-Change-Number: 33209 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • ...
  • 248
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.