2892 lines
66 KiB
HTML
2892 lines
66 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/kiss_modem_protocol/">
|
|
|
|
|
|
<link rel="prev" href="../terminal_chat_cli/">
|
|
|
|
|
|
<link rel="next" href="../packet_format/">
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="icon" href="../assets/images/favicon.png">
|
|
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.8.2">
|
|
|
|
|
|
|
|
<title>KISS modem protocol - 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="#meshcore-kiss-modem-protocol" 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">
|
|
|
|
KISS modem protocol
|
|
|
|
</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--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 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">
|
|
|
|
|
|
KISS modem protocol
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<a href="./" class="md-nav__link md-nav__link--active">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
KISS modem protocol
|
|
|
|
|
|
|
|
</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="#serial-configuration" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Serial Configuration
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#frame-format" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Frame Format
|
|
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Frame Format">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#type-byte" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Type Byte
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#standard-kiss-commands" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Standard KISS Commands
|
|
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Standard KISS Commands">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#host-to-tnc" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Host to TNC
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#tnc-to-host" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
TNC to Host
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#host-output-backpressure" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Host Output Backpressure
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#csma-behavior" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
CSMA Behavior
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#sethardware-extensions-0x06" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
SetHardware Extensions (0x06)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="SetHardware Extensions (0x06)">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#frame-format_1" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Frame Format
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#request-sub-commands-host-to-tnc" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Request Sub-commands (Host to TNC)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#response-sub-commands-tnc-to-host" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Response Sub-commands (TNC to Host)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#error-codes" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Error Codes
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#unsolicited-events" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Unsolicited Events
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#data-formats" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Data Formats
|
|
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Data Formats">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#radio-parameters-setradio-radio-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Radio Parameters (SetRadio / Radio response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#version-version-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Version (Version response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#encrypted-encrypted-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Encrypted (Encrypted response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#airtime-airtime-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Airtime (Airtime response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#noise-floor-noisefloor-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Noise Floor (NoiseFloor response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#capabilities-capabilities-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Capabilities (Capabilities response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#agc-reset-interval-setagcresetinterval-agcresetinterval-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
AGC Reset Interval (SetAgcResetInterval / AgcResetInterval response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#fem-state-setfemstate-femstate-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
FEM State (SetFemState / FemState response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#rx-boosted-gain-setrxboostedgain-rxboostedgain-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
RX Boosted Gain (SetRxBoostedGain / RxBoostedGain response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#stats-stats-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Stats (Stats response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#battery-battery-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Battery (Battery response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#mcu-temperature-mcutemp-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
MCU Temperature (MCUTemp response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#device-name-devicename-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Device Name (DeviceName response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#reboot" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Reboot
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#sensor-permissions-getsensors" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Sensor Permissions (GetSensors)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#sensor-data-sensors-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Sensor Data (Sensors response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#cryptographic-algorithms" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Cryptographic Algorithms
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#notes" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Notes
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</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="#serial-configuration" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Serial Configuration
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#frame-format" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Frame Format
|
|
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Frame Format">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#type-byte" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Type Byte
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#standard-kiss-commands" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Standard KISS Commands
|
|
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Standard KISS Commands">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#host-to-tnc" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Host to TNC
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#tnc-to-host" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
TNC to Host
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#host-output-backpressure" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Host Output Backpressure
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#csma-behavior" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
CSMA Behavior
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#sethardware-extensions-0x06" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
SetHardware Extensions (0x06)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="SetHardware Extensions (0x06)">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#frame-format_1" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Frame Format
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#request-sub-commands-host-to-tnc" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Request Sub-commands (Host to TNC)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#response-sub-commands-tnc-to-host" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Response Sub-commands (TNC to Host)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#error-codes" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Error Codes
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#unsolicited-events" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Unsolicited Events
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#data-formats" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Data Formats
|
|
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Data Formats">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#radio-parameters-setradio-radio-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Radio Parameters (SetRadio / Radio response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#version-version-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Version (Version response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#encrypted-encrypted-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Encrypted (Encrypted response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#airtime-airtime-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Airtime (Airtime response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#noise-floor-noisefloor-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Noise Floor (NoiseFloor response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#capabilities-capabilities-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Capabilities (Capabilities response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#agc-reset-interval-setagcresetinterval-agcresetinterval-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
AGC Reset Interval (SetAgcResetInterval / AgcResetInterval response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#fem-state-setfemstate-femstate-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
FEM State (SetFemState / FemState response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#rx-boosted-gain-setrxboostedgain-rxboostedgain-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
RX Boosted Gain (SetRxBoostedGain / RxBoostedGain response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#stats-stats-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Stats (Stats response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#battery-battery-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Battery (Battery response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#mcu-temperature-mcutemp-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
MCU Temperature (MCUTemp response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#device-name-devicename-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Device Name (DeviceName response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#reboot" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Reboot
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#sensor-permissions-getsensors" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Sensor Permissions (GetSensors)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#sensor-data-sensors-response" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Sensor Data (Sensors response)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#cryptographic-algorithms" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Cryptographic Algorithms
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#notes" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Notes
|
|
|
|
</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/kiss_modem_protocol.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="meshcore-kiss-modem-protocol">MeshCore KISS Modem Protocol<a class="headerlink" href="#meshcore-kiss-modem-protocol" title="Permanent link">¶</a></h1>
|
|
<p>Standard KISS TNC firmware for MeshCore LoRa radios. Compatible with any KISS client (Direwolf, APRSdroid, YAAC, etc.) for sending and receiving raw packets. MeshCore-specific extensions (cryptography, radio configuration, telemetry) are available through the standard SetHardware (0x06) command.</p>
|
|
<h2 id="serial-configuration">Serial Configuration<a class="headerlink" href="#serial-configuration" title="Permanent link">¶</a></h2>
|
|
<p>115200 baud, 8N1, no flow control.</p>
|
|
<h2 id="frame-format">Frame Format<a class="headerlink" href="#frame-format" title="Permanent link">¶</a></h2>
|
|
<p>Standard KISS framing per the KA9Q/K3MC specification.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Byte</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>0xC0</code></td>
|
|
<td>FEND</td>
|
|
<td>Frame delimiter</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>0xDB</code></td>
|
|
<td>FESC</td>
|
|
<td>Escape character</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>0xDC</code></td>
|
|
<td>TFEND</td>
|
|
<td>Escaped FEND (FESC + TFEND = 0xC0)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>0xDD</code></td>
|
|
<td>TFESC</td>
|
|
<td>Escaped FESC (FESC + TFESC = 0xDB)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="highlight"><pre><span></span><code>┌──────┬───────────┬────────────────┬──────┐
|
|
│ FEND │ Type Byte │ Data (escaped) │ FEND │
|
|
│ 0xC0 │ 1 byte │ 0-510 bytes │ 0xC0 │
|
|
└──────┴───────────┴────────────────┴──────┘
|
|
</code></pre></div>
|
|
<h3 id="type-byte">Type Byte<a class="headerlink" href="#type-byte" title="Permanent link">¶</a></h3>
|
|
<p>The type byte is split into two nibbles:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Bits</th>
|
|
<th>Field</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>7-4</td>
|
|
<td>Port</td>
|
|
<td>Port number (0 for single-port TNC)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>3-0</td>
|
|
<td>Command</td>
|
|
<td>Command number</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Maximum unescaped frame size: 512 bytes.</p>
|
|
<h2 id="standard-kiss-commands">Standard KISS Commands<a class="headerlink" href="#standard-kiss-commands" title="Permanent link">¶</a></h2>
|
|
<h3 id="host-to-tnc">Host to TNC<a class="headerlink" href="#host-to-tnc" title="Permanent link">¶</a></h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Command</th>
|
|
<th>Value</th>
|
|
<th>Data</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Data</td>
|
|
<td><code>0x00</code></td>
|
|
<td>Raw packet</td>
|
|
<td>Queue packet for transmission (one pending at a time)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TXDELAY</td>
|
|
<td><code>0x01</code></td>
|
|
<td>Delay (1 byte)</td>
|
|
<td>Transmitter keyup delay in 10ms units (default: 50 = 500ms)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Persistence</td>
|
|
<td><code>0x02</code></td>
|
|
<td>P (1 byte)</td>
|
|
<td>CSMA persistence parameter 0-255 (default: 63)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SlotTime</td>
|
|
<td><code>0x03</code></td>
|
|
<td>Interval (1 byte)</td>
|
|
<td>CSMA slot interval in 10ms units (default: 10 = 100ms)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TXtail</td>
|
|
<td><code>0x04</code></td>
|
|
<td>Delay (1 byte)</td>
|
|
<td>Post-TX hold time in 10ms units (default: 0)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>FullDuplex</td>
|
|
<td><code>0x05</code></td>
|
|
<td>Mode (1 byte)</td>
|
|
<td>0 = half duplex, nonzero = full duplex (default: 0)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SetHardware</td>
|
|
<td><code>0x06</code></td>
|
|
<td>Sub-command + data</td>
|
|
<td>MeshCore extensions (see below)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Return</td>
|
|
<td><code>0xFF</code></td>
|
|
<td>-</td>
|
|
<td>Exit KISS mode (no-op)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="tnc-to-host">TNC to Host<a class="headerlink" href="#tnc-to-host" title="Permanent link">¶</a></h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Value</th>
|
|
<th>Data</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Data</td>
|
|
<td><code>0x00</code></td>
|
|
<td>Raw packet</td>
|
|
<td>Received packet from radio</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Data frames carry raw packet data only, with no metadata prepended. The Data command payload is limited to 255 bytes to match the MeshCore maximum transmission unit (MAX_TRANS_UNIT); frames larger than 255 bytes are silently dropped. The KISS specification recommends at least 1024 bytes for general-purpose TNCs; this modem is intended for MeshCore packets only, whose protocol MTU is 255 bytes.</p>
|
|
<p>Only one packet may be pending for radio transmission at a time. If the host sends a second Data frame before the first has completed, the modem responds with Error (0xF1) and TxBusy (0x07).</p>
|
|
<h3 id="host-output-backpressure">Host Output Backpressure<a class="headerlink" href="#host-output-backpressure" title="Permanent link">¶</a></h3>
|
|
<p>Outbound frames are encoded into a 2-slot queue and flushed when serial output space is available; <code>loop()</code> never blocks on writes. Radio TX state advances independently of host read speed. TxDone is retained until it can be queued. If the outbound queue is full, the modem responds with Error (0xF1) and TxBusy (0x07). Hosts should read serial promptly to avoid delayed responses.</p>
|
|
<h3 id="csma-behavior">CSMA Behavior<a class="headerlink" href="#csma-behavior" title="Permanent link">¶</a></h3>
|
|
<p>The TNC implements p-persistent CSMA for half-duplex operation:</p>
|
|
<ol>
|
|
<li>When a packet is queued, monitor carrier detect</li>
|
|
<li>When the channel clears, generate a random value 0-255</li>
|
|
<li>If the value is less than or equal to P (Persistence), wait TXDELAY then transmit</li>
|
|
<li>Otherwise, wait SlotTime and repeat from step 1</li>
|
|
</ol>
|
|
<p>In full-duplex mode, CSMA is bypassed and packets transmit after TXDELAY.</p>
|
|
<h2 id="sethardware-extensions-0x06">SetHardware Extensions (0x06)<a class="headerlink" href="#sethardware-extensions-0x06" title="Permanent link">¶</a></h2>
|
|
<p>MeshCore-specific functionality uses the standard KISS SetHardware command. The first byte of SetHardware data is a sub-command. Standard KISS clients ignore these frames.</p>
|
|
<h3 id="frame-format_1">Frame Format<a class="headerlink" href="#frame-format_1" title="Permanent link">¶</a></h3>
|
|
<div class="highlight"><pre><span></span><code>┌──────┬──────┬─────────────┬────────────────┬──────┐
|
|
│ FEND │ 0x06 │ Sub-command │ Data (escaped) │ FEND │
|
|
│ 0xC0 │ │ 1 byte │ variable │ 0xC0 │
|
|
└──────┴──────┴─────────────┴────────────────┴──────┘
|
|
</code></pre></div>
|
|
<h3 id="request-sub-commands-host-to-tnc">Request Sub-commands (Host to TNC)<a class="headerlink" href="#request-sub-commands-host-to-tnc" title="Permanent link">¶</a></h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Sub-command</th>
|
|
<th>Value</th>
|
|
<th>Data</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>GetIdentity</td>
|
|
<td><code>0x01</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetRandom</td>
|
|
<td><code>0x02</code></td>
|
|
<td>Length (1 byte, 1-64)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>VerifySignature</td>
|
|
<td><code>0x03</code></td>
|
|
<td>PubKey (32) + Signature (64) + Data</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SignData</td>
|
|
<td><code>0x04</code></td>
|
|
<td>Data to sign</td>
|
|
</tr>
|
|
<tr>
|
|
<td>EncryptData</td>
|
|
<td><code>0x05</code></td>
|
|
<td>Key (32) + Plaintext</td>
|
|
</tr>
|
|
<tr>
|
|
<td>DecryptData</td>
|
|
<td><code>0x06</code></td>
|
|
<td>Key (32) + MAC (2) + Ciphertext</td>
|
|
</tr>
|
|
<tr>
|
|
<td>KeyExchange</td>
|
|
<td><code>0x07</code></td>
|
|
<td>Remote PubKey (32)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Hash</td>
|
|
<td><code>0x08</code></td>
|
|
<td>Data to hash</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SetRadio</td>
|
|
<td><code>0x09</code></td>
|
|
<td>Freq (4) + BW (4) + SF (1) + CR (1)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SetTxPower</td>
|
|
<td><code>0x0A</code></td>
|
|
<td>Power dBm (1)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetRadio</td>
|
|
<td><code>0x0B</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetTxPower</td>
|
|
<td><code>0x0C</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetCurrentRssi</td>
|
|
<td><code>0x0D</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>IsChannelBusy</td>
|
|
<td><code>0x0E</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetAirtime</td>
|
|
<td><code>0x0F</code></td>
|
|
<td>Packet length (1)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetNoiseFloor</td>
|
|
<td><code>0x10</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetVersion</td>
|
|
<td><code>0x11</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetStats</td>
|
|
<td><code>0x12</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetBattery</td>
|
|
<td><code>0x13</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetMCUTemp</td>
|
|
<td><code>0x14</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetSensors</td>
|
|
<td><code>0x15</code></td>
|
|
<td>Permissions (1)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetDeviceName</td>
|
|
<td><code>0x16</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Ping</td>
|
|
<td><code>0x17</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Reboot</td>
|
|
<td><code>0x18</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SetSignalReport</td>
|
|
<td><code>0x19</code></td>
|
|
<td>Enable (1): 0x00=disable, nonzero=enable</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetSignalReport</td>
|
|
<td><code>0x1A</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetCapabilities</td>
|
|
<td><code>0x1B</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SetAgcResetInterval</td>
|
|
<td><code>0x1C</code></td>
|
|
<td>Seconds (2): 0=disable, 0-1020</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetAgcResetInterval</td>
|
|
<td><code>0x1D</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SetFemState</td>
|
|
<td><code>0x1E</code></td>
|
|
<td>Apply mask (1) + Value mask (1)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetFemState</td>
|
|
<td><code>0x1F</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SetRxBoostedGain</td>
|
|
<td><code>0x20</code></td>
|
|
<td>Enable (1): 0x00=disable, nonzero=enable</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GetRxBoostedGain</td>
|
|
<td><code>0x21</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="response-sub-commands-tnc-to-host">Response Sub-commands (TNC to Host)<a class="headerlink" href="#response-sub-commands-tnc-to-host" title="Permanent link">¶</a></h3>
|
|
<p>Response codes use the high-bit convention: <code>response = command | 0x80</code>. Generic and unsolicited responses use the <code>0xF0</code>+ range. Set commands that report state (SetSignalReport, SetAgcResetInterval, SetFemState, SetRxBoostedGain) reply with the matching Get response, so <code>0x9C</code>, <code>0x9E</code> and <code>0xA0</code> are never sent.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Sub-command</th>
|
|
<th>Value</th>
|
|
<th>Data</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Identity</td>
|
|
<td><code>0x81</code></td>
|
|
<td>PubKey (32)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Random</td>
|
|
<td><code>0x82</code></td>
|
|
<td>Random bytes (1-64)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Verify</td>
|
|
<td><code>0x83</code></td>
|
|
<td>Result (1): 0x00=invalid, 0x01=valid</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Signature</td>
|
|
<td><code>0x84</code></td>
|
|
<td>Signature (64)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Encrypted</td>
|
|
<td><code>0x85</code></td>
|
|
<td>MAC (2) + Ciphertext</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Decrypted</td>
|
|
<td><code>0x86</code></td>
|
|
<td>Plaintext</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SharedSecret</td>
|
|
<td><code>0x87</code></td>
|
|
<td>Shared secret (32)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Hash</td>
|
|
<td><code>0x88</code></td>
|
|
<td>SHA-256 hash (32)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Radio</td>
|
|
<td><code>0x8B</code></td>
|
|
<td>Freq (4) + BW (4) + SF (1) + CR (1)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TxPower</td>
|
|
<td><code>0x8C</code></td>
|
|
<td>Power dBm (1)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>CurrentRssi</td>
|
|
<td><code>0x8D</code></td>
|
|
<td>RSSI dBm (1, signed)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>ChannelBusy</td>
|
|
<td><code>0x8E</code></td>
|
|
<td>Result (1): 0x00=clear, 0x01=busy</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Airtime</td>
|
|
<td><code>0x8F</code></td>
|
|
<td>Milliseconds (4)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>NoiseFloor</td>
|
|
<td><code>0x90</code></td>
|
|
<td>dBm (2, signed)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Version</td>
|
|
<td><code>0x91</code></td>
|
|
<td>Version (1) + Reserved (1)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Stats</td>
|
|
<td><code>0x92</code></td>
|
|
<td>RX (4) + TX (4) + Errors (4)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Battery</td>
|
|
<td><code>0x93</code></td>
|
|
<td>Millivolts (2)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>MCUTemp</td>
|
|
<td><code>0x94</code></td>
|
|
<td>Temperature (2, signed)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Sensors</td>
|
|
<td><code>0x95</code></td>
|
|
<td>CayenneLPP payload</td>
|
|
</tr>
|
|
<tr>
|
|
<td>DeviceName</td>
|
|
<td><code>0x96</code></td>
|
|
<td>Name (variable, UTF-8)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Pong</td>
|
|
<td><code>0x97</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SignalReport</td>
|
|
<td><code>0x9A</code></td>
|
|
<td>Status (1): 0x00=disabled, 0x01=enabled</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Capabilities</td>
|
|
<td><code>0x9B</code></td>
|
|
<td>Feature bits (4)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>AgcResetInterval</td>
|
|
<td><code>0x9D</code></td>
|
|
<td>Effective seconds (2)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>FemState</td>
|
|
<td><code>0x9F</code></td>
|
|
<td>Capability mask (1) + Value mask (1)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>RxBoostedGain</td>
|
|
<td><code>0xA1</code></td>
|
|
<td>Status (1): 0x00=disabled, 0x01=enabled</td>
|
|
</tr>
|
|
<tr>
|
|
<td>OK</td>
|
|
<td><code>0xF0</code></td>
|
|
<td>-</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Error</td>
|
|
<td><code>0xF1</code></td>
|
|
<td>Error code (1)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TxDone</td>
|
|
<td><code>0xF8</code></td>
|
|
<td>Result (1): 0x00=failed, 0x01=success</td>
|
|
</tr>
|
|
<tr>
|
|
<td>RxMeta</td>
|
|
<td><code>0xF9</code></td>
|
|
<td>SNR (1) + RSSI (1)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="error-codes">Error Codes<a class="headerlink" href="#error-codes" title="Permanent link">¶</a></h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Code</th>
|
|
<th>Value</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>InvalidLength</td>
|
|
<td><code>0x01</code></td>
|
|
<td>Request data too short</td>
|
|
</tr>
|
|
<tr>
|
|
<td>InvalidParam</td>
|
|
<td><code>0x02</code></td>
|
|
<td>Invalid parameter value</td>
|
|
</tr>
|
|
<tr>
|
|
<td>NoCallback</td>
|
|
<td><code>0x03</code></td>
|
|
<td>Feature not available</td>
|
|
</tr>
|
|
<tr>
|
|
<td>MacFailed</td>
|
|
<td><code>0x04</code></td>
|
|
<td>MAC verification failed</td>
|
|
</tr>
|
|
<tr>
|
|
<td>UnknownCmd</td>
|
|
<td><code>0x05</code></td>
|
|
<td>Unknown sub-command</td>
|
|
</tr>
|
|
<tr>
|
|
<td>EncryptFailed</td>
|
|
<td><code>0x06</code></td>
|
|
<td>Encryption failed</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TxBusy</td>
|
|
<td><code>0x07</code></td>
|
|
<td>Radio TX busy, or host output queue full</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Unsupported</td>
|
|
<td><code>0x08</code></td>
|
|
<td>Command known, but not supported by this board</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="unsolicited-events">Unsolicited Events<a class="headerlink" href="#unsolicited-events" title="Permanent link">¶</a></h3>
|
|
<p>The TNC sends these SetHardware frames without a preceding request:</p>
|
|
<p><strong>TxDone (0xF8)</strong>: Sent after radio transmission completes. Contains a single byte: 0x01 for success, 0x00 for failure. Delivery to the host may be delayed under serial backpressure but is not dropped.</p>
|
|
<p><strong>RxMeta (0xF9)</strong>: Sent after each standard data frame (type 0x00) with SNR (1 byte, signed, value x4) and RSSI (1 byte, signed, dBm). Queued with the data frame; omitted if the data frame cannot be queued. Enabled by default; toggle with SetSignalReport. Standard KISS clients ignore this frame.</p>
|
|
<h2 id="data-formats">Data Formats<a class="headerlink" href="#data-formats" title="Permanent link">¶</a></h2>
|
|
<h3 id="radio-parameters-setradio-radio-response">Radio Parameters (SetRadio / Radio response)<a class="headerlink" href="#radio-parameters-setradio-radio-response" title="Permanent link">¶</a></h3>
|
|
<p>All values little-endian.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Frequency</td>
|
|
<td>4 bytes</td>
|
|
<td>Hz (e.g., 869618000)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Bandwidth</td>
|
|
<td>4 bytes</td>
|
|
<td>Hz (e.g., 62500)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SF</td>
|
|
<td>1 byte</td>
|
|
<td>Spreading factor (5-12)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>CR</td>
|
|
<td>1 byte</td>
|
|
<td>Coding rate (5-8)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="version-version-response">Version (Version response)<a class="headerlink" href="#version-version-response" title="Permanent link">¶</a></h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Version</td>
|
|
<td>1 byte</td>
|
|
<td>Firmware version</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Reserved</td>
|
|
<td>1 byte</td>
|
|
<td>Always 0</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="encrypted-encrypted-response">Encrypted (Encrypted response)<a class="headerlink" href="#encrypted-encrypted-response" title="Permanent link">¶</a></h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>MAC</td>
|
|
<td>2 bytes</td>
|
|
<td>HMAC-SHA256 truncated to 2 bytes</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Ciphertext</td>
|
|
<td>variable</td>
|
|
<td>AES-128 block-encrypted data with zero padding</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="airtime-airtime-response">Airtime (Airtime response)<a class="headerlink" href="#airtime-airtime-response" title="Permanent link">¶</a></h3>
|
|
<p>All values little-endian.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Airtime</td>
|
|
<td>4 bytes</td>
|
|
<td>uint32_t, estimated air time in milliseconds</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="noise-floor-noisefloor-response">Noise Floor (NoiseFloor response)<a class="headerlink" href="#noise-floor-noisefloor-response" title="Permanent link">¶</a></h3>
|
|
<p>All values little-endian.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Noise floor</td>
|
|
<td>2 bytes</td>
|
|
<td>int16_t, dBm (signed)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>The modem recalibrates the noise floor every 2 seconds. AGC resets follow the configured AGC reset interval (default 32 seconds).</p>
|
|
<h3 id="capabilities-capabilities-response">Capabilities (Capabilities response)<a class="headerlink" href="#capabilities-capabilities-response" title="Permanent link">¶</a></h3>
|
|
<p>All values little-endian. Hosts should probe capabilities rather than infer them from the firmware version: boards running the same version expose different hardware controls. Firmware older than version 2 answers GetCapabilities with <code>UnknownCmd</code>; treat that as no capabilities.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Feature bits</td>
|
|
<td>4 bytes</td>
|
|
<td>uint32_t, see below</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Bit</th>
|
|
<th>Value</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>0</td>
|
|
<td><code>0x01</code></td>
|
|
<td>AGC reset interval control (always set)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>1</td>
|
|
<td><code>0x02</code></td>
|
|
<td>External FEM RX (LNA) gain control</td>
|
|
</tr>
|
|
<tr>
|
|
<td>2</td>
|
|
<td><code>0x04</code></td>
|
|
<td>External FEM TX (PA) gain control</td>
|
|
</tr>
|
|
<tr>
|
|
<td>3</td>
|
|
<td><code>0x08</code></td>
|
|
<td>Radio chip boosted RX gain control</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Remaining bits are reserved and sent as 0.</p>
|
|
<h3 id="agc-reset-interval-setagcresetinterval-agcresetinterval-response">AGC Reset Interval (SetAgcResetInterval / AgcResetInterval response)<a class="headerlink" href="#agc-reset-interval-setagcresetinterval-agcresetinterval-response" title="Permanent link">¶</a></h3>
|
|
<p>All values little-endian.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Seconds</td>
|
|
<td>2 bytes</td>
|
|
<td>uint16_t, 0 = disabled, maximum 1020</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>The modem periodically resets the radio's AGC while idle (no transmission in progress and host output not backed up). The interval has 4-second resolution, matching the MeshCore <code>agc.reset.interval</code> setting: requested values are rounded down to a multiple of 4, so 1-3 disable the reset. Values above 1020 return <code>InvalidParam</code>. SetAgcResetInterval replies with the AgcResetInterval response carrying the effective value, and restarts the countdown from the time of the request.</p>
|
|
<p>The default is 32 seconds (previously a fixed 30; changed so the default is a settable 4-second multiple). The setting is not persisted; hosts should re-send it after reconnecting or rebooting the modem.</p>
|
|
<h3 id="fem-state-setfemstate-femstate-response">FEM State (SetFemState / FemState response)<a class="headerlink" href="#fem-state-setfemstate-femstate-response" title="Permanent link">¶</a></h3>
|
|
<p>Controls the board's external LoRa front-end module gain. This is separate from the radio chip's own RX boosted gain. TX/RX switching of the FEM is handled by the board and is not affected by these settings.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Bit</th>
|
|
<th>Value</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>0</td>
|
|
<td><code>0x01</code></td>
|
|
<td>RX gain (LNA enabled)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>1</td>
|
|
<td><code>0x02</code></td>
|
|
<td>TX gain (PA high gain enabled)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>SetFemState data:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Apply mask</td>
|
|
<td>1 byte</td>
|
|
<td>Bits to change; bits not set are left as-is</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Value mask</td>
|
|
<td>1 byte</td>
|
|
<td>New value for each bit in the apply mask</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>FemState response data:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Capability mask</td>
|
|
<td>1 byte</td>
|
|
<td>Bits this board can control</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Value mask</td>
|
|
<td>1 byte</td>
|
|
<td>Current state; always 0 for uncontrollable bits</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Example: enable RX gain without changing TX gain: apply <code>0x01</code>, value <code>0x01</code>.</p>
|
|
<p>If any bit in the apply mask is not in the board's capability mask (including reserved bits), the modem replies <code>Unsupported</code> and changes nothing. Otherwise SetFemState replies with the FemState response carrying the state read back from the board; if a bit differs from the request, that change did not take effect. SetFemState and GetFemState requests, including their error replies, are answered strictly in the order received. A SetFemState received while a packet is on air (before its TxDone is queued) is held and applied after TxDone, so its reply follows TxDone, and FEM requests that arrive after it wait behind it. Up to 4 FEM requests can wait; beyond that the modem replies <code>TxBusy</code> immediately. Capabilities come from the board's own <code>get/set radio.fem.rxgain</code> and <code>radio.fem.txgain</code> CLI commands (see <a href="../cli_commands/">cli_commands.md</a>): a gain is controllable when the board answers <code>get</code> with <code>> on</code> or <code>> off</code>. Any board that implements those commands is supported without KISS changes, and a board with a fixed, board-managed FEM (for example RAK3401) reports none. Changes made over KISS are not saved to the board's preferences.</p>
|
|
<p>The setting is not persisted; the board's power-on default applies after reboot.</p>
|
|
<h3 id="rx-boosted-gain-setrxboostedgain-rxboostedgain-response">RX Boosted Gain (SetRxBoostedGain / RxBoostedGain response)<a class="headerlink" href="#rx-boosted-gain-setrxboostedgain-rxboostedgain-response" title="Permanent link">¶</a></h3>
|
|
<p>Controls the radio chip's own boosted RX gain mode (SX1262, SX1268, LLCC68, LR11x0, LR2021), the equivalent of the MeshCore <code>radio.rxgain</code> setting. This is independent of the external FEM RX gain controlled by SetFemState; a board can support either, both or neither.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Status</td>
|
|
<td>1 byte</td>
|
|
<td>0x00 = power-saving, 0x01 = boosted</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>SetRxBoostedGain always replies with the RxBoostedGain response carrying the effective state read back from the radio; if it differs from the requested value, the change did not take effect. Some radios must drop to standby to apply it, so the modem replies <code>TxBusy</code> and changes nothing while a packet is on air or host output is backed up; retry later. Before applying, any completed received packet is delivered to the host first. A packet still being received at that moment can be lost. Radios whose driver has no boosted RX gain control (for example SX127x and STM32WLx) do not set capability bit 3 and reply <code>Unsupported</code> to both commands. The power-on default is the build's <code>SX126X_RX_BOOSTED_GAIN</code> setting; the value is not persisted, and periodic AGC resets preserve it.</p>
|
|
<h3 id="stats-stats-response">Stats (Stats response)<a class="headerlink" href="#stats-stats-response" title="Permanent link">¶</a></h3>
|
|
<p>All values little-endian.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>RX</td>
|
|
<td>4 bytes</td>
|
|
<td>Packets received</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TX</td>
|
|
<td>4 bytes</td>
|
|
<td>Packets transmitted</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Errors</td>
|
|
<td>4 bytes</td>
|
|
<td>Receive errors</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="battery-battery-response">Battery (Battery response)<a class="headerlink" href="#battery-battery-response" title="Permanent link">¶</a></h3>
|
|
<p>All values little-endian.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Millivolts</td>
|
|
<td>2 bytes</td>
|
|
<td>uint16_t, battery voltage in mV</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="mcu-temperature-mcutemp-response">MCU Temperature (MCUTemp response)<a class="headerlink" href="#mcu-temperature-mcutemp-response" title="Permanent link">¶</a></h3>
|
|
<p>All values little-endian.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Temperature</td>
|
|
<td>2 bytes</td>
|
|
<td>int16_t, tenths of °C (e.g., 253 = 25.3°C)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Returns <code>NoCallback</code> error if the board does not support temperature readings.</p>
|
|
<h3 id="device-name-devicename-response">Device Name (DeviceName response)<a class="headerlink" href="#device-name-devicename-response" title="Permanent link">¶</a></h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Size</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Name</td>
|
|
<td>variable</td>
|
|
<td>UTF-8 string, no null terminator</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="reboot">Reboot<a class="headerlink" href="#reboot" title="Permanent link">¶</a></h3>
|
|
<p>Sends an <code>OK</code> response, flushes serial, then reboots the device. The host should expect the connection to drop.</p>
|
|
<h3 id="sensor-permissions-getsensors">Sensor Permissions (GetSensors)<a class="headerlink" href="#sensor-permissions-getsensors" title="Permanent link">¶</a></h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Bit</th>
|
|
<th>Value</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>0</td>
|
|
<td><code>0x01</code></td>
|
|
<td>Base (battery)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>1</td>
|
|
<td><code>0x02</code></td>
|
|
<td>Location (GPS)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>2</td>
|
|
<td><code>0x04</code></td>
|
|
<td>Environment (temp, humidity, pressure)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Use <code>0x07</code> for all permissions.</p>
|
|
<h3 id="sensor-data-sensors-response">Sensor Data (Sensors response)<a class="headerlink" href="#sensor-data-sensors-response" title="Permanent link">¶</a></h3>
|
|
<p>Data returned in CayenneLPP format. See <a href="https://docs.mydevices.com/docs/lorawan/cayenne-lpp">CayenneLPP documentation</a> for parsing.</p>
|
|
<h2 id="cryptographic-algorithms">Cryptographic Algorithms<a class="headerlink" href="#cryptographic-algorithms" title="Permanent link">¶</a></h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Operation</th>
|
|
<th>Algorithm</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Identity / Signing / Verification</td>
|
|
<td>Ed25519</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Key Exchange</td>
|
|
<td>X25519 (ECDH)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Encryption</td>
|
|
<td>AES-128 block encryption with zero padding + HMAC-SHA256 (MAC truncated to 2 bytes)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Hashing</td>
|
|
<td>SHA-256</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h2 id="notes">Notes<a class="headerlink" href="#notes" title="Permanent link">¶</a></h2>
|
|
<ul>
|
|
<li>Data payload limit (255 bytes) matches MeshCore MAX_TRANS_UNIT; no change needed for KISS “1024+ recommended” (that applies to general TNCs, not MeshCore)</li>
|
|
<li>Modem generates identity on first boot (stored in flash)</li>
|
|
<li>All multi-byte values are little-endian unless stated otherwise</li>
|
|
<li>SNR values in RxMeta are multiplied by 4 for 0.25 dB precision</li>
|
|
<li>TxDone is sent as a SetHardware event after each transmission</li>
|
|
<li>Standard KISS clients receive only type 0x00 data frames and can safely ignore all SetHardware (0x06) frames</li>
|
|
<li>See <a href="../packet_format/">packet_format.md</a> for packet format</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</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> |