Integrate IPA SDK
# Integration Preparation:
# IPA SDK contains the following files:
|libipa.so||IPA SDK library , having different suffixes on different platforms|
|rt_app_ipa.h||Device API header file declaration. For the details, see the description in IPA SDK API.|
|rt_ipa_port.h||Declaration of interface header file that user need to adapt and port to different platforms|
|rt_port.c||System API that the user needs to port and adapt, we will provide the demo code, user can modify the specific implementation according to the specific system and requirements.|
|test_ipa_demo.c||IPA SDK interface demo code|
# Adaption Process
- You need to provide the compilation tool chain first, so that our team can compile the corresponding library for your system;
- Transplant the Port codes and library into your system application;
- Adapt the Port API in accordance with your device’s system;
# Integration Instruction
IPA SDK is an IoT Profile Assistant, which is provided in software SDK library and needs to be adapted and integrated in the external MCU or inside the module.
The port SDK interfaces are system interfaces, including standard C library interfaces, Modem interaction interfaces, thread synchronization interfaces and network communication interfaces. Considering the interfaces between different operation systems may not be compatible, in order to adapt to a new platform easily, Redtea Mobile provides reference Port source code. The customer need to read the description of the system interfaces and enable the functions as shown below.
|Standard C Library Interfaces|
|rt_port_heap_malloc||Same function as standard C interface malloc|
|rt_port_heap_free||Same function as standard C interface free|
|rt_port_sprintf||Same function as standard C interface sprintf|
|rt_port_snprintf||Same function as standard C interface snprintf|
|rt_port_sscanf||Same function as standard C interface sscanf|
|Basic Functions Interfaces|
|rt_port_log_print_array||LOG interface, used to print array of a specified length|
|rt_port_log_print||LOG print interface|
|rt_port_modem_get_imei||Get module IMEI|
|rt_port_modem_usim_transimit_apdu||Send APDU command to e-SIM card|
|Thread and Synchronization Interfaces|
|rt_task_sleep||Task dormancy or cyclic waiting function|
|rt_port_mutex_create||Create a mutex|
|HTTPS Communication interfaces|
|rt_port_http_client_create||Create and initialize http client|
|rt_port_http_client_destroy||Destroy a specified http client|
|rt_port_http_post||Http client post request|
|Other Functional Interfaces|
|rt_port_read_flash||Read FLASH data|
|rt_port_get_buffer||Get the system global buffer|
For the detailed description and implementation of Port interfaces, please check the description in Port Demo SDK and in HAL Port API (opens new window);
- Customer provide compilation tool chain or module SDK (or provide compilation parameters if it is DS5 or a similar general development tool);
- Redtea Mobile SIM.Express team compile the IPA into library for the customer with the compilation tool chain or module SDK;
- The customer copy the Port source code to its own application code;
- The customer transplant relevant system interfaces in reference to Redtea Mobile’s Port source code;
- The customer call Redtea Mobile’s API to implement service logic;
- The customer compile the application or firmware package after linking with the Redtea Mobile library file.
# IPA SDK API Reference
The SDK provides interfaces for downloading and managing Profiles, the customer shall call the relevant interface in accordance with its own business logic, to implement relevant service functions.
|InitializeIPA||int rt_ipa_init(void *arg)|
|GetEID||int rt_ipa_get_eid(unsigned char *eid)|
|GetProfileInfo||int rt_ipa_get_profile_info(profile_info_t *profile_info, unsigned int *num)|
|EnableProfile||int rt_ipa_enable_profile(const char *iccid)|
|RequestDeviceInfo||int rt_ipa_request_device_info(unsigned char *info, unsigned int *info_size)|
|DownloadProfile||iint rt_ipa_download_profile(const unsigned char *info, unsigned int info_len)|
|RequesteSIMInfo||int rt_ipa_request_esim_info(unsigned char *info, unsigned int *info_size)|
|UpgradeeSIMOS||int rt_ipa_upgrade_esim_os(unsigned int addr, unsigned int length)|
When the customer use the device API for the first time after starting its application, the customer shall call the “InitializeIPA” interface to initialize the terminal API.
The customer’s application call the “GetEID” and “GetProfileInfo” interfaces to query the information of the device.
The customer’s application call the “RequestDeviceInfo” interface to obtain relevant information of the device.
The customer’s application call the “DownloadProfile” interface to download Profile from SM-DP+ to the device.
# Verification Steps:
- Simple eSIM functions check: Check whether the functions of reading EID, obtaining device info, obtaining Profile info, printing logs, sending and receiving APDU are normal;
- Local Profile management function check: Enable the Profile, and check whether the modem works normally after Profile is switched;
- Profile download function check: Check whether HTTPS functions normally, and whether the downloaded Profile can be used normally;
- Verify other eSIM management functions per service logic.