aboutsummaryrefslogtreecommitdiffstats
path: root/pySim-shell.py
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-05-03 23:17:29 +0200
committerHarald Welte <laforge@osmocom.org>2021-05-04 13:24:07 +0200
commitdaf2b392f04e3b97ce52e52df08bd5a79ac35715 (patch)
treebad1bb3e63dee0549c5ce26e38f50752b0e5129a /pySim-shell.py
parent917d98c1a5cbff72820c45e8c6ccb4ac425fd369 (diff)
shell: Add 'reset' command to reset the card
At some points during an interactive session or a script one may want to reset the card. Change-Id: I992eb3e0ed52f7941a5fb44f28a42e22ebd49301
Diffstat (limited to 'pySim-shell.py')
-rwxr-xr-xpySim-shell.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pySim-shell.py b/pySim-shell.py
index 5b5768a..bbfe7e9 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -313,6 +313,12 @@ class PySimCommands(CommandSet):
elif context['DF_SKIP']:
raise RuntimeError("unable to export %i dedicated files(s)" % context['ERR'])
+ def do_reset(self, opts):
+ """Reset the Card."""
+ atr = self._cmd.rs.reset(self._cmd)
+ self._cmd.poutput('Card ATR: %s' % atr)
+ self._cmd.update_prompt()
+
@with_default_category('ISO7816 Commands')
class Iso7816Commands(CommandSet):