mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-12-26 16:09:40 -05:00
364 lines
17 KiB
HTML
364 lines
17 KiB
HTML
|
||
<!DOCTYPE html>
|
||
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>Using Reticulum on Your System — Reticulum Network Stack 0.3.6 beta documentation</title>
|
||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
|
||
|
||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||
<script src="_static/jquery.js"></script>
|
||
<script src="_static/underscore.js"></script>
|
||
<script src="_static/doctools.js"></script>
|
||
|
||
<link rel="index" title="Index" href="genindex.html" />
|
||
<link rel="search" title="Search" href="search.html" />
|
||
<link rel="next" title="Building Networks" href="networks.html" />
|
||
<link rel="prev" title="Getting Started Fast" href="gettingstartedfast.html" />
|
||
</head><body>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="networks.html" title="Building Networks"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="gettingstartedfast.html" title="Getting Started Fast"
|
||
accesskey="P">previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.6 beta documentation</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">Using Reticulum on Your System</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<div class="section" id="using-reticulum-on-your-system">
|
||
<span id="using-main"></span><h1>Using Reticulum on Your System<a class="headerlink" href="#using-reticulum-on-your-system" title="Permalink to this headline">¶</a></h1>
|
||
<p>Reticulum is not installed as a driver or kernel module, as one might expect
|
||
of a networking stack. Instead, Reticulum is distributed as a Python module.
|
||
This means that no special privileges are required to install or use it. It
|
||
is also very light-weight, and easy to transfer to and install on new systems.
|
||
Any program or application that uses Reticulum will automatically load and
|
||
initialise Reticulum when it starts.</p>
|
||
<p>In many cases, this approach is sufficient. When any program needs to use
|
||
Reticulum, it is loaded, initialised, interfaces are brought up, and the
|
||
program can now communicate over any Reticulum networks available. If another
|
||
program starts up and also wants access to the same Reticulum network, the
|
||
instance is simply shared. This works for any number of programs running
|
||
concurrently, and is very easy to use, but depending on your use case, there
|
||
are other options.</p>
|
||
<div class="section" id="included-utility-programs">
|
||
<h2>Included Utility Programs<a class="headerlink" href="#included-utility-programs" title="Permalink to this headline">¶</a></h2>
|
||
<p>If you often use Reticulum from several different programs, or simply want
|
||
Reticulum to stay available all the time, for example if you are hosting
|
||
a transport node, you might want to run Reticulum as a separate service that
|
||
other programs, applications and services can utilise.</p>
|
||
<div class="section" id="the-rnsd-utility">
|
||
<h3>The rnsd Utility<a class="headerlink" href="#the-rnsd-utility" title="Permalink to this headline">¶</a></h3>
|
||
<p>To do so is very easy. Simply run the included <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> command. When <code class="docutils literal notranslate"><span class="pre">rnsd</span></code>
|
||
is running, it will keep all configured interfaces open, handle transport if
|
||
it is enabled, and allow any other programs to immediately utilise the
|
||
Reticulum network it is configured for.</p>
|
||
<p>You can even run multiple instances of rnsd with different configurations on
|
||
the same system.</p>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span># Install Reticulum
|
||
pip3 install rns
|
||
|
||
# Run rnsd
|
||
rnsd
|
||
</pre></div>
|
||
</div>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>usage: rnsd [-h] [--config CONFIG] [-v] [-q] [--version]
|
||
|
||
Reticulum Network Stack Daemon
|
||
|
||
optional arguments:
|
||
-h, --help show this help message and exit
|
||
--config CONFIG path to alternative Reticulum config directory
|
||
-v, --verbose
|
||
-q, --quiet
|
||
--version show program's version number and exit
|
||
</pre></div>
|
||
</div>
|
||
<p>You can easily add <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> as an always-on service by <a class="reference internal" href="#using-systemd"><span class="std std-ref">configuring a service</span></a>.</p>
|
||
</div>
|
||
<div class="section" id="the-rnstatus-utility">
|
||
<h3>The rnstatus Utility<a class="headerlink" href="#the-rnstatus-utility" title="Permalink to this headline">¶</a></h3>
|
||
<p>Using the <code class="docutils literal notranslate"><span class="pre">rnstatus</span></code> utility, you can view the status of configured Reticulum
|
||
interfaces, similar to the <code class="docutils literal notranslate"><span class="pre">ifconfig</span></code> program.</p>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span># Run rnstatus
|
||
rnstatus
|
||
|
||
# Example output
|
||
Shared Instance[37428]
|
||
Status : Up
|
||
Serving : 1 program
|
||
Rate : 1.00 Gbps
|
||
Traffic : 83.13 KB↑
|
||
86.10 KB↓
|
||
|
||
AutoInterface[Local]
|
||
Status : Up
|
||
Mode : Full
|
||
Rate : 10.00 Mbps
|
||
Peers : 1 reachable
|
||
Traffic : 63.23 KB↑
|
||
80.17 KB↓
|
||
|
||
TCPInterface[RNS Testnet Frankfurt/frankfurt.rns.unsigned.io:4965]
|
||
Status : Up
|
||
Mode : Full
|
||
Rate : 10.00 Mbps
|
||
Traffic : 187.27 KB↑
|
||
74.17 KB↓
|
||
|
||
RNodeInterface[RNode UHF]
|
||
Status : Up
|
||
Mode : Access Point
|
||
Rate : 1.30 kbps
|
||
Access : 64-bit IFAC by <…e702c42ba8>
|
||
Traffic : 8.49 KB↑
|
||
9.23 KB↓
|
||
|
||
Reticulum Transport Instance <5245a8efe1788c6a70e1> running
|
||
</pre></div>
|
||
</div>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>usage: rnstatus [-h] [--config CONFIG] [--version] [-a] [-v]
|
||
|
||
Reticulum Network Stack Status
|
||
|
||
optional arguments:
|
||
-h, --help show this help message and exit
|
||
--config CONFIG path to alternative Reticulum config directory
|
||
--version show program's version number and exit
|
||
-a, --all show all interfaces
|
||
-v, --verbose
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="the-rnpath-utility">
|
||
<h3>The rnpath Utility<a class="headerlink" href="#the-rnpath-utility" title="Permalink to this headline">¶</a></h3>
|
||
<p>With the <code class="docutils literal notranslate"><span class="pre">rnpath</span></code> utility, you can look up and view paths for
|
||
destinations on the Reticulum network.</p>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span># Run rnpath
|
||
rnpath eca6f4e4dc26ae329e61
|
||
|
||
# Example output
|
||
Path found, destination <eca6f4e4dc26ae329e61> is 4 hops away via <56b115c30cd386cad69c> on TCPInterface[Testnet/frankfurt.rns.unsigned.io:4965]
|
||
</pre></div>
|
||
</div>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>usage: rnpath [-h] [--config CONFIG] [--version] [-t] [-d] [-w seconds] [-v]
|
||
[destination]
|
||
|
||
Reticulum Path Discovery Utility
|
||
|
||
positional arguments:
|
||
destination hexadecimal hash of the destination
|
||
|
||
optional arguments:
|
||
-h, --help show this help message and exit
|
||
--config CONFIG path to alternative Reticulum config directory
|
||
--version show program's version number and exit
|
||
-t, --table show all known paths
|
||
-d, --drop remove the path to a destination
|
||
-w seconds timeout before giving up
|
||
-v, --verbose
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="the-rnprobe-utility">
|
||
<h3>The rnprobe Utility<a class="headerlink" href="#the-rnprobe-utility" title="Permalink to this headline">¶</a></h3>
|
||
<p>The <code class="docutils literal notranslate"><span class="pre">rnprobe</span></code> utility lets you probe a destination for connectivity, similar
|
||
to the <code class="docutils literal notranslate"><span class="pre">ping</span></code> program. Please note that probes will only be answered if the
|
||
specified destination is configured to send proofs for received packets. Many
|
||
destinations will not have this option enabled, and will not be probable.</p>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span># Run rnprobe
|
||
python3 -m RNS.Utilities.rnprobe example_utilities.echo.request 9382f334de63217a4278
|
||
|
||
# Example output
|
||
Sent 16 byte probe to <9382f334de63217a4278>
|
||
Valid reply received from <9382f334de63217a4278>
|
||
Round-trip time is 38.469 milliseconds over 2 hops
|
||
</pre></div>
|
||
</div>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>usage: rnprobe.py [-h] [--config CONFIG] [--version] [-v] [full_name] [destination_hash]
|
||
|
||
Reticulum Probe Utility
|
||
|
||
positional arguments:
|
||
full_name full destination name in dotted notation
|
||
destination_hash hexadecimal hash of the destination
|
||
|
||
optional arguments:
|
||
-h, --help show this help message and exit
|
||
--config CONFIG path to alternative Reticulum config directory
|
||
--version show program's version number and exit
|
||
-v, --verbose
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="improving-system-configuration">
|
||
<h2>Improving System Configuration<a class="headerlink" href="#improving-system-configuration" title="Permalink to this headline">¶</a></h2>
|
||
<p>If you are setting up a system for permanent use with Reticulum, there is a
|
||
few system configuration changes that can make this easier to administrate.
|
||
These changes will be detailed here.</p>
|
||
<div class="section" id="fixed-serial-port-names">
|
||
<h3>Fixed Serial Port Names<a class="headerlink" href="#fixed-serial-port-names" title="Permalink to this headline">¶</a></h3>
|
||
<p>On a Reticulum instance with several serial port based interfaces, it can be
|
||
beneficial to use the fixed device names for the serial ports, instead
|
||
of the dynamically allocated shorthands such as <code class="docutils literal notranslate"><span class="pre">/dev/ttyUSB0</span></code>. Under most
|
||
Debian-based distributions, including Ubuntu and Raspberry Pi OS, these nodes
|
||
can be found under <code class="docutils literal notranslate"><span class="pre">/dev/serial/by-id</span></code>.</p>
|
||
<p>You can use such a device path directly in place of the numbered shorthands.
|
||
Here is an example of a packet radio TNC configured as such:</p>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>[[Packet Radio KISS Interface]]
|
||
type = KISSInterface
|
||
interface_enabled = True
|
||
outgoing = true
|
||
port = /dev/serial/by-id/usb-FTDI_FT230X_Basic_UART_43891CKM-if00-port0
|
||
speed = 115200
|
||
databits = 8
|
||
parity = none
|
||
stopbits = 1
|
||
preamble = 150
|
||
txtail = 10
|
||
persistence = 200
|
||
slottime = 20
|
||
</pre></div>
|
||
</div>
|
||
<p>Using this methodology avoids potential naming mix-ups where physical devices
|
||
might be plugged and unplugged in different orders, or when device name
|
||
assignment varies from one boot to another.</p>
|
||
</div>
|
||
<div class="section" id="reticulum-as-a-system-service">
|
||
<span id="using-systemd"></span><h3>Reticulum as a System Service<a class="headerlink" href="#reticulum-as-a-system-service" title="Permalink to this headline">¶</a></h3>
|
||
<p>Instead of starting Reticulum manually, you can install <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> as a system
|
||
service and have it start automatically at boot.</p>
|
||
<p>If you installed Reticulum with <code class="docutils literal notranslate"><span class="pre">pip</span></code>, the <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> program will most likely
|
||
be located in a user-local installation path only, which means <code class="docutils literal notranslate"><span class="pre">systemd</span></code> will not
|
||
be able to execute it. In this case, you can simply symlink the <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> program
|
||
into a directory that is in systemd’s path:</p>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>sudo ln -s $(which rnsd) /usr/local/bin/
|
||
</pre></div>
|
||
</div>
|
||
<p>You can then create the service file <code class="docutils literal notranslate"><span class="pre">/etc/systemd/system/rnsd.service</span></code> with the
|
||
following content:</p>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>[Unit]
|
||
Description=Reticulum Network Stack Daemon
|
||
After=multi-user.target
|
||
|
||
[Service]
|
||
# If you run Reticulum on WiFi devices,
|
||
# or other devices that need some extra
|
||
# time to initialise, you might want to
|
||
# add a short delay before Reticulum is
|
||
# started by systemd:
|
||
# ExecStartPre=/bin/sleep 10
|
||
Type=simple
|
||
Restart=always
|
||
RestartSec=3
|
||
User=USERNAMEHERE
|
||
ExecStart=rnsd --service
|
||
|
||
[Install]
|
||
WantedBy=multi-user.target
|
||
</pre></div>
|
||
</div>
|
||
<p>Be sure to replace <code class="docutils literal notranslate"><span class="pre">USERNAMEHERE</span></code> with the user you want to run <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> as.</p>
|
||
<p>To manually start <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> run:</p>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>sudo systemctl start rnsd
|
||
</pre></div>
|
||
</div>
|
||
<p>If you want to automatically start <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> at boot, run:</p>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>sudo systemctl enable rnsd
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="clearer"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper">
|
||
<h3><a href="index.html">Table of Contents</a></h3>
|
||
<ul>
|
||
<li><a class="reference internal" href="#">Using Reticulum on Your System</a><ul>
|
||
<li><a class="reference internal" href="#included-utility-programs">Included Utility Programs</a><ul>
|
||
<li><a class="reference internal" href="#the-rnsd-utility">The rnsd Utility</a></li>
|
||
<li><a class="reference internal" href="#the-rnstatus-utility">The rnstatus Utility</a></li>
|
||
<li><a class="reference internal" href="#the-rnpath-utility">The rnpath Utility</a></li>
|
||
<li><a class="reference internal" href="#the-rnprobe-utility">The rnprobe Utility</a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a class="reference internal" href="#improving-system-configuration">Improving System Configuration</a><ul>
|
||
<li><a class="reference internal" href="#fixed-serial-port-names">Fixed Serial Port Names</a></li>
|
||
<li><a class="reference internal" href="#reticulum-as-a-system-service">Reticulum as a System Service</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="gettingstartedfast.html"
|
||
title="previous chapter">Getting Started Fast</a></p>
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="networks.html"
|
||
title="next chapter">Building Networks</a></p>
|
||
<div role="note" aria-label="source link">
|
||
<h3>This Page</h3>
|
||
<ul class="this-page-menu">
|
||
<li><a href="_sources/using.rst.txt"
|
||
rel="nofollow">Show Source</a></li>
|
||
</ul>
|
||
</div>
|
||
<div id="searchbox" style="display: none" role="search">
|
||
<h3 id="searchlabel">Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="search.html" method="get">
|
||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<script>$('#searchbox').show(0);</script>
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="networks.html" title="Building Networks"
|
||
>next</a> |</li>
|
||
<li class="right" >
|
||
<a href="gettingstartedfast.html" title="Getting Started Fast"
|
||
>previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.6 beta documentation</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">Using Reticulum on Your System</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2022, Mark Qvist.
|
||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.1.
|
||
</div>
|
||
</body>
|
||
</html> |