aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-10-29 02:02:14 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-05-10 22:24:21 +0700
commit35a96edb0dc446ed1e09a932c8f41e748f571c19 (patch)
tree4049fe594f7da5922409b59841e9737545cb1081
parent5491c48e71e1979f58fff46bc10556b22f458241 (diff)
pySim-*.py: print info about selected reader interfaceHEADmaster
-rwxr-xr-xpySim-prog.py6
-rwxr-xr-xpySim-read.py6
-rw-r--r--pysim-testdata/fakemagicsim.ok1
-rw-r--r--pysim-testdata/sysmoUSIM-SJS1.ok1
-rw-r--r--pysim-testdata/sysmosim-gr1.ok1
5 files changed, 15 insertions, 0 deletions
diff --git a/pySim-prog.py b/pySim-prog.py
index d6d7ad5..2638eef 100755
--- a/pySim-prog.py
+++ b/pySim-prog.py
@@ -568,12 +568,18 @@ if __name__ == '__main__':
# Init card reader driver
if opts.pcsc_dev is not None:
+ print("Using PC/SC reader (dev=%d) interface"
+ % opts.pcsc_dev)
from pySim.transport.pcsc import PcscSimLink
sl = PcscSimLink(opts.pcsc_dev)
elif opts.osmocon_sock is not None:
+ print("Using Calypso-based (OsmocomBB, sock=%s) reader interface"
+ % opts.osmocon_sock)
from pySim.transport.calypso import CalypsoSimLink
sl = CalypsoSimLink(sock_path=opts.osmocon_sock)
else: # Serial reader is default
+ print("Using serial reader (port=%s, baudrate=%d) interface"
+ % (opts.device, opts.baudrate))
from pySim.transport.serial import SerialSimLink
sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate)
diff --git a/pySim-read.py b/pySim-read.py
index d4a9849..17fce61 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -76,12 +76,18 @@ if __name__ == '__main__':
# Init card reader driver
if opts.pcsc_dev is not None:
+ print("Using PC/SC reader (dev=%d) interface"
+ % opts.pcsc_dev)
from pySim.transport.pcsc import PcscSimLink
sl = PcscSimLink(opts.pcsc_dev)
elif opts.osmocon_sock is not None:
+ print("Using Calypso-based (OsmocomBB, sock=%s) reader interface"
+ % opts.osmocon_sock)
from pySim.transport.calypso import CalypsoSimLink
sl = CalypsoSimLink(sock_path=opts.osmocon_sock)
else: # Serial reader is default
+ print("Using serial reader (port=%s, baudrate=%d) interface"
+ % (opts.device, opts.baudrate))
from pySim.transport.serial import SerialSimLink
sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate)
diff --git a/pysim-testdata/fakemagicsim.ok b/pysim-testdata/fakemagicsim.ok
index 7de421d..a1d9e9c 100644
--- a/pysim-testdata/fakemagicsim.ok
+++ b/pysim-testdata/fakemagicsim.ok
@@ -1,3 +1,4 @@
+Using PC/SC reader (dev=1) interface
Reading ...
ICCID: 1122334455667788990
IMSI: 001010000000102
diff --git a/pysim-testdata/sysmoUSIM-SJS1.ok b/pysim-testdata/sysmoUSIM-SJS1.ok
index 275e79e..3bbdc90 100644
--- a/pysim-testdata/sysmoUSIM-SJS1.ok
+++ b/pysim-testdata/sysmoUSIM-SJS1.ok
@@ -1,3 +1,4 @@
+Using PC/SC reader (dev=0) interface
Reading ...
ICCID: 1122334455667788990
IMSI: 001010000000102
diff --git a/pysim-testdata/sysmosim-gr1.ok b/pysim-testdata/sysmosim-gr1.ok
index 6a66cda..a1a49fd 100644
--- a/pysim-testdata/sysmosim-gr1.ok
+++ b/pysim-testdata/sysmosim-gr1.ok
@@ -1,3 +1,4 @@
+Using PC/SC reader (dev=2) interface
Reading ...
ICCID: 1122334455667788990
IMSI: 001010000000102