blob: 1ce511eb206357b326775a27ddb2441cc1cb24b4 [file] [log] [blame]
Harald Welte3c4d0062019-03-31 18:55:18 +02001== RSPRO
2
3*RSPRO*, the *Remote SIM Protocol*, is an osmo-remsim specific,
4non-standard communications protocol used between the elements of the
5osmo-remsim system.
6
7It is specified in ASN.1 syntax (see `asn1/RSPRO.asn` in the
8`osmo-remsim` source code) and uses BER (Basic Encoding Rules) on the
9transport level.
10
11=== Underlying Transport Layer
12
13RSPRO uses TCP as an underlying transport protocol. As TCP doesn't
14preserve message boundaries, the IPA multiplex is used as intermediate
15layer between TCP and the BER-encoded RSPRO PDU.
16
17For more information about the IPA multiplex, see the related chapter
18in http://ftp.osmocom.org/docs/latest/osmobts-abis.pdf
19
20RSPRO uses the IPA CCM PING/PONG messages for keep-alive and detection
21of dead/stale connections. The compiled-in defaults transmits one IPA
22PING every 30s and waits 10s for a response from the peer before
23declaring the connection as dead.
24
25=== RSPRO PDU
26
27An RsproPDU consists of:
28
29* *version* of the protocol (v2 is current)
30* *tag* specified by the sender, echoed back by the receiver in
31 its response so the server can map responses back to a specific
32 request
33* *msg* the actual RSPRO Message (union/choice)
34
35=== RSPRO Operations
36
37Each RSPRO Operation typically (unless specified othewise) consists of a
38Request and Response pair.
39
40==== ConnectBank
41
42This is used by `remsim-bankd` to identify itself to `remsim-server` and
43to establish a logical connection between the two elements.
44
45==== ConnectClient
46
47This is used by `remsim-client` to identify itself to `remsim-server`
48and to establish a logical connection between the two elements.
49
50==== CreateMapping
51
52This is used by `remsim-server` to install a slot mapping in a
53`remsim-bankd`.
54
55==== RemoveMapping
56
57This is used by `remsim-server` to remove a slot mapping from a
58`remsim-bankd`.
59
60==== ConfigClientId
61
62This is used by `remsim-server` to dynamically configure a ClientID in a
63`remsim-client`. This mode is currently not supported yet, each client
64must have a locally-configured ClientID.
65
66==== ConfigClientBank
67
68This is used by `remsim-server` to inform a `remsim-client` about the
69details (bankd ID, slot number, IP address, TCP port) of a the
70`remsim-bankd` to which it shall connect.
71
72==== ErrorInd
73
74This is a generic error indication that can be sent by any RSRPO entity.
75
76==== SetAtr
77
78This is used by `remsim-bankd` to inform the `remsim-client` about the
79ATR of the card, so that `remsim-client` can replicate that ATR when
80answering to the reset of the SIM card interface of the phone/modem.
81
82==== TpduModemToCard
83
84This is used by `remsim-client` to transfer a command TPDU/APDU from the
85phone/modem to the SIM card in `remsim-bankd`
86
87==== TpduCardToModem
88
89This is used by `remsim-bankd` to transfer a response TPDU/APDU from the
90SIM card back to the phone/modem at `remsim-client`.
91
92==== ClientSlotStatusInd
93
94This is used by `remsim-client` to report the status of a given slot.
95
96==== BankSlotStatusInd
97
98This is used by `remsim-bankd` to report the status of a given slot.