tobias has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/33080 )
Change subject: modem_atcmd: make card reset cards.py compatible ......................................................................
modem_atcmd: make card reset cards.py compatible
Change-Id: I79d0fc87919efae4ee89881b7840c0e809bd7918 --- M pySim/transport/modem_atcmd.py 1 file changed, 14 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/80/33080/1
diff --git a/pySim/transport/modem_atcmd.py b/pySim/transport/modem_atcmd.py index ea50bc9..1bebaa7 100644 --- a/pySim/transport/modem_atcmd.py +++ b/pySim/transport/modem_atcmd.py @@ -36,7 +36,7 @@ self._sl = serial.Serial(device, baudrate, timeout=5) self._echo = False # this will be auto-detected by _check_echo() self._device = device - self._atr = None + self._atr = []
# Check the AT interface self._check_echo() @@ -48,6 +48,9 @@ if hasattr(self, '_sl'): self._sl.close()
+ def get_atr(self): + return self._atr + def send_at_cmd(self, cmd, timeout=0.2, patience=0.002): # Convert from string to bytes, if needed bcmd = cmd if type(cmd) is bytes else cmd.encode() @@ -129,6 +132,7 @@ raise ReaderError('The modem does not seem to support SIM access')
log.info('Modem at '%s' is ready!' % self._device) + return 1
def connect(self): pass # Nothing to do really ...