I am trying to assign a TAR to an applet that I want to install on a sysmoISIM-SJA2. My ultimate goal is to write an OTA message to trigger the opening of this applet later.
As a base, I used HelloSTK, modifying it slightly. Here:
The TAR value must be specified during INSTALL [for install] according to ETS ITS 102 226 Section 8.2.1.3.2 in the tag CA. You currently need to encode those manually and pass it to the --install-parameters or --install-parameters-stk arguments.
Thank you for the response! Yes, I had looked into shadysim just because I saw that in the install_app function, it handled the TAR separately and it could help me understand the exact placement in the string.
For the actual installation, I was using gp.jar; I didn’t know that pySim-shell supported the installation of CAP files, I will definitely try it.
Anyway, if the only way is to encode the parameters manually, then I think I will need to try harder…
I also tried with pysim-shell.py, but the issue isn’t with the tool, it’s that I’m evidently misinterpreting the table in the ETSI document. To recap:
Original CA section
010001001505000000000000000000000000
broken down like this:
0100: Access domain = 0x00 ==> file system access allowed
01: Priority level
00: Maximum allowed timers
15: Maximum length for a menu entry
05: Maximum number of menu entries
0000000000: 2 × m bytes where m is 5
00: Maximum number of channels for this application instance
00: Length of Minimum Security Level field
00: Minimum Security Level (MSL)
00: Length of TAR Value(s) field
000000: TAR Value(s) of the Toolkit Application instance
Hi @mandomat,
You need 2 bytes per Menu Entry, not 2 digits. But, if you work with Hello STK, 1 menu entry is enough.
Can you try one of these? 01000100150500000000000000000000000003BFFFFF
or 0100010015010000000003BFFFFF (recommended)
Hope this helps.
I’m currently working on this topic, but I’m having issues with the TAR parameter. I can successfully load the applet using the --install-parameters-stk argument and assign TAR numbers such as “BFFFFF”, “B00030”, or “B00040”. After loading, I can also see the applet on the phone.
pySIM-shell (SCP02[01]:00:MF/ADF.ISD)> install_cap /home/anda/HelloSTK.cap --install-parameters-non-volatile-memory-quota 255 --install-parameters-volatile-memory-quota 255 --install-parameters-stk 0100010015010000000003BFFFFF
loading cap file: /home/anda/HelloSTK.cap ...
parameters:
security-domain-aid: a000000003000000
load-file: 786 bytes
load-file-aid: d07002ca44
module-aid: d07002ca44900101
application-aid: d07002ca44900101
install-parameters: c900ef0dc80200ffc70200ffca03b00030
step #1: install for load...
step #2: load...
Loaded a total of 790 bytes in 4 blocks. Don't forget install_for_install (and make selectable) now!
step #3: install_for_install (and make selectable)...
However, when I send an “OTA SMS” to the SIM card using one of these TAR numbers, I receive the error “09 - TAR Unknown.” I
’m sure that the new applet has been successfully installed — I even verified it through the phone. However, I’m having trouble accessing the TAR information that I assigned using the --install-parameters-stk argument. Could there be something I’m missing or doing incorrectly? I’m open to your suggestions.