aboutsummaryrefslogtreecommitdiffstats
path: root/pySim-read.py
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-10-27 02:10:34 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-10-29 02:45:54 +0700
commit9f9f5a6157265b1b20a99b1d4707462f73b06a6f (patch)
treebfb30a0be9660c0cc86a9c48cce790e18e115ac6 /pySim-read.py
parent588f3aca3ce5cfa6db05f4a1b312d96d77b009e8 (diff)
pySim-*.py: add command line option for Calypso reader
Diffstat (limited to 'pySim-read.py')
-rwxr-xr-xpySim-read.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pySim-read.py b/pySim-read.py
index 066b0df..4356453 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -56,6 +56,10 @@ def parse_options():
help="Which PC/SC reader number for SIM access",
default=None,
)
+ parser.add_option("--osmocon", dest="osmocon_sock", metavar="PATH",
+ help="Socket path for Calypso (e.g. Motorola C1XX) based reader (via OsmocomBB)",
+ default=None,
+ )
(options, args) = parser.parse_args()
@@ -74,6 +78,9 @@ if __name__ == '__main__':
if opts.pcsc_dev is not None:
from pySim.transport.pcsc import PcscSimLink
sl = PcscSimLink(opts.pcsc_dev)
+ elif opts.osmocon_sock is not None:
+ from pySim.transport.calypso import CalypsoSimLink
+ sl = CalypsoSimLink(sock_path=opts.osmocon_sock)
else: # Serial reader is default
from pySim.transport.serial import SerialSimLink
sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate)