Files
meshcore-tth/payloads/index.html
T

2713 lines
55 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/payloads/">
<link rel="prev" href="../packet_format/">
<link rel="next" href="../stats_binary_frames/">
<link rel="icon" href="../_assets/meshcore-tth.svg">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.8.2">
<title>Payloads - 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="stylesheet" href="../_stylesheets/extra.css">
<link rel="stylesheet" href="../_stylesheets/tth.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="slate" data-md-color-primary="custom" data-md-color-accent="custom">
<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="#payload-format" 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-tth.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">
Payloads
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="custom" data-md-color-accent="custom" aria-label="Světlý režim · light mode" type="radio" name="__palette" id="__palette_0">
<label class="md-header__button md-icon" title="Světlý režim · light mode" for="__palette_1" 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>
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="custom" data-md-color-accent="custom" aria-label="Tmavý režim · dark mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Tmavý režim · dark mode" for="__palette_0" 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>
</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-tth.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--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1" >
<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="false">
<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">
<a href="../ota/" class="md-nav__link">
<span class="md-ellipsis">
Aktualizace od admina · OTA
</span>
</a>
</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--active md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" checked>
<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="true">
<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 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">
Payloads
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
Payloads
</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="#important-concepts" class="md-nav__link">
<span class="md-ellipsis">
Important concepts:
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#node-advertisement" class="md-nav__link">
<span class="md-ellipsis">
Node advertisement
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#acknowledgement" class="md-nav__link">
<span class="md-ellipsis">
Acknowledgement
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#returned-path-request-response-and-plain-text-message" class="md-nav__link">
<span class="md-ellipsis">
Returned path, request, response, and plain text message
</span>
</a>
<nav class="md-nav" aria-label="Returned path, request, response, and plain text message">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#returned-path" class="md-nav__link">
<span class="md-ellipsis">
Returned path
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#request" class="md-nav__link">
<span class="md-ellipsis">
Request
</span>
</a>
<nav class="md-nav" aria-label="Request">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#get-stats" class="md-nav__link">
<span class="md-ellipsis">
Get stats
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#get-telemetry" class="md-nav__link">
<span class="md-ellipsis">
Get Telemetry
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#get-minmaxave-sensor-nodes" class="md-nav__link">
<span class="md-ellipsis">
Get Min/Max/Ave (Sensor nodes)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#subscribe-to-telemetry-push-sensor-nodes" class="md-nav__link">
<span class="md-ellipsis">
Subscribe to Telemetry push - (Sensor nodes)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unsubscribe-from-telemetry-push-sensor-nodes" class="md-nav__link">
<span class="md-ellipsis">
Unsubscribe from Telemetry push - (Sensor nodes)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#get-access-list" class="md-nav__link">
<span class="md-ellipsis">
Get Access List
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#get-neighbors" class="md-nav__link">
<span class="md-ellipsis">
Get Neighbors
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#get-owner-info" class="md-nav__link">
<span class="md-ellipsis">
Get Owner Info
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#response" class="md-nav__link">
<span class="md-ellipsis">
Response
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#plain-text-message" class="md-nav__link">
<span class="md-ellipsis">
Plain text message
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#anonymous-request" class="md-nav__link">
<span class="md-ellipsis">
Anonymous request
</span>
</a>
<nav class="md-nav" aria-label="Anonymous request">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#room-server-login" class="md-nav__link">
<span class="md-ellipsis">
Room server login
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#repeatersensor-login" class="md-nav__link">
<span class="md-ellipsis">
Repeater/Sensor login
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#repeater-regions-request" class="md-nav__link">
<span class="md-ellipsis">
Repeater - Regions request
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#repeater-owner-info-request" class="md-nav__link">
<span class="md-ellipsis">
Repeater - Owner info request
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#repeater-clock-and-status-request" class="md-nav__link">
<span class="md-ellipsis">
Repeater - Clock and status request
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#group-text-message" class="md-nav__link">
<span class="md-ellipsis">
Group text message
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#group-datagram" class="md-nav__link">
<span class="md-ellipsis">
Group datagram
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#control-data" class="md-nav__link">
<span class="md-ellipsis">
Control data
</span>
</a>
<nav class="md-nav" aria-label="Control data">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#discover_req-sub_type" class="md-nav__link">
<span class="md-ellipsis">
DISCOVER_REQ (sub_type)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#discover_resp-sub_type" class="md-nav__link">
<span class="md-ellipsis">
DISCOVER_RESP (sub_type)
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#custom-packet" class="md-nav__link">
<span class="md-ellipsis">
Custom packet
</span>
</a>
</li>
</ul>
</nav>
</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="#important-concepts" class="md-nav__link">
<span class="md-ellipsis">
Important concepts:
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#node-advertisement" class="md-nav__link">
<span class="md-ellipsis">
Node advertisement
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#acknowledgement" class="md-nav__link">
<span class="md-ellipsis">
Acknowledgement
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#returned-path-request-response-and-plain-text-message" class="md-nav__link">
<span class="md-ellipsis">
Returned path, request, response, and plain text message
</span>
</a>
<nav class="md-nav" aria-label="Returned path, request, response, and plain text message">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#returned-path" class="md-nav__link">
<span class="md-ellipsis">
Returned path
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#request" class="md-nav__link">
<span class="md-ellipsis">
Request
</span>
</a>
<nav class="md-nav" aria-label="Request">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#get-stats" class="md-nav__link">
<span class="md-ellipsis">
Get stats
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#get-telemetry" class="md-nav__link">
<span class="md-ellipsis">
Get Telemetry
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#get-minmaxave-sensor-nodes" class="md-nav__link">
<span class="md-ellipsis">
Get Min/Max/Ave (Sensor nodes)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#subscribe-to-telemetry-push-sensor-nodes" class="md-nav__link">
<span class="md-ellipsis">
Subscribe to Telemetry push - (Sensor nodes)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unsubscribe-from-telemetry-push-sensor-nodes" class="md-nav__link">
<span class="md-ellipsis">
Unsubscribe from Telemetry push - (Sensor nodes)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#get-access-list" class="md-nav__link">
<span class="md-ellipsis">
Get Access List
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#get-neighbors" class="md-nav__link">
<span class="md-ellipsis">
Get Neighbors
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#get-owner-info" class="md-nav__link">
<span class="md-ellipsis">
Get Owner Info
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#response" class="md-nav__link">
<span class="md-ellipsis">
Response
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#plain-text-message" class="md-nav__link">
<span class="md-ellipsis">
Plain text message
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#anonymous-request" class="md-nav__link">
<span class="md-ellipsis">
Anonymous request
</span>
</a>
<nav class="md-nav" aria-label="Anonymous request">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#room-server-login" class="md-nav__link">
<span class="md-ellipsis">
Room server login
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#repeatersensor-login" class="md-nav__link">
<span class="md-ellipsis">
Repeater/Sensor login
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#repeater-regions-request" class="md-nav__link">
<span class="md-ellipsis">
Repeater - Regions request
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#repeater-owner-info-request" class="md-nav__link">
<span class="md-ellipsis">
Repeater - Owner info request
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#repeater-clock-and-status-request" class="md-nav__link">
<span class="md-ellipsis">
Repeater - Clock and status request
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#group-text-message" class="md-nav__link">
<span class="md-ellipsis">
Group text message
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#group-datagram" class="md-nav__link">
<span class="md-ellipsis">
Group datagram
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#control-data" class="md-nav__link">
<span class="md-ellipsis">
Control data
</span>
</a>
<nav class="md-nav" aria-label="Control data">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#discover_req-sub_type" class="md-nav__link">
<span class="md-ellipsis">
DISCOVER_REQ (sub_type)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#discover_resp-sub_type" class="md-nav__link">
<span class="md-ellipsis">
DISCOVER_RESP (sub_type)
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#custom-packet" class="md-nav__link">
<span class="md-ellipsis">
Custom packet
</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/payloads.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="payload-format">Payload Format<a class="headerlink" href="#payload-format" title="Permanent link">&para;</a></h1>
<p>Inside each <a href="../packet_format/">MeshCore Packet</a> is a payload, identified by the payload type in the packet header. The types of payloads are:</p>
<ul>
<li>Node advertisement.</li>
<li>Acknowledgment.</li>
<li>Returned path.</li>
<li>Request (destination/source hashes + MAC).</li>
<li>Response to REQ or ANON_REQ.</li>
<li>Plain text message.</li>
<li>Anonymous request.</li>
<li>Group text message (unverified).</li>
<li>Group datagram (unverified).</li>
<li>Multi-part packet</li>
<li>Control data packet</li>
<li>Custom packet (raw bytes, custom encryption).</li>
</ul>
<p>This document defines the structure of each of these payload types.</p>
<p>NOTE: all 16 and 32-bit integer fields are Little Endian.</p>
<h2 id="important-concepts">Important concepts:<a class="headerlink" href="#important-concepts" title="Permanent link">&para;</a></h2>
<ul>
<li>Node hash: the first byte of the node's public key</li>
</ul>
<h2 id="node-advertisement">Node advertisement<a class="headerlink" href="#node-advertisement" title="Permanent link">&para;</a></h2>
<p>This kind of payload notifies receivers that a node exists, and gives information about the node</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>public key</td>
<td>32</td>
<td>Ed25519 public key of the node</td>
</tr>
<tr>
<td>timestamp</td>
<td>4</td>
<td>unix timestamp of advertisement</td>
</tr>
<tr>
<td>signature</td>
<td>64</td>
<td>Ed25519 signature of public key, timestamp, and app data</td>
</tr>
<tr>
<td>appdata</td>
<td>rest of payload</td>
<td>optional, see below</td>
</tr>
</tbody>
</table>
<p>Appdata</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>flags</td>
<td>1</td>
<td>specifies which of the fields are present, see below</td>
</tr>
<tr>
<td>latitude</td>
<td>4 (optional)</td>
<td>decimal latitude multiplied by 1000000, integer</td>
</tr>
<tr>
<td>longitude</td>
<td>4 (optional)</td>
<td>decimal longitude multiplied by 1000000, integer</td>
</tr>
<tr>
<td>feature 1</td>
<td>2 (optional)</td>
<td>reserved for future use</td>
</tr>
<tr>
<td>feature 2</td>
<td>2 (optional)</td>
<td>reserved for future use</td>
</tr>
<tr>
<td>name</td>
<td>rest of appdata</td>
<td>name of the node</td>
</tr>
</tbody>
</table>
<p>Appdata Flags</p>
<table>
<thead>
<tr>
<th>Value</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>0x01</code></td>
<td>is chat node</td>
<td>advert is for a chat node</td>
</tr>
<tr>
<td><code>0x02</code></td>
<td>is repeater</td>
<td>advert is for a repeater</td>
</tr>
<tr>
<td><code>0x03</code></td>
<td>is room server</td>
<td>advert is for a room server</td>
</tr>
<tr>
<td><code>0x04</code></td>
<td>is sensor</td>
<td>advert is for a sensor server</td>
</tr>
<tr>
<td><code>0x10</code></td>
<td>has location</td>
<td>appdata contains lat/long information</td>
</tr>
<tr>
<td><code>0x20</code></td>
<td>has feature 1</td>
<td>Reserved for future use.</td>
</tr>
<tr>
<td><code>0x40</code></td>
<td>has feature 2</td>
<td>Reserved for future use.</td>
</tr>
<tr>
<td><code>0x80</code></td>
<td>has name</td>
<td>appdata contains a node name</td>
</tr>
</tbody>
</table>
<h2 id="acknowledgement">Acknowledgement<a class="headerlink" href="#acknowledgement" title="Permanent link">&para;</a></h2>
<p>An acknowledgement that a message was received. Note that for returned path messages, an acknowledgement can be sent in the "extra" payload (see <a href="#returned-path">Returned Path</a>) instead of as a separate acknowledgement packet. CLI commands do not cause acknowledgement responses, neither discrete nor extra.</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>checksum</td>
<td>4</td>
<td>CRC checksum of message timestamp, text, and sender pubkey</td>
</tr>
</tbody>
</table>
<h2 id="returned-path-request-response-and-plain-text-message">Returned path, request, response, and plain text message<a class="headerlink" href="#returned-path-request-response-and-plain-text-message" title="Permanent link">&para;</a></h2>
<p>Returned path, request, response, and plain text messages are all formatted in the same way. See the subsection for more details about the ciphertext's associated plaintext representation.</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>destination hash</td>
<td>1</td>
<td>first byte of destination node public key</td>
</tr>
<tr>
<td>source hash</td>
<td>1</td>
<td>first byte of source node public key</td>
</tr>
<tr>
<td>cipher MAC</td>
<td>2</td>
<td>MAC for encrypted data in next field</td>
</tr>
<tr>
<td>ciphertext</td>
<td>rest of payload</td>
<td>encrypted message, see subsections below for details</td>
</tr>
</tbody>
</table>
<h3 id="returned-path">Returned path<a class="headerlink" href="#returned-path" title="Permanent link">&para;</a></h3>
<p>Returned path messages provide a description of the route a packet took from the original author. Receivers will send returned path messages to the author of the original message.</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>path length</td>
<td>1</td>
<td>length of next field</td>
</tr>
<tr>
<td>path</td>
<td>see above</td>
<td>a list of node hashes (one byte each)</td>
</tr>
<tr>
<td>extra type</td>
<td>1</td>
<td>extra, bundled payload type, eg., acknowledgement or response. Same values as in <a href="../packet_format/">Packet Format</a></td>
</tr>
<tr>
<td>extra</td>
<td>rest of data</td>
<td>extra, bundled payload content, follows same format as main content defined by this document</td>
</tr>
</tbody>
</table>
<h3 id="request">Request<a class="headerlink" href="#request" title="Permanent link">&para;</a></h3>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>timestamp</td>
<td>4</td>
<td>sender time (unix timestamp)</td>
</tr>
<tr>
<td>req type</td>
<td>1</td>
<td>request sub type</td>
</tr>
<tr>
<td>request data</td>
<td>rest of payload</td>
<td>application-defined request payload body</td>
</tr>
</tbody>
</table>
<p>For the common chat/server helpers in <code>BaseChatMesh</code>, the current request type values are:</p>
<table>
<thead>
<tr>
<th>Value</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>0x01</code></td>
<td>get stats</td>
<td>get stats of repeater or room server</td>
</tr>
<tr>
<td><code>0x02</code></td>
<td>keepalive</td>
<td>(deprecated)</td>
</tr>
<tr>
<td><code>0x03</code></td>
<td>get telemetry</td>
<td>request node telemetry</td>
</tr>
<tr>
<td><code>0x04</code></td>
<td>get min/max/avg</td>
<td>get sensor node stats on time series data</td>
</tr>
<tr>
<td><code>0x05</code></td>
<td>get acl</td>
<td>node ACL query</td>
</tr>
<tr>
<td><code>0x06</code></td>
<td>get neighbors</td>
<td>node neighbors query</td>
</tr>
<tr>
<td><code>0x08</code></td>
<td>subscribe</td>
<td>subscribe to telemetry push</td>
</tr>
<tr>
<td><code>0x09</code></td>
<td>ubsubscribe</td>
<td>unsubscribe from telemetry push</td>
</tr>
</tbody>
</table>
<h4 id="get-stats">Get stats<a class="headerlink" href="#get-stats" title="Permanent link">&para;</a></h4>
<p>Gets information about the node, possibly including the following:</p>
<ul>
<li>Battery level (millivolts)</li>
<li>Current transmit queue length</li>
<li>Current free queue length</li>
<li>Last RSSI value</li>
<li>Number of received packets</li>
<li>Number of sent packets</li>
<li>Total airtime (seconds)</li>
<li>Total uptime (seconds)</li>
<li>Number of packets sent as flood</li>
<li>Number of packets sent directly</li>
<li>Number of packets received as flood</li>
<li>Number of packets received directly</li>
<li>Error flags</li>
<li>Last SNR value</li>
<li>Number of direct route duplicates</li>
<li>Number of flood route duplicates</li>
<li>Number posted (?)</li>
<li>Number of post pushes (?)</li>
</ul>
<h4 id="get-telemetry">Get Telemetry<a class="headerlink" href="#get-telemetry" title="Permanent link">&para;</a></h4>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>timestamp</td>
<td>4</td>
<td>sender time (unix timestamp)</td>
</tr>
<tr>
<td>req type</td>
<td>1</td>
<td>0x03 (request sub type)</td>
</tr>
<tr>
<td>permission mask</td>
<td>1</td>
<td>bitwise inverse mask to AND to permissions (0 = get ALL telem values)</td>
</tr>
</tbody>
</table>
<h4 id="get-minmaxave-sensor-nodes">Get Min/Max/Ave (Sensor nodes)<a class="headerlink" href="#get-minmaxave-sensor-nodes" title="Permanent link">&para;</a></h4>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>timestamp</td>
<td>4</td>
<td>sender time (unix timestamp)</td>
</tr>
<tr>
<td>req type</td>
<td>1</td>
<td>0x04 (request sub type)</td>
</tr>
<tr>
<td>start</td>
<td>4</td>
<td>starting time, seconds ago</td>
</tr>
<tr>
<td>end</td>
<td>4</td>
<td>ending time, seconds ago</td>
</tr>
<tr>
<td>reserved</td>
<td>2</td>
<td>should be zeroes</td>
</tr>
</tbody>
</table>
<h4 id="subscribe-to-telemetry-push-sensor-nodes">Subscribe to Telemetry push - (Sensor nodes)<a class="headerlink" href="#subscribe-to-telemetry-push-sensor-nodes" title="Permanent link">&para;</a></h4>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>timestamp</td>
<td>4</td>
<td>sender time (unix timestamp)</td>
</tr>
<tr>
<td>req type</td>
<td>1</td>
<td>0x08 (request sub type)</td>
</tr>
<tr>
<td>push tag</td>
<td>4</td>
<td>32-bit tag to be used in telemetry push _REPLY payloads</td>
</tr>
<tr>
<td>timeout secs</td>
<td>2</td>
<td>subscription timeout (seconds)</td>
</tr>
<tr>
<td>reserved</td>
<td>1</td>
<td>should be zero</td>
</tr>
<tr>
<td>min deltas len</td>
<td>1</td>
<td>byte length of LPP encoded min_deltas</td>
</tr>
<tr>
<td>min deltas</td>
<td>(variable)</td>
<td>LPP encoded min_deltas</td>
</tr>
</tbody>
</table>
<h4 id="unsubscribe-from-telemetry-push-sensor-nodes">Unsubscribe from Telemetry push - (Sensor nodes)<a class="headerlink" href="#unsubscribe-from-telemetry-push-sensor-nodes" title="Permanent link">&para;</a></h4>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>timestamp</td>
<td>4</td>
<td>sender time (unix timestamp)</td>
</tr>
<tr>
<td>req type</td>
<td>1</td>
<td>0x09 (request sub type)</td>
</tr>
</tbody>
</table>
<h4 id="get-access-list">Get Access List<a class="headerlink" href="#get-access-list" title="Permanent link">&para;</a></h4>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>timestamp</td>
<td>4</td>
<td>sender time (unix timestamp)</td>
</tr>
<tr>
<td>req type</td>
<td>1</td>
<td>0x05 (request sub type)</td>
</tr>
<tr>
<td>reserved</td>
<td>2</td>
<td>should be zeroes</td>
</tr>
</tbody>
</table>
<h4 id="get-neighbors">Get Neighbors<a class="headerlink" href="#get-neighbors" title="Permanent link">&para;</a></h4>
<p>Not defined in <code>BaseChatMesh</code>.</p>
<h4 id="get-owner-info">Get Owner Info<a class="headerlink" href="#get-owner-info" title="Permanent link">&para;</a></h4>
<p>Not defined in <code>BaseChatMesh</code>.</p>
<h3 id="response">Response<a class="headerlink" href="#response" title="Permanent link">&para;</a></h3>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>content</td>
<td>rest of payload</td>
<td>application-defined response body</td>
</tr>
</tbody>
</table>
<p>Response contents are opaque application data. There is no single generic response envelope beyond the encrypted payload wrapper shown above.</p>
<h3 id="plain-text-message">Plain text message<a class="headerlink" href="#plain-text-message" title="Permanent link">&para;</a></h3>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>timestamp</td>
<td>4</td>
<td>send time (unix timestamp)</td>
</tr>
<tr>
<td>txt_type + attempt</td>
<td>1</td>
<td>upper six bits are txt_type (see below), lower two bits are attempt number (0..3)</td>
</tr>
<tr>
<td>message</td>
<td>rest of payload</td>
<td>the message content, see next table</td>
</tr>
</tbody>
</table>
<p>txt_type</p>
<table>
<thead>
<tr>
<th>Value</th>
<th>Description</th>
<th>Message content</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>0x00</code></td>
<td>plain text message</td>
<td>the plain text of the message</td>
</tr>
<tr>
<td><code>0x01</code></td>
<td>CLI data</td>
<td>CLI command OR reply text</td>
</tr>
<tr>
<td><code>0x02</code></td>
<td>signed plain text message</td>
<td>first four bytes is sender pubkey prefix, followed by plain text message</td>
</tr>
<tr>
<td><code>0x03</code></td>
<td>CLI command</td>
<td>(since v1.18+) CLI command text (explicit)</td>
</tr>
</tbody>
</table>
<h2 id="anonymous-request">Anonymous request<a class="headerlink" href="#anonymous-request" title="Permanent link">&para;</a></h2>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>destination hash</td>
<td>1</td>
<td>first byte of destination node public key</td>
</tr>
<tr>
<td>public key</td>
<td>32</td>
<td>sender's Ed25519 public key</td>
</tr>
<tr>
<td>cipher MAC</td>
<td>2</td>
<td>MAC for encrypted data in next field</td>
</tr>
<tr>
<td>ciphertext</td>
<td>rest of payload</td>
<td>encrypted message, see below for details</td>
</tr>
</tbody>
</table>
<h3 id="room-server-login">Room server login<a class="headerlink" href="#room-server-login" title="Permanent link">&para;</a></h3>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>timestamp</td>
<td>4</td>
<td>sender time (unix timestamp)</td>
</tr>
<tr>
<td>sync timestamp</td>
<td>4</td>
<td>sender's "sync messages SINCE x" timestamp</td>
</tr>
<tr>
<td>password</td>
<td>rest of message</td>
<td>password for room</td>
</tr>
</tbody>
</table>
<h3 id="repeatersensor-login">Repeater/Sensor login<a class="headerlink" href="#repeatersensor-login" title="Permanent link">&para;</a></h3>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>timestamp</td>
<td>4</td>
<td>sender time (unix timestamp)</td>
</tr>
<tr>
<td>password</td>
<td>rest of message</td>
<td>password for repeater/sensor</td>
</tr>
</tbody>
</table>
<h3 id="repeater-regions-request">Repeater - Regions request<a class="headerlink" href="#repeater-regions-request" title="Permanent link">&para;</a></h3>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>timestamp</td>
<td>4</td>
<td>sender time (unix timestamp)</td>
</tr>
<tr>
<td>req type</td>
<td>1</td>
<td>0x01 (request sub type)</td>
</tr>
<tr>
<td>reply path len</td>
<td>1</td>
<td>path len for reply</td>
</tr>
<tr>
<td>reply path</td>
<td>(variable)</td>
<td>reply path</td>
</tr>
</tbody>
</table>
<h3 id="repeater-owner-info-request">Repeater - Owner info request<a class="headerlink" href="#repeater-owner-info-request" title="Permanent link">&para;</a></h3>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>timestamp</td>
<td>4</td>
<td>sender time (unix timestamp)</td>
</tr>
<tr>
<td>req type</td>
<td>1</td>
<td>0x02 (request sub type)</td>
</tr>
<tr>
<td>reply path len</td>
<td>1</td>
<td>path len for reply</td>
</tr>
<tr>
<td>reply path</td>
<td>(variable)</td>
<td>reply path</td>
</tr>
</tbody>
</table>
<h3 id="repeater-clock-and-status-request">Repeater - Clock and status request<a class="headerlink" href="#repeater-clock-and-status-request" title="Permanent link">&para;</a></h3>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>timestamp</td>
<td>4</td>
<td>sender time (unix timestamp)</td>
</tr>
<tr>
<td>req type</td>
<td>1</td>
<td>0x03 (request sub type)</td>
</tr>
<tr>
<td>reply path len</td>
<td>1</td>
<td>path len for reply</td>
</tr>
<tr>
<td>reply path</td>
<td>(variable)</td>
<td>reply path</td>
</tr>
</tbody>
</table>
<h2 id="group-text-message">Group text message<a class="headerlink" href="#group-text-message" title="Permanent link">&para;</a></h2>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>channel hash</td>
<td>1</td>
<td>first byte of SHA256 of channel's shared key</td>
</tr>
<tr>
<td>cipher MAC</td>
<td>2</td>
<td>MAC for encrypted data in next field</td>
</tr>
<tr>
<td>ciphertext</td>
<td>rest of payload</td>
<td>encrypted message, see below for details</td>
</tr>
</tbody>
</table>
<p>The plaintext contained in the ciphertext matches the format described in <a href="#plain-text-message">plain text message</a>. Specifically, it consists of a four byte timestamp, a flags byte, and the message. The flags byte will generally be <code>0x00</code> because it is a "plain text message". The message will be of the form <code>&lt;sender name&gt;: &lt;message body&gt;</code> (eg., <code>user123: I'm on my way</code>).</p>
<p>The sender name is unverified message text. Group messages contain no sender
signature, so any channel-key holder can choose any sender name.</p>
<h2 id="group-datagram">Group datagram<a class="headerlink" href="#group-datagram" title="Permanent link">&para;</a></h2>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>channel hash</td>
<td>1</td>
<td>first byte of SHA256 of channel's shared key</td>
</tr>
<tr>
<td>cipher MAC</td>
<td>2</td>
<td>MAC for encrypted data in next field</td>
</tr>
<tr>
<td>ciphertext</td>
<td>rest of payload</td>
<td>encrypted data, see below for details</td>
</tr>
</tbody>
</table>
<p>The data contained in the ciphertext uses the format below:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>data type</td>
<td>2</td>
<td>Identifier for type of data. (See number_allocations.md)</td>
</tr>
<tr>
<td>data len</td>
<td>1</td>
<td>byte length of data</td>
</tr>
<tr>
<td>data</td>
<td>rest of payload</td>
<td>(depends on data type)</td>
</tr>
</tbody>
</table>
<h2 id="control-data">Control data<a class="headerlink" href="#control-data" title="Permanent link">&para;</a></h2>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>flags</td>
<td>1</td>
<td>upper 4 bits is sub_type</td>
</tr>
<tr>
<td>data</td>
<td>rest of payload</td>
<td>typically unencrypted data</td>
</tr>
</tbody>
</table>
<h3 id="discover_req-sub_type">DISCOVER_REQ (sub_type)<a class="headerlink" href="#discover_req-sub_type" title="Permanent link">&para;</a></h3>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>flags</td>
<td>1</td>
<td>0x8 (upper 4 bits), prefix_only (lowest bit)</td>
</tr>
<tr>
<td>type_filter</td>
<td>1</td>
<td>bit for each ADV_TYPE_*</td>
</tr>
<tr>
<td>tag</td>
<td>4</td>
<td>randomly generate by sender</td>
</tr>
<tr>
<td>since</td>
<td>4</td>
<td>(optional) epoch timestamp (0 by default)</td>
</tr>
</tbody>
</table>
<h3 id="discover_resp-sub_type">DISCOVER_RESP (sub_type)<a class="headerlink" href="#discover_resp-sub_type" title="Permanent link">&para;</a></h3>
<table>
<thead>
<tr>
<th>Field</th>
<th>Size (bytes)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>flags</td>
<td>1</td>
<td>0x9 (upper 4 bits), node_type (lower 4)</td>
</tr>
<tr>
<td>snr</td>
<td>1</td>
<td>signed, SNR*4</td>
</tr>
<tr>
<td>tag</td>
<td>4</td>
<td>reflected back from DISCOVER_REQ</td>
</tr>
<tr>
<td>pubkey</td>
<td>8 or 32</td>
<td>node's ID (or prefix)</td>
</tr>
</tbody>
</table>
<h2 id="custom-packet">Custom packet<a class="headerlink" href="#custom-packet" title="Permanent link">&para;</a></h2>
<p>Custom packets have no defined format.</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>