894 lines
37 KiB
HTML
894 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/en/"><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>English - 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">O forku</span>
|
|
</a>
|
|
<meta property="position" content="0">
|
|
</li>
|
|
|
|
|
|
<li property="itemListElement" typeof="ListItem">
|
|
<a href="./" class="menu-item active" property="item" typeof="WebPage">
|
|
<span property="name">English</span>
|
|
</a>
|
|
<meta property="position" content="1">
|
|
</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="2">
|
|
</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="..">O forku</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="terminal-mkdocs-side-nav-li">
|
|
|
|
|
|
|
|
|
|
<span class="terminal-mkdocs-side-nav-item--active">English</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="terminal-mkdocs-side-nav-li">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="
|
|
|
|
|
|
|
|
terminal-mkdocs-side-nav-item 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">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../tth-commands/">Příkazy konzole · console commands</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../ota/">Aktualizace od admina · OTA</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../power/">Napájení · power</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../budka-sensor/">Budka jako senzor · Budka sensor</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../ble-lora-coexistence/">Koexistence BLE/LoRa</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="#about-this-fork-meshcore-tth">About this fork (meshcore-tth)</a></li>
|
|
<li><a href="#repeater-antispam-all-of-it-off-switchable-none-of-it-upstream">Repeater: antispam (all of it off-switchable, none of it upstream)</a></li><li><a href="#diagnostics-and-operations">Diagnostics and operations</a></li><li><a href="#core-fixes">Core fixes</a></li><li><a href="#power-clock-gps">Power, clock, GPS</a></li><li><a href="#sensors-and-companions">Sensors and companions</a></li><li><a href="#public-builds-czech-mesh-defaults">Public builds: Czech mesh defaults</a></li><li><a href="#flashing-a-release">Flashing a release</a></li><li><a href="#experimental-firmware-update-pushed-by-the-admin-ota">Experimental: firmware update pushed by the admin (*-ota)</a></li><li><a href="#build">Build</a></li>
|
|
</ul>
|
|
</nav>
|
|
</aside>
|
|
<main id="terminal-mkdocs-main-content">
|
|
<section id="mkdocs-terminal-content">
|
|
<h1 id="about-this-fork-meshcore-tth">About this fork (meshcore-tth)</h1>
|
|
<p><em>Česká verze <a href="../">výše</a>.</em></p>
|
|
<div class="admonition warning">
|
|
<p class="admonition-title">Warning</p>
|
|
<p><strong>Experimental firmware -- not meant for regular users.</strong> This fork and all
|
|
its releases are a personal development branch for the nodes of one small
|
|
network: a rolling release on upstream <code>dev</code>, built automatically about
|
|
twice a day, with no stable channel, no support, and tried only on our own
|
|
boards. It may carry bugs that take a node out of service, and getting one
|
|
back then needs USB or BLE in hand. For everyday use flash the official
|
|
MeshCore (<a href="https://flasher.meshcore.io">flasher.meshcore.io</a>).</p>
|
|
</div>
|
|
<p>A fork of <a href="https://github.com/meshcore-dev/MeshCore">meshcore-dev/MeshCore</a>
|
|
that runs the repeaters, sensors and bench boards of a small Czech network on
|
|
the CZ mesh (869.432 MHz). Upstream <code>main</code> and <code>dev</code> are merged automatically
|
|
twice a day; everything below is on top of that. Our code is marked
|
|
<code>CUSTOM (TeTeHacko)</code> in the source. Nothing here changes the wire protocol.</p>
|
|
<h2 id="repeater-antispam-all-of-it-off-switchable-none-of-it-upstream">Repeater: antispam (all of it off-switchable, none of it upstream)</h2>
|
|
<p><strong>After flashing only the FairnessLimiter is on</strong>, with limits about twice
|
|
above 30 days of real CZ mesh traffic: per channel a burst of 100 messages,
|
|
then one per 30 s; per sender 150 and one per 10 s; per advert origin 30 and
|
|
one per 10 min. It is a net for runaway floods, not a quota; <code>fairness off</code>
|
|
switches it off for good. The advert window, the filters and dry-run stay
|
|
off until you turn them on.</p>
|
|
<ul>
|
|
<li><strong>FairnessLimiter</strong> -- token buckets on forwarded floods, keyed on the 1-byte
|
|
ids already in the clear (channel hash, sender hash, advert origin). Port of
|
|
Beanow's proposal <a href="https://github.com/meshcore-dev/MeshCore/pull/1502">#1502</a>,
|
|
limits re-sized from 30 days of real CZ traffic.
|
|
<code>fairness [on|off|grid|cap|refill]</code>; direct-routed traffic is never limited.</li>
|
|
<li><strong>Per-origin advert window</strong> -- each node's flood advert forwarded at most
|
|
once per N hours (<code>fairness advert <h>|clear</code>), ported from
|
|
<a href="https://github.com/Dutch-MeshCore/MeshCore">DutchMeshCore</a>'s AdvertLimiter.
|
|
Aimed at nodes that re-advertise every minute.</li>
|
|
<li><strong>Dry-run</strong> -- <code>fairness dryrun on</code> counts every verdict but forwards anyway;
|
|
<code>fairness air</code> reports the airtime shed (or that would be) per reason.</li>
|
|
<li><strong>Channel filter</strong> -- on channels whose key the repeater knows (Public and
|
|
<code>#hashtag</code> channels), stop forwarding messages of listed sender names
|
|
(<code>filter add|del|list</code>). Names are spoofable: it contains a runaway bot,
|
|
it is not security.</li>
|
|
<li><strong>Channel-hash deny-forward</strong> -- <code>filter hash add <hex> [secs]</code>: keyless,
|
|
works on private channels too; reception is unaffected, only forwarding.
|
|
With <code>secs</code> the channel is throttled (one packet per <code>secs</code>) instead of cut.</li>
|
|
<li><strong>Message age limit</strong> -- <code>filter age <min>|off</code> (opt-in, 1-10080 min): do not
|
|
forward group texts on the decrypted channels whose sender timestamp is
|
|
older; inactive while the repeater clock is unset. It judges the sender's
|
|
clock, so companions without a time sync are dropped too -- keep it in days.</li>
|
|
<li><code>filter dryrun on</code> counts every <code>filter</code> verdict but forwards anyway.</li>
|
|
</ul>
|
|
<h2 id="diagnostics-and-operations">Diagnostics and operations</h2>
|
|
<p>Every command of the fork, which builds have it and the defaults:
|
|
<a href="https://git.rfa.cz/tth-pub/meshcore-tth/src/branch/main/tth-commands.md">docs/tth-commands.md</a>.</p>
|
|
<p>Repeater, room server and sensor (everything with a text console) have:</p>
|
|
<ul>
|
|
<li><strong>Radio watchdogs.</strong> The hardware watchdog only catches a frozen loop; two
|
|
of our nodes were found deaf with the loop running, and only a reboot
|
|
helped.</li>
|
|
<li><code>set radio.silence <min></code> -- <strong>deaf receiver</strong>: when the received-frame
|
|
counter does not move for <code><min></code> minutes (a frame with a CRC error
|
|
counts), the node re-arms its receiver first and reboots if that does not
|
|
help either. Each such reboot doubles the threshold for the next boot (up
|
|
to 16x) and the first frame received resets it, so a quiet site does not
|
|
end in a reboot loop. Saved; <strong>off by default</strong> (<code>0</code>) -- pick a threshold
|
|
well above the longest normal quiet spell of the site.</li>
|
|
<li><strong>Stalled TX</strong> (repeater only): packets wait in the queue and the sent
|
|
counter does not move -> re-arm the radio, then reboot. An empty queue
|
|
never counts. <strong>On, 15 min</strong> (<code>RADIO_TXSTALL_MIN</code>); <code>set radio.txstall
|
|
<min>|off</code> holds until the next reboot.</li>
|
|
<li><code>get radio.reboots</code> -- reboots done by the watchdogs (survives power
|
|
loss); <code>get boot</code> -- why the board last reset, and the hardfault record
|
|
(also printed at boot).</li>
|
|
<li><code>dfu [uf2|serial|ota]</code> -- a deterministic reboot into the bootloader (local
|
|
console only); <code>i2c</code> -- bus scan.</li>
|
|
</ul>
|
|
<p>The repeater also has:</p>
|
|
<ul>
|
|
<li><code>blink</code> (flashes the LED, also over the mesh -- finds a node on a mast),
|
|
<code>txpwr</code> (TX power until reboot, with RadioLib's verdict), TX-failure
|
|
counters in the status reply.</li>
|
|
<li>Observer variants only (<code>*-observer</code>): text console over BLE next to USB,
|
|
<code>ble on|off</code> saved across reboots (<code>RPT_BLE_DEFAULT_OFF</code>: starts off), own
|
|
BLE PIN (<code>ble pin</code>), persisted connection TX power (<code>blepwr</code>), <code>bleconn</code>, a
|
|
non-blocking BLE TX pump and connection parameters that hold on a weak
|
|
link.</li>
|
|
<li>Also observer variants only: a passive analyzer in the console --
|
|
<code>nodes</code> (heard repeaters/rooms, multi-path join key), <code>rxlog</code> (every frame
|
|
heard, type/path/SNR/RSSI), <code>pktlog</code> (raw frames for an observer feed), big
|
|
paged replies.</li>
|
|
<li>Own builds only, not in the releases:</li>
|
|
<li>channel bot (<code>BOT_CHANNEL_PSK</code>: <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>, per-sender
|
|
cooldown, ignore list) -- answers without repeating;</li>
|
|
<li><code>RADIO_DIAG</code>: <code>radiostat</code> (SX1262 receiver state, hands off) and
|
|
<code>radiokick rx|clrirq|standby|agc</code> (one recovery step at a time, gentlest
|
|
first -- the first that helps names the broken layer);</li>
|
|
<li><code>PIN_DIAG</code>: <code>dio1</code> (the chip's IRQ status against the level on the pin --
|
|
which end of a dead DIO1 line is broken);</li>
|
|
<li><code>LORA_POLL_IRQ</code>: DIO1-less operation for a board with a dead IRQ line.</li>
|
|
</ul>
|
|
<h2 id="core-fixes">Core fixes</h2>
|
|
<ul>
|
|
<li><strong>Replay protection of admin commands survives a reboot.</strong> Upstream keeps a
|
|
client's last timestamp in RAM only, so after every restart any captured
|
|
command is accepted again -- a captured <code>reboot</code> reboots the node forever.
|
|
Repeater, room server and sensor now write it to flash before acting on the
|
|
command (<code>/s_acl_ts0|1</code>, alternating with a checksum, so a power cut mid-write
|
|
does not lose it). A timestamp more than a day ahead of the node's clock
|
|
(<code>ACL_TS_MAX_AHEAD</code>) is accepted but not stored, so a companion with a runaway
|
|
clock cannot lock its admin out. Only admins are stored: a guest can only
|
|
read, and with the empty guest password anybody is one, so its every
|
|
request would be a flash write. Nothing changes for clients.</li>
|
|
<li><strong>Passwords can no longer be guessed over the air at full speed.</strong> Upstream
|
|
checks every login without a limit and does not even answer a wrong one.
|
|
After 4 wrong passwords within 3 minutes (<code>LOGIN_FAIL_MAX</code>,
|
|
<code>LOGIN_FAIL_SECS</code>) no password is checked until the window ends. A client
|
|
that is already an admin in the ACL always gets through -- nobody else can
|
|
send a login in its name, so the attack cannot lock the admins out.</li>
|
|
<li><strong>A replayed blank-password login no longer floods a reply.</strong> A login from a
|
|
client in the ACL with an empty password had no replay check; replayed, it
|
|
gained nothing, but every copy made the node flood its reply over the mesh.</li>
|
|
<li>TRACE no longer appends its path past the end of the payload; TRACE/PATH
|
|
parsing and <code>Packet::readFrom</code> are bounds-checked.</li>
|
|
<li><code>markSeen</code> is idempotent again (the send path was eating the dedup window).</li>
|
|
<li><code>calcMaxPacketMillis</code> fallback no longer underflows (a node went deaf on it).</li>
|
|
<li>Path-hash width comes from the node's prefs on every TX path, including
|
|
<code>sendZeroHop</code>; 2-byte path hashes are the default (<code>PATH_HASH_MODE_DEFAULT</code>).</li>
|
|
<li>Failed transmits are re-queued with backoff instead of dropped.</li>
|
|
<li>Per-packet RSSI captured at RX; <code>ContactInfo</code> zeroed before a partial fill.</li>
|
|
</ul>
|
|
<h2 id="power-clock-gps">Power, clock, GPS</h2>
|
|
<ul>
|
|
<li>GPS duty cycle (<code>gps duty</code>), also on the T1000-E, which had none: the
|
|
receiver runs only around a clock sync (once a day, after a window without
|
|
a fix again in 6 h). A position request warms it for the next request.</li>
|
|
<li>A node without GPS starts at its build epoch, not in 2024; the clock and a
|
|
hardfault record survive a warm reset (<code>.noinit</code>); <code>clkreboot</code>.</li>
|
|
<li>No blinking LED and slower BLE advertising on solar nodes.</li>
|
|
<li>Battery level as an icon at the end of the advertised name: <code>set batt.icon
|
|
on</code>, thresholds <code>set batt.icon.lo|hi <mV></code> (off by default; a long name has
|
|
no room for it and the command says so).</li>
|
|
<li>Optional RX duty cycle (<code>set radio.rxps off|on|balanced|max</code>, finer
|
|
<code>level <1-10></code>; ported from EasySkyMesh PowerSaving): the SX1262 sleeps
|
|
between short listening windows. Built into the public releases and
|
|
<strong>off</strong>; <code>max</code> saved ~2.3 mA on the bench with no packet loss
|
|
(<a href="https://git.rfa.cz/tth-pub/meshcore-tth/src/branch/main/power.md">docs/power.md</a>), but on the live mesh one of our masts lost
|
|
16 % of its reception -- switch it on with care. SX1262 only, not the LR1110
|
|
(T1000-E).</li>
|
|
<li>The nRF52 boot undervoltage lock (<code>PWRMGT_VOLTAGE_BOOTLOCK</code>) is <strong>off</strong>,
|
|
as in upstream since v1.18.0
|
|
(<a href="https://github.com/meshcore-dev/MeshCore/pull/2377">#2377</a>): its fixed
|
|
3.3 V threshold kept LiFePO4 and LTO nodes from booting. The firmware boots
|
|
on any cell chemistry; deep-discharge protection is up to the BMS or the
|
|
cell's protection board. A configurable, chemistry-aware lock is waiting
|
|
for upstream (<a href="https://github.com/meshcore-dev/MeshCore/pull/2088">#2088</a>). The exception
|
|
is <code>SenseCap_Solar_repeater</code> (Li-ion, our masts): the lock is on and both
|
|
thresholds are settable at runtime, also as an admin over the mesh --
|
|
<code>set pwr.bootlock <mV>|off</code> (default 3300; below it the node does not start
|
|
and sleeps until the cell recovers) and <code>set pwr.cutoff <mV>|off</code> (default
|
|
off; below it a running node switches off); <code>get pwr</code>
|
|
(<a href="https://git.rfa.cz/tth-pub/meshcore-tth/src/branch/main/power.md">docs/power.md</a>).</li>
|
|
</ul>
|
|
<h2 id="sensors-and-companions">Sensors and companions</h2>
|
|
<ul>
|
|
<li><code>simple_sensor</code>: telemetry from an external station over UART
|
|
(<code>BudkaLinkSensorManager</code>, one LPP channel per meter), <code>sensor read</code>.</li>
|
|
<li>Sensors that would otherwise convert continuously (INA219, INA226, INA260,
|
|
INA3221, BMP280) sleep between telemetry reads and measure on demand (idea
|
|
and first INA219 patch: Alkel Brostl). INA chips are told apart by their ID,
|
|
so an INA226 is no longer taken for an INA219. The shunt is set at runtime
|
|
and saved: <code>sensor set ina.shunt <mOhm></code>.</li>
|
|
<li>Companion: <code>gps duty</code> persists, bounded build-date copy. Private key
|
|
export, reading the BLE PIN and changing it (CLI <code>set pin</code> included) work
|
|
only over paired BLE, never over USB, a UART or WiFi/TCP, and the reply that
|
|
carries the key or PIN goes back only where the request came from. (The
|
|
v1.17 merge had silently disabled that gate; a build without BLE still
|
|
trusts its one transport.) KISS modem: off-by-one in the name clamp.</li>
|
|
</ul>
|
|
<h2 id="public-builds-czech-mesh-defaults">Public builds: Czech mesh defaults</h2>
|
|
<p>Releases built from this repository (<code>pub-release</code>) come preset for the
|
|
Czech mesh, following the <a href="https://meshcore.cz/">meshcore.cz</a> wiki, so a
|
|
freshly flashed node does not need the usual round of settings:</p>
|
|
<ul>
|
|
<li>radio 869.432 MHz / 62.5 kHz / SF7 / CR5 (all builds);</li>
|
|
<li>repeater and room server: zero-hop advert off, flood advert every 25 h,
|
|
10 % duty cycle (<code>get dutycycle</code> → <code>10.0%</code>; the deprecated <code>af</code> reads 9);</li>
|
|
<li>repeater: regions <code>cz</code> and <code>cs</code> next to <code>*</code> -- add your own <code>cz-<kraj></code>
|
|
with <code>region put cz-xxx cz</code> + <code>region save</code>;</li>
|
|
<li>2-byte path hashes (this fork's default);</li>
|
|
<li>repeater: the channel filter (<code>filter add <name></code>) is built in for Public,
|
|
<code>#meshcore</code> and <code>#test</code>, with an empty list -- it does nothing until you
|
|
add a name.</li>
|
|
</ul>
|
|
<p>They apply only to a node with no saved settings (new, or after an erase):
|
|
a reflash keeps whatever the node already has, and regions you removed and
|
|
saved stay removed. Set a name and an admin password yourself.</p>
|
|
<p><strong>The companion's BLE PIN is the public <code>123456</code></strong> (boards with a display
|
|
draw their own and show it). Whoever pairs with it owns the companion:
|
|
messages, contacts, private key export. So change it in the app after the
|
|
first pairing. And with the board in hand neither the PIN nor a password
|
|
protects anything: the flash is not locked and the bootloader takes any
|
|
firmware. Treat a lost or stolen node as compromised -- for a repeater,
|
|
change the admin password wherever it was the same and drop its key from
|
|
ACLs; for a companion, treat the channels it held as known.</p>
|
|
<p>Observer variants (<code>*_repeater-observer-*</code>) of the nRF52 repeaters (XIAO,
|
|
SenseCAP Solar, RAK4631, T1000-E, Heltec T114) add the <code>nodes</code> / <code>rxlog</code> /
|
|
<code>pktlog</code> rings and a text console over BLE, for reading the repeater over
|
|
USB or BLE (<a href="https://git.rfa.cz/tth-pub/meshcore-repeater-observer">meshcore-repeater-observer</a>).
|
|
The BLE console is <strong>off</strong> after flashing (<code>RPT_BLE_DEFAULT_OFF</code>). It has no
|
|
login of its own, only the BLE PIN, and the build's PIN is the public
|
|
placeholder <code>123456</code>. So first set your own -- in the USB console, or as
|
|
admin over the mesh (remote CLI in the app): <code>ble pin <6 digits></code> (saved, survives a reboot and a reflash; it also drops
|
|
every existing bond, so paired devices pair again). Only then <code>ble on</code> --
|
|
these builds refuse it while the PIN is still the placeholder. <code>ble</code> shows
|
|
whether the PIN is <code>own</code> or <code>build default</code>, never the PIN itself. Releases
|
|
up to <code>tth-654d53f3</code> do not have <code>ble pin</code>: keep BLE off there and use USB.</p>
|
|
<h2 id="flashing-a-release">Flashing a release</h2>
|
|
<p>Every release is an automatic build on upstream <code>dev</code> (see the warning
|
|
above), not a stable version. Flash it only on nodes you can reach, and each
|
|
new release on one of them first.</p>
|
|
<p>Files are in <a href="https://git.rfa.cz/tth-pub/meshcore-tth/releases">Releases</a>.
|
|
A release is named after the upstream version and the date, e.g.
|
|
<code>v1.18.0+tth.20261112</code> (a second one that day <code>.2</code>), and its notes list the
|
|
changes since the previous release. One set per board and role
|
|
(<code><board>_<role>-<release></code>, e.g. <code>Xiao_nrf52_repeater-v1.18.0+tth.20261112.zip</code>):
|
|
<code>.zip</code> and <code>.uf2</code> for nRF52 boards, <code>.bin</code> for ESP32 (<code>-merged.bin</code> is the
|
|
full image for a blank board, the plain <code>.bin</code> an update). <code>SHA256SUMS</code> lists
|
|
the checksums. Releases up to 12. 11. 2026 were named <code>tth-<sha></code>.</p>
|
|
<p><strong>nRF52 (XIAO, RAK4631, SenseCAP Solar, T1000-E, T114) with the
|
|
<a href="https://flasher.meshcore.io">MeshCore web flasher</a></strong> -- Chrome, Edge or
|
|
Chromium on a computer (Web Serial; not Firefox or Safari):</p>
|
|
<ol>
|
|
<li>Connect the board over USB.</li>
|
|
<li>Click <strong>Custom Firmware</strong> and choose the <code>.zip</code> for your board.</li>
|
|
<li>Click <strong>Enter DFU mode</strong> and pick the board's serial port. The board
|
|
restarts into its bootloader and shows up as a new port.</li>
|
|
<li>Click <strong>Flash!</strong> and pick that new port. About 30 s, then the board
|
|
restarts into the new firmware.</li>
|
|
<li><strong>Console</strong> in the flasher (or any serial terminal, 115200) checks the
|
|
result: <code>ver</code> shows <code>v1.xx.x-tth<sha></code>, the same as the "Verze v uzlu"
|
|
(node version) line in the release notes.</li>
|
|
</ol>
|
|
<p><strong>Do not click Erase Flash</strong> unless you want a new node: it wipes the
|
|
identity (the node's key and everything that knows it) together with all
|
|
settings. A plain flash keeps them.</p>
|
|
<p>Tried on a XIAO (repeater-observer, 3. 11. 2026). ESP32 <code>.bin</code> through the
|
|
same Custom Firmware button is untested here.</p>
|
|
<p>Without the web flasher: on most boards a double-tap of reset opens the
|
|
bootloader as a USB drive; copy the <code>.uf2</code> onto it. Or
|
|
<code>adafruit-nrfutil dfu serial -pkg <file>.zip -p <port> -b 115200</code> with the
|
|
board in the bootloader.</p>
|
|
<p>After flashing a new node, set it up in the console: <code>set name <name></code>,
|
|
<code>password <admin password></code> (at most 15 characters), your own region with
|
|
<code>region put cz-<kraj> cz</code> + <code>region save</code>. A repeater forwards from its
|
|
first boot (upstream default) and these builds are on the live CZ frequency:
|
|
on a desk without its antenna, <code>set repeat off</code> until it is in place.</p>
|
|
<h2 id="experimental-firmware-update-pushed-by-the-admin-ota">Experimental: firmware update pushed by the admin (<code>*-ota</code>)</h2>
|
|
<p>Every nRF52 build with a text console (repeater, observer, room server,
|
|
sensor) is in the release once more as an <strong>experimental</strong> <code>*-ota</code> /
|
|
<code>*-observer-ota</code> image. It takes a new firmware from its admin with the
|
|
<code>fw …</code> commands: on the USB or BLE console, or <strong>over the mesh as remote admin
|
|
CLI</strong>. No bootloader change, no second bank: the node stores the package in
|
|
free flash, checks all of it (signature, hashes, the delta applied dry) and
|
|
rewrites itself only on <code>fw apply</code>, from a routine running in RAM. A power
|
|
cut during the rewrite leaves it in the bootloader, back via USB/BLE DFU.</p>
|
|
<ul>
|
|
<li>Each <code>*-ota</code> image comes with a full package
|
|
<code><board>_<role>-ota-<release>.mcfw</code> (USB/BLE only) and a delta
|
|
<code>….from-<earlier release>.mcfw</code> from every kept earlier release, typically
|
|
a few kB.</li>
|
|
<li><strong>Over the mesh a node takes only a delta, and never an older version than
|
|
it runs</strong> -- enforced by the node, not by the tool. A full image or a step
|
|
back only locally (<code>fw apply downgrade</code>). <code>fw apply</code> wants the battery at
|
|
3.8 V or more unless the node runs on USB.</li>
|
|
<li>Packages and <code>SHA256SUMS</code> are signed by <code>meshcore-ota@tth-pub</code>, and an
|
|
<code>*-ota</code> image accepts no other signature. Checking the downloads:
|
|
<code>ssh-keygen -Y verify -f tools/ota_allowed_signers -I meshcore-ota@tth-pub
|
|
-n meshcore-ota -s SHA256SUMS.sig < SHA256SUMS</code>. Your own build with your own
|
|
key: <code>[ota] pubkey</code> in <code>platformio.local.ini</code>.</li>
|
|
<li>The first <code>*-ota</code> image is flashed the usual way (above), later ones go as
|
|
deltas. Tools: <code>tools/ota_push.py</code> (USB), <code>tools/ota_mesh_push.py</code> (over the
|
|
mesh through a companion; needs the <code>meshcore</code> Python library, takes the
|
|
admin password from <code>[secrets] admin_pw</code> in <code>platformio.local.ini</code>; <code>--side</code>
|
|
carries the transfer on a side channel, off the shared mesh),
|
|
<code>tools/ota_pack.py info</code>. The transfer itself is the OTA engine of the
|
|
<a href="https://git.rfa.cz/tth-pub/meshcore-ansible">tth.meshcore</a> Ansible
|
|
collection (module <code>meshcore_fw_ota</code>), one code for the tools and Ansible.
|
|
From a phone: the <a href="https://git.rfa.cz/tth-pub/meshcore-open">meshcore-open</a>
|
|
fork, repeater management → Firmware update (OTA), which finds the delta in
|
|
the release by itself. How it works and bench numbers:
|
|
<a href="https://git.rfa.cz/tth-pub/meshcore-tth/src/branch/main/ota.md">docs/ota.md</a>.</li>
|
|
<li><strong>Experimental even within this fork</strong>: the images come with every
|
|
release (see the warning above) and have no second bank and no automatic
|
|
rollback. A bad firmware that boots keeps running until you push the next
|
|
one; one that does not boot needs USB/BLE DFU in hand. Tried on the bench
|
|
(XIAO, USB, mesh, side channel) and on two of our masts since 13. 11. 2026.
|
|
The radio watchdogs (see Diagnostics and operations) catch an image that
|
|
boots with a dead radio: switch <code>set radio.silence</code> on for nodes you push
|
|
to. Costs ~10 kB of RAM.</li>
|
|
</ul>
|
|
<h2 id="build">Build</h2>
|
|
<ul>
|
|
<li>Version stamping in every nRF52 env (<code>v1.18.0-tth<sha></code>, <code>+</code> = dirty tree),
|
|
base version from the upstream tag (<code>tools/build_version.py</code>).</li>
|
|
<li><code>tools/</code>: host tools for the nodes -- consoles (USB, BLE), flashing, bench
|
|
tests, diagnostics (<a href="https://git.rfa.cz/tth-pub/meshcore-tth/src/branch/main/tools/README.md">tools/README.md</a>). Board names come
|
|
from a local config outside the repo (<code>tools/config.example.ini</code>).</li>
|
|
<li><code>hardware/cavity-box</code>: parametric enclosure for a cavity filter on a mast.</li>
|
|
</ul>
|
|
<hr />
|
|
<p><em>Níže je README upstreamového MeshCore. Jeho flasher, klienti a návody se
|
|
týkají oficiálního firmwaru, ne releasů tohoto forku. / Below is upstream
|
|
MeshCore's README: its flasher, clients and guides refer to the official
|
|
firmware, not to this fork's releases.</em></p>
|
|
</section>
|
|
|
|
</main>
|
|
</div>
|
|
<hr><footer>
|
|
<div class="terminal-mkdocs-footer-grid">
|
|
<div id="terminal-mkdocs-footer-copyright-info">
|
|
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> |