diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py index 8055306d..5b0ee076 100644 --- a/pySim/transport/__init__.py +++ b/pySim/transport/__init__.py @@ -119,6 +119,11 @@ class LinkBase(abc.ABC): """Connect to a card immediately """ + @abc.abstractmethod + def get_atr(self) -> Hexstr: + """Retrieve card ATR + """ + @abc.abstractmethod def disconnect(self): """Disconnect from card diff --git a/pySim/transport/calypso.py b/pySim/transport/calypso.py index fa3a9f29..f28e40c6 100644 --- a/pySim/transport/calypso.py +++ b/pySim/transport/calypso.py @@ -123,6 +123,9 @@ class CalypsoSimLink(LinkBaseTpdu): def connect(self): self.reset_card() + def get_atr(self) -> Hexstr: + return "3b00" # Dummy ATR + def disconnect(self): pass # Nothing to do really ... diff --git a/pySim/transport/modem_atcmd.py b/pySim/transport/modem_atcmd.py index e7614c0e..440ec779 100644 --- a/pySim/transport/modem_atcmd.py +++ b/pySim/transport/modem_atcmd.py @@ -139,6 +139,9 @@ class ModemATCommandLink(LinkBaseTpdu): def connect(self): pass # Nothing to do really ... + def get_atr(self) -> Hexstr: + return "3b00" # Dummy ATR + def disconnect(self): pass # Nothing to do really ...