From 087feff7cb4d8b8d4a5f7c84a426203401753a61 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 23 Aug 2018 09:41:36 +0200 Subject: [PATCH] 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 --- pySim/cards.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pySim/cards.py b/pySim/cards.py index a72a52f7..4dee0d8d 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): """