transport: trace APDUs when they are sent

Right now APDUs that never return/fail are omitted from the trace output.
Move the print, so it actually tells me what failed..

Change-Id: I828ea36b06da36b6bb0aa073d235d4f49cbb3161
This commit is contained in:
Eric Wild
2026-09-23 17:51:04 +02:00
parent 37719a0fcf
commit a0e14a16f2
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -210,8 +210,10 @@ Online manual available at https://downloads.osmocom.org/docs/pysim/master/html/
def __init__(self, cmd2_app):
self.cmd2 = cmd2_app
def trace_response(self, cmd, sw, resp):
def trace_command(self, cmd):
self.cmd2.poutput("-> %s %s" % (cmd[:10], cmd[10:]))
def trace_response(self, cmd, sw, resp):
self.cmd2.poutput("<- %s: %s" % (sw, resp))
def update_prompt(self):
+3 -1
View File
@@ -45,8 +45,10 @@ class ApduTracer:
class StdoutApduTracer(ApduTracer):
"""Minimalistic APDU tracer, printing commands to stdout."""
def trace_response(self, cmd, sw, resp):
def trace_command(self, cmd):
log.info("-> %s %s", cmd[:10], cmd[10:])
def trace_response(self, cmd, sw, resp):
log.info("<- %s: %s", sw, resp)
def trace_reset(self):