1201 lines
37 KiB
HTML
1201 lines
37 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<meta name="generator" content="mkdocs-1.6.1, mkdocs-terminal-4.8.0">
|
|
|
|
<meta name="description" content="MeshCore fork meshcore-tth -- repeater antispam, diagnostics, OTA, Czech mesh defaults">
|
|
|
|
|
|
<link rel="canonical" href="https://tth-pub.pages.rfa.cz/meshcore-tth/tth-commands/"><link rel="icon" type="image/png" sizes="192x192" href="../img/android-chrome-192x192.png" />
|
|
<link rel="icon" type="image/png" sizes="512x512" href="../img/android-chrome-512x512.png" />
|
|
<link rel="apple-touch-icon" sizes="180x180" href="../img/apple-touch-icon.png" />
|
|
<link rel="shortcut icon" type="image/png" sizes="48x48" href="../img/favicon.ico" />
|
|
<link rel="icon" type="image/png" sizes="16x16" href="../img/favicon-16x16.png" />
|
|
<link rel="icon" type="image/png" sizes="32x32" href="../img/favicon-32x32.png" />
|
|
|
|
|
|
|
|
|
|
<title>Console commands - MeshCore TTH</title>
|
|
|
|
|
|
<link href="../css/fontawesome/css/fontawesome.min.css" rel="stylesheet">
|
|
<link href="../css/fontawesome/css/solid.min.css" rel="stylesheet">
|
|
<link href="../css/normalize.css" rel="stylesheet">
|
|
<link href="../css/terminal.css" rel="stylesheet">
|
|
<link href="../css/theme.css" rel="stylesheet">
|
|
<link href="../css/theme.tile_grid.css" rel="stylesheet">
|
|
<link href="../css/theme.footer.css" rel="stylesheet">
|
|
<!-- dark color palette -->
|
|
<link href="../css/palettes/dark.css" rel="stylesheet">
|
|
|
|
<!-- page layout -->
|
|
<style>
|
|
/* initially set page layout to a one column grid */
|
|
.terminal-mkdocs-main-grid {
|
|
display: grid;
|
|
grid-column-gap: 1.4em;
|
|
grid-template-columns: auto;
|
|
grid-template-rows: auto;
|
|
}
|
|
|
|
/*
|
|
* when side navigation is not hidden, use a two column grid.
|
|
* if the screen is too narrow, fall back to the initial one column grid layout.
|
|
* in this case the main content will be placed under the navigation panel.
|
|
*/
|
|
@media only screen and (min-width: 70em) {
|
|
.terminal-mkdocs-main-grid {
|
|
grid-template-columns: 4fr 9fr;
|
|
}
|
|
}</style>
|
|
|
|
<!-- cursor_animation override -->
|
|
<style>
|
|
#mkdocs-terminal-site-name.terminal-prompt::after {
|
|
display: none;
|
|
}
|
|
</style>
|
|
|
|
|
|
<link href="../_stylesheets/tth.css" rel="stylesheet">
|
|
|
|
|
|
|
|
|
|
<!-- search css support -->
|
|
<link href="../css/search/bootstrap-modal.css" rel="stylesheet">
|
|
<!-- search scripts -->
|
|
<script>
|
|
var base_url = "..",
|
|
shortcuts = "{}";
|
|
</script>
|
|
<script src="../js/jquery/jquery-1.10.1.min.js" defer></script>
|
|
<script src="../js/bootstrap/bootstrap.min.js" defer></script>
|
|
<script src="../js/mkdocs/base.js" defer></script>
|
|
|
|
|
|
|
|
|
|
<script src="../search/main.js"></script>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body class="terminal"><div class="container">
|
|
<div class="terminal-nav">
|
|
<header class="terminal-logo">
|
|
<div id="mkdocs-terminal-site-name" class="logo terminal-prompt"><a href="https://tth-pub.pages.rfa.cz/meshcore-tth/" class="no-style">MeshCore TTH</a></div>
|
|
</header>
|
|
|
|
<nav class="terminal-menu">
|
|
|
|
<ul vocab="https://schema.org/" typeof="BreadcrumbList">
|
|
|
|
|
|
<li property="itemListElement" typeof="ListItem">
|
|
<a href=".." class="menu-item " property="item" typeof="WebPage">
|
|
<span property="name">About the fork</span>
|
|
</a>
|
|
<meta property="position" content="0">
|
|
</li>
|
|
|
|
|
|
<li property="itemListElement" typeof="ListItem">
|
|
<a href="../cs/" class="menu-item " property="item" typeof="WebPage">
|
|
<span property="name">Česky</span>
|
|
</a>
|
|
<meta property="position" content="1">
|
|
</li>
|
|
|
|
|
|
<li property="itemListElement" typeof="ListItem">
|
|
<a href="https://git.rfa.cz/tth-pub/meshcore-tth" class="menu-item " property="item" typeof="WebPage">
|
|
<span property="name">Repository</span>
|
|
</a>
|
|
<meta property="position" content="2">
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li property="itemListElement" typeof="ListItem">
|
|
<a href="#" class="menu-item" data-toggle="modal" data-target="#mkdocs_search_modal" property="item" typeof="SearchAction">
|
|
<i aria-hidden="true" class="fa fa-search"></i> <span property="name">Search</span>
|
|
</a>
|
|
<meta property="position" content="3">
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<div class="terminal-mkdocs-main-grid"><aside id="terminal-mkdocs-side-panel"><nav>
|
|
<ul class="terminal-mkdocs-side-nav-items">
|
|
|
|
<li class="terminal-mkdocs-side-nav-li">
|
|
|
|
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="..">About the fork</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="terminal-mkdocs-side-nav-li">
|
|
|
|
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../cs/">Česky</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="terminal-mkdocs-side-nav-li">
|
|
|
|
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="https://git.rfa.cz/tth-pub/meshcore-tth">Repository</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="terminal-mkdocs-side-nav-li">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="
|
|
|
|
|
|
|
|
terminal-mkdocs-side-nav-item--active terminal-mkdocs-side-nav-section-no-index">Fork meshcore-tth</span>
|
|
|
|
|
|
|
|
|
|
<ul class="terminal-mkdocs-side-nav-li-ul">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
<span class="terminal-mkdocs-side-nav-item--active">Console commands</span>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../ota/">Firmware update by the admin (OTA)</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../power/">Power saving</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../budka-sensor/">Budka as a sensor</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../ble-lora-coexistence/">BLE/LoRa coexistence</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</li>
|
|
|
|
<li class="terminal-mkdocs-side-nav-li">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="
|
|
|
|
|
|
|
|
terminal-mkdocs-side-nav-item terminal-mkdocs-side-nav-section-no-index">MeshCore (upstream)</span>
|
|
|
|
|
|
|
|
|
|
|
|
<ul class="terminal-mkdocs-side-nav-li-ul">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../meshcore/">Introduction</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../faq/">FAQ</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../cli_commands/">CLI commands</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../companion_cli/">Companion CLI</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../companion_protocol/">Companion protocol</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../terminal_chat_cli/">Terminal chat CLI</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../kiss_modem_protocol/">KISS modem protocol</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../packet_format/">Packet format</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../payloads/">Payloads</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../stats_binary_frames/">Stats binary frames</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../number_allocations/">Number allocations</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../qr_codes/">QR codes</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../radio_presets/">Radio presets</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../nrf52_power_management/">nRF52 power management</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav><hr>
|
|
<nav>
|
|
<ul>
|
|
<li><a href="#console-commands-of-this-fork-meshcore-tth">Console commands of this fork (meshcore-tth)</a></li>
|
|
<li><a href="#antispam-repeater">Antispam (repeater)</a></li><li><a href="#radio-watchdogs-and-board-upkeep-all">Radio watchdogs and board upkeep (all)</a></li><li><a href="#number-arguments-of-set-all-and-the-companions-serial-cli">Number arguments of set (all, and the companion's serial CLI)</a></li><li><a href="#diagnostics">Diagnostics</a></li><li><a href="#ble-console-observer">BLE console (observer)</a></li><li><a href="#passive-analyzer-observer">Passive analyzer (observer)</a></li><li><a href="#channel-bot-own-build-bot_channel_psk">Channel bot (own build: BOT_CHANNEL_PSK)</a></li><li><a href="#power-and-clock">Power and clock</a></li><li><a href="#sensors">Sensors</a></li><li><a href="#build-flags">Build flags</a></li>
|
|
</ul>
|
|
</nav>
|
|
</aside>
|
|
<main id="terminal-mkdocs-main-content">
|
|
<section id="mkdocs-terminal-content">
|
|
<h1 id="console-commands-of-this-fork-meshcore-tth">Console commands of this fork (meshcore-tth)</h1>
|
|
<div class="admonition warning">
|
|
<p class="admonition-title">Warning</p>
|
|
<p>Part of an experimental fork, not meant for regular users: its releases are
|
|
a rolling release on MeshCore <code>dev</code> (see the <a href="../">README</a>).</p>
|
|
</div>
|
|
<p>Everything this fork adds to the text console of a node, on top of upstream's
|
|
<a href="../cli_commands/">cli_commands.md</a>. Where a command is described there too
|
|
(the watchdogs, <code>rxps</code>, <code>batt.icon</code>, <code>gps duty</code>, <code>dfu</code>, <code>get boot</code>), this page
|
|
gives the short form and points to it.</p>
|
|
<p><strong>How commands are written</strong> (as in cli_commands.md): <code><value></code> is required,
|
|
<code>[value]</code> optional, <code><on|off></code> one of the listed words. One command per line;
|
|
ranges, units and defaults are in the description.</p>
|
|
<p><strong>Where a command exists</strong> depends on the role and on build flags:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>mark</th>
|
|
<th>builds</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>all</td>
|
|
<td>repeater, room server and sensor -- every build with a text console</td>
|
|
</tr>
|
|
<tr>
|
|
<td>repeater</td>
|
|
<td><code>simple_repeater</code> builds</td>
|
|
</tr>
|
|
<tr>
|
|
<td>observer</td>
|
|
<td>the <code>*-observer</code> variants of the nRF52 repeaters in the releases (<code>MAX_HEARD_NODES</code>, <code>RXLOG_SIZE</code>, <code>PKTFEED_SIZE</code>, <code>BLE_PIN_CODE</code>)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>own build</td>
|
|
<td>only with the named flag -- not in the releases</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p><strong>Where it can be sent from:</strong> the USB console, the BLE console (observer
|
|
variants) and the mesh, as admin in the remote CLI of an app -- unless the
|
|
entry says <em>local only</em>. Replies over the mesh are cut to one packet (~150 B).</p>
|
|
<h2 id="antispam-repeater">Antispam (repeater)</h2>
|
|
<p>Forwarding only: what this node hears, logs and feeds to an observer is never
|
|
affected. Everything is persisted in prefs, so a reboot keeps it.</p>
|
|
<h3 id="fairnesslimiter-fairness">FairnessLimiter -- <code>fairness</code></h3>
|
|
<p>Token buckets on forwarded floods, keyed on the 1-byte ids already in the
|
|
clear: channel hash, sender hash, advert origin. Buckets collide (the hash is
|
|
masked), and every key is chosen by the sender: it contains runaway floods,
|
|
it is not security. Direct-routed traffic is never limited.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>command</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>fairness</code></td>
|
|
<td>state, denials per category, caps and refill intervals</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>fairness <on|off></code></td>
|
|
<td>the buckets on or off. Default: on (<code>FAIRNESS_ENABLED_DEFAULT</code>)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>fairness cap <group> <sender> <advert></code></td>
|
|
<td>burst caps, 0..255 each; <code>0</code> = build default (100 / 150 / 30)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>fairness refill <group> <sender> <advert></code></td>
|
|
<td>one token per interval, seconds, 0..65535 each; <code>0</code> = build default (30 / 10 / 600)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>fairness grid</code></td>
|
|
<td>the busiest denied buckets per category -- what is being shed</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>fairness air</code></td>
|
|
<td>estimated airtime shed per reason</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>fairness advert</code></td>
|
|
<td>the per-origin advert window: hours, held adverts, cache</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>fairness advert <hours></code></td>
|
|
<td>one flood advert per origin per <code>hours</code>, 0..720; <code>0</code> = off. Default: off</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>fairness advert clear</code></td>
|
|
<td>forget the origins seen</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>fairness dryrun [on|off]</code></td>
|
|
<td>count every verdict but forward anyway; without an argument shows the state. Default: off</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>The defaults keep about twice the headroom over 30 days of CZ mesh traffic
|
|
(the zero-loss frontier was 60 s / cap 60 per channel, 10 s / 60 per sender,
|
|
600 s / 12 per advert origin).</p>
|
|
<h3 id="channel-filter-filter">Channel filter -- <code>filter</code></h3>
|
|
<p>On channels whose key the node knows (<code>FILTER_CHANNEL_PSKS</code>; the releases
|
|
know Public, <code>#meshcore</code> and <code>#test</code>) the node decrypts each group text and
|
|
refuses to forward listed senders. The sender name is plain text in the
|
|
message: anyone can rename around it.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>command</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>filter [list]</code></td>
|
|
<td>channels known, drops, the deny list</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter add <name></code></td>
|
|
<td>deny a sender name: exact, case-insensitive; spaces allowed, commas not</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter del <name></code></td>
|
|
<td>remove a name from the deny list</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter clear</code></td>
|
|
<td>empty the deny list</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="channel-hash-deny-forward-filter-hash-every-repeater">Channel-hash deny-forward -- <code>filter hash</code> (every repeater)</h3>
|
|
<p>Keyless: the first byte of a group packet is the channel hash, in the clear,
|
|
so this works on private channels too. One byte is coarse -- every other
|
|
channel whose key hashes to the same byte is hit as well; check what else
|
|
lives on it before adding one.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>command</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>filter hash [list]</code></td>
|
|
<td>drops, passes by a throttle, the list (<code>43</code> blocked, <code>43/60</code> throttled)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter hash add <hex> [secs]</code></td>
|
|
<td>block the byte, or with <code>secs</code> (1..65535) let one packet through per <code>secs</code>; re-adding changes the interval</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter hash del <hex></code></td>
|
|
<td>remove one byte</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter hash clear</code></td>
|
|
<td>empty the list</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>A throttle's window lives in RAM: the first match after a boot passes.</p>
|
|
<h3 id="message-age-filter-age-repeater-with-channel-keys">Message age -- <code>filter age</code> (repeater with channel keys)</h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>command</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>filter age</code></td>
|
|
<td>the limit and how many were dropped</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter age <minutes></code></td>
|
|
<td>do not forward a group text on a decrypted channel whose sender timestamp is older than <code>minutes</code> (1..10080) by this node's clock</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter age off</code></td>
|
|
<td>no age limit. Default: off</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>It judges the sender's clock, so a companion that never got a time sync (it
|
|
stamps 2024) is dropped too -- keep it in days. Inactive while the node's own
|
|
clock reads before 2026; a clock running ahead makes everything look old.</p>
|
|
<h3 id="dry-run-filter-dryrun">Dry run -- <code>filter dryrun</code></h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>command</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>filter dryrun [on|off]</code></td>
|
|
<td>count every <code>filter</code> verdict (sender, hash, age) but forward anyway -- try a rule on a live node before it bites; without an argument shows the state. Default: off</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h2 id="radio-watchdogs-and-board-upkeep-all">Radio watchdogs and board upkeep (all)</h2>
|
|
<p>Details: <a href="../cli_commands/">cli_commands.md</a>, "Radio silence watchdog", "TX
|
|
stall watchdog", "Reboot into the bootloader" and "Why the board last reset".</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>command</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>get radio.silence</code></td>
|
|
<td>threshold, current multiplier, quiet time, stage</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>set radio.silence <minutes></code></td>
|
|
<td>deaf receiver: re-arm RX, then reboot after <code>minutes</code> (1..1440) without a received frame (CRC errors count as heard); each such reboot doubles the threshold for the next boot (up to 16x), the first frame clears it. <code>0</code> or <code>off</code> = off. Saved. Default: off</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>get radio.txstall</code></td>
|
|
<td>threshold, queue, time without TX, stage</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>set radio.txstall <minutes></code></td>
|
|
<td>repeater only: packets queued and nothing sent for <code>minutes</code> (1..1440) -> re-arm, then reboot. An empty queue never counts. <code>0</code> or <code>off</code> = off. Not saved: a reboot returns to the build value. Default: 15 (<code>RADIO_TXSTALL_MIN</code>)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>get radio.reboots</code></td>
|
|
<td>reboots done by the watchdogs, survives power loss</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>get boot</code></td>
|
|
<td>reset reason and the hardfault record (also printed at boot)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>dfu [uf2|serial|ota]</code></td>
|
|
<td><em>local only</em>, nRF52: reboot into the bootloader -- UF2 drive (default), CDC port for <code>adafruit-nrfutil</code>, or BLE DFU</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>fw <subcommand></code></td>
|
|
<td><code>-ota</code> images only: admin-pushed firmware update, see <a href="../ota/">ota.md</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h2 id="number-arguments-of-set-all-and-the-companions-serial-cli">Number arguments of <code>set</code> (all, and the companion's serial CLI)</h2>
|
|
<p>Upstream parses the value of a <code>set</code> with <code>atoi()</code>/<code>atof()</code>: text became 0,
|
|
<code>300</code> became 44 in a one-byte setting, and the result was saved with <code>OK</code>. This
|
|
fork refuses a value that is not a number or lies outside the range and keeps
|
|
the old one (<code>Error, must be ...</code>). It applies to <code>set tx</code> (-9 up to the
|
|
board's <code>MAX_LORA_TX_POWER</code>, else 30, and saved only if the radio takes it:
|
|
SX1262 -9..22), <code>set radio</code> and <code>tempradio</code> (each field; the timeout 1-10080
|
|
min), <code>set freq</code>, <code>set lat</code>/<code>set lon</code>, <code>set flood.max</code>, <code>set
|
|
flood.max.unscoped</code>, <code>set flood.max.advert</code> (0-64), <code>set int.thresh</code> (0-255),
|
|
<code>set multi.acks</code> (0-1), <code>set path.hash.mode</code> (0-2), <code>set agc.reset.interval</code>
|
|
(0-1020), <code>set rxdelay</code>, <code>set txdelay</code>, <code>set direct.txdelay</code>, <code>set
|
|
adc.multiplier</code>, and on the companion <code>set pin</code>, <code>set adc.multiplier</code>, <code>set
|
|
tz.offset</code>. No exponent (<code>1e3</code>), no <code>nan</code>/<code>inf</code>.</p>
|
|
<h2 id="diagnostics">Diagnostics</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>command</th>
|
|
<th>where</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>blink [count]</code></td>
|
|
<td>repeater</td>
|
|
<td>flash a spare LED (not the BLE or TX one) <code>count</code> times (1..999, default 6); finds a board on a bench or a node on a mast</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>blink <on|off></code></td>
|
|
<td>repeater</td>
|
|
<td>blink until <code>blink off</code> (gives up after 10 min)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>txpwr</code></td>
|
|
<td>repeater</td>
|
|
<td>the last requested LoRa output power and RadioLib's status</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>txpwr <dBm></code></td>
|
|
<td>repeater</td>
|
|
<td>LoRa output power until reboot, -9..30 (SX1262 takes -9..22), with RadioLib's status</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>i2c</code></td>
|
|
<td>all</td>
|
|
<td>scan the I2C bus</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>get chip</code></td>
|
|
<td>nRF52 (repeater, room server, sensor)</td>
|
|
<td>the silicon (<code>nRF52840 AAD0</code>; variant <code>xxF0</code> and later = rev3) and <code>UICR.APPROTECT</code>: <code>open</code> means SWD can read the whole flash, keys included</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>dio1</code></td>
|
|
<td>own build: <code>PIN_DIAG</code></td>
|
|
<td>has the SX1262 raise TX_DONE and compares its IRQ register with the level on the DIO1 pin -- which end of a dead IRQ line is broken</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>radiostat</code></td>
|
|
<td>own build: <code>RADIO_DIAG</code></td>
|
|
<td>receiver state, interrupt and RX counters, without touching the radio</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>radiokick <rx|clrirq|standby|agc></code></td>
|
|
<td>own build: <code>RADIO_DIAG</code></td>
|
|
<td>one recovery step, gentlest first: re-arm RX, clear latched IRQs, standby + RX, AGC reset; the first that brings <code>recv</code> back names the broken layer</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>A board with a dead DIO1 line still runs with <code>LORA_POLL_IRQ</code> (own build):
|
|
the IRQ status is polled over SPI.</p>
|
|
<h2 id="ble-console-observer">BLE console (observer)</h2>
|
|
<p>The text console over BLE (Nordic UART), next to USB. No login of its own:
|
|
the BLE PIN is the only lock, and the release PIN is the public placeholder
|
|
<code>123456</code>. These commands also work as admin over the mesh.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>command</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>ble</code></td>
|
|
<td>on or off, PIN <code>own</code> or <code>build default</code>, connected or not -- never the PIN itself</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>ble <on|off></code></td>
|
|
<td>the BLE console on or off, saved. Default: off (<code>RPT_BLE_DEFAULT_OFF</code>); <code>ble on</code> is refused while the PIN is the placeholder</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>ble pin</code></td>
|
|
<td>whether the PIN is your own or the build default</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>ble pin <pin></code></td>
|
|
<td>set your own PIN, 6 digits (saved, survives a reflash; drops every bond, so paired devices pair again)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>blepwr</code></td>
|
|
<td>TX power of the connection and of advertising</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>blepwr <dBm></code></td>
|
|
<td>TX power of the connection: -40, -20, -16, -12, -8, -4, 0, 2..8; applied to live connections and saved</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>blepwr default</code></td>
|
|
<td>back to the build value (0 dBm)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>bleconn</code></td>
|
|
<td>what the central actually agreed to: interval (and what was requested), latency, supervision timeout</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>A connected central stops the node advertising: if the BLE console cannot be
|
|
found, look for who is connected (<code>ble</code> shows it).</p>
|
|
<h2 id="passive-analyzer-observer">Passive analyzer (observer)</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>command</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>nodes [offset]</code></td>
|
|
<td>heard repeaters and room servers with a key to join several paths, paged from <code>offset</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>rxlog [cursor]</code></td>
|
|
<td>every frame heard: type, path, SNR, RSSI; <code>cursor</code> from the previous page (<code>0</code> = all)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>pktlog [cursor]</code></td>
|
|
<td>raw frames heard, for an observer feed (<a href="https://git.rfa.cz/tth-pub/meshcore-repeater-observer">meshcore-repeater-observer</a>)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>A page is as big as the caller's reply buffer: ~1000 B on the local console,
|
|
one packet over the mesh.</p>
|
|
<h2 id="channel-bot-own-build-bot_channel_psk">Channel bot (own build: <code>BOT_CHANNEL_PSK</code>)</h2>
|
|
<p>A repeater that answers on one channel without forwarding anything:
|
|
<code>!link</code>, <code>!path</code>, <code>!snr</code>, <code>!heard</code>, <code>!noise</code>, <code>!ping</code>, <code>!help</code> (narrowed by
|
|
<code>BOT_COMMANDS</code>), with a per-sender cooldown and an ignore list. <code>bot</code> on the
|
|
console shows its state.</p>
|
|
<h2 id="power-and-clock">Power and clock</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>command</th>
|
|
<th>where</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>get radio.rxps</code></td>
|
|
<td>all, SX1262 only (<code>WITH_RX_POWERSAVING</code>, in the releases)</td>
|
|
<td>requested and effective RX duty cycle, window lengths, error counters</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>set radio.rxps <off|on|balanced|max></code></td>
|
|
<td>same</td>
|
|
<td>RX duty cycle: the radio sleeps between short listening windows. Presets: <code>on</code> = level 3, <code>balanced</code> = 6, <code>max</code> = 8. Saved. Default: off</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>set radio.rxps level <level> [preamble <16|32>]</code></td>
|
|
<td>same</td>
|
|
<td>the same by number, 1..10 (9 and 10 are past the datasheet's timing condition, 10 is known to lose packets)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>set radio.rxps <rx_us> <sleep_us></code></td>
|
|
<td>same</td>
|
|
<td>raw window lengths</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>get batt.icon</code></td>
|
|
<td>all</td>
|
|
<td>whether the icon is on, and whether the name leaves room for it</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>set batt.icon <on|off></code></td>
|
|
<td>all</td>
|
|
<td>battery level as an icon at the end of the advertised name; with a name too long for it the icon is left out, and the reply says so. Default: off</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>set batt.icon.lo <mV></code></td>
|
|
<td>all</td>
|
|
<td>the empty end of the icon's scale, 2500..4500; <code>0</code> = build default (3300)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>set batt.icon.hi <mV></code></td>
|
|
<td>all</td>
|
|
<td>the full end, 2500..4500; <code>0</code> = build default (4200)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>gps duty</code></td>
|
|
<td>GPS boards</td>
|
|
<td>the receiver runs only around a clock sync; <code>gps on</code> / <code>gps off</code> leave it. See cli_commands.md</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>get pwr</code></td>
|
|
<td>SenseCAP Solar repeater (<code>PWRMGT_RUNTIME</code>)</td>
|
|
<td>both thresholds, the battery now and at boot, why the node last switched off</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>set pwr.bootlock <mV></code></td>
|
|
<td>same</td>
|
|
<td>do not start below this voltage, 3000..4200 or <code>off</code>; saved on the node, see <a href="../power/">power.md</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>set pwr.cutoff <mV></code></td>
|
|
<td>same</td>
|
|
<td>switch a running node off below this voltage, 3000..4200 or <code>off</code>. Must stay under the bootlock; neither may be above the battery right now</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>clkreboot</code></td>
|
|
<td>all</td>
|
|
<td>reset the clock to the build epoch and reboot -- the only way to move a clock backwards (<code>time</code> and <code>clock sync</code> refuse to)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>RX duty cycle: <code>max</code> saved ~2.3 mA on the bench, but a mast on the live mesh
|
|
lost 16 % of its reception -- see cli_commands.md and <a href="../power/">power.md</a>.</p>
|
|
<h2 id="sensors">Sensors</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>command</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>sensor read</code></td>
|
|
<td>the live telemetry decoded into one line (<code>sensor list</code> shows only settings)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>sensor get ina.shunt</code></td>
|
|
<td>the shunt the current is computed with</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>sensor set ina.shunt <mOhm></code></td>
|
|
<td>shunt resistance of an INA219, INA226 or INA3221 module (<code>10</code> for <code>R010</code>), saved; <code>0</code> = build default (100). The INA260 has its shunt inside and no setting</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h2 id="build-flags">Build flags</h2>
|
|
<p>The ones that change what a node does; set in <code>platformio.ini</code> /
|
|
<code>platformio.local.ini</code> (<code>-D NAME=value</code>, the last <code>-D</code> wins).</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>flag</th>
|
|
<th>default</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>FAIRNESS_ENABLED_DEFAULT</code></td>
|
|
<td><code>1</code></td>
|
|
<td>FairnessLimiter on for a node without prefs</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>RADIO_SILENCE_MIN_DEFAULT</code></td>
|
|
<td><code>0</code></td>
|
|
<td>deaf-receiver watchdog for a node without prefs</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>RADIO_TXSTALL_MIN</code></td>
|
|
<td><code>15</code></td>
|
|
<td>TX stall watchdog at boot (repeater), <code>0</code> = off</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>FILTER_CHANNEL_PSKS</code></td>
|
|
<td>releases: Public, <code>#meshcore</code>, <code>#test</code></td>
|
|
<td>channel keys the filter can decrypt</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>MAX_HEARD_NODES</code>, <code>RXLOG_SIZE</code>, <code>PKTFEED_SIZE</code></td>
|
|
<td><code>0</code> (observer variants: 128 / 512 / 64)</td>
|
|
<td>the analyzer rings</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>BLE_PIN_CODE</code>, <code>RPT_BLE_DEFAULT_OFF</code></td>
|
|
<td>observer variants</td>
|
|
<td>BLE console, starting off</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>BOT_CHANNEL_PSK</code>, <code>BOT_COMMANDS</code></td>
|
|
<td>unset</td>
|
|
<td>channel bot</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>RADIO_DIAG</code>, <code>PIN_DIAG</code>, <code>LORA_POLL_IRQ</code></td>
|
|
<td>unset</td>
|
|
<td>radio diagnostics, DIO1-less operation</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>FW_OTA</code></td>
|
|
<td><code>-ota</code> images</td>
|
|
<td>admin-pushed firmware update</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>PATH_HASH_MODE_DEFAULT</code></td>
|
|
<td><code>1</code> (2 B per hop)</td>
|
|
<td>path hash width for a node without prefs</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>ACL_TS_MAX_AHEAD</code></td>
|
|
<td><code>86400</code> (s)</td>
|
|
<td>a client timestamp further ahead of the node's clock is not stored as the replay floor</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>LOCKED_NODE</code></td>
|
|
<td>unset</td>
|
|
<td>a node that keeps its secrets from whoever holds it: <code>get prv.key</code>, <code>get guest.password</code> and <code>get bridge.secret</code> answer <code>Error: locked build</code> to everyone (USB and BLE console, an admin over the mesh); a companion serves only paired BLE (USB, UART and WiFi get the device info and nothing else) and its rescue CLI refuses <code>set pin</code>. Only half of it: whoever can rewrite the flash (SWD with <code>APPROTECT</code> open, an unsigned DFU) still gets the keys -- the other half is a locked bootloader (SWD closed, signed images only), which these builds do not have</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>LOGIN_FAIL_MAX</code>, <code>LOGIN_FAIL_SECS</code></td>
|
|
<td><code>4</code>, <code>180</code> (s)</td>
|
|
<td>after that many wrong passwords in the window no password is checked until it ends (an admin already in the ACL always gets in)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>NRF52_POWER_MANAGEMENT</code>, <code>PWRMGT_RUNTIME</code></td>
|
|
<td>upstream: off; on in <code>SenseCap_Solar_repeater</code> (the masts)</td>
|
|
<td>boot protection, and with <code>PWRMGT_RUNTIME</code> the runtime <code>pwr.bootlock</code> / <code>pwr.cutoff</code> above</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>PWRMGT_BOOTLOCK_DEFAULT</code>, <code>PWRMGT_CUTOFF_DEFAULT</code></td>
|
|
<td><code>PWRMGT_VOLTAGE_BOOTLOCK</code> (SenseCAP 3300), <code>0</code> (mV)</td>
|
|
<td>thresholds for a node without <code>/pwr_guard</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>PWR_DUTY_INSTRUMENT</code></td>
|
|
<td>unset</td>
|
|
<td>bench only, nRF52: every ~10 s a <code>PWRDUTY</code> line on the USB console with the time the MCU was awake and asleep, its wakes, and the CPU time spent on received packets. See <a href="../power/#cpu-time-per-received-packet-pwr_duty_instrument">power.md</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Prefs saved on the node override the build defaults: a reflash keeps what a
|
|
node already has; only a new node or one after <code>erase</code> takes them.</p>
|
|
</section>
|
|
|
|
</main>
|
|
</div>
|
|
<hr><footer>
|
|
<div class="terminal-mkdocs-footer-grid">
|
|
<div id="terminal-mkdocs-footer-copyright-info">
|
|
|
|
<p class="text-center text-muted">Source: <a href="https://git.rfa.cz/tth-pub/meshcore-tth">git.rfa.cz/tth-pub/meshcore-tth</a> ·</p>
|
|
Site built with <a href="http://www.mkdocs.org">MkDocs</a> and <a href="https://github.com/ntno/mkdocs-terminal">Terminal for MkDocs</a>.
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
|
|
|
|
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="alertdialog" aria-modal="true" aria-labelledby="searchModalLabel">
|
|
<div class="modal-dialog modal-lg" role="search">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="searchModalLabel">Search</h5>
|
|
<button type="button" class="close btn btn-default btn-ghost" data-dismiss="modal" aria-label="Close">x</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p id="searchInputLabel">Type to start searching</p>
|
|
<form>
|
|
<div class="form-group">
|
|
<input type="search" class="form-control" aria-labelledby="searchInputLabel" placeholder="" id="mkdocs-search-query" title="Please enter search terms here">
|
|
</div>
|
|
</form>
|
|
<div id="mkdocs-search-results" data-no-results-text="No document matches found"></div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</body>
|
|
|
|
</html> |