> 15. | Remote SIM Access (RSA) Commands

> This chapter contains AT commands and responses related to the Remote SIM Access (RSA) feature of TC65. RSA allows TC65 to access and use a remote SIM card via its serial interface in addition to or instead of the SIM locally attached via the dedicated lines on the interface connector.
> The necessary protocols and procedures are implemented following the "SIM Access Profile (SAP) Interoperability Specification" [16]. As stated there it is possible for a SAP client to use a SIM card in an external device connected via a wireless link. The external device can either be a mobile phone, a PDA or any other mobile equipment that may be used as SIM card holder. The SIM Access Profile builds on the interface between the mobile equipment and the SIM card (refer to the "Specification of the Subscriber Identity Module (GSM 11.11)" [26]). For further details contact the Wireless Modules Application Engineering Department at Siemens AG.
> Figure 15.1, Basic Remote SIM Access Usage Scenario via Bluetooth illustrates an access scenario via Bluetooth:
> Since the TC65 itself - acting as SAP client - does not control the Bluetooth wireless link, the communication with the remote SIM needs to be routed via an external customer application. The external application establishes and controls the Bluetooth connection. It maps data received over a serial interface channel to data transferred over a Bluetooth interface and vice versa.
> Figure 15.2, Basic Remote SIM Access usage scenario via RS232 illustrates an alternative access scenario via a serial RS232 interface: Instead of Bluetooth it is possible for an external customer application to use a serial RS232 interface in mapping data for the remote SIM in an external device. In this case an ASCII coded string format (Siemens' XSAP) is used instead of the binary SAP data format employed for Bluetooth.

> Figure 15.1: Basic Remote SIM Access Usage Scenario via Bluetooth

> Figure 15.2: Basic Remote SIM Access usage scenario via RS232

> The TC65 can operate either as SAP server or as SAP client. A brief description of the configuration is given below.
> SAP server
> The SAP server has direct (galvanic) access to a SIM. It acts as a SIM card reader which assists the SAP client in accessing and controlling this SIM via the serial link.
> After RSA activation, the SAP server waits for SAP CONNECTION_REQ messages from the SAP client (see Figure 15.3, SIM usage states of SAP server). The SAP server still uses its local SIM card until the parameter negotiation with an SAP client has been accomplished successfully.

> Figure 15.3: SIM usage states of SAP server

> SAP client
> After RSA activation, the SAP client starts sending SAP CONNECTION_REQ messages (see Figure 15.4, SIM usage states of SAP client). The SAP client still uses its local SIM until an SAP server responds and the parameter negotiation has been accomplished successfully. When the SAP client recognizes from the received ATR data that the SIM of the SAP server is appropriate and uses the correct transmission protocols, it switches over to the server's SIM. The "^SRSA: 2,2,1" URC notifies the SAP client that the server's SIM is accessible. Now, the SAP client can enter the SIM PIN of the server's SIM. Both sides start to exchange APDU data.
> When the SIM PIN authentication has been completed, the SAP client can register to the cellular network - via the SIM inserted in the SAP server instead of its own local SIM.
> As an additional option, the SAP client is advised to enable further URCs to get detailed status information during connection setup, such as the URCs "^SCKS" and "+CREG". See the example provided in Section 15.2, AT^SRSM.

> Figure 15.4: SIM usage states of SAP client