Add API + shell command for sending TERMINAL PROFILE to card

This allows a very first start to play with PROACTIVE SIM

Change-Id: Id8f23f7cebe0f9efce2c0ce4229509f35cd93d6a
This commit is contained in:
Harald Welte
2021-10-08 15:47:16 +02:00
parent f44256c7df
commit 846a898ee0
3 changed files with 14 additions and 0 deletions

View File

@@ -441,3 +441,9 @@ class SimCardCommands(object):
def envelope(self, payload:str):
"""Send one ENVELOPE command to the SIM"""
return self._tp.send_apdu_checksw('80c20000%02x%s' % (len(payload)//2, payload))
def terminal_profile(self, payload:str):
"""Send TERMINAL PROFILE to card"""
data_length = len(payload) // 2
data, sw = self._tp.send_apdu(('80100000%02x' % data_length) + payload)
return (data, sw)