diff --git a/pySim/cards.py b/pySim/cards.py index 4511271e..8f5004e4 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -60,7 +60,11 @@ class SimCard(object): self._aids = [] def reset(self): - self._scc.reset_card() + rc = self._scc.reset_card() + if rc is 1: + return self._scc.get_atr() + else: + return None def erase(self): print("warning: erasing is not supported for specified card type!") diff --git a/pySim/filesystem.py b/pySim/filesystem.py index cc9176f1..dcc26081 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -1068,8 +1068,7 @@ class RuntimeState(object): Args: cmd_app : Command Application State (for unregistering old file commands) """ - self.card._scc._tp.reset_card() - atr = i2h(self.card._scc._tp.get_atr()) + atr = i2h(self.card.reset()) # select MF to reset internal state and to verify card really works self.select('MF', cmd_app) return atr