Files
meshcore-tth/ota/index.html
T

1466 lines
38 KiB
HTML

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<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="prev" href="../tth-commands/">
<link rel="next" href="../power/">
<link rel="icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.8.2">
<title>Aktualizace od admina · OTA - MeshCore TTH</title>
<link rel="stylesheet" href="../assets/stylesheets/main.57a0d79d.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.fb2fffe2.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<link rel="stylesheet" href="../_stylesheets/extra.css">
<script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
</head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#admin-pushed-firmware-update-experimental-ota-images" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href=".." title="MeshCore TTH" class="md-header__button md-logo" aria-label="MeshCore TTH" data-md-component="logo">
<img src="../_assets/meshcore.svg" alt="logo">
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
MeshCore TTH
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Aktualizace od admina · OTA
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Tmavý režim · dark mode" type="radio" name="__palette" id="__palette_0">
<label class="md-header__button md-icon" title="Tmavý režim · dark mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m17.75 4.09-2.53 1.94.91 3.06-2.63-1.81-2.63 1.81.91-3.06-2.53-1.94L12.44 4l1.06-3 1.06 3zm3.5 6.91-1.64 1.25.59 1.98-1.7-1.17-1.7 1.17.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95zm-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14.4-.4.82-.76 1.27-1.08.75-.53 1.93.36 1.85 1.19-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82-2.81 3.14-2.7 7.96.31 10.98 3.02 3.01 7.84 3.12 10.98.31"/></svg>
</label>
<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Světlý režim · light mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Světlý režim · light mode" for="__palette_0" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3m0-7 2.39 3.42C13.65 5.15 12.84 5 12 5s-1.65.15-2.39.42zM3.34 7l4.16-.35A7.2 7.2 0 0 0 5.94 8.5c-.44.74-.69 1.5-.83 2.29zm.02 10 1.76-3.77a7.131 7.131 0 0 0 2.38 4.14zM20.65 7l-1.77 3.79a7.02 7.02 0 0 0-2.38-4.15zm-.01 10-4.14.36c.59-.51 1.12-1.14 1.54-1.86.42-.73.69-1.5.83-2.29zM12 22l-2.41-3.44c.74.27 1.55.44 2.41.44.82 0 1.63-.17 2.37-.44z"/></svg>
</label>
</form>
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
</button>
</nav>
<div class="md-search__suggest" data-md-component="search-suggest"></div>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://git.rfa.cz/tth-pub/meshcore-tth" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
</div>
<div class="md-source__repository">
tth-pub/meshcore-tth
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href=".." title="MeshCore TTH" class="md-nav__button md-logo" aria-label="MeshCore TTH" data-md-component="logo">
<img src="../_assets/meshcore.svg" alt="logo">
</a>
MeshCore TTH
</label>
<div class="md-nav__source">
<a href="https://git.rfa.cz/tth-pub/meshcore-tth" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
</div>
<div class="md-source__repository">
tth-pub/meshcore-tth
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1" checked>
<label class="md-nav__link" for="__nav_1" id="__nav_1_label" tabindex="">
<span class="md-ellipsis">
Fork meshcore-tth
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_1_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_1">
<span class="md-nav__icon md-icon"></span>
Fork meshcore-tth
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href=".." class="md-nav__link">
<span class="md-ellipsis">
O forku (česky)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../en/" class="md-nav__link">
<span class="md-ellipsis">
About the fork (English)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../tth-commands/" class="md-nav__link">
<span class="md-ellipsis">
Příkazy konzole · console commands
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
<span class="md-ellipsis">
Aktualizace od admina · OTA
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
Aktualizace od admina · OTA
</span>
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#what-a-release-carries" class="md-nav__link">
<span class="md-ellipsis">
What a release carries
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#on-the-node" class="md-nav__link">
<span class="md-ellipsis">
On the node
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#when-an-update-goes-wrong" class="md-nav__link">
<span class="md-ellipsis">
When an update goes wrong
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#tools" class="md-nav__link">
<span class="md-ellipsis">
Tools
</span>
</a>
<nav class="md-nav" aria-label="Tools">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#from-a-phone" class="md-nav__link">
<span class="md-ellipsis">
From a phone
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#off-the-shared-channel-side" class="md-nav__link">
<span class="md-ellipsis">
Off the shared channel: --side
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#your-own-builds" class="md-nav__link">
<span class="md-ellipsis">
Your own builds
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../power/" class="md-nav__link">
<span class="md-ellipsis">
Napájení · power
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../budka-sensor/" class="md-nav__link">
<span class="md-ellipsis">
Budka jako senzor · Budka sensor
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../ble-lora-coexistence/" class="md-nav__link">
<span class="md-ellipsis">
Koexistence BLE/LoRa
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" >
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="">
<span class="md-ellipsis">
MeshCore (upstream)
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2">
<span class="md-nav__icon md-icon"></span>
MeshCore (upstream)
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../meshcore/" class="md-nav__link">
<span class="md-ellipsis">
Introduction
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../faq/" class="md-nav__link">
<span class="md-ellipsis">
FAQ
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../cli_commands/" class="md-nav__link">
<span class="md-ellipsis">
CLI commands
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../companion_cli/" class="md-nav__link">
<span class="md-ellipsis">
Companion CLI
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../companion_protocol/" class="md-nav__link">
<span class="md-ellipsis">
Companion protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../terminal_chat_cli/" class="md-nav__link">
<span class="md-ellipsis">
Terminal chat CLI
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
KISS modem protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../packet_format/" class="md-nav__link">
<span class="md-ellipsis">
Packet format
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../payloads/" class="md-nav__link">
<span class="md-ellipsis">
Payloads
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../stats_binary_frames/" class="md-nav__link">
<span class="md-ellipsis">
Stats binary frames
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../number_allocations/" class="md-nav__link">
<span class="md-ellipsis">
Number allocations
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../qr_codes/" class="md-nav__link">
<span class="md-ellipsis">
QR codes
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../radio_presets/" class="md-nav__link">
<span class="md-ellipsis">
Radio presets
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../nrf52_power_management/" class="md-nav__link">
<span class="md-ellipsis">
nRF52 power management
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#what-a-release-carries" class="md-nav__link">
<span class="md-ellipsis">
What a release carries
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#on-the-node" class="md-nav__link">
<span class="md-ellipsis">
On the node
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#when-an-update-goes-wrong" class="md-nav__link">
<span class="md-ellipsis">
When an update goes wrong
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#tools" class="md-nav__link">
<span class="md-ellipsis">
Tools
</span>
</a>
<nav class="md-nav" aria-label="Tools">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#from-a-phone" class="md-nav__link">
<span class="md-ellipsis">
From a phone
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#off-the-shared-channel-side" class="md-nav__link">
<span class="md-ellipsis">
Off the shared channel: --side
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#your-own-builds" class="md-nav__link">
<span class="md-ellipsis">
Your own builds
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<a href="https://git.rfa.cz/tth-pub/meshcore-tth/src/branch/main/docs/ota.md" title="View source of this page" class="md-content__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 18c.56 0 1 .44 1 1s-.44 1-1 1-1-.44-1-1 .44-1 1-1m0-3c-2.73 0-5.06 1.66-6 4 .94 2.34 3.27 4 6 4s5.06-1.66 6-4c-.94-2.34-3.27-4-6-4m0 6.5a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5M9.27 20H6V4h7v5h5v4.07c.7.08 1.36.25 2 .49V8l-6-6H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4.5a8.2 8.2 0 0 1-1.23-2"/></svg>
</a>
<h1 id="admin-pushed-firmware-update-experimental-ota-images">Admin-pushed firmware update (experimental <code>-ota</code> images)<a class="headerlink" href="#admin-pushed-firmware-update-experimental-ota-images" title="Permanent link">&para;</a></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<a class="headerlink" href="#what-a-release-carries" title="Permanent link">&para;</a></h2>
<p>For every <code>&lt;board&gt;_&lt;role&gt;-ota</code> / <code>-observer-ota</code> image:</p>
<table>
<thead>
<tr>
<th>file</th>
<th>what</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>&lt;image&gt;-&lt;release&gt;.zip</code> / <code>.uf2</code></td>
<td>the image, flashed the usual way (first time)</td>
</tr>
<tr>
<td><code>&lt;image&gt;-&lt;release&gt;.mcfw</code></td>
<td>full package: USB/BLE console only</td>
</tr>
<tr>
<td><code>&lt;image&gt;-&lt;release&gt;.from-&lt;earlier&gt;.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 &lt; SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS
</code></pre>
<p><code>tools/ota_pack.py fetch &lt;image&gt; --base &lt;sha8&gt;</code> does both and picks the delta
for the node's image (<code>--full</code> for the full package, <code>--release &lt;tag&gt;</code> for
another than the latest).</p>
<h2 id="on-the-node">On the node<a class="headerlink" href="#on-the-node" title="Permanent link">&para;</a></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 &lt;bytes&gt; [sid] start a transfer
fw w &lt;offset&gt; &lt;base64&gt; 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<a class="headerlink" href="#when-an-update-goes-wrong" title="Permanent link">&para;</a></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 &lt;min&gt; re-arm the receiver, then reboot, if it hears nothing
for &lt;min&gt; (persisted, off by default); catches an OTA
that boots with a dead radio
set radio.txstall &lt;min&gt; 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<a class="headerlink" href="#tools" title="Permanent link">&para;</a></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>&lt;sha8<span class="w"> </span>from<span class="w"> </span>fw<span class="w"> </span>status&gt;
<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/&lt;companion&gt;<span class="w"> </span>&lt;node<span class="w"> </span>pubkey<span class="w"> </span>prefix&gt;<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/&lt;node&gt;<span class="w"> </span>pkg.mcfw<span class="w"> </span>--apply
</code></pre></div>
<h3 id="from-a-phone">From a phone<a class="headerlink" href="#from-a-phone" title="Permanent link">&para;</a></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><a class="headerlink" href="#off-the-shared-channel-side" title="Permanent link">&para;</a></h3>
<pre><code>tools/ota_mesh_push.py &lt;companion&gt; &lt;node&gt; 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 &lt;side&gt;,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 &lt;its preset&gt;,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<a class="headerlink" href="#your-own-builds" title="Permanent link">&para;</a></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">&lt;tools/ota_pack.py pubkey --key your.key&gt;</span>
</code></pre></div>
<p>and pack with <code>tools/ota_pack.py pack|diff &lt;env&gt; --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>
</article>
</div>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
<button type="button" class="md-top md-icon" data-md-component="top" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
Back to top
</button>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["content.action.view", "content.code.copy", "navigation.sections", "navigation.top", "search.highlight", "search.suggest", "toc.follow"], "search": "../assets/javascripts/workers/search.a7633da7.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
<script src="../assets/javascripts/bundle.a5f9d56c.min.js"></script>
</body>
</html>