blob: d39a4f6d5929e18b3322c11b13d3328ea0c40dcc [file] [log] [blame]
Harald Welte3c4d0062019-03-31 18:55:18 +02001== Overview
2
3=== About this manual
4
5This manual should help you getting started with the osmo-remsim software.
6
7It will cover aspects of configuration and running osmo-remsim as well as some
8introduction about its internal architecture and external interfaces.
9
10=== About osmo-remsim
11
12osmo-remsim is a suite of software programs enabling physical/geographic
13separation of a cellular phone (or modem) on the one hand side and the
14SIM/USIM/ISIM card on the other side.
15
16Using osmo-remsim, you can operate an entire fleet of modems/phones, as
17well as banks of SIM cards and dynamically establish or remove the
18connections between modems/phones and cards.
19
20So in technical terms, it behaves like a proxy for the ISO 7816 smart
21card interface between the MS/UE and the UICC/SIM/USIM/ISIM.
22
23While originally designed to be used in context of cellular networks,
24there is nothing cellular specific in the system. It can therefore also
25be used with other systems that use contact based smart cards according
26to ISO 7816. Currently only the T=0 protocol with standard
27(non-extended) APDUs is supported. Both T=1 and extended APDU support
28can easily be added as a pure software update, should it be required at
29some future point.
30
31=== Credits
32
33osmo-remsim was originally developed by Harald Welte with contributions
34by Kevin Redon. It builds on top of pre-existing infrastructure of
35the Osmocom project, including the Osmocom SIMtrace project.
36
37Development of osmo-remsim software was funded by GSMK and sysmocom.
38
Harald Welte51cfec02019-04-03 09:18:44 +020039=== osmo-remsim-server
Harald Welte3c4d0062019-03-31 18:55:18 +020040
Harald Welte51cfec02019-04-03 09:18:44 +020041The `osmo-remsim-server` is the central element of the osmo-remsim
Harald Welte3c4d0062019-03-31 18:55:18 +020042architecture. All other elements connect to it. It maintains the
43inventory of other network elements, as well as the list of
44slot-mappings, i.e. the relationship between each given physical card
45in a bank and each card emulator attached to a phone/modem.
46
Harald Welte51cfec02019-04-03 09:18:44 +020047The tasks of `osmo-remsim-server` include:
Harald Welte3c4d0062019-03-31 18:55:18 +020048
Harald Welte51cfec02019-04-03 09:18:44 +020049* accepting incoming TCP control connections from `osmo-remsim-client` and
50 `osmo-remsim-bankd` instances
Harald Welte3c4d0062019-03-31 18:55:18 +020051* providing a RESTful JSON interface for external application logic to
52
Harald Welte5103ea02020-03-04 15:31:58 +010053For more information, please see <<remsim-server>>.
54
Harald Welte51cfec02019-04-03 09:18:44 +020055=== osmo-remsim-client
Harald Welte3c4d0062019-03-31 18:55:18 +020056
Harald Weltee18069a2020-03-04 15:24:07 +010057The `osmo-remsim-client` software is co-located next to the _user of the card_
58which traditionally is a phone or modem. However, there are other flavors
59of clients available, too. This is for example useful if existing software
60wants to interface remote smart cards, rather than those physically inserted
61into a local reader next to the PC running that application.
62
63In the classic phone / modem use case, osmo-remsim-client
64typically runs on an [embedded] computer next to the phone/modem.
Harald Welte3c4d0062019-03-31 18:55:18 +020065
Harald Welte51cfec02019-04-03 09:18:44 +020066The tasks of `osmo-remsim-client` include:
Harald Welte3c4d0062019-03-31 18:55:18 +020067
Harald Weltee18069a2020-03-04 15:24:07 +010068* interaction with the user application. For phone/modem, that's
69 over USB with a device supported by the 'SIMtrace2 cardem'
Harald Welte3c4d0062019-03-31 18:55:18 +020070 firmware, which provides the physical interface to the phone/modem SIM
Harald Weltee18069a2020-03-04 15:24:07 +010071 interface (ISO 7816-3).
Harald Welte51cfec02019-04-03 09:18:44 +020072* establishing a TCP connection with the `osmo-remsim-server`, in order to
Harald Welte3c4d0062019-03-31 18:55:18 +020073 enable the server to issue control commands
Harald Welte51cfec02019-04-03 09:18:44 +020074* under control of `osmo-remsim-server`, establishing a TCP connection to a
75 `osmo-remsim-bankd` in order to connect a card physically located at the
Harald Welte3c4d0062019-03-31 18:55:18 +020076 bankd.
77
Harald Welte51cfec02019-04-03 09:18:44 +020078`osmo-remsim-client` supports at this point only one phone/modem. If you have
Harald Welte3c4d0062019-03-31 18:55:18 +020079multiple phones/modems at one location, you can simply run multiple
Harald Welte51cfec02019-04-03 09:18:44 +020080instances of `osmo-remsim-client` on the same system, one for each phone/modem.
Harald Welte3c4d0062019-03-31 18:55:18 +020081
Harald Welte5103ea02020-03-04 15:31:58 +010082For more information, please see <<remsim-client>>.
83
Harald Welte51cfec02019-04-03 09:18:44 +020084=== osmo-remsim-bankd
Harald Welte3c4d0062019-03-31 18:55:18 +020085
Harald Welte51cfec02019-04-03 09:18:44 +020086The `osmo-remsim-bankd` software is co-located next to a bank of SIM cards.
Harald Welte3c4d0062019-03-31 18:55:18 +020087
Harald Welte51cfec02019-04-03 09:18:44 +020088The tasks of `osmo-remsim-bankd` include:
Harald Welte3c4d0062019-03-31 18:55:18 +020089
90* interaction with the actual card reader hardware. At this point, only
91 PC/SC based readers are supported, with 1 to 255 slots per reader.
Harald Welte51cfec02019-04-03 09:18:44 +020092* establishing a TCP connection with the `osmo-remsim-server`, in order to
Harald Welte3c4d0062019-03-31 18:55:18 +020093 enable the server to issue control commands
Harald Welte51cfec02019-04-03 09:18:44 +020094* running a TCP server where TCP connections from `osmo-remsim-client`
Harald Welte3c4d0062019-03-31 18:55:18 +020095 instances are accepted and handled.
96
Harald Welte5103ea02020-03-04 15:31:58 +010097For more information, please see <<remsim-bankd>>.
Harald Welte3c4d0062019-03-31 18:55:18 +020098
Harald Welte5103ea02020-03-04 15:31:58 +010099=== RSPRO
100
101RSPRO is the *R*emote *S*IM *PRO*tocol. It is a binary protocol
102specified in ASN.1 which is spoken on any of the internal connections
103between `osmo-remsim-client`, `osmo-remsim-bankd` and
104`osmo-remsim-server`.
105
106You can find more information about RSPRO in <<rspro>>.
107
108=== RSRES
109
110RSRES is the *R*emote *S*IM *RES*T protocol. It is an interface offered
111by `osmo-remsim-server` towards external back-end application logic of
112the operator of an osmo-remsim network.
113
114You can find more information about RSRES in <<rsres>>.
115
116=== Security
117
118WARNING: RSPRO, RSRES and their underlying transport layer both operate in plain-text,
119There is no authentication or encryption built into the protocol. It is
120assumed that the protocols are only spoken over trusted, controlled IP
121networks, such as inside a VPN or a closed / private corporate network.