mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-22 13:28:33 +03:00
shell: Fix activate_file + deactivate_file commands
We cannot re-activate a deactivated file after we have selected somethng else, as SELECT will fail on the deactivated file. Hence, the deactivate_file command needs to be used with a file name as argument. Change-Id: Ief4d2bf8ea90497a8f25d1986aeea935c615f9bb
This commit is contained in:
@@ -367,9 +367,9 @@ class SimCardCommands(object):
|
||||
"""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):
|
||||
def activate_file(self, fid):
|
||||
"""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)
|
||||
return self._tp.send_apdu_checksw(self.cla_byte + '44000002' + fid)
|
||||
|
||||
def manage_channel(self, mode='open', lchan_nr=0):
|
||||
"""Execute MANAGE CHANNEL command as per TS 102 221 Section 11.1.17."""
|
||||
|
||||
Reference in New Issue
Block a user