YateOTA – JSON API to encode UD(s)/APDU(s)

How to use JSON API to encode OTA User Data and Application Protocol Data Unit

This API is used to encode OTA messages called UDs.

These UDs can modify files on the SIM (RFM) or manage applets on the SIM (RAM).

Request: generate_uds

Generate and retrieve UDs and APDUs to update the SIM files(RFM) or to manage applets(RAM) for multiple participants(SIMs).
This request has multiple formats in which it can be sent:
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RFM",
        "tar_type": "Type of tar to use for generating UDs: sim/usim/isim. Required.",
        "participant": [
            {
                "kic": "Key Identifier for ciphering. Used for encryption. Size: 16/24 bytes. Format: hex",
                "kid": "Key Identifier for RC/CC/DS. Used to verify integrity data. Size: 16/24 bytes. Format: hex",
                "kik": "Key Identifier for protecting KIc and KID.",
                "ota_counter": "Counter used for replay detection and sequence integrity. Size: 5 bytes. Format: hex. Common: 0000000000.",
                "ota_profile": {
                    "cla": "Class Byte. The class byte shall be coded according to section 11.1.4.1 in GlobalPlatform Card Specification version 2.3. Size: 1 byte. Format: hex. Common: 80",
                    "spi": "Security Parameter Indicator. Specifies if algorithm is used, if PoR is ciphered etc. Size: 2 bytes. Format: hex. Common: 1621",
                    "kic": "Key and algorithm Identifier for ciphering. Algorithm type used for encryption. Size: 1 byte. Format: hex. Common: 15",
                    "kid": "Key and algorithm Identifier for RC/CC/DS. Algorithm type used to  compute RC/CC/DS field to verify integrity data. Size: 1 byte. Format: hex. Common: 15",
                    "tar_ram": "Toolkit Application Reference for RAM. Size: 3 byte. Format: hex. Common: 000000",
                    "tar_rfm_sim": "Toolkit Application Reference for RFM SIM. Size: 3 byte. Format: hex. Common: b00010",
                    "tar_rfm_usim": "Toolkit Application Reference for RFM USIM. Size: 3 byte. Format: hex. Common: b00001",
                    "tar_rfm_isim": "Toolkit Application Reference for RFM ISIM. Size: 3 byte. Format: hex. Common: b00020"
                }
            }
        ],
        "commands": [
            {
                "profile": "String. Optional. Name of the profile to use. If not set, default profile will be used",
                "app": "String. Required. RFM application to update: gsm/telecom/usim",
                "batch": [
                    {
                        "addr": "String or Array if case file in located in directory",
                        "values": "String or Object. If string, it contains the new value for the field. If object with \"old\" and \"new\" keys, then generated UDs will try to encode only the different between the two values."
                    }
                ]
            }
        ]
    }
}
{ "request": "generate_uds", "node": "ota", "params": { "type": "RFM", "tar_type": "Type of tar to use for generating UDs: sim/usim/isim. Required.", "participant": [ { "kic": "Key Identifier for ciphering. Used for encryption. Size: 16/24 bytes. Format: hex", "kid": "Key Identifier for RC/CC/DS. Used to verify integrity data. Size: 16/24 bytes. Format: hex", "kik": "Key Identifier for protecting KIc and KID.", "ota_counter": "Counter used for replay detection and sequence integrity. Size: 5 bytes. Format: hex. Common: 0000000000.", "ota_profile": { "cla": "Class Byte. The class byte shall be coded according to section 11.1.4.1 in GlobalPlatform Card Specification version 2.3. Size: 1 byte. Format: hex. Common: 80", "spi": "Security Parameter Indicator. Specifies if algorithm is used, if PoR is ciphered etc. Size: 2 bytes. Format: hex. Common: 1621", "kic": "Key and algorithm Identifier for ciphering. Algorithm type used for encryption. Size: 1 byte. Format: hex. Common: 15", "kid": "Key and algorithm Identifier for RC/CC/DS. Algorithm type used to compute RC/CC/DS field to verify integrity data. Size: 1 byte. Format: hex. Common: 15", "tar_ram": "Toolkit Application Reference for RAM. Size: 3 byte. Format: hex. Common: 000000", "tar_rfm_sim": "Toolkit Application Reference for RFM SIM. Size: 3 byte. Format: hex. Common: b00010", "tar_rfm_usim": "Toolkit Application Reference for RFM USIM. Size: 3 byte. Format: hex. Common: b00001", "tar_rfm_isim": "Toolkit Application Reference for RFM ISIM. Size: 3 byte. Format: hex. Common: b00020" } } ], "apdus": "Array of already generated APDUs to use to generate UDs. This is required unless commands is present." } }
{ "request": "generate_uds", "node": "ota", "params": { "type": "RAM", "tar_type": "Type of tar to use for generating UDs: ram/applet. Required.", "participant": [ { "kic": "Key Identifier for ciphering. Used for encryption. Size: 16/24 bytes. Format: hex", "kid": "Key Identifier for RC/CC/DS. Used to verify integrity data. Size: 16/24 bytes. Format: hex", "kik": "Key Identifier for protecting KIc and KID.", "ota_counter": "Counter used for replay detection and sequence integrity. Size: 5 bytes. Format: hex. Common: 0000000000.", "ota_profile": { "cla": "Class Byte. The class byte shall be coded according to section 11.1.4.1 in GlobalPlatform Card Specification version 2.3. Size: 1 byte. Format: hex. Common: 80", "spi": "Security Parameter Indicator. Specifies if algorithm is used, if PoR is ciphered etc. Size: 2 bytes. Format: hex. Common: 1621", "kic": "Key and algorithm Identifier for ciphering. Algorithm type used for encryption. Size: 1 byte. Format: hex. Common: 15", "kid": "Key and algorithm Identifier for RC/CC/DS. Algorithm type used to compute RC/CC/DS field to verify integrity data. Size: 1 byte. Format: hex. Common: 15", "tar_ram": "Toolkit Application Reference for RAM. Size: 3 byte. Format: hex. Common: 000000", "tar_rfm_sim": "Toolkit Application Reference for RFM SIM. Size: 3 byte. Format: hex. Common: b00010", "tar_rfm_usim": "Toolkit Application Reference for RFM USIM. Size: 3 byte. Format: hex. Common: b00001", "tar_rfm_isim": "Toolkit Application Reference for RFM ISIM. Size: 3 byte. Format: hex. Common: b00020" } } ], "commands": [ { "operation": "Name of the operation: delete/load/install/load_install/delete_load_install/custom/list_isd/list_packages/list_applets", "parameters": [ { "non_volatile_data_size": "Used to check if there is space on the SIM before loading an applet. Decimal value(0 - 65535), default is 0.", "volatile_data_size": "Used to check if there is space on the SIM before loading an applet. Decimal value(0 - 65535), default is 0.", "module_aid": "AID of the Executable module previously loaded. Mandatory for install operation.", "instance_aid": "AID of the instance that will be selected. Mandatory for install operation.", "aid": "Applet ID. Used for install/delete operation to install/delete specified applet.", "delete_related_objects": "true/false. If true will delete all the related modules/instances to the specified AID. Format: bool. Default true.", "toolkit_parameters": "sim/uicc or empty string. Used to install a STK/USAT applet.", "access_domain": "Access Domain used to install a STK applet. Size: 1 byte. Format: hex. Default value: FF.", "priority_level": "Priority Level. Size 1 byte. Format hex. Default value: 01.", "max_timers": "Maximum Timers. Size 1 byte. Decimal value (0 - 255). Default value: 0", "max_menu_entry_text": "Maximum Menu Entry Text. Size 1 byte. Decimal value (0 - 255). Default value: 16.", "max_menu_entries": "Maximum Menu Entries. Size 1 byte. Decimal value (0 - 255). Default value: 1.", "multi_tar": "Assign one more more TARs to an applet by separating them with ','.", "max_nr_services": "Maximum Number of Services. Size 1 byte. Decimal Value (0 - 255). Default value: 0.", "uicc_access_app": "UICC Access Application. Format Hex.", "uicc_admin_access_app": "UICC Administrative Access Application. Format Hex.", "app_parameters": "Application Parameters. Format Hex.", "applet": "Content of .CAP file base64 encoded or applet_name (if the applet already exists on the server).", "applet_name": "Name of the applet. Optional. Used for load operation to save the applet on server with the specified name, otherwise it will be saved as 'applet_{timestamp}.cap'", "tlv": "true/false. Used for list operations to receive the response (PoR) in TLV format. Default: false.", "first": "true/false. Used for list_packages/list_applets to receive in response the first set of packages/applets or the next sets.", "tar": "TAR of the targeting applet, it will override the profile TAR. Used only for the 'custom' operation to communicate with the applet. (Hexadecimal 3 bytes)", "data": "Hexadecimal string that will be send to the applet. Used only for the 'custom' operation." } ] } ] } }
Examples: generate_uds
Generate UD(s) and APDU(s) for every participant.
It updates the first 2 bytes of EF 6F05 with value 'AABB'.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RFM",
        "tar_type": "usim",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "app": "gsm",
            "batch": [
                {
                    "addr": "6F05",
                    "values": "AABB"
                }
            ]
        }
    }
}
Generate UD(s) and APDU(s) for every participant.
It finds the differences between old value and new value and updates EF 4F20 in DF 5F3B under USIM.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RFM",
        "tar_type": "usim",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "profile": "Elatec_new",
            "app": "usim",
            "batch": [
                {
                    "addr": [
                        "5F3B",
                        "4F20"
                    ],
                    "values": {
                        "old": "C6B5A841AC6DEC9500",
                        "new": "C6B5A841AC6DEE9500"
                    }
                }
            ]
        }
    }
}
Generate UD(s) and APDU(s) for every participant.
It updates 3 records in EF 6F42 under Telecom.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RFM",
        "tar_type": "sim",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "app": "telecom",
            "batch": [
                {
                    "addr": "6F42",
                    "values": {
                        "1": "FFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF0591880200F3FFFFFFFFFFFFFFFFFF",
                        "2": "FFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF069169830840F4FFFFFFFFFFFFFFFF",
                        "3": "FFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF0591880200F3FFFFFFFFFFFFFFFFFF"
                    }
                }
            ]
        }
    }
}
Generate UD(s) for every participant by specifying APDUs.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RFM",
        "tar_type": "usim",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "apdus": [
            "00A40004026F42",
            "00DC0104260581880205F3FFFFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF0581880205F3FFFFFFFFFFFFFFFFFF",
            "00A40004026F46",
            "00D60000110054657374FFFFFFFFFFFFFFFFFFFFFFFF"
        ]
    }
}
Generate UD(s) for every participant to delete an applet and all the related objects to it from the SIM.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RAM",
        "tar_type": "ram",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "operation": "delete",
            "parameters": {
                "aid": "D07002CA449001",
                "delete_related_objects": true
            }
        }
    }
}
Generate UD(s) for every participant to load an applet on SIM by specifying the base64 encoded content.
Save the applet on server with applet name 'TestApplet.cap'.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RAM",
        "tar_type": "ram",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "operation": "load",
            "parameters": {
                "volatile_data_size": 0,
                "non_volatile_data_size": 0,
                "applet": "UEsDBAoAAAgAAJh7gU4pOAUWFAAAABQAAAAnAAAAb3JnL3NzN3dhcmUvU1M3V2FyZS9qYXZhY2FyZC9IZWFkZXIuY2FwAQAR3sr/7QECBAABB9BwAspEkAFQSwMECgAACAAAmHuBTo6jB2YiAAAAIgAAACoAAABvcmcvc3M3d2FyZS9TUzdXYXJlL2phdmFjYXJkL0RpcmVjdG9yeS5jYXACAB8AEQAfAAwAHgBCABgAbQAkABcAAACpAAQAAgAUAgEAUEsDBAoAAAgAAJh7gU6btFc/DwAAAA8AAAAnAAAAb3JnL3NzN3dhcmUvU1M3V2FyZS9qYXZhY2FyZC9BcHBsZXQuY2FwAwAMAQjQcALKRJABAQAgUEsDBAoAAAgAAJh7gU7O5gsCIQAAACEAAAAnAAAAb3JnL3NzN3dhcmUvU1M3V2FyZS9qYXZhY2FyZC9JbXBvcnQuY2FwBAAeAgABB6AAAABiAQEGAhCgAAAACQAD/////4kQcQACUEsDBAoAAAgAAJh7gU4NmmYIRQAAAEUAAAAtAAAAb3JnL3NzN3dhcmUvU1M3V2FyZS9qYXZhY2FyZC9Db25zdGFudFBvb2wuY2FwBQBCABACAAAABoEJAAUAAAIDgQkLBoADAAEAAAAGAAABA4ADAQOAAwMGgQgAA4EIDAYAAFMGgQoABQAAAAOBChMDgQoWUEsDBAoAAAgAAJh7gU7NjbEeGwAAABsAA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"applet_name": "TestApplet.cap"
            }
        }
    }
}
Generate UD(s) for every participant to load an existing applet from the server on SIM by specifying the applet name 'TestApplet.cap'.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RAM",
        "tar_type": "ram",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "operation": "load",
            "parameters": {
                "volatile_data_size": 0,
                "non_volatile_data_size": 0,
                "applet": "TestApplet.cap"
            }
        }
    }
}
Generate UD(s) for every participant to install a STK applet that is already loaded on SIM.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RAM",
        "tar_type": "ram",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "operation": "install",
            "parameters": {
                "aid": "D07002CA449001",
                "module_aid": "D07002CA44900101",
                "instance_aid": "D07002CA449001",
                "toolkit_parameters": "sim",
                "access_domain": "00",
                "priority_level": "01",
                "max_timers": "05",
                "max_menu_entry_text": "10",
                "max_menu_entries": "3",
                "app_parameters": "50505050",
                "multi_tar": "A0A1A2,A3A4A5"
            }
        }
    }
}
Generate UD(s) for every participant to load and install a STK applet on SIM.
The applet already exists on the server as 'TestApplet.cap'.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RAM",
        "tar_type": "ram",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "operation": "load_install",
            "parameters": {
                "module_aid": "D07002CA44900101",
                "instance_aid": "D07002CA449001",
                "toolkit_parameters": "sim",
                "access_domain": "00",
                "priority_level": "01",
                "max_timers": "05",
                "max_menu_entry_text": "10",
                "max_menu_entries": "3",
                "app_parameters": "50505050",
                "multi_tar": "A0A1A2,A3A4A5",
                "applet": "TestApplet.cap",
                "comment_applet": "The 'applet' parameter can contain the base64 encoded applet"
            }
        }
    }
}
Generate UD(s) for every participant to delete,load and install a STK applet on SIM.
The applet already exists on the server as 'TestApplet.cap'.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RAM",
        "tar_type": "ram",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "operation": "delete_load_install",
            "parameters": {
                "delete_related_objects": true,
                "module_aid": "D07002CA44900101",
                "instance_aid": "D07002CA449001",
                "toolkit_parameters": "sim",
                "access_domain": "00",
                "priority_level": "01",
                "max_timers": "05",
                "max_menu_entry_text": "10",
                "max_menu_entries": "3",
                "app_parameters": "50505050",
                "multi_tar": "A0A1A2,A3A4A5",
                "applet": "TestApplet.cap",
                "comment_applet": "The 'applet' parameter can contain the base64 encoded applet"
            }
        }
    }
}
Generate UD(s) for every participant to send a custom applet command to a specific applet on the SIM.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RAM",
        "tar_type": "applet",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "operation": "custom",
            "parameters": {
                "tar": "A0A1A2",
                "data": "00A40004023F0000A40004027F2000A40004026F4600D6000011004D79546573744E6574776F726BFFFFFF"
            }
        }
    }
}
Generate UD(s) for every participant to list ISD from the SIM.
Without any parameters specified, the response will not be in TLV format.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RAM",
        "tar_type": "ram",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "operation": "list_isd"
        }
    }
}
Generate UD(s) for every participant to list ISD from the SIM.
Specify the response to be in TLV format.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RAM",
        "tar_type": "ram",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "operation": "list_isd",
            "parameters": {
                "tlv": true
            }
        }
    }
}
Generate UD(s) for every participant to list the packages from the SIM.
Without any parameters the response will not be in TLV format and retrieve only the first set of the packages.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RAM",
        "tar_type": "ram",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "operation": "list_packages"
        }
    }
}
Generate UD(s) for every participant to list the packages from the SIM.
Specify the response to be in TLV format and retrieve the next set of the packages.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RAM",
        "tar_type": "ram",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "operation": "list_packages",
            "parameters": {
                "tlv": true,
                "first": false
            }
        }
    }
}
Generate UD(s) for every participant to list the applets from the SIM.
Without any parameters the response will not be in TLV format and retrieve only the first set of the applets.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RAM",
        "tar_type": "ram",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "operation": "list_applets"
        }
    }
}
Generate UD(s) for every participant to list the applets from the SIM.
Specify the response to be in TLV format and retrieve the next set of the applets.
{
    "request": "generate_uds",
    "node": "ota",
    "params": {
        "type": "RAM",
        "tar_type": "ram",
        "participant": [
            {
                "kic": "86ADE6DAF787FF199ACB51FFA118F765",
                "kid": "D6490DCB0EC849A66E43A455916D7DC0",
                "kik": "DEEACC5323A3FCE76EB3691F0676DFC0",
                "ota_counter": "000000005e",
                "ota_profile": {
                    "cla": "80",
                    "spi": "1621",
                    "kid": "15",
                    "kic": "15",
                    "tar_ram": "000000",
                    "tar_rfm_sim": "b00010",
                    "tar_rfm_usim": "b00001",
                    "tar_rfm_isim": "b00020"
                }
            }
        ],
        "commands": {
            "operation": "list_applets",
            "parameters": {
                "tlv": true,
                "first": false
            }
        }
    }
}

Request: decode_por

Decode PoR(Proof of Receipt) to understand the response returned by the RE(Receiving Entity).
{
    "request": "decode_por",
    "node": "ota",
    "params": {
        "por": "Hexadecimal string. Value returned by RE.",
        "kic": "Hexadecimal string, length: 8/16/24 bytes. Key value used in ciphering data.",
        "ota_profile": {
            "spi": "Hexadecimal string, length: 2 bytes. Security Parameter Indicator.",
            "kic": "Hexadecimal string, length: 1 byte. Keyset and algorithm used in ciphering data."
        }
    }
}
Examples: decode_por
Successful response (RSC = 00, SW = 9000)
{
    "request": "decode_por",
    "node": "ota",
    "params": {
        "por": "027100000e0ab0001000000000940000069000",
        "kic": "3E2561E5FB6E941C321302F2919267DF",
        "ota_profile": {
            "spi": "1621",
            "kic": "15"
        }
    }
}
Unsuccessful Response. Counter verification failed (RSC = 02) => OTA counter is not incremented when RSC fails
{
    "request": "decode_por",
    "node": "ota",
    "params": {
        "por": "027100000b0ab0001000000000000002",
        "kic": "3E2561E5FB6E941C321302F2919267DF",
        "ota_profile": {
            "spi": "1621",
            "kic": "15"
        }
    }
}
Unsuccessful Response: File not found on SIM (RSC = 00, SW = 06)
{
    "request": "decode_por",
    "node": "ota",
    "params": {
        "por": "027100000e0ab0001000000000950000016a82",
        "kic": "3E2561E5FB6E941C321302F2919267DF",
        "ota_profile": {
            "spi": "1621",
            "kic": "15"
        }
    }
}
This documentation was generated on 01 July 2022