aboutsummaryrefslogtreecommitdiffstats
path: root/pySim
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-08-23 09:41:36 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2018-08-23 10:43:57 +0200
commit087feff7cb4d8b8d4a5f7c84a426203401753a61 (patch)
treef3d9e045e3c216844c40438307ff416363fbc108 /pySim
parent52f59aca780f7c7a8e82142fb53c179156acc19b (diff)
cards: autodetect sysmosim-gr1
The sysmosim-gr1 lacks the auto detection feature because no autodetect is yet programmed inside the related class. - add autodetect for sysmosim-gr1 Change-Id: Iec1f1ab6824ff2328baedd731b08df997df4da01 Related: OS#3405
Diffstat (limited to 'pySim')
-rw-r--r--pySim/cards.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pySim/cards.py b/pySim/cards.py
index a72a52f..4dee0d8 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -387,6 +387,15 @@ class SysmoSIMgr1(GrcardSim):
"""
name = 'sysmosim-gr1'
+ @classmethod
+ def autodetect(kls, scc):
+ try:
+ # Look for ATR
+ if scc.get_atr() == toBytes("3B 99 18 00 11 88 22 33 44 55 66 77 60"):
+ return kls(scc)
+ except:
+ return None
+ return None
class SysmoUSIMgr1(Card):
"""