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

laforge gerrit-no-reply at
Sun Apr 11 10:35:34 UTC 2021

laforge has uploaded this change for review. ( )

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/
1 file changed, 5 insertions(+), 4 deletions(-)

  git pull ssh:// refs/changes/20/23720/1

diff --git a/pySim/transport/ b/pySim/transport/
index 290bc7c..64a06a5 100644
--- a/pySim/transport/
+++ b/pySim/transport/
@@ -182,19 +182,20 @@
 	sl = None # type : :Optional[LinkBase]
 		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
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I87fd934243bc3556fd6db0ce6d219c22a60c2db4
Gerrit-Change-Number: 23720
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list