Remote SIM service
The remote SIM (RSIM) service allows using a remote SIM instead of the internal SIM cards.
This service allows a user application to convey APDU requests to the remote SIM and APDU responses to the modem through the RSIM service. The link between the application and the RSIM service is based on the SIM Access Profile (SAP) specification: the user application must therefore implement a remote SIM server supporting this specification to handle the remote SIM card.
- Note
- The remote SIM Server application is not part of the Legato implementation and should be developed by the user.
IPC interfaces binding
All the functions of this API are provided by the modemService application service.
Here's a code sample binding to Data Connection services:
bindings: { clientExe.clientComponent.le_rsim -> modemService.le_rsim }
Communication
The communication between the application and the remote SIM service uses the SIM Access Profile (SAP) protocol.
The latest V11r00 SAP specification is supported by the remote SIM service. All client-mandatory features and some optional features are supported. The table below summarizes all SAP messages supported by the remote SIM service.
Feature | Associated SAP messages | Support in SAP client | RSIM support |
---|---|---|---|
Connection management | CONNECT_REQ | Mandatory | Supported |
CONNECT_RESP | Supported | ||
DISCONNECT_REQ | Supported | ||
DISCONNECT_RESP | Supported | ||
DISCONNECT_IND | Supported | ||
Transfer APDU | TRANSFER_APDU_REQ | Mandatory | Supported |
TRANSFER_APDU_RESP | Supported | ||
Transfer ATR | TRANSFER_ATR_REQ | Mandatory | Supported |
TRANSFER_ATR_RESP | Supported | ||
Power SIM off | POWER_SIM_OFF_REQ | Optional | Supported |
POWER_SIM_OFF_RESP | Supported | ||
Power SIM on | POWER_SIM_ON_REQ | Mandatory | Supported |
POWER_SIM_ON_RESP | Supported | ||
Reset SIM | RESET_SIM_REQ | Optional | Supported |
RESET_SIM_RESP | Supported | ||
Report Status | STATUS_IND | Mandatory | Supported |
Transfer Card Reader Status | TRANSFER_CARD_READER_STATUS_REQ | Optional | Not supported |
TRANSFER_CARD_READER_STATUS_RESP | Not supported | ||
Error handling | ERROR_RESP | Mandatory | Supported |
Set Transport Protocol | SET_TRANSPORT_PROTOCOL_REQ | Optional | Not supported |
SET_TRANSPORT_PROTOCOL_RESP | Not supported |
The application must register a handler function with le_rsim_AddMessageHandler() in order to receive the SAP messages sent by the remote SIM service. Registering the handler indicates that the remote SIM server is ready to receive messages and that a remote SIM card is available. The handler can be deregistered through the le_rsim_RemoveMessageHandler() function when it is not needed anymore.
The application can send SAP messages to the remote SIM service with the le_rsim_SendMessage() function. Message sending is an asynchronous process: a callback can therefore be passed to le_rsim_SendMessage() in order to receive the sending result for this message.
- Warning
- The remote SIM service supports only one remote SIM card and can therefore be connected with only one application.
- Note
- The remote SIM service has to be supported by the modem to be used: check your platform documentation.
- The remote SIM card should be selected in order to use the remote SIM service.
- As runtime switch is not currently supported, the switch between local and remote SIM card requires a platform reset to take effect.
A sample code of a basic remote SIM server is available in the following page:
Copyright (C) Sierra Wireless Inc.