diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2009-12-27 10:28:47 +0100 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2009-12-27 10:28:47 +0100 |
commit | 36f7a2d60be6bb14a888324afb48f1f0e6c0d840 (patch) | |
tree | 97e8cf63c2ee9bca150835a09cc40ab47452bed2 | |
parent | 995c398c132de922d8970e94eb8741fe135ebc9d (diff) |
Reset the card after formatting and auto-detect
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rwxr-xr-x | pySim.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -344,6 +344,9 @@ class Card(object): """Converts integer MCC/MNC into 6 bytes for EF""" return swap_nibbles(lpad('%d' % mcc, 3) + lpad('%d' % mnc, 3)) + def reset(self): + self._sl.reset_card() + class _MagicSimBase(Card): """ @@ -775,6 +778,7 @@ if __name__ == '__main__': card = kls.autodetect(sl) if card: print "Autodetected card type %s" % card.name + card.reset() break if card is None: @@ -792,6 +796,7 @@ if __name__ == '__main__': if opts.erase: print "Formatting ..." card.erase() + card.reset() # Program it print "Programming ..." |