Change in pysim[master]: init_reader: Print device name/number of chosen reader

laforge gerrit-no-reply at lists.osmocom.org
Sun Apr 11 10:35:34 UTC 2021


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/23720 )


Change subject: init_reader: Print device name/number of chosen reader
......................................................................

init_reader: Print device name/number of chosen reader

It's sometimes not clear what automatic defaults are chosen when
starting a pySim program; let's inform the user of the chosen reader.

Change-Id: I87fd934243bc3556fd6db0ce6d219c22a60c2db4
---
M pySim/transport/__init__.py
1 file changed, 5 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/20/23720/1

diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py
index 290bc7c..64a06a5 100644
--- a/pySim/transport/__init__.py
+++ b/pySim/transport/__init__.py
@@ -182,19 +182,20 @@
 	sl = None # type : :Optional[LinkBase]
 	try:
 		if opts.pcsc_dev is not None:
-			print("Using PC/SC reader interface")
+			print("Using PC/SC reader interface (dev_number=%u)" % opts.pcsc_dev)
 			from pySim.transport.pcsc import PcscSimLink
 			sl = PcscSimLink(opts.pcsc_dev, **kwargs)
 		elif opts.osmocon_sock is not None:
-			print("Using Calypso-based (OsmocomBB) reader interface")
+			print("Using Calypso-based (OsmocomBB) reader interface (sock='%s')" % opts.osmocon_sock)
 			from pySim.transport.calypso import CalypsoSimLink
 			sl = CalypsoSimLink(sock_path=opts.osmocon_sock, **kwargs)
 		elif opts.modem_dev is not None:
-			print("Using modem for Generic SIM Access (3GPP TS 27.007)")
+			print("Using modem for Generic SIM Access (3GPP TS 27.007) (dev='%s', baud=%u)" %
+					(opts.modem_dev, opts.modem_baud))
 			from pySim.transport.modem_atcmd import ModemATCommandLink
 			sl = ModemATCommandLink(device=opts.modem_dev, baudrate=opts.modem_baud, **kwargs)
 		else: # Serial reader is default
-			print("Using serial reader interface")
+			print("Using serial reader interface (dev='%s', baud=%u)" % (opts.device, opts.baudrate))
 			from pySim.transport.serial import SerialSimLink
 			sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate, **kwargs)
 		return sl

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/23720
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I87fd934243bc3556fd6db0ce6d219c22a60c2db4
Gerrit-Change-Number: 23720
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210411/604e8a90/attachment.htm>


More information about the gerrit-log mailing list