Using SoftSIM on SOM-NRF9151
This document overviews the SoftSIM technology supported by Zephyr BSP for SOM-NRF9151 and provides instructions how to configure and use the SoftSIM library in the customized Asset Tracker v2 application.
Set up the hardware platform with an LTE antenna as described in https://voxelbotics.atlassian.net/wiki/spaces/SOMnRF9151/pages/709328900.
Install the modem and application firmware onto the hardware platform as described in https://voxelbotics.atlassian.net/wiki/spaces/SOMnRF9151/pages/708673628/Installing+SOM-NRF9151+Images?atlOrigin=eyJpIjoiYWUyYTU1MzAzNGMyNGZmOWEwZDFlOTMxNzdkYjk1ZTciLCJwIjoiYyJ9.
SoftSIM is a form of SIM card that is implemented in software and programmed into a device. The SoftSIM interface in the Modem library is used to transfer SIM data between the modem and the application. When the modem makes a SoftSIM request, the SoftSIM interface handles the request and forwards it to the application. The application then generates a response and responds to the modem through the SoftSIM interface. The modem can be configured at runtime to use a regular SIM or SoftSIM (iSIM), or both. For more information on how to enable this feature in the modem, refer to the nRF91x1 AT Commands Reference Guide.
nRF Connect SDK implements the following C-binding API, which is declared in the nrf_modem_softsim.h file:
Function | Description | Comments |
| Handle a SoftSIM request. | To handle requests from the SoftSIM interface, the application needs to implement a
|
| Set a handler function for SoftSIM requests. |
Returns 0 on success. |
| Sends a SoftSIM response to a request. | This function is used to respond to the Modem with the data requested by a specific request.
Returns:
|
| Sends a SoftSIM error to a request. | This function is used to inform the Modem that an error occurred for a specific request.
Returns:
|
| Free the data of a SoftSIM request. |
|
The customized nRF Connect SDK manifest includes a link to the latest release of Onomondo SoftSIM library. Use the west update command to update the west environment and download the SoftSIM library automatically.
Onomondo SoftSIM library is available at https://github.com/onomondo/nrf-softsim .
Refer to https://github.com/onomondo/nrf-softsim?tab=readme-ov-file#understanding-the-sim---why-softsim-is-possible for more details about Onomondo SoftSIM implementation.
The Onomondo SoftSIM library implements the following C-binding API, which is defined in the nrf_softsim.h file:
Function | Description | Comments |
| Initialize the SoftSIM library and install the SoftSIM request handler. | Only use if Returns 0 on success. |
| Provision a SoftSIM profile to protected storage. |
Returns 0 on success. |
| Check if a SoftSIM profile is provisioned in protected storage. | Returns 1 if provisioned, 0 if not. It’s not recommended to call this function after switching from SoftSIM to the physical SIM, as it may cause kernel panic. |
The nrf_softsim_init() implements a separate workqueue thread for SoftSIM operations, which prevents other threads from interfering with handling of SoftSIM requests from the nRF9151 LTE modem.