748 lines
25 KiB
HTML
748 lines
25 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/ota/"><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>Aktualizace od admina · OTA - 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="../en/" class="menu-item " 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">
|
|
|
|
|
|
|
|
|
|
|
|
<a class="terminal-mkdocs-side-nav-item" href="../en/">English</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">
|
|
|
|
|
|
|
|
<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">
|
|
|
|
|
|
<span class="terminal-mkdocs-side-nav-item--active">Aktualizace od admina · OTA</span>
|
|
|
|
</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="#admin-pushed-firmware-update-experimental-ota-images">Admin-pushed firmware update (experimental -ota images)</a></li>
|
|
<li><a href="#what-a-release-carries">What a release carries</a></li><li><a href="#on-the-node">On the node</a></li><li><a href="#when-an-update-goes-wrong">When an update goes wrong</a></li><li><a href="#tools">Tools</a></li><li><a href="#your-own-builds">Your own builds</a></li>
|
|
</ul>
|
|
</nav>
|
|
</aside>
|
|
<main id="terminal-mkdocs-main-content">
|
|
<section id="mkdocs-terminal-content">
|
|
<h1 id="admin-pushed-firmware-update-experimental-ota-images">Admin-pushed firmware update (experimental <code>-ota</code> images)</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>The <code>*-ota</code> and <code>*-observer-ota</code> images of this fork's releases can take a new
|
|
firmware from their admin -- over the USB or BLE console, or <strong>over the mesh,
|
|
as remote admin CLI</strong>. Nothing changes in the bootloader and there is no second
|
|
bank: the node stores the package in free flash, checks all of it, and only on
|
|
an explicit <code>fw apply</code> rewrites itself from a routine running in RAM.</p>
|
|
<p>The point is the <strong>delta</strong>: a package against the image the node runs is
|
|
usually a few kB, so it goes through LoRa in minutes. A full image (~300 kB)
|
|
goes only over USB or BLE.</p>
|
|
<p><strong>Rolling release on <code>dev</code>, for experienced users.</strong> These <code>-ota</code> images track
|
|
MeshCore <code>dev</code>, merged continuously, so a new release lands roughly twice a day
|
|
and each delta stays small. There is no stable channel, no second bank, and no
|
|
automatic rollback: a bad image that still boots keeps running until you push the
|
|
next one, and one that will not boot needs USB/BLE DFU in hand. Run it only on
|
|
nodes you can reach, and try every release on one within reach first.</p>
|
|
<h2 id="what-a-release-carries">What a release carries</h2>
|
|
<p>For every <code><board>_<role>-ota</code> / <code>-observer-ota</code> image:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>file</th>
|
|
<th>what</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code><image>-<release>.zip</code> / <code>.uf2</code></td>
|
|
<td>the image, flashed the usual way (first time)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><image>-<release>.mcfw</code></td>
|
|
<td>full package: USB/BLE console only</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><image>-<release>.from-<earlier>.mcfw</code></td>
|
|
<td>delta from an earlier release's same image</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>manifest.json</code></td>
|
|
<td>image sha256, target, build epoch, packages, deltas by base</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>SHA256SUMS</code>, <code>SHA256SUMS.sig</code></td>
|
|
<td>checksums, signed by <code>meshcore-ota@tth-pub</code></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Check a download:</p>
|
|
<pre><code>ssh-keygen -Y verify -f tools/ota_allowed_signers -I meshcore-ota@tth-pub \
|
|
-n meshcore-ota -s SHA256SUMS.sig < SHA256SUMS
|
|
sha256sum -c --ignore-missing SHA256SUMS
|
|
</code></pre>
|
|
<p><code>tools/ota_pack.py fetch <image> --base <sha8></code> does both and picks the delta
|
|
for the node's image (<code>--full</code> for the full package, <code>--release <tag></code> for
|
|
another than the latest).</p>
|
|
<h2 id="on-the-node">On the node</h2>
|
|
<div class="highlight"><pre><span></span><code>fw status state, battery, the running image's size and sha256 prefix
|
|
fw ver target and build epoch a package for this image needs
|
|
fw begin <bytes> [sid] start a transfer
|
|
fw w <offset> <base64> one 96 B chunk (text)
|
|
fw missing what is still missing
|
|
fw verify queue the full check, poll fw status
|
|
fw apply battery gate, then rewrite and reboot
|
|
fw apply downgrade local console only: an older (or the same) image
|
|
fw abort
|
|
</code></pre></div>
|
|
<p>What the node checks before it touches its own image:</p>
|
|
<ol>
|
|
<li>The <strong>manifest</strong>, as soon as it is in: an Ed25519 signature by the key the
|
|
image was built with (<code>[ota] pubkey</code>), the target (board + variant: an
|
|
<code>-observer-ota</code> node takes no <code>-ota</code> package), the size, for a delta the
|
|
base (the sha256 of the image it runs), and the build epoch.</li>
|
|
<li>Over the mesh: <strong>only a delta, and only a newer build.</strong> An older or equal
|
|
one is refused right after the manifest; a full image is refused when the
|
|
transfer begins. Locally a full image is fine, and an older one takes
|
|
<code>fw apply downgrade</code>.</li>
|
|
<li><code>fw verify</code>: the payload hash, and a delta applied <strong>dry</strong> -- the same code
|
|
the real run uses, with the flash untouched -- must produce the signed
|
|
image hash.</li>
|
|
<li><code>fw apply</code>: battery at 3.8 V or more unless the node runs on USB. The
|
|
bootloader settings get the new image's CRC <strong>first</strong>, so a power cut during
|
|
the rewrite leaves the node in the bootloader (back with USB/BLE DFU), not
|
|
in half an image.</li>
|
|
</ol>
|
|
<h2 id="when-an-update-goes-wrong">When an update goes wrong</h2>
|
|
<p>No second bank, no automatic rollback. The checks above stop a <em>corrupt</em> package,
|
|
but firmware that passes them and still boots into a broken state keeps running.
|
|
Two watchdogs catch that. The deaf-receiver one is <strong>off by default</strong> -- turn it
|
|
on for nodes you push to; the TX stall one is on in repeaters:</p>
|
|
<pre><code>set radio.silence <min> re-arm the receiver, then reboot, if it hears nothing
|
|
for <min> (persisted, off by default); catches an OTA
|
|
that boots with a dead radio
|
|
set radio.txstall <min> the same when the TX queue stalls (repeater only, on
|
|
at 15 min by default, a change holds until reboot)
|
|
get radio.reboots watchdog reboots so far (survives power loss)
|
|
get boot why the board last reset, plus the hardfault record
|
|
</code></pre>
|
|
<p>Details: <code>docs/cli_commands.md</code>, "Radio silence watchdog" and "TX stall watchdog".</p>
|
|
<p>A node that will not boot at all has to be reflashed over USB/BLE DFU. After an
|
|
<code>fw apply</code> over <strong>BLE</strong> the bond can drop (a supervision timeout while the node
|
|
reboots) -- re-pair from the same host; it is not a brick.</p>
|
|
<h2 id="tools">Tools</h2>
|
|
<div class="highlight"><pre><span></span><code><span class="c1"># a delta for the node's image, from the latest release</span>
|
|
tools/ota_pack.py<span class="w"> </span>fetch<span class="w"> </span>Xiao_nrf52_repeater-ota<span class="w"> </span>--base<span class="w"> </span><sha8<span class="w"> </span>from<span class="w"> </span>fw<span class="w"> </span>status>
|
|
|
|
<span class="c1"># over the mesh, through a companion (USB port or tcp://host:port), as admin</span>
|
|
tools/ota_mesh_push.py<span class="w"> </span>/dev/serial/by-id/<companion><span class="w"> </span><node<span class="w"> </span>pubkey<span class="w"> </span>prefix><span class="w"> </span>pkg.mcfw<span class="w"> </span>--apply
|
|
|
|
<span class="c1"># over the node's own USB console</span>
|
|
tools/ota_push.py<span class="w"> </span>/dev/serial/by-id/<node><span class="w"> </span>pkg.mcfw<span class="w"> </span>--apply
|
|
</code></pre></div>
|
|
<h3 id="from-a-phone">From a phone</h3>
|
|
<p>The <a href="https://git.rfa.cz/tth-pub/meshcore-open">tth fork of meshcore-open</a>
|
|
(Android, Obtainium) has it in the repeater management of an admin: Firmware
|
|
update (OTA). With no file chosen it reads the node's target and image and
|
|
takes the delta from the latest release (checked against <code>SHA256SUMS</code>); the
|
|
side channel below is a switch there.</p>
|
|
<h3 id="off-the-shared-channel-side">Off the shared channel: <code>--side</code></h3>
|
|
<pre><code>tools/ota_mesh_push.py <companion> <node> pkg.mcfw --apply \
|
|
--side 869.525,62.5,7,5 --duty 10 --gap 1
|
|
</code></pre>
|
|
<p>Login, <code>fw status</code> and <code>get radio</code> still go over the mesh; then the node gets
|
|
<code>tempradio <side>,3</code>, the companion retunes to the same preset, logs in again
|
|
zero-hop, and the chunks go there. The window grows to <code>--window</code> (15 min) once
|
|
the link is proven and is renewed while the transfer runs. The node comes back
|
|
by itself when the window runs out, on <code>fw apply</code> (the reboot), or when the
|
|
tool sends it back with <code>tempradio <its preset>,1</code>. Nothing new in the firmware:
|
|
any node with <code>tempradio</code> takes it.</p>
|
|
<ul>
|
|
<li>The companion must be in <strong>direct</strong> range of the node, and it must be a
|
|
companion <strong>firmware</strong> that retunes its own radio. An openHop virtual
|
|
companion answers <code>set_radio</code> with OK and stays put; the tool checks that
|
|
and stops, and the node returns within 3 minutes.</li>
|
|
<li>The companion's preset is put back at the end -- unless the tool is killed
|
|
hard; then <code>set_radio</code> it back yourself.</li>
|
|
<li>The example preset sits inside 869.4-869.65 MHz (10 % duty) between the CZ
|
|
mesh (869.432/62.5) and EU Narrow (869.618/62.5). The node keeps its TX
|
|
power on the side channel: pick a band where that power is allowed.</li>
|
|
</ul>
|
|
<p>The transfer in both tools is the OTA engine of the
|
|
<a href="https://git.rfa.cz/tth-pub/meshcore-ansible">tth.meshcore Ansible collection</a>
|
|
(<code>plugins/module_utils/meshcore_ota_engine.py</code>) -- its <code>meshcore_fw_ota</code> module
|
|
runs the same code, so a fix lands everywhere at once. The tools need only its
|
|
files, not Ansible: an installed collection
|
|
(<code>ansible-galaxy collection install git+https://git.rfa.cz/tth-pub/meshcore-ansible.git</code>),
|
|
a checkout named by <code>MESHCORE_ANSIBLE</code>, or one next to this repository
|
|
(<code>tools/ota_collection.py</code> prints which one it uses).</p>
|
|
<p><code>ota_mesh_push.py</code> needs the <code>meshcore</code> Python library. It logs in as admin
|
|
(password from <code>[secrets] admin_pw</code> of <code>platformio.local.ini</code>, or asked for),
|
|
sends binary chunks with a pause between them, asks which are missing and
|
|
resends only those, and keeps an airtime budget (<code>--duty</code>, default 1 % per
|
|
hour: the 865-868 MHz band). A refused package costs the two manifest chunks,
|
|
not the whole transfer. Check <code>get radio</code> on both ends first: this transmits.</p>
|
|
<h2 id="your-own-builds">Your own builds</h2>
|
|
<p>A build with <code>-D FW_OTA=1</code> trusts <code>[ota] pubkey</code> of <code>platformio.ini</code> -- the
|
|
release key. To sign your own packages, set your key in the gitignored
|
|
<code>platformio.local.ini</code>:</p>
|
|
<div class="highlight"><pre><span></span><code><span class="k">[ota]</span>
|
|
<span class="na">pubkey</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s"><tools/ota_pack.py pubkey --key your.key></span>
|
|
</code></pre></div>
|
|
<p>and pack with <code>tools/ota_pack.py pack|diff <env> --key your.key</code>. Target and
|
|
build epoch come from the ELF, never from the command line. Keep every image
|
|
you flash: a delta needs the exact bytes the node runs as its base.</p>
|
|
<p>Cost: about 10 kB of RAM on a repeater, the applier code in RAM, a 32 kB
|
|
buffer while a full package is verified or applied. Classic images (without
|
|
<code>-ota</code>) have none of it.</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> |