docs site preview: English site, Czech page
This commit is contained in:
1 parent
a360339eb3
commit
20828922f2
26 files changed
+1396
-1396
No files matched your search
+300
-295
@@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
|
||||
<title>O forku - MeshCore TTH</title>
|
||||
<title>About the fork - MeshCore TTH</title>
|
||||
|
||||
|
||||
<link href="css/fontawesome/css/fontawesome.min.css" rel="stylesheet">
|
||||
@@ -100,15 +100,15 @@
|
||||
|
||||
<li property="itemListElement" typeof="ListItem">
|
||||
<a href="." class="menu-item active" property="item" typeof="WebPage">
|
||||
<span property="name">O forku</span>
|
||||
<span property="name">About the fork</span>
|
||||
</a>
|
||||
<meta property="position" content="0">
|
||||
</li>
|
||||
|
||||
|
||||
<li property="itemListElement" typeof="ListItem">
|
||||
<a href="en/" class="menu-item " property="item" typeof="WebPage">
|
||||
<span property="name">English</span>
|
||||
<a href="cs/" class="menu-item " property="item" typeof="WebPage">
|
||||
<span property="name">Česky</span>
|
||||
</a>
|
||||
<meta property="position" content="1">
|
||||
</li>
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
|
||||
|
||||
<span class="terminal-mkdocs-side-nav-item--active">O forku</span>
|
||||
<span class="terminal-mkdocs-side-nav-item--active">About the fork</span>
|
||||
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
|
||||
|
||||
<a class="terminal-mkdocs-side-nav-item" href="en/">English</a>
|
||||
<a class="terminal-mkdocs-side-nav-item" href="cs/">Česky</a>
|
||||
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
|
||||
|
||||
|
||||
<a class="terminal-mkdocs-side-nav-item" href="tth-commands/">Příkazy konzole · console commands</a>
|
||||
<a class="terminal-mkdocs-side-nav-item" href="tth-commands/">Console commands</a>
|
||||
|
||||
|
||||
</li>
|
||||
@@ -214,7 +214,7 @@
|
||||
|
||||
|
||||
|
||||
<a class="terminal-mkdocs-side-nav-item" href="ota/">Aktualizace od admina · OTA</a>
|
||||
<a class="terminal-mkdocs-side-nav-item" href="ota/">Firmware update by the admin (OTA)</a>
|
||||
|
||||
|
||||
</li>
|
||||
@@ -230,7 +230,7 @@
|
||||
|
||||
|
||||
|
||||
<a class="terminal-mkdocs-side-nav-item" href="power/">Napájení · power</a>
|
||||
<a class="terminal-mkdocs-side-nav-item" href="power/">Power saving</a>
|
||||
|
||||
|
||||
</li>
|
||||
@@ -246,7 +246,7 @@
|
||||
|
||||
|
||||
|
||||
<a class="terminal-mkdocs-side-nav-item" href="budka-sensor/">Budka jako senzor · Budka sensor</a>
|
||||
<a class="terminal-mkdocs-side-nav-item" href="budka-sensor/">Budka as a sensor</a>
|
||||
|
||||
|
||||
</li>
|
||||
@@ -262,7 +262,7 @@
|
||||
|
||||
|
||||
|
||||
<a class="terminal-mkdocs-side-nav-item" href="ble-lora-coexistence/">Koexistence BLE/LoRa</a>
|
||||
<a class="terminal-mkdocs-side-nav-item" href="ble-lora-coexistence/">BLE/LoRa coexistence</a>
|
||||
|
||||
|
||||
</li>
|
||||
@@ -532,321 +532,326 @@
|
||||
</nav><hr>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="#o-tomto-forku-meshcore-tth">O tomto forku (meshcore-tth)</a></li>
|
||||
<li><a href="#repeater-antispam-vsechno-vypinatelne-nic-z-toho-neni-v-upstreamu">Repeater: antispam (všechno vypínatelné, nic z toho není v upstreamu)</a></li><li><a href="#diagnostika-a-provoz">Diagnostika a provoz</a></li><li><a href="#opravy-jadra">Opravy jádra</a></li><li><a href="#napajeni-hodiny-gps">Napájení, hodiny, GPS</a></li><li><a href="#senzory-a-companiony">Senzory a companiony</a></li><li><a href="#verejne-buildy-vychozi-nastaveni-pro-cesky-mesh">Veřejné buildy: výchozí nastavení pro český mesh</a></li><li><a href="#nahrani-releasu">Nahrání releasu</a></li><li><a href="#experimentalni-aktualizace-firmwaru-od-admina-ota">Experimentální: aktualizace firmwaru od admina (*-ota)</a></li><li><a href="#sestaveni">Sestavení</a></li>
|
||||
<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="o-tomto-forku-meshcore-tth">O tomto forku (meshcore-tth)</h1>
|
||||
<p><em>English version <a href="en/">below</a> -- experimental
|
||||
firmware, not meant for regular users.</em></p>
|
||||
<h1 id="about-this-fork-meshcore-tth">About this fork (meshcore-tth)</h1>
|
||||
<p><em><a href="cs/">Česká verze</a>.</em></p>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Warning</p>
|
||||
<p><strong>Experimentální firmware – není určený pro běžné uživatele.</strong> Tenhle fork
|
||||
i všechny jeho releasy jsou osobní vývojová větev pro uzly jedné malé sítě:
|
||||
rolling release nad upstreamovou větví <code>dev</code>, sestavovaný automaticky
|
||||
zhruba dvakrát denně, bez stabilního kanálu, bez podpory a vyzkoušený jen
|
||||
na našich deskách. Může obsahovat chyby, které uzel vyřadí z provozu,
|
||||
a vrátit ho pak jde jen s USB nebo BLE v ruce. Pro běžný provoz nahrajte
|
||||
oficiální MeshCore (<a href="https://flasher.meshcore.io">flasher.meshcore.io</a>).</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>Fork projektu <a href="https://github.com/meshcore-dev/MeshCore">meshcore-dev/MeshCore</a>,
|
||||
na kterém běží repeatery, senzory a testovací desky malé české sítě na CZ
|
||||
meshi (869,432 MHz). Upstreamové větve <code>main</code> a <code>dev</code> se slučují automaticky
|
||||
dvakrát denně; všechno níže je navíc nad nimi. Náš kód je ve zdrojácích
|
||||
označený <code>CUSTOM (TeTeHacko)</code>. Nic z toho nemění protokol na rádiu.</p>
|
||||
<h2 id="repeater-antispam-vsechno-vypinatelne-nic-z-toho-neni-v-upstreamu">Repeater: antispam (všechno vypínatelné, nic z toho není v upstreamu)</h2>
|
||||
<p><strong>Po nahrání je zapnutý jen FairnessLimiter</strong>, s limity se zhruba
|
||||
dvojnásobnou rezervou nad 30 dní skutečného provozu CZ meshe: na kanál dávka
|
||||
100 zpráv a pak jedna za 30 s, na odesílatele 150 a jedna za 10 s, na
|
||||
původce advertu 30 a jeden za 10 min. Je to síť na utržené floody, ne kvóta;
|
||||
<code>fairness off</code> ho vypne natrvalo. Okno na adverty, filtry a dry-run jsou
|
||||
vypnuté, dokud je nezapnete.</p>
|
||||
<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 buckety na přeposílané floody podle 1bajtových
|
||||
identifikátorů, které jsou v paketu stejně v čitelné podobě (hash kanálu,
|
||||
hash odesílatele, původce advertu). Port návrhu Beanowa
|
||||
<a href="https://github.com/meshcore-dev/MeshCore/pull/1502">#1502</a>, limity
|
||||
přepočítané z 30 dní skutečného provozu CZ meshe.
|
||||
<code>fairness [on|off|grid|cap|refill]</code>; přímo směrovaný provoz se neomezuje nikdy.</li>
|
||||
<li><strong>Okno na adverty podle původce</strong> – flood advert každého uzlu se přepošle
|
||||
nejvýš jednou za N hodin (<code>fairness advert <h>|clear</code>), převzato
|
||||
z AdvertLimiteru <a href="https://github.com/Dutch-MeshCore/MeshCore">DutchMeshCore</a>.
|
||||
Míří na uzly, které advertují každou minutu.</li>
|
||||
<li><strong>Dry-run</strong> – <code>fairness dryrun on</code> započítá každý verdikt, ale přepošle
|
||||
i tak; <code>fairness air</code> ukáže ušetřený (nebo ušetřitelný) airtime podle důvodu.</li>
|
||||
<li><strong>Filtr kanálů</strong> – na kanálech, jejichž klíč repeater zná (Public
|
||||
a <code>#hashtag</code> kanály), přestane přeposílat zprávy uvedených jmen odesílatelů
|
||||
(<code>filter add|del|list</code>). Jméno se dá podvrhnout: je to brzda na utrženého
|
||||
bota, ne bezpečnost.</li>
|
||||
<li><strong>Blokace přeposílání podle hashe kanálu</strong> – <code>filter hash add <hex> [s]</code>:
|
||||
bez klíče, takže funguje i na soukromých kanálech; příjem se nemění, jen
|
||||
přeposílání. S <code>s</code> se kanál neodřízne, ale přiškrtí (jeden paket za <code>s</code>
|
||||
sekund).</li>
|
||||
<li><strong>Limit stáří zprávy</strong> – <code>filter age <min>|off</code> (volitelné, 1–10080 min):
|
||||
nepřeposílá skupinové zprávy na dešifrovaných kanálech, jejichž čas od
|
||||
odesílatele je starší; bez nastavených hodin repeateru neplatí. Posuzuje
|
||||
hodiny odesílatele, takže zahodí i companiony bez synchronizace času –
|
||||
nastavuj ho na dny.</li>
|
||||
<li><code>filter dryrun on</code> započítá každý verdikt <code>filter</code>, ale přepošle i tak.</li>
|
||||
<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="diagnostika-a-provoz">Diagnostika a provoz</h2>
|
||||
<p>Všechny příkazy forku, kde je který build má a výchozí hodnoty:
|
||||
<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 i senzor (všechno s textovou konzolí) mají:</p>
|
||||
<p>Repeater, room server and sensor (everything with a text console) have:</p>
|
||||
<ul>
|
||||
<li><strong>Watchdogy rádia.</strong> Hardwarový watchdog chytí jen zamrzlou smyčku; dva naše
|
||||
uzly ale byly nalezeny hluché s běžící smyčkou a pomohl až restart.</li>
|
||||
<li><code>set radio.silence <min></code> – <strong>hluchý přijímač</strong>: když se za <code><min></code> minut
|
||||
nepohne čítač přijatých rámců (počítá se i rámec s chybou CRC), uzel
|
||||
napřed znovu nahodí příjem, a když ani to nepomůže, restartuje se. Každý
|
||||
takový restart zdvojnásobí práh pro příští start (až 16×), první přijatý
|
||||
rámec ho vrátí, takže tiché místo neskončí ve smyčce restartů. Uloží se;
|
||||
<strong>ve výchozím stavu vypnutý</strong> (<code>0</code>) – práh volte s rezervou nad nejdelší
|
||||
běžné ticho na místě.</li>
|
||||
<li><strong>Zaseknuté vysílání</strong> (jen repeater): pakety čekají ve frontě a čítač
|
||||
odeslaných se nehýbe → znovu nahodí rádio, pak restart. Prázdná fronta se
|
||||
nepočítá. <strong>Zapnutý, 15 min</strong> (<code>RADIO_TXSTALL_MIN</code>); <code>set radio.txstall
|
||||
<min>|off</code> platí jen do restartu.</li>
|
||||
<li><code>get radio.reboots</code> – kolik restartů watchdogy udělaly (přežije i výpadek
|
||||
napájení); <code>get boot</code> – proč se deska naposledy resetovala a záznam
|
||||
o hardfaultu (vypíše se i při startu).</li>
|
||||
<li><code>dfu [uf2|serial|ota]</code> – spolehlivý reboot do bootloaderu (jen z lokální
|
||||
konzole); <code>i2c</code> – sken sběrnice.</li>
|
||||
<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>Repeater navíc:</p>
|
||||
<p>The repeater also has:</p>
|
||||
<ul>
|
||||
<li><code>blink</code> (rozbliká LED, i přes mesh – najdete uzel na stožáru), <code>txpwr</code>
|
||||
(vysílací výkon do restartu, s verdiktem RadioLibu), čítače chyb vysílání
|
||||
ve stavové odpovědi.</li>
|
||||
<li>Jen observer varianty (<code>*-observer</code>): textová konzole přes BLE vedle USB,
|
||||
<code>ble on|off</code> uložené přes reboot (<code>RPT_BLE_DEFAULT_OFF</code>: startuje vypnuté),
|
||||
vlastní BLE PIN (<code>ble pin</code>), uložený vysílací výkon spojení (<code>blepwr</code>),
|
||||
<code>bleconn</code>, neblokující BLE vysílání a parametry spojení, které vydrží i na
|
||||
slabém linku.</li>
|
||||
<li>Taky jen observer varianty: pasivní analyzátor v konzoli – <code>nodes</code>
|
||||
(slyšené repeatery a roomy, klíč pro spojení více cest), <code>rxlog</code> (každý
|
||||
slyšený rámec: typ, cesta, SNR, RSSI), <code>pktlog</code> (surové rámce pro feed
|
||||
observeru), velké stránkované odpovědi.</li>
|
||||
<li>Jen vlastní buildy, ne releasy:</li>
|
||||
<li>kanálový 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>, výběr přes <code>BOT_COMMANDS</code>, cooldown na
|
||||
odesílatele, ignore list) – odpovídá, aniž by přeposílal;</li>
|
||||
<li><code>RADIO_DIAG</code>: <code>radiostat</code> (stav přijímače SX1262 bez zásahu) a
|
||||
<code>radiokick rx|clrirq|standby|agc</code> (jeden krok obnovy, od nejjemnějšího –
|
||||
první, který pomůže, ukáže rozbitou vrstvu);</li>
|
||||
<li><code>PIN_DIAG</code>: <code>dio1</code> (stav přerušení v čipu proti úrovni na pinu – který
|
||||
konec mrtvé linky DIO1 je přerušený);</li>
|
||||
<li><code>LORA_POLL_IRQ</code>: provoz bez DIO1 pro desku s mrtvou linkou přerušení.</li>
|
||||
<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="opravy-jadra">Opravy jádra</h2>
|
||||
<h2 id="core-fixes">Core fixes</h2>
|
||||
<ul>
|
||||
<li><strong>Ochrana proti přehrání admin příkazů přežije reboot.</strong> Upstream si
|
||||
poslední timestamp klienta drží jen v RAM, takže po každém restartu projde
|
||||
libovolný zachycený příkaz znovu – zachycený <code>reboot</code> uzel restartuje
|
||||
pořád dokola. Repeater, room server i sensor ho teď zapíšou do flash dřív,
|
||||
než příkaz provedou (<code>/s_acl_ts0|1</code>, střídavě s kontrolním součtem, takže
|
||||
ho nesmaže ani výpadek napájení při zápisu). Timestamp víc než den před
|
||||
hodinami uzlu (<code>ACL_TS_MAX_AHEAD</code>) se přijme, ale neuloží, aby companion
|
||||
s rozhozenými hodinami nezamkl admina. Ukládá se jen u adminů: host smí
|
||||
jen číst a s prázdným guest heslem se jím stane kdokoli, takže by každý
|
||||
jeho dotaz znamenal zápis do flash. Klientů se to nijak netýká.</li>
|
||||
<li><strong>Hesla nejde hádat přes éter plnou rychlostí.</strong> Upstream kontroluje každý
|
||||
login bez omezení a na špatné heslo ani neodpoví. Po 4 špatných heslech
|
||||
během 3 minut (<code>LOGIN_FAIL_MAX</code>, <code>LOGIN_FAIL_SECS</code>) se hesla do konce okna
|
||||
nekontrolují. Klient, který už je v ACL jako admin, projde vždy – login
|
||||
jeho jménem nikdo jiný poslat nedokáže, takže útok adminy nezamkne.</li>
|
||||
<li><strong>Přehraný login bez hesla už nevyvolá flood odpověď.</strong> Login klienta z ACL
|
||||
s prázdným heslem neměl ochranu proti přehrání; útočník tím nic nezískal,
|
||||
ale každá kopie donutila uzel poslat odpověď floodem přes celý mesh.</li>
|
||||
<li>TRACE už nepřipisuje cestu za konec payloadu; parsování TRACE/PATH
|
||||
a <code>Packet::readFrom</code> hlídají meze.</li>
|
||||
<li><code>markSeen</code> je zase idempotentní (odesílací cesta ujídala okno deduplikace).</li>
|
||||
<li>Záložní výpočet v <code>calcMaxPacketMillis</code> už nepodteče (uzel na tom ohluchl).</li>
|
||||
<li>Šířka path hashe se bere z nastavení uzlu na všech cestách vysílání včetně
|
||||
<code>sendZeroHop</code>; výchozí jsou 2bajtové path hashe (<code>PATH_HASH_MODE_DEFAULT</code>).</li>
|
||||
<li>Nepovedené vysílání se zařadí znovu s odstupem, místo aby se zahodilo.</li>
|
||||
<li>RSSI každého paketu se zaznamená při příjmu; <code>ContactInfo</code> se před
|
||||
částečným vyplněním vynuluje.</li>
|
||||
<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="napajeni-hodiny-gps">Napájení, hodiny, GPS</h2>
|
||||
<h2 id="power-clock-gps">Power, clock, GPS</h2>
|
||||
<ul>
|
||||
<li>GPS duty cycle (<code>gps duty</code>), i na T1000-E, kde nebyl: přijímač běží jen
|
||||
kolem synchronizace hodin (jednou denně, po neúspěšném okně znovu za 6 h).
|
||||
Dotaz na polohu přijímač probudí pro příští dotaz.</li>
|
||||
<li>Uzel bez GPS startuje na čase sestavení firmwaru, ne v roce 2024; hodiny
|
||||
a záznam o hardfaultu přežijí teplý reset (<code>.noinit</code>); <code>clkreboot</code>.</li>
|
||||
<li>Na solárních uzlech žádná blikající LED a pomalejší BLE advertising.</li>
|
||||
<li>Stav baterie jako ikona na konci advertovaného jména: <code>set batt.icon on</code>,
|
||||
prahy <code>set batt.icon.lo|hi <mV></code> (výchozí vypnuté; dlouhé jméno ikonu
|
||||
nepojme a příkaz na to upozorní).</li>
|
||||
<li>Volitelný RX duty cycle (<code>set radio.rxps off|on|balanced|max</code>, jemněji
|
||||
<code>level <1-10></code>; port PowerSaving z EasySkyMesh): SX1262 mezi krátkými okny
|
||||
poslechu spí. Ve veřejných buildech je zabudovaný a <strong>vypnutý</strong>; <code>max</code> na
|
||||
lavici ušetřil ~2,3 mA bez ztráty paketů (<a href="https://git.rfa.cz/tth-pub/meshcore-tth/src/branch/main/power.md">docs/power.md</a>),
|
||||
na ostrém meshi ale jeden náš stožár ztratil 16 % příjmu – zapínat s rozmyslem. Jen
|
||||
SX1262, ne LR1110 (T1000-E).</li>
|
||||
<li>Podpěťová pojistka při startu (<code>PWRMGT_VOLTAGE_BOOTLOCK</code>) je na nRF52
|
||||
<strong>vypnutá</strong>, stejně jako v upstreamu od v1.18.0
|
||||
(<a href="https://github.com/meshcore-dev/MeshCore/pull/2377">#2377</a>): pevný práh
|
||||
3,3 V nepouštěl k životu uzly na LiFePO4 nebo LTO. Firmware tak naběhne na
|
||||
jakékoli chemii článku; před hlubokým vybitím má chránit BMS nebo ochranná
|
||||
destička článku. Konfigurovatelná pojistka podle chemie čeká na upstream
|
||||
(<a href="https://github.com/meshcore-dev/MeshCore/pull/2088">#2088</a>). Výjimkou je
|
||||
<code>SenseCap_Solar_repeater</code> (Li-ion, naše stožáry): pojistka je zapnutá
|
||||
a oba prahy jdou nastavit za běhu, i přes mesh jako admin –
|
||||
<code>set pwr.bootlock <mV>|off</code> (výchozí 3300, pod ním uzel nenaběhne a spí,
|
||||
dokud se článek nezotaví) a <code>set pwr.cutoff <mV>|off</code> (výchozí vypnuto,
|
||||
pod ním se běžící uzel vypne); <code>get pwr</code> (<a href="https://git.rfa.cz/tth-pub/meshcore-tth/src/branch/main/power.md">docs/power.md</a>).</li>
|
||||
<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="senzory-a-companiony">Senzory a companiony</h2>
|
||||
<h2 id="sensors-and-companions">Sensors and companions</h2>
|
||||
<ul>
|
||||
<li><code>simple_sensor</code>: telemetrie z externí stanice po UART
|
||||
(<code>BudkaLinkSensorManager</code>, jeden LPP kanál na veličinu), <code>sensor read</code>.</li>
|
||||
<li>Senzory, které jinak měří nepřetržitě (INA219, INA226, INA260, INA3221,
|
||||
BMP280), mezi čteními telemetrie spí a měří jen na vyžádání (nápad a první
|
||||
patch pro INA219: Alkel Brostl). Čipy INA se rozlišují podle ID, takže
|
||||
INA226 už se nedetekuje jako INA219. Odpor bočníku se nastavuje za běhu
|
||||
a ukládá se: <code>sensor set ina.shunt <mΩ></code>.</li>
|
||||
<li>Companion: <code>gps duty</code> přežije reboot, kopie data sestavení má hlídanou
|
||||
délku. Export privátního klíče, čtení BLE PINu a jeho změna (i přes CLI
|
||||
<code>set pin</code>) jdou jen přes spárované BLE, ne přes USB, UART ani WiFi/TCP,
|
||||
a odpověď s klíčem či PINem jde jen tam, odkud přišel dotaz. (Merge v1.17
|
||||
tu kontrolu potichu vyřadil; build bez BLE bere své jediné rozhraní dál
|
||||
jako důvěryhodné.) KISS modem: oprava o jedna vedle při zkracování jména.</li>
|
||||
<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="verejne-buildy-vychozi-nastaveni-pro-cesky-mesh">Veřejné buildy: výchozí nastavení pro český mesh</h2>
|
||||
<p>Releasy z tohoto repozitáře (<code>pub-release</code>) jsou přednastavené pro český
|
||||
mesh podle wiki <a href="https://meshcore.cz/">meshcore.cz</a>, takže čerstvě nahraný
|
||||
uzel nepotřebuje obvyklé kolečko nastavování:</p>
|
||||
<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>rádio 869,432 MHz / 62,5 kHz / SF7 / CR5 (všechny buildy);</li>
|
||||
<li>repeater a room server: zero-hop advert vypnutý, flood advert každých 25 h,
|
||||
duty cycle 10 % (<code>get dutycycle</code> → <code>10.0%</code>; zastaralé <code>af</code> je 9);</li>
|
||||
<li>repeater: regiony <code>cz</code> a <code>cs</code> vedle <code>*</code> – vlastní <code>cz-<kraj></code> přidáš přes
|
||||
<code>region put cz-xxx cz</code> + <code>region save</code>;</li>
|
||||
<li>2bajtové path hashe (výchozí v tomto forku);</li>
|
||||
<li>repeater: filtr kanálů (<code>filter add <jméno></code>) je zabudovaný pro Public,
|
||||
<code>#meshcore</code> a <code>#test</code>, s prázdným seznamem – nedělá nic, dokud do něj
|
||||
nepřidáš jméno.</li>
|
||||
<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>Platí jen pro uzel bez uloženého nastavení (nový nebo po <code>erase</code>): nové
|
||||
nahrání ponechá, co už uzel má, a regiony, které jsi smazal a uložil,
|
||||
zůstanou smazané. Jméno a admin heslo si nastav sám.</p>
|
||||
<p><strong>BLE PIN companionu je veřejný <code>123456</code></strong> (desky s displejem si losují
|
||||
vlastní a ukážou ho). Kdo se s ním spáruje, má companion celý: zprávy,
|
||||
kontakty, export privátního klíče. Po prvním spárování ho proto změň
|
||||
v aplikaci. A s deskou v ruce nechrání nic ani PIN, ani heslo: flash není
|
||||
zamčená a bootloader přijme jakýkoli firmware. Ztracený nebo ukradený uzel
|
||||
ber jako vyzrazený – u repeateru změň admin heslo všude, kde bylo stejné,
|
||||
a vyhoď jeho klíč z ACL; u companionu ber kanály, které na něm byly, jako
|
||||
známé.</p>
|
||||
<p>Varianty observer (<code>*_repeater-observer-*</code>) nRF52 repeaterů (XIAO, SenseCAP
|
||||
Solar, RAK4631, T1000-E, Heltec T114) přidávají buffery <code>nodes</code> / <code>rxlog</code> /
|
||||
<code>pktlog</code> a textovou konzoli přes BLE, aby šel repeater číst přes USB nebo BLE
|
||||
(<a href="https://git.rfa.cz/tth-pub/meshcore-repeater-observer">meshcore-repeater-observer</a>).
|
||||
BLE konzole je po nahrání <strong>vypnutá</strong> (<code>RPT_BLE_DEFAULT_OFF</code>). Nemá vlastní
|
||||
přihlášení, jen BLE PIN, a PIN v buildu je veřejný zástupný <code>123456</code>. Nejdřív
|
||||
si proto nastav vlastní – v USB konzoli, nebo jako admin přes mesh (vzdálené
|
||||
CLI v aplikaci): <code>ble pin <6 číslic></code> (uloží se a přežije reboot i nové
|
||||
nahrání; zároveň smaže všechny bondy, takže spárovaná zařízení se párují
|
||||
znovu). Teprve pak <code>ble on</code> – dokud je PIN zástupný, tyhle buildy ho odmítnou.
|
||||
<code>ble</code> ukáže, jestli je PIN <code>own</code> nebo <code>build default</code>, samotný PIN nikdy.
|
||||
Releasy do <code>tth-654d53f3</code> <code>ble pin</code> nemají: BLE tam nech vypnuté a používej USB.</p>
|
||||
<h2 id="nahrani-releasu">Nahrání releasu</h2>
|
||||
<p>Každý release je automatický build nad upstreamovým <code>dev</code> (viz upozornění
|
||||
nahoře), ne stabilní verze. Nahrávejte ho jen na uzly, na které dosáhnete,
|
||||
a nový release vždy nejdřív na jeden z nich.</p>
|
||||
<p>Soubory jsou v <a href="https://git.rfa.cz/tth-pub/meshcore-tth/releases">Releases</a>.
|
||||
Release se jmenuje podle upstreamové verze a data, např.
|
||||
<code>v1.18.0+tth.20261112</code> (druhý téhož dne <code>.2</code>), a v popisu má změny od
|
||||
předchozího releasu. Pro každou desku a roli je jedna sada
|
||||
(<code><deska>_<role>-<release></code>, např. <code>Xiao_nrf52_repeater-v1.18.0+tth.20261112.zip</code>):
|
||||
<code>.zip</code> a <code>.uf2</code> pro nRF52, <code>.bin</code> pro ESP32 (<code>-merged.bin</code> je celý obraz pro
|
||||
prázdnou desku, obyčejný <code>.bin</code> aktualizace). Kontrolní součty jsou
|
||||
v <code>SHA256SUMS</code>. Releasy do 12. 11. 2026 se jmenovaly <code>tth-<sha></code>.</p>
|
||||
<p><strong>nRF52 (XIAO, RAK4631, SenseCAP Solar, T1000-E, T114) přes
|
||||
<a href="https://flasher.meshcore.io">webový flasher MeshCore</a></strong> – Chrome, Edge nebo
|
||||
Chromium na počítači (Web Serial; ne Firefox ani Safari):</p>
|
||||
<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>Připoj desku přes USB.</li>
|
||||
<li>Klikni na <strong>Custom Firmware</strong> a vyber <code>.zip</code> pro svou desku.</li>
|
||||
<li>Klikni na <strong>Enter DFU mode</strong> a vyber sériový port desky. Deska se
|
||||
restartuje do bootloaderu a objeví se jako nový port.</li>
|
||||
<li>Klikni na <strong>Flash!</strong> a vyber ten nový port. Zhruba 30 s, pak se deska
|
||||
restartuje do nového firmwaru.</li>
|
||||
<li><strong>Console</strong> ve flasheru (nebo jakýkoli sériový terminál, 115200) ověří
|
||||
výsledek: <code>ver</code> ukáže <code>v1.xx.x-tth<sha></code>, stejně jako řádek „Verze v uzlu“
|
||||
v popisu releasu.</li>
|
||||
<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>Neklikej na Erase Flash</strong>, pokud nechceš nový uzel: smaže identitu (klíč
|
||||
uzlu a všechno, co ho zná) i veškeré nastavení. Obyčejné nahrání je zachová.</p>
|
||||
<p>Vyzkoušeno na XIAO (repeater-observer, 3. 11. 2026). ESP32 <code>.bin</code> přes stejné
|
||||
tlačítko Custom Firmware tu vyzkoušené není.</p>
|
||||
<p>Bez webového flasheru: na většině desek otevře dvojí stisk resetu bootloader
|
||||
jako USB disk; zkopíruj na něj <code>.uf2</code>. Nebo
|
||||
<code>adafruit-nrfutil dfu serial -pkg <soubor>.zip -p <port> -b 115200</code> s deskou
|
||||
v bootloaderu.</p>
|
||||
<p>Nový uzel po nahrání nastav v konzoli: <code>set name <jméno></code>,
|
||||
<code>password <admin heslo></code> (nejvýš 15 znaků), vlastní region přes
|
||||
<code>region put cz-<kraj> cz</code> + <code>region save</code>. Repeater přeposílá od prvního
|
||||
startu (výchozí v upstreamu) a tyhle buildy jsou na ostré CZ frekvenci: na
|
||||
stole bez antény dej <code>set repeat off</code>, dokud není na místě.</p>
|
||||
<h2 id="experimentalni-aktualizace-firmwaru-od-admina-ota">Experimentální: aktualizace firmwaru od admina (<code>*-ota</code>)</h2>
|
||||
<p>Každý nRF52 build s textovou konzolí (repeater, observer, room server,
|
||||
senzor) je v releasu ještě jednou jako <strong>experimentální</strong> <code>*-ota</code> /
|
||||
<code>*-observer-ota</code>. Ten umí přijmout nový firmware od admina příkazy <code>fw …</code>:
|
||||
v USB nebo BLE konzoli, nebo <strong>přes mesh jako vzdálené admin CLI</strong>. Bez změny
|
||||
bootloaderu a bez druhé banky: uzel si balíček uloží do volné flash,
|
||||
zkontroluje ho celý (podpis, hashe, nanečisto provedená delta) a přepíše se
|
||||
až na <code>fw apply</code>, rutinou běžící z RAM. Když během přepisu vypadne napájení,
|
||||
zůstane v bootloaderu a vrátí se přes USB/BLE DFU.</p>
|
||||
<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>V releasu je ke každému <code>*-ota</code> obrazu plný balíček
|
||||
<code><deska>_<role>-ota-<release>.mcfw</code> (jen přes USB/BLE) a delta
|
||||
<code>….from-<starší release>.mcfw</code> od každého drženého předchozího releasu,
|
||||
typicky jednotky kB.</li>
|
||||
<li><strong>Přes mesh uzel přijme jen deltu, a nikdy ne starší verzi, než má</strong> –
|
||||
vynucuje to uzel, ne nástroj. Plný obraz nebo návrat ke starší verzi jen
|
||||
lokálně (<code>fw apply downgrade</code>). <code>fw apply</code> čeká na baterii ≥ 3,8 V, pokud
|
||||
uzel neběží z USB.</li>
|
||||
<li>Balíčky i <code>SHA256SUMS</code> jsou podepsané klíčem <code>meshcore-ota@tth-pub</code>
|
||||
a <code>*-ota</code> obraz jiný podpis nepřijme. Ověření stažených souborů:
|
||||
<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>. Vlastní build s vlastním
|
||||
klíčem: <code>[ota] pubkey</code> v <code>platformio.local.ini</code>.</li>
|
||||
<li>První <code>*-ota</code> obraz se nahraje obyčejně (viz výše), další už jako delta.
|
||||
Nástroje: <code>tools/ota_push.py</code> (USB), <code>tools/ota_mesh_push.py</code> (přes mesh
|
||||
skrz companion; potřebuje pythonovou knihovnu <code>meshcore</code>, admin heslo bere
|
||||
z <code>[secrets] admin_pw</code> v <code>platformio.local.ini</code>; s <code>--side</code> jde přenos po
|
||||
vedlejším kanálu mimo sdílený mesh), <code>tools/ota_pack.py info</code>. Přenos samotný
|
||||
je OTA engine kolekce
|
||||
<a href="https://git.rfa.cz/tth-pub/meshcore-ansible">tth.meshcore</a> (modul
|
||||
<code>meshcore_fw_ota</code>), stejný kód pro nástroje i Ansible. Z telefonu: fork
|
||||
aplikace <a href="https://git.rfa.cz/tth-pub/meshcore-open">meshcore-open</a>, správa
|
||||
repeateru → Firmware update (OTA), deltu si najde v releasu sám.
|
||||
Postup a čísla: <a href="https://git.rfa.cz/tth-pub/meshcore-tth/src/branch/main/ota.md">docs/ota.md</a>.</li>
|
||||
<li><strong>Experimentální i v rámci tohoto forku</strong>: obrazy přicházejí s každým
|
||||
releasem (viz upozornění nahoře) a nemají druhou banku ani automatický
|
||||
návrat. Vadný firmware, který nabootuje, běží, dokud nepošlete další;
|
||||
takový, který nenabootuje, chce USB/BLE DFU v ruce. Vyzkoušeno na lavici
|
||||
(XIAO, USB, mesh, vedlejší kanál) a od 13. 11. 2026 na dvou našich
|
||||
stožárech. Proti obrazu, který nabootuje s mrtvým rádiem, jsou watchdogy
|
||||
rádia (viz Diagnostika a provoz): pro uzly, kam posíláte OTA, zapněte
|
||||
<code>set radio.silence</code>. Stojí ~10 kB RAM navíc.</li>
|
||||
-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="sestaveni">Sestavení</h2>
|
||||
<h2 id="build">Build</h2>
|
||||
<ul>
|
||||
<li>Razítko verze v každém nRF52 envu (<code>v1.18.0-tth<sha></code>, <code>+</code> = neuklizený
|
||||
strom), základní verze z upstreamového tagu (<code>tools/build_version.py</code>).</li>
|
||||
<li><code>tools/</code>: nástroje na uzly – konzole (USB, BLE), flashování, testy na
|
||||
lavici, diagnostika (<a href="https://git.rfa.cz/tth-pub/meshcore-tth/src/branch/main/tools/README.md">tools/README.md</a>). Desky podle jména
|
||||
bere z lokálního configu mimo repo (<code>tools/config.example.ini</code>).</li>
|
||||
<li><code>hardware/cavity-box</code>: parametrická krabička pro dutinový filtr na stožár.</li>
|
||||
<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>
|
||||
|
||||
Reference in new issue
Block a user