aboutsummaryrefslogtreecommitdiffstats
path: root/pySim/commands.py
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-04-10 18:17:55 +0200
committerHarald Welte <laforge@osmocom.org>2021-04-11 12:20:29 +0200
commita463161ae22bb111dcc8c9fc8a9b17a78f6a3121 (patch)
tree4e2158ed94a91d42e3f940d72062609a9f9000d1 /pySim/commands.py
parent15fae98d2eb18fd27fc12de4df7a28897c9188c8 (diff)
pySim-shell: Adds support for DEACTIVATE FILE + ACTIVATE FILE
Diffstat (limited to 'pySim/commands.py')
-rw-r--r--pySim/commands.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pySim/commands.py b/pySim/commands.py
index 791b995..2894d31 100644
--- a/pySim/commands.py
+++ b/pySim/commands.py
@@ -296,6 +296,14 @@ class SimCardCommands(object):
ret = {'successful_3g_authentication': data}
return (ret, sw)
+ def deactivate_file(self):
+ """Execute DECATIVATE FILE command as per TS 102 221 Section 11.1.14."""
+ return self._tp.send_apdu_constr_checksw(self.cla_byte, '04', '00', '00', None, None, None)
+
+ def activate_file(self):
+ """Execute ACTIVATE FILE command as per TS 102 221 Section 11.1.15."""
+ return self._tp.send_apdu_constr_checksw(self.cla_byte, '44', '00', '00', None, None, None)
+
def reset_card(self):
"""Physically reset the card"""
return self._tp.reset_card()