Terminal IPA SDK

# InitializeIPA

Prototype int rt_ipa_init(void *arg)
Description IPA SDK Initialization Interface
Input arg: Initialization parameter, is Null if no special requirements.
Output No output
Response 0: Success
< 0: Failed
Remarks /

# GetEID

Prototype int rt_ipa_get_eid(unsigned char *eid)
Description Get EID of eSIM card
Input EID: EID buffer
Output EID: obtained hexadecimal EID
Response 0: Success
< 0: Failed
Remarks EID buffer shall not be less than 33 bytes.

# GetProfileInfo

Prototype int rt_ipa_get_profile_info(profile_info_t *profile_info, unsigned int *num)
Description Get Profile info
Input profile_info: Profile buffer
num: maximum number of Profile info that can be stored in the Profile buffer
Output Profile_info: Obtained Profile info
Num: number of actually obtained Profile info
Response 0: Success
< 0: Failed
Remarks
The types of profile_info_t are as follows:
    typedef PROFILE_INFO {
        char iccid[21];       /* 20-digit ICCID, padded with F */
        unsigned char profile_class;   /* 0 test, 1 provisioning, 2operational*/
        unsigned char profile_state; /* 0 disabled, 1 enabled */
    } profile_info_t;
A Profile info is about 23 bytes. If it is estimated that 10 Profile can be stored at the maximum,  
 the receiving buffer should be no less than sizeof(profile_info_t)*10 bytes.

# EnableProfile

Prototype int rt_ipa_enable_profile(const char *iccid)
Description Enable Profile for a specified ICCID
Input ICCID: ICCID of the Profile to be enabled
Output No output
Response 0: Success
< 0: Failed
Remarks /

# RequestDeviceInfo

Prototype int rt_ipa_request_device_info(unsigned char *info, unsigned int *info_size)
Description Get device info
Input Info: Device info buffer
Info_size: Size of device info buffer
Output Info: Obtained device info
Info_size: Length of the obtained device info
Response 0: Success
< 0: Failed
Remarks Device info buffer shall be not less than 184 bytes.

# DownloadProfile

Prototype int rt_ipa_download_profile(const unsigned char *info, unsigned int info_len)
Description Request to download Profile
Input info: DownloadInfo
Info_len: Length of DownloadInfo
Content of downloadinfo in JSON requested by the platform API, do not include the quotation marks
{
	“downloadId”:”7d35d9037f4f91a267fd9411790bbb”
 	“rplmn”:46001”
 	“downloadInfo”:””
}
Output No output
Response 0: Success
< 0: Failed
Remarks /

# RequesteSIMInfo

Prototype int rt_ipa_request_esim_info(unsigned char *info, unsigned int *info_size)
Description Get eSIM info
Input info: eSIM info buffer
info_size: size of eSIM info buffer
Output info: Obtained eSIM info
info_size: length of obtained eSIM info
Response 0: Success
< 0: Failed
Remarks Device info buf shall not be less than 80 bytes.

# eSIMOSUpgrade

Prototype int rt_ipa_upgrade_esim_os(unsigned int addr, unsigned int length)
Description Request to upgrade eSIM OS
Input addr: eSIM OS upgrade package address
length: size of eSIM OS upgrade package
Output No output
Response 0: Success
< 0: Failed
Remarks /