1369 lines
47 KiB
HTML
1369 lines
47 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="#stats-bundle-one-request-per-scrape-repeater">Stats bundle -- one request per scrape (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="forward-deny-rules-filter-flow-every-repeater">Forward-deny rules -- <code>filter flow</code> (every repeater)</h3>
|
|
<p>One table of keyless rules (max 24) that replaces the former <code>filter hash</code> and
|
|
<code>filter path</code> (both remain as aliases, below). A rule makes this node not
|
|
re-air a matching <strong>flood</strong> packet; reception, rxlog and the pktfeed are
|
|
unaffected. Match is on what is in the clear:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>kind</th>
|
|
<th>key (hex)</th>
|
|
<th>matches</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>c</code></td>
|
|
<td>1 B channel byte</td>
|
|
<td>GRP_TXT / GRP_DATA. One byte is coarse: every other channel hashing to it is hit as well</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>r</code></td>
|
|
<td><code>dest src</code> (2 B), optionally + first hop (4 B); or <code>src first-hop</code> (3 B), <strong>any destination</strong></td>
|
|
<td>REQ / RESPONSE / TXT_MSG / PATH</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>n</code></td>
|
|
<td><code>dest</code> (1 B), optionally + first hop (3 B)</td>
|
|
<td>ANON_REQ (login flood)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>a</code></td>
|
|
<td>pubkey prefix, 4-8 B</td>
|
|
<td>ADVERT</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>p</code></td>
|
|
<td>relay pubkey prefix, 2-4 B</td>
|
|
<td>any hop of the path (a hop matches on the shorter of its width and the entry)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>The 3-byte <code>r</code> form is <code>src</code> (1 B) + first hop (2 B): <code>payload[1] == src</code> and the
|
|
path's first hop equals the two hop bytes, whatever the destination. One
|
|
requester asking many destinations through the same first relay thus takes one
|
|
entry instead of one per destination. The 2 B and 4 B forms are unchanged.</p>
|
|
<p>"First hop" is the 2-byte hash at the start of the path. <strong>0-hop packets and
|
|
1-byte hops never match a rule that has it</strong>, and kind <code>p</code> never matches a
|
|
1-byte hop (one byte is shared by most repeaters of a mesh).</p>
|
|
<p>Per entry: a mode, a flag, counters and an optional expiry.</p>
|
|
<ul>
|
|
<li>mode <code>block</code> (default), <code>throttle <s></code> (1..65535: one packet per <code>s</code>
|
|
seconds passes, the rest is dropped; the window is RAM, the first match after
|
|
a boot passes) or <code>dry</code> (count only, never drops);</li>
|
|
<li>flag <code>auto</code>: set by an agent, as opposed to static (inventory / by hand);
|
|
<code>clear</code> and the CRCs treat the two sets separately;</li>
|
|
<li>counters <code>dropped</code> / <code>passed</code> (RAM, gone at reboot; <code>passed</code> counts throttle
|
|
passes, <code>dropped</code> of a <code>dry</code> entry counts what it WOULD have dropped; of
|
|
several matching rules only the first dropping one is charged);</li>
|
|
<li>expiry <code>ttl <s></code> (1..2000000, from now) or <code>expires <unix></code>: an expired
|
|
entry is <strong>removed</strong>. The entry carries the absolute time AND the seconds
|
|
that were left when it was last written (written only on add/change, never
|
|
periodically); after a boot the entry ends at whichever comes first: the
|
|
absolute time (only while the node clock reads 2026 or later) or the
|
|
countdown of the saved seconds from boot. A cold start without GPS has a
|
|
clock behind by the age of the build, so the absolute time alone would
|
|
extend a block. <code>expires</code> with no valid clock is stored without a countdown
|
|
and can then end only by the absolute time.</li>
|
|
</ul>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>command</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>filter flow add <kind> <hex> [block|throttle <s>|dry] [auto] [ttl <s>|expires <unix>]</code></td>
|
|
<td>add; the same key again changes the entry (counters kept)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter flow del <kind> <hex></code></td>
|
|
<td>remove one entry</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter flow clear auto|static|all</code></td>
|
|
<td>remove a set</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter flow [list [page]]</code></td>
|
|
<td>paged list</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Entries are kept <strong>sorted by (kind, key)</strong> -- kind as its ASCII letter, key
|
|
bytewise, a shorter key before a longer one it prefixes. The index in that
|
|
order is the <code>slot_id</code> and <strong>moves on add/del/expiry</strong>. A rule is a veto, not a
|
|
route: with several matches any dropping rule drops the packet, and a throttle
|
|
window is only spent by a packet that nothing else vetoes.</p>
|
|
<p><code>add</code>, <code>del</code> and <code>clear</code> reply (machine format, one line):</p>
|
|
<pre><code>OK <add|change|same|del|clear> n=<total> a=<n>:<crc16> s=<n>:<crc16>
|
|
</code></pre>
|
|
<p><code>a=</code> is the number of <code>auto</code> entries and the CRC of that set, <code>s=</code> the same for
|
|
the static set; <code>crc16</code> is 4 upper-case hex digits. Errors start with <code>Err -</code>.</p>
|
|
<p>CRC-16/CCITT-FALSE (poly 0x1021, init 0xFFFF, no reflection, no final XOR)
|
|
over the entries of one set in sorted order, each serialized as
|
|
<code>kind(1, ASCII) klen(1) key(klen) mode(1: 0 block, 1 throttle, 2 dry)
|
|
throttle_secs(2, big endian, 0 unless throttle) expires(4, big endian, 0 = none)</code>.
|
|
Counters, the remaining seconds and the <code>auto</code> flag are not part of it; an
|
|
empty set is <code>FFFF</code>. Test vectors and a Python reference:
|
|
<code>test/vectors/flow_rules_vectors.json</code>, <code>test/vectors/gen_flow_rules_vectors.py</code>.</p>
|
|
<p><code>list</code> replies are at most 149 characters (the RF reply limit is 150 B):</p>
|
|
<pre><code>flow <page>/<of> n=<total> a=<n>:<crc16> s=<n>:<crc16> <entry> <entry> ...
|
|
<entry> = <kind><hex>,<mode>,<A|S>,<dropped>/<passed>,<left>
|
|
<mode> = B | T<secs> | D <left> = seconds to expiry, or -
|
|
</code></pre>
|
|
<p>Entries are separated by a space, fields by a comma. Up to 4 entries a page,
|
|
fewer when long keys would not fit; the packing depends only on the rules (it
|
|
budgets the counters at their maximum), never on the counters, so <code>of</code> stays
|
|
put while counters tick. Displayed counters are capped at 99999. An empty
|
|
table: <code>flow 1/1 n=0 a=0:FFFF s=0:FFFF</code>. A page out of range:
|
|
<code>Err - page 1..<of></code>. The reader fetches page 1, then 2..<code>of</code>; if <code>n</code> or a
|
|
CRC differs between pages the table changed meanwhile -- start again.</p>
|
|
<p><code>filter dryrun on</code> forces every verdict (flow, age, sender) to count-only.</p>
|
|
<p>Persisted in prefs (keys <code>f_fl0</code>..<code>f_fl15</code>). At the first boot after an update
|
|
the old <code>f_dhash*</code> / <code>f_dpath*</code> entries are moved into the table as static
|
|
kind <code>c</code> / <code>p</code> rules and the old fields are cleared (downgrading afterwards
|
|
loses them).</p>
|
|
<h4 id="aliases-filter-hash-and-filter-path">Aliases <code>filter hash</code> and <code>filter path</code></h4>
|
|
<p>Kept so existing configuration and the Ansible module <code>meshcore_filter_hash</code>
|
|
keep working; they act on static kind <code>c</code> / <code>p</code> entries.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>command</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>filter hash [list]</code></td>
|
|
<td><code>filter hash: dropped N, passed M, deny: 43 2E/60</code> -- sums of the kind-<code>c</code> counters; <code>43</code> blocked, <code>43/60</code> throttled, <code>43/dry</code> dry</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter hash add <hex> [secs]</code></td>
|
|
<td><code>filter flow add c <hex> [throttle <secs>]</code>; no <code>secs</code> / 0 = block; re-adding changes the interval</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter hash del <hex></code> / <code>clear</code></td>
|
|
<td>remove one byte / all STATIC <code>c</code> entries</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter path [list]</code></td>
|
|
<td><code>filter path: dropped N, deny: c420 5f14c420</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter path add <hex></code></td>
|
|
<td><code>filter flow add p <hex></code> (2-4 bytes = 4-8 hex digits)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>filter path del <hex></code> / <code>clear</code></td>
|
|
<td>remove one entry / all STATIC <code>p</code> entries</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>The table is shared: 24 entries in all (it was 16 before; prefs records
|
|
<code>f_fl0..f_fl23</code>), where <code>filter hash</code> had 8 and <code>filter path</code> 8. The list order is now the sorted order, not the order of adding.</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, flow, 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="stats-bundle-one-request-per-scrape-repeater">Stats bundle -- one request per scrape (repeater)</h2>
|
|
<p>A binary request (<code>0xF1</code>, not a console command) that returns status, telemetry,
|
|
FairnessLimiter drops, per-rule <code>filter flow</code> counters, the rule CRCs
|
|
(<code>rules_crc16</code>, auto and static), <code>prefs_crc16</code> and the adaptive power save
|
|
stage in one reply of at most 150 B, paged when it does not fit. Admin gets
|
|
everything, a guest what <code>GET_STATUS</code> gives. Byte format, ids, paging, the
|
|
pairing rule for <code>slot_id</code> and the <code>prefs_crc16</code> field list:
|
|
<a href="../stats-bundle/">stats-bundle.md</a>.</p>
|
|
<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>all</td>
|
|
<td>battery now, adaptive power-save thresholds/state; on <code>PWRMGT_RUNTIME</code> boards also bootlock, cutoff, boot voltage and last shutdown reason</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>set pwr.rxgain <lo> [hi]|off</code></td>
|
|
<td>all</td>
|
|
<td>disable SX126x RX boosted gain below <code>lo</code> mV (3 readings, 1/min), restore at <code>hi</code> mV (default <code>lo + 150</code>, min hysteresis 50 mV); does not overwrite <code>radio.rxgain</code> pref. Saved in <code>/pwr_save</code>. Default: off</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>set pwr.rxps <lo> [hi]|off</code></td>
|
|
<td>all (<code>WITH_RX_POWERSAVING</code>)</td>
|
|
<td>enable RXPS <code>balanced</code> below <code>lo</code> mV, restore continuous RX at <code>hi</code> mV (skipped if <code>radio.rxps</code> was enabled manually). Saved in <code>/pwr_save</code>. Default: off</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>set pwr.bootlock <mV></code></td>
|
|
<td>SenseCAP Solar repeater (<code>PWRMGT_RUNTIME</code>)</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>bench batt [mV|off|poll]</code></td>
|
|
<td>own build (<code>BENCH_BATT_OVERRIDE</code>), local only</td>
|
|
<td>override battery voltage for adaptive power-save testing (simulates battery without USB; <code>poll</code> triggers one sample immediately)</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>NRF52_TICKLESS_MAX_MS</code></td>
|
|
<td><code>50</code> (ms)</td>
|
|
<td>nRF52 with <code>powersaving on</code>: the longest the main loop blocks between wake-ups (the DIO1 interrupt wakes it at once); <code>0</code> = the old <code>sd_app_evt_wait()</code> loop that wakes with every 1024 Hz tick. See <a href="../power/">power.md</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>BENCH_BATT_OVERRIDE</code></td>
|
|
<td>unset</td>
|
|
<td>bench only: <code>bench batt <mV|off|poll></code> overrides the battery reading of the adaptive power saving (<code>pwr.rxgain</code> / <code>pwr.rxps</code>; not <code>pwr.cutoff</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> |