<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-remsim/+/17342">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">client: document osmo-remsim-client-shell<br><br>Change-Id: I7db510982194ae4f6b9ab8bc442587ecdbf52684<br>---<br>M doc/manuals/chapters/remsim-client.adoc<br>1 file changed, 66 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/doc/manuals/chapters/remsim-client.adoc b/doc/manuals/chapters/remsim-client.adoc</span><br><span>index 7416b05..977a772 100644</span><br><span>--- a/doc/manuals/chapters/remsim-client.adoc</span><br><span>+++ b/doc/manuals/chapters/remsim-client.adoc</span><br><span>@@ -153,3 +153,69 @@</span><br><span> | request-sim-local | The client asks the system to switch to local SIM</span><br><span> | request-modem-reset | The client asks the system to perform a modem reset</span><br><span> |===</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+== osmo-remsim-client-shell</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+This is a remsim-client that's mostly useful for manual debugging/testing or automatic testing.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Instead of using hardware like the SIMtrace with cardem firmware to interface a virtual SIM card</span><br><span style="color: hsl(120, 100%, 40%);">+to a real phone or modem, it simply offers and interactive way to exchange APDUs with a remote</span><br><span style="color: hsl(120, 100%, 40%);">+SIM card via STDIO of the process.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+This allows testing of large parts of the osmo-remsim-client code as well as the integration with</span><br><span style="color: hsl(120, 100%, 40%);">+the overall osmo-remsim network including osmo-remsim-server, osmo-remsim-bankd and any external</span><br><span style="color: hsl(120, 100%, 40%);">+backend application driving the REST interface.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+=== Running</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+osmo-remsim-client-shell currently has the following command-line options:</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+==== SYNOPSIS</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+*osmo-remsim-client-shell* [...]</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+==== OPTIONS</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+*-h, --help*::</span><br><span style="color: hsl(120, 100%, 40%);">+  Print a short help message about the supported options</span><br><span style="color: hsl(120, 100%, 40%);">+*-v, --version*::</span><br><span style="color: hsl(120, 100%, 40%);">+  Print the compile-time version information</span><br><span style="color: hsl(120, 100%, 40%);">+*-i, --server-ip A.B.C.D*::</span><br><span style="color: hsl(120, 100%, 40%);">+  Specify the remote IP address / hostname of the `osmo-remsim-server` to</span><br><span style="color: hsl(120, 100%, 40%);">+  which this client shall establish its RSPRO control connection</span><br><span style="color: hsl(120, 100%, 40%);">+*-p, --server-port <1-65535>*::</span><br><span style="color: hsl(120, 100%, 40%);">+  Specify the remote TCP port number of the `osmo-remsim-server` to which</span><br><span style="color: hsl(120, 100%, 40%);">+  this client shall establish its RSPRO control connection</span><br><span style="color: hsl(120, 100%, 40%);">+*-c, --client-id <1-65535>*::</span><br><span style="color: hsl(120, 100%, 40%);">+  Specify the numeric client identifier of the SIM bank this bankd</span><br><span style="color: hsl(120, 100%, 40%);">+  instance operates.  The tuple of client-id and client-slot must be</span><br><span style="color: hsl(120, 100%, 40%);">+  unique among all clients connecting to the same `osmo-remsim-server`.</span><br><span style="color: hsl(120, 100%, 40%);">+*-n, --client-slot <0-65535>*::</span><br><span style="color: hsl(120, 100%, 40%);">+  Specify the slot number served within this client.  The tuple of</span><br><span style="color: hsl(120, 100%, 40%);">+  client-id and client-slot must be unique among all clients connecting</span><br><span style="color: hsl(120, 100%, 40%);">+  to the same `osmo-remsim-server`.</span><br><span style="color: hsl(120, 100%, 40%);">+ `osmo-remsim-bankd` once a card has been mapped to this client.</span><br><span style="color: hsl(120, 100%, 40%);">+*-e, --event-script COMMAND*::</span><br><span style="color: hsl(120, 100%, 40%);">+  Specify the shell command to be execute when the client wants to call its</span><br><span style="color: hsl(120, 100%, 40%);">+  helper script</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+==== Examples</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The below example uses stderr-redirection to avoid the log output cluttering the console.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+.remsim-server is at 192.168.11.10; we are client 23 slot 0</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+./osmo-remsim-client-shell -i 192.168.11.10 -c 23  2>/dev/null</span><br><span style="color: hsl(120, 100%, 40%);">+SET_ATR: 3b 00</span><br><span style="color: hsl(120, 100%, 40%);">+SET_ATR: 3b 7d 94 00 00 55 55 53 0a 74 86 93 0b 24 7c 4d 54 68</span><br><span style="color: hsl(120, 100%, 40%);">+a0a40000023f00</span><br><span style="color: hsl(120, 100%, 40%);">+R-APDU: 9f 17</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+* The first SET_ATR is performed by osmo-remsim-client locally using a default ATR</span><br><span style="color: hsl(120, 100%, 40%);">+* The second SET_ATR is performed by osmo-remsim-bankd to inform us about the ATR of the real remote card</span><br><span style="color: hsl(120, 100%, 40%);">+* The `a0a40000023f00` is a command TPDU entered on STDIN by the suer</span><br><span style="color: hsl(120, 100%, 40%);">+* The `9f17` is a response TPDU provided by the remote card in response to the command</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The program continues in this loop (read command APDU as hex-dump from stdin; provide response on stdout)</span><br><span style="color: hsl(120, 100%, 40%);">+until it is terminated by Ctrl+C or by other means.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-remsim/+/17342">change 17342</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-remsim/+/17342"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-remsim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7db510982194ae4f6b9ab8bc442587ecdbf52684 </div>
<div style="display:none"> Gerrit-Change-Number: 17342 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>