> 15.2 | AT^SRSM Remote SIM Access Message

> The AT^SRSM command is used to transfer SAP messages between devices acting as SAP server and client. It is applicable for XSAP data format only, for details please refer to the <dataForm> parameter of the AT^SRSA command. The write command transports SAP messages to an SAP server or SAP client.
> Syntax

> Test Command AT^SRSM=?
> Response(s)
> OK

> Write Command AT^SRSM=<RsaDevId>, <RsaMsgId>[, <RsaMsgData>[, <RsaMsgLen>[, <RsaMsgRc>]]]
> Response(s)
> OK

> Reference(s) |  | PIN |  | ASC0 | ASC1 | USB | MUX1 | MUX2 | MUX3 |  |  | Charge | Q | Last
> SIEMENS |  | - |  | + | - | + | + | + | + |  |  | - | - | -

> Unsolicited Result Code
> ^SRSM: <RsaDevId>, <RsaMsgId>[, <RsaMsgData>[, <RsaMsgLen>[, <RsaMsgRc>]]]
> This URC is issued by an ME acting as SAP server or client to transfer SAP message data.
> Parameter Description

> <RsaDevId>(num)

> RSA device identification
> Number assigned by the host on RSA activation via AT^SRSA, parameter <devId>.

> <RsaMsgId>(num)

> RSA message identification
> For details refer to Section 15.2.1, SAP Request Message Parameters and Section 15.2.2, SAP Response Message Parameters.

> <RsaMsgData>(str)

> RSA message data
> For details refer to Section 15.2.1, SAP Request Message Parameters and Section 15.2.2, SAP Response Message Parameters.

> <RsaMsgLen>(num)

> RSA message data length
> For details refer to Section 15.2.1, SAP Request Message Parameters and Section 15.2.2, SAP Response Message Parameters.

> <RsaMsgRc>(num)

> RSA message result code
> For details refer to Section 15.2.1, SAP Request Message Parameters and Section 15.2.2, SAP Response Message Parameters.

> <MaxMsgSize>(num)

> SAP parameter MaxMsgSize
> Handling of this parameter is as follows:

> • | If the TC65 is acting as SAP client the requested value of <MaxMsgSize> is 300. During SAP connection setup this value may be negotiated with the server to the minimal value 274, which is calculated by 256 data bytes as part of a TRANSFER_APDU_RESP message plus a 16 byte SAP header and two status bytes. If the server does not accept this value range no SAP connection will be established.

> • | If the TC65 is acting as SAP server it requires that a <MaxMsgSize> value of 276 will be accepted by a connected client.

> <ConnStatus>(num)

> SAP parameter Connection Status

> <DiscType>(num)

> SAP parameter Disconnection Type

> <CmdApdu>(str)

> SAP parameter Command APDU or Command APDU7816

> <CmdApduLen>(num)

> SAP parameter Command APDU length

> <RspApdu>(str)

> SAP parameter Response APDU

> <RspApduLen>(num)

> SAP parameter Response APDU length

> <ATR>(str)

> SAP parameter ATR

> <AtrLen>(num)

> SAP parameter ATR length

> <ResCode>(num)

> SAP parameter Result Code

> <CardRdStatus>(num)

> SAP parameter Card Reader Status

> <StatusChange>(num)

> SAP parameter Status Change

> <TransportProtocol>(num)

> SAP parameter Transport Protocol
> Example
> The following example shows how to establish an RSA connection.

> AT+CMEE=2 | Switch on verbose error messages.
> OK
> AT+CREG=1
> OK | Switch on network registration URC.
> AT^SSET=1 | Switch on SIM data ready URC.
> OK
> AT^SCKS=1 | Switch on SIM status URC.
> OK
> AT^SM20=0 | Switch on immediate indication of OK response after dialing with ATD.
> OK
> AT^SRSA? | Does the ME support RSA and is a SAP connection established?
> OK
> AT^SRSA=2,2,3,0 | Initialization of RSA mode using XSAP data format.
> ^SRSA:0
> OK
> ^SRSA:2,2,0 | URC indicating SAP client start without ongoing connection.
> | ME now starts sending SAP message CONNECTION_REQ on dedicated RSA channel.
> | If an SAP server has responded and offers its SIM:
> ^SRSA:2,2,1 | URC indicating a connection with SAP server.
> ^SCKS:0 | URC indicating the loss of (local) SIM.
> +CREG:0 | URC indicating the deregistration from network because of loss of SIM.
> ^SCKS:1 | URC indicating the activation of remote SIM.
> | ME now starts reading data from the SIM.
> | Does the new SIM require a PIN?
> AT+CPIN? | Request PIN status.
> +CPIN: SIM PIN | PIN needs to be entered.
> OK | or
> +CME ERROR: SIM blocked | or
> +CME ERROR: SIM busy | Retry if the ME returns these messages.
> AT+CPIN=1234
> OK
> +CREG:2
> +CREG:1 | URC indicating network registration.
> ^SSIM READY | URC indicating that SIM data is read out.
> ATD491777777777777
> OK | Make a call.