This commit is contained in:
mattzzw
2026-02-15 11:15:16 +00:00
parent 7b2998aa36
commit 63623169f8
16 changed files with 2753 additions and 148 deletions

View File

@@ -349,6 +349,33 @@
<li class="md-nav__item">
<a href="/meshcore/kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
MeshCore KISS Modem Protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="/meshcore/nrf52_power_management/" class="md-nav__link">
@@ -377,14 +404,14 @@
<li class="md-nav__item">
<a href="/meshcore/packet_structure/" class="md-nav__link">
<a href="/meshcore/packet_format/" class="md-nav__link">
<span class="md-ellipsis">
Packet Structure
Packet Format
@@ -411,7 +438,7 @@
<span class="md-ellipsis">
Meshcore payloads
Payload Format

View File

@@ -1437,6 +1437,33 @@
<li class="md-nav__item">
<a href="../kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
MeshCore KISS Modem Protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../nrf52_power_management/" class="md-nav__link">
@@ -1465,14 +1492,14 @@
<li class="md-nav__item">
<a href="../packet_structure/" class="md-nav__link">
<a href="../packet_format/" class="md-nav__link">
<span class="md-ellipsis">
Packet Structure
Packet Format
@@ -1499,7 +1526,7 @@
<span class="md-ellipsis">
Meshcore payloads
Payload Format
@@ -3099,7 +3126,7 @@
<h4 id="dump-all-defined-regions-and-flood-permissions">Dump all defined regions and flood permissions</h4>
<p><strong>Usage:</strong>
- <code>region</code></p>
<p><strong>Serial Only:</strong> Yes</p>
<p><strong>Serial Only:</strong> For firmware older than 1.12.0</p>
<hr />
<h3 id="region-examples">Region Examples</h3>
<p><strong>Example 1: Using F Flag with Named Public Region</strong></p>

View File

@@ -922,6 +922,33 @@
<li class="md-nav__item">
<a href="../kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
MeshCore KISS Modem Protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../nrf52_power_management/" class="md-nav__link">
@@ -950,14 +977,14 @@
<li class="md-nav__item">
<a href="../packet_structure/" class="md-nav__link">
<a href="../packet_format/" class="md-nav__link">
<span class="md-ellipsis">
Packet Structure
Packet Format
@@ -984,7 +1011,7 @@
<span class="md-ellipsis">
Meshcore payloads
Payload Format

View File

@@ -418,6 +418,33 @@
<li class="md-nav__item">
<a href="../kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
MeshCore KISS Modem Protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../nrf52_power_management/" class="md-nav__link">
@@ -446,14 +473,14 @@
<li class="md-nav__item">
<a href="../packet_structure/" class="md-nav__link">
<a href="../packet_format/" class="md-nav__link">
<span class="md-ellipsis">
Packet Structure
Packet Format
@@ -480,7 +507,7 @@
<span class="md-ellipsis">
Meshcore payloads
Payload Format

View File

@@ -16,7 +16,7 @@
<link rel="prev" href="../docs/">
<link rel="next" href="../nrf52_power_management/">
<link rel="next" href="../kiss_modem_protocol/">
@@ -647,7 +647,7 @@
<a href="#37-q-my-repeater-maybe-suffering-from-deafness-due-to-high-power-interference-near-my-meshs-frequency-it-is-not-hearing-other-in-range-meshcore-radios-what-can-i-do" class="md-nav__link">
<span class="md-ellipsis">
3.7. Q: My repeater maybe suffering from deafness due to high power interference near my mesh's frequency, it is not hearing other in-range MeshCore radios. what can I do?
3.7. Q: My repeater maybe suffering from deafness due to high power interference near my mesh's frequency, it is not hearing other in-range MeshCore radios. What can I do?
</span>
</a>
@@ -658,7 +658,7 @@
<a href="#38-q-how-do-i-make-my-repeater-an-observer-on-the-mesh" class="md-nav__link">
<span class="md-ellipsis">
3.8 Q: How do I make my repeater an observer on the mesh
3.8. Q: How do I make my repeater an observer on the mesh?
</span>
</a>
@@ -1380,6 +1380,33 @@
<li class="md-nav__item">
<a href="../kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
MeshCore KISS Modem Protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../nrf52_power_management/" class="md-nav__link">
@@ -1408,14 +1435,14 @@
<li class="md-nav__item">
<a href="../packet_structure/" class="md-nav__link">
<a href="../packet_format/" class="md-nav__link">
<span class="md-ellipsis">
Packet Structure
Packet Format
@@ -1442,7 +1469,7 @@
<span class="md-ellipsis">
Meshcore payloads
Payload Format
@@ -1816,7 +1843,7 @@
<a href="#37-q-my-repeater-maybe-suffering-from-deafness-due-to-high-power-interference-near-my-meshs-frequency-it-is-not-hearing-other-in-range-meshcore-radios-what-can-i-do" class="md-nav__link">
<span class="md-ellipsis">
3.7. Q: My repeater maybe suffering from deafness due to high power interference near my mesh's frequency, it is not hearing other in-range MeshCore radios. what can I do?
3.7. Q: My repeater maybe suffering from deafness due to high power interference near my mesh's frequency, it is not hearing other in-range MeshCore radios. What can I do?
</span>
</a>
@@ -1827,7 +1854,7 @@
<a href="#38-q-how-do-i-make-my-repeater-an-observer-on-the-mesh" class="md-nav__link">
<span class="md-ellipsis">
3.8 Q: How do I make my repeater an observer on the mesh
3.8. Q: How do I make my repeater an observer on the mesh?
</span>
</a>
@@ -2586,8 +2613,8 @@
<li><a href="#34-q-what-is-the-password-to-join-a-room-server">3.4. Q: What is the password to join a room server?</a></li>
<li><a href="#35-q-can-i-retrieve-a-repeaters-private-key-or-set-a-repeaters-private-key">3.5. Q: Can I retrieve a repeater's private key or set a repeater's private key?</a></li>
<li><a href="#36-q-the-first-byte-of-my-repeaters-public-key-collides-with-an-exisitng-repeater-on-the-mesh--how-do-i-get-a-new-private-key-with-a-matching-public-key-that-has-its-first-byte-of-my-choosing">3.6. Q: The first byte of my repeater's public key collides with an exisitng repeater on the mesh. How do I get a new private key with a matching public key that has its first byte of my choosing?</a></li>
<li><a href="#37-q-my-repeater-maybe-suffering-from-deafness-due-to-high-power-interference-near-my-meshs-frequency-it-is-not-hearing-other-in-range-meshcore-radios--what-can-i-do">3.7. Q: My repeater maybe suffering from deafness due to high power interference near my mesh's frequency, it is not hearing other in-range MeshCore radios. what can I do?</a></li>
<li><a href="#38-q-how-do-i-make-my-repeater-an-observer-on-the-mesh">3.8 Q: How do I make my repeater an observer on the mesh</a></li>
<li><a href="#37-q-my-repeater-maybe-suffering-from-deafness-due-to-high-power-interference-near-my-meshs-frequency-it-is-not-hearing-other-in-range-meshcore-radios--what-can-i-do">3.7. Q: My repeater maybe suffering from deafness due to high power interference near my mesh's frequency, it is not hearing other in-range MeshCore radios. What can I do?</a></li>
<li><a href="#38-q-how-do-i-make-my-repeater-an-observer-on-the-mesh">3.8. Q: How do I make my repeater an observer on the mesh?</a></li>
<li><a href="#4-t-deck-related">4. T-Deck Related</a></li>
<li><a href="#41-q-is-there-a-user-guide-for-t-deck-t-pager-t-watch-or-t-display-pro">4.1. Q: Is there a user guide for T-Deck, T-Pager, T-Watch, or T-Display Pro?</a></li>
<li><a href="#42-q-what-are-the-steps-to-get-a-t-deck-into-dfu-device-firmware-update-mode">4.2. Q: What are the steps to get a T-Deck into DFU (Device Firmware Update) mode?</a></li>
@@ -2777,12 +2804,12 @@ Advert means to advertise yourself on the network. In Reticulum terms it would b
<p>Reboot the repeater after <code>set prv.key &lt;hex&gt;</code> command for the new private key to take effect.</p>
<h3 id="36-q-the-first-byte-of-my-repeaters-public-key-collides-with-an-exisitng-repeater-on-the-mesh-how-do-i-get-a-new-private-key-with-a-matching-public-key-that-has-its-first-byte-of-my-choosing">3.6. Q: The first byte of my repeater's public key collides with an exisitng repeater on the mesh. How do I get a new private key with a matching public key that has its first byte of my choosing?</h3>
<p><strong>A:</strong> You can generate a new private key and specific the first byte of its public key here: https://gessaman.com/mc-keygen/</p>
<h3 id="37-q-my-repeater-maybe-suffering-from-deafness-due-to-high-power-interference-near-my-meshs-frequency-it-is-not-hearing-other-in-range-meshcore-radios-what-can-i-do">3.7. Q: My repeater maybe suffering from deafness due to high power interference near my mesh's frequency, it is not hearing other in-range MeshCore radios. what can I do?</h3>
<p><strong>A:</strong> This may be due to the SX1262 radio's auto gain control feature. You can use this command to preiodically reset its AGC. </p>
<h3 id="37-q-my-repeater-maybe-suffering-from-deafness-due-to-high-power-interference-near-my-meshs-frequency-it-is-not-hearing-other-in-range-meshcore-radios-what-can-i-do">3.7. Q: My repeater maybe suffering from deafness due to high power interference near my mesh's frequency, it is not hearing other in-range MeshCore radios. What can I do?</h3>
<p><strong>A:</strong> This may be due to the SX1262 radio's auto gain control feature. You can use this command to periodically reset its AGC. </p>
<p><code>set agc.reset.interval &lt;number&gt;</code></p>
<p>The <code>&lt;number&gt;</code> unit is in seconds and is incremented by 4. <code>set agc.reset.interval 4</code> works well to cure deafness. </p>
<p>This is a very low cost operation. AGC reset is done by simply setting <code>state = STATE_IDLE;</code> in function <code>RadioLibWrapper::resetAGC()</code> in <code>RadioLibWrappers.cpp</code></p>
<h3 id="38-q-how-do-i-make-my-repeater-an-observer-on-the-mesh">3.8 Q: How do I make my repeater an observer on the mesh</h3>
<h3 id="38-q-how-do-i-make-my-repeater-an-observer-on-the-mesh">3.8. Q: How do I make my repeater an observer on the mesh?</h3>
<p><strong>A:</strong> The observer instruction is available here: https://analyzer.letsmesh.net/observer/onboard</p>
<hr />
<h2 id="4-t-deck-related">4. T-Deck Related</h2>

View File

@@ -368,6 +368,33 @@
<li class="md-nav__item">
<a href="kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
MeshCore KISS Modem Protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="nrf52_power_management/" class="md-nav__link">
@@ -396,14 +423,14 @@
<li class="md-nav__item">
<a href="packet_structure/" class="md-nav__link">
<a href="packet_format/" class="md-nav__link">
<span class="md-ellipsis">
Packet Structure
Packet Format
@@ -430,7 +457,7 @@
<span class="md-ellipsis">
Meshcore payloads
Payload Format
@@ -574,7 +601,7 @@
<li><a href="faq/">Frequently Asked Questions</a></li>
<li><a href="cli_commands/">CLI Commands</a></li>
<li><a href="companion_protocol/">Companion Protocol</a></li>
<li><a href="packet_structure/">Packet Structure</a></li>
<li><a href="packet_format/">Packet Format</a></li>
<li><a href="qr_codes/">QR Codes</a></li>
</ul>
<p>If you find a mistake in any of our documentation, or find something is missing, please feel free to open a pull request for us to review.</p>

File diff suppressed because it is too large Load Diff

View File

@@ -13,10 +13,10 @@
<link rel="canonical" href="https://meshcore-dev.github.io/meshcore/nrf52_power_management/">
<link rel="prev" href="../faq/">
<link rel="prev" href="../kiss_modem_protocol/">
<link rel="next" href="../packet_structure/">
<link rel="next" href="../packet_format/">
@@ -358,6 +358,33 @@
<li class="md-nav__item">
<a href="../kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
MeshCore KISS Modem Protocol
</span>
</a>
</li>
@@ -634,14 +661,14 @@
<li class="md-nav__item">
<a href="../packet_structure/" class="md-nav__link">
<a href="../packet_format/" class="md-nav__link">
<span class="md-ellipsis">
Packet Structure
Packet Format
@@ -668,7 +695,7 @@
<span class="md-ellipsis">
Meshcore payloads
Payload Format

View File

@@ -10,7 +10,7 @@
<link rel="canonical" href="https://meshcore-dev.github.io/meshcore/packet_structure/">
<link rel="canonical" href="https://meshcore-dev.github.io/meshcore/packet_format/">
<link rel="prev" href="../nrf52_power_management/">
@@ -27,7 +27,7 @@
<title>Packet Structure - MeshCore Docs</title>
<title>Packet Format - MeshCore Docs</title>
@@ -70,7 +70,7 @@
<div data-md-component="skip">
<a href="#packet-structure" class="md-skip">
<a href="#packet-format" class="md-skip">
Skip to content
</a>
@@ -105,7 +105,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Packet Structure
Packet Format
</span>
</div>
@@ -360,6 +360,33 @@
<li class="md-nav__item">
<a href="../kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
MeshCore KISS Modem Protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../nrf52_power_management/" class="md-nav__link">
@@ -404,7 +431,7 @@
<span class="md-ellipsis">
Packet Structure
Packet Format
@@ -422,7 +449,7 @@
<span class="md-ellipsis">
Packet Structure
Packet Format
@@ -448,47 +475,75 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#header-breakdown" class="md-nav__link">
<a href="#version-1-packet-format" class="md-nav__link">
<span class="md-ellipsis">
Header Breakdown
Version 1 Packet Format
</span>
</a>
<nav class="md-nav" aria-label="Version 1 Packet Format">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#packet-format_1" class="md-nav__link">
<span class="md-ellipsis">
Packet Format
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#route-type-values" class="md-nav__link">
<li class="md-nav__item">
<a href="#header-format" class="md-nav__link">
<span class="md-ellipsis">
Route Type Values
Header Format
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#payload-type-values" class="md-nav__link">
<li class="md-nav__item">
<a href="#route-types" class="md-nav__link">
<span class="md-ellipsis">
Payload Type Values
Route Types
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#payload-version-values" class="md-nav__link">
<li class="md-nav__item">
<a href="#payload-types" class="md-nav__link">
<span class="md-ellipsis">
Payload Version Values
Payload Types
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#payload-versions" class="md-nav__link">
<span class="md-ellipsis">
Payload Versions
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
@@ -513,7 +568,7 @@
<span class="md-ellipsis">
Meshcore payloads
Payload Format
@@ -634,47 +689,75 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#header-breakdown" class="md-nav__link">
<a href="#version-1-packet-format" class="md-nav__link">
<span class="md-ellipsis">
Header Breakdown
Version 1 Packet Format
</span>
</a>
<nav class="md-nav" aria-label="Version 1 Packet Format">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#packet-format_1" class="md-nav__link">
<span class="md-ellipsis">
Packet Format
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#route-type-values" class="md-nav__link">
<li class="md-nav__item">
<a href="#header-format" class="md-nav__link">
<span class="md-ellipsis">
Route Type Values
Header Format
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#payload-type-values" class="md-nav__link">
<li class="md-nav__item">
<a href="#route-types" class="md-nav__link">
<span class="md-ellipsis">
Payload Type Values
Route Types
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#payload-version-values" class="md-nav__link">
<li class="md-nav__item">
<a href="#payload-types" class="md-nav__link">
<span class="md-ellipsis">
Payload Version Values
Payload Types
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#payload-versions" class="md-nav__link">
<span class="md-ellipsis">
Payload Versions
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
@@ -694,7 +777,7 @@
<a href="https://github.com/meshcore-dev/meshcore/edit/main/docs/packet_structure.md" title="Edit this page" class="md-content__button md-icon" rel="edit">
<a href="https://github.com/meshcore-dev/meshcore/edit/main/docs/packet_format.md" title="Edit this page" class="md-content__button md-icon" rel="edit">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4zm10.2-7c.1 0 .3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1 23H12v-2.1l6.1-6.1z"/></svg>
</a>
@@ -702,7 +785,77 @@
<h1 id="packet-structure">Packet Structure</h1>
<h1 id="packet-format">Packet Format</h1>
<p>This document describes the MeshCore packet format.</p>
<ul>
<li><code>0xYY</code> indicates <code>YY</code> in hex notation.</li>
<li><code>0bYY</code> indicates <code>YY</code> in binary notation.</li>
<li>Bit 0 indicates the bit furthest to the right: <code>0000000X</code></li>
<li>Bit 7 indicates the bit furthest to the left: <code>X0000000</code></li>
</ul>
<h2 id="version-1-packet-format">Version 1 Packet Format</h2>
<p>This is the protocol level packet structure used in MeshCore firmware v1.12.0</p>
<pre><code>[header][transport_codes(optional)][path_length][path][payload]
</code></pre>
<ul>
<li><a href="#header-format">header</a> - 1 byte<ul>
<li>8-bit Format: <code>0bVVPPPPRR</code> - <code>V=Version</code> - <code>P=PayloadType</code> - <code>R=RouteType</code></li>
<li>Bits 0-1 - 2-bits - <a href="#route-types">Route Type</a><ul>
<li><code>0x00</code>/<code>0b00</code> - <code>ROUTE_TYPE_TRANSPORT_FLOOD</code> - Flood Routing + Transport Codes</li>
<li><code>0x01</code>/<code>0b01</code> - <code>ROUTE_TYPE_FLOOD</code> - Flood Routing</li>
<li><code>0x02</code>/<code>0b10</code> - <code>ROUTE_TYPE_DIRECT</code> - Direct Routing</li>
<li><code>0x03</code>/<code>0b11</code> - <code>ROUTE_TYPE_TRANSPORT_DIRECT</code> - Direct Routing + Transport Codes</li>
</ul>
</li>
<li>Bits 2-5 - 4-bits - <a href="#payload-types">Payload Type</a><ul>
<li><code>0x00</code>/<code>0b0000</code> - <code>PAYLOAD_TYPE_REQ</code> - Request (destination/source hashes + MAC)</li>
<li><code>0x01</code>/<code>0b0001</code> - <code>PAYLOAD_TYPE_RESPONSE</code> - Response to <code>REQ</code> or <code>ANON_REQ</code></li>
<li><code>0x02</code>/<code>0b0010</code> - <code>PAYLOAD_TYPE_TXT_MSG</code> - Plain text message</li>
<li><code>0x03</code>/<code>0b0011</code> - <code>PAYLOAD_TYPE_ACK</code> - Acknowledgment</li>
<li><code>0x04</code>/<code>0b0100</code> - <code>PAYLOAD_TYPE_ADVERT</code> - Node advertisement</li>
<li><code>0x05</code>/<code>0b0101</code> - <code>PAYLOAD_TYPE_GRP_TXT</code> - Group text message (unverified)</li>
<li><code>0x06</code>/<code>0b0110</code> - <code>PAYLOAD_TYPE_GRP_DATA</code> - Group datagram (unverified)</li>
<li><code>0x07</code>/<code>0b0111</code> - <code>PAYLOAD_TYPE_ANON_REQ</code> - Anonymous request</li>
<li><code>0x08</code>/<code>0b1000</code> - <code>PAYLOAD_TYPE_PATH</code> - Returned path</li>
<li><code>0x09</code>/<code>0b1001</code> - <code>PAYLOAD_TYPE_TRACE</code> - Trace a path, collecting SNR for each hop</li>
<li><code>0x0A</code>/<code>0b1010</code> - <code>PAYLOAD_TYPE_MULTIPART</code> - Packet is part of a sequence of packets</li>
<li><code>0x0B</code>/<code>0b1011</code> - <code>PAYLOAD_TYPE_CONTROL</code> - Control packet data (unencrypted)</li>
<li><code>0x0C</code>/<code>0b1100</code> - reserved</li>
<li><code>0x0D</code>/<code>0b1101</code> - reserved</li>
<li><code>0x0E</code>/<code>0b1110</code> - reserved</li>
<li><code>0x0F</code>/<code>0b1111</code> - <code>PAYLOAD_TYPE_RAW_CUSTOM</code> - Custom packet (raw bytes, custom encryption)</li>
</ul>
</li>
<li>Bits 6-7 - 2-bits - <a href="#payload-versions">Payload Version</a><ul>
<li><code>0x00</code>/<code>0b00</code> - v1 - 1-byte src/dest hashes, 2-byte MAC</li>
<li><code>0x01</code>/<code>0b01</code> - v2 - Future version (e.g., 2-byte hashes, 4-byte MAC)</li>
<li><code>0x02</code>/<code>0b10</code> - v3 - Future version</li>
<li><code>0x03</code>/<code>0b11</code> - v4 - Future version</li>
</ul>
</li>
</ul>
</li>
<li><code>transport_codes</code> - 4 bytes (optional)<ul>
<li>Only present for <code>ROUTE_TYPE_TRANSPORT_FLOOD</code> and <code>ROUTE_TYPE_TRANSPORT_DIRECT</code></li>
<li><code>transport_code_1</code> - 2 bytes - <code>uint16_t</code> - calculated from region scope</li>
<li><code>transport_code_2</code> - 2 bytes - <code>uint16_t</code> - reserved</li>
</ul>
</li>
<li><code>path_length</code> - 1 byte - Length of the path field in bytes</li>
<li><code>path</code> - size provided by <code>path_length</code> - Path to use for Direct Routing<ul>
<li>Up to a maximum of 64 bytes, defined by <code>MAX_PATH_SIZE</code></li>
<li>v1.12.0 firmware and older drops packets with <code>path_length</code> <a href="https://github.com/meshcore-dev/MeshCore/blob/e812632235274ffd2382adf5354168aec765d416/src/Dispatcher.cpp#L144">larger than 64</a></li>
</ul>
</li>
<li><code>payload</code> - variable length - Payload Data<ul>
<li>Up to a maximum 184 bytes, defined by <code>MAX_PACKET_PAYLOAD</code></li>
<li>Generally this is the remainder of the raw packet data</li>
<li>The firmware parses this data based on the provided Payload Type</li>
<li>v1.12.0 firmware and older drops packets with <code>payload</code> sizes <a href="https://github.com/meshcore-dev/MeshCore/blob/e812632235274ffd2382adf5354168aec765d416/src/Dispatcher.cpp#L152">larger than 184</a></li>
</ul>
</li>
</ul>
<h3 id="packet-format_1">Packet Format</h3>
<table>
<thead>
<tr>
@@ -715,7 +868,7 @@
<tr>
<td>header</td>
<td>1</td>
<td>Contains routing type, payload type, and payload version.</td>
<td>Contains routing type, payload type, and payload version</td>
</tr>
<tr>
<td>transport_codes</td>
@@ -723,25 +876,27 @@
<td>2x 16-bit transport codes (if ROUTE_TYPE_TRANSPORT_*)</td>
</tr>
<tr>
<td>path_len</td>
<td>path_length</td>
<td>1</td>
<td>Length of the path field in bytes.</td>
<td>Length of the path field in bytes</td>
</tr>
<tr>
<td>path</td>
<td>up to 64 (<code>MAX_PATH_SIZE</code>)</td>
<td>Stores the routing path if applicable.</td>
<td>Stores the routing path if applicable</td>
</tr>
<tr>
<td>payload</td>
<td>up to 184 (<code>MAX_PACKET_PAYLOAD</code>)</td>
<td>The actual data being transmitted.</td>
<td>Data for the provided Payload Type</td>
</tr>
</tbody>
</table>
<p>Note: see the <a href="../payloads/">payloads doc</a> for more information about the content of payload.</p>
<h2 id="header-breakdown">Header Breakdown</h2>
<p>bit 0 means the lowest bit (1s place)</p>
<blockquote>
<p>NOTE: see the <a href="../payloads/">Payloads</a> documentation for more information about the content of specific payload types.</p>
</blockquote>
<h3 id="header-format">Header Format</h3>
<p>Bit 0 means the lowest bit (1s place)</p>
<table>
<thead>
<tr>
@@ -756,23 +911,23 @@
<td>0-1</td>
<td><code>0x03</code></td>
<td>Route Type</td>
<td>Flood, Direct, Reserved - see below.</td>
<td>Flood, Direct, etc</td>
</tr>
<tr>
<td>2-5</td>
<td><code>0x3C</code></td>
<td>Payload Type</td>
<td>Request, Response, ACK, etc. - see below.</td>
<td>Request, Response, ACK, etc</td>
</tr>
<tr>
<td>6-7</td>
<td><code>0xC0</code></td>
<td>Payload Version</td>
<td>Versioning of the payload format - see below.</td>
<td>Versioning of the payload format</td>
</tr>
</tbody>
</table>
<h2 id="route-type-values">Route Type Values</h2>
<h3 id="route-types">Route Types</h3>
<table>
<thead>
<tr>
@@ -785,26 +940,26 @@
<tr>
<td><code>0x00</code></td>
<td><code>ROUTE_TYPE_TRANSPORT_FLOOD</code></td>
<td>Flood routing mode + transport codes</td>
<td>Flood Routing + Transport Codes</td>
</tr>
<tr>
<td><code>0x01</code></td>
<td><code>ROUTE_TYPE_FLOOD</code></td>
<td>Flood routing mode (builds up path).</td>
<td>Flood Routing</td>
</tr>
<tr>
<td><code>0x02</code></td>
<td><code>ROUTE_TYPE_DIRECT</code></td>
<td>Direct route (path is supplied).</td>
<td>Direct Routing</td>
</tr>
<tr>
<td><code>0x03</code></td>
<td><code>ROUTE_TYPE_TRANSPORT_DIRECT</code></td>
<td>direct route + transport codes</td>
<td>Direct Routing + Transport Codes</td>
</tr>
</tbody>
</table>
<h2 id="payload-type-values">Payload Type Values</h2>
<h3 id="payload-types">Payload Types</h3>
<table>
<thead>
<tr>
@@ -817,86 +972,86 @@
<tr>
<td><code>0x00</code></td>
<td><code>PAYLOAD_TYPE_REQ</code></td>
<td>Request (destination/source hashes + MAC).</td>
<td>Request (destination/source hashes + MAC)</td>
</tr>
<tr>
<td><code>0x01</code></td>
<td><code>PAYLOAD_TYPE_RESPONSE</code></td>
<td>Response to REQ or ANON_REQ.</td>
<td>Response to <code>REQ</code> or <code>ANON_REQ</code></td>
</tr>
<tr>
<td><code>0x02</code></td>
<td><code>PAYLOAD_TYPE_TXT_MSG</code></td>
<td>Plain text message.</td>
<td>Plain text message</td>
</tr>
<tr>
<td><code>0x03</code></td>
<td><code>PAYLOAD_TYPE_ACK</code></td>
<td>Acknowledgment.</td>
<td>Acknowledgment</td>
</tr>
<tr>
<td><code>0x04</code></td>
<td><code>PAYLOAD_TYPE_ADVERT</code></td>
<td>Node advertisement.</td>
<td>Node advertisement</td>
</tr>
<tr>
<td><code>0x05</code></td>
<td><code>PAYLOAD_TYPE_GRP_TXT</code></td>
<td>Group text message (unverified).</td>
<td>Group text message (unverified)</td>
</tr>
<tr>
<td><code>0x06</code></td>
<td><code>PAYLOAD_TYPE_GRP_DATA</code></td>
<td>Group datagram (unverified).</td>
<td>Group datagram (unverified)</td>
</tr>
<tr>
<td><code>0x07</code></td>
<td><code>PAYLOAD_TYPE_ANON_REQ</code></td>
<td>Anonymous request.</td>
<td>Anonymous request</td>
</tr>
<tr>
<td><code>0x08</code></td>
<td><code>PAYLOAD_TYPE_PATH</code></td>
<td>Returned path.</td>
<td>Returned path</td>
</tr>
<tr>
<td><code>0x09</code></td>
<td><code>PAYLOAD_TYPE_TRACE</code></td>
<td>trace a path, collecting SNI for each hop.</td>
<td>Trace a path, collecting SNR for each hop</td>
</tr>
<tr>
<td><code>0x0A</code></td>
<td><code>PAYLOAD_TYPE_MULTIPART</code></td>
<td>packet is part of a sequence of packets.</td>
<td>Packet is part of a sequence of packets</td>
</tr>
<tr>
<td><code>0x0B</code></td>
<td><code>PAYLOAD_TYPE_CONTROL</code></td>
<td>control packet data (unencrypted)</td>
<td>Control packet data (unencrypted)</td>
</tr>
<tr>
<td><code>0x0C</code></td>
<td>.</td>
<td>reserved</td>
<td>reserved</td>
</tr>
<tr>
<td><code>0x0D</code></td>
<td>.</td>
<td>reserved</td>
<td>reserved</td>
</tr>
<tr>
<td><code>0x0E</code></td>
<td>.</td>
<td>reserved</td>
<td>reserved</td>
</tr>
<tr>
<td><code>0x0F</code></td>
<td><code>PAYLOAD_TYPE_RAW_CUSTOM</code></td>
<td>Custom packet (raw bytes, custom encryption).</td>
<td>Custom packet (raw bytes, custom encryption)</td>
</tr>
</tbody>
</table>
<h2 id="payload-version-values">Payload Version Values</h2>
<h3 id="payload-versions">Payload Versions</h3>
<table>
<thead>
<tr>
@@ -909,22 +1064,22 @@
<tr>
<td><code>0x00</code></td>
<td>1</td>
<td>1-byte src/dest hashes, 2-byte MAC.</td>
<td>1-byte src/dest hashes, 2-byte MAC</td>
</tr>
<tr>
<td><code>0x01</code></td>
<td>2</td>
<td>Future version (e.g., 2-byte hashes, 4-byte MAC).</td>
<td>Future version (e.g., 2-byte hashes, 4-byte MAC)</td>
</tr>
<tr>
<td><code>0x02</code></td>
<td>3</td>
<td>Future version.</td>
<td>Future version</td>
</tr>
<tr>
<td><code>0x03</code></td>
<td>4</td>
<td>Future version.</td>
<td>Future version</td>
</tr>
</tbody>
</table>

View File

@@ -13,7 +13,7 @@
<link rel="canonical" href="https://meshcore-dev.github.io/meshcore/payloads/">
<link rel="prev" href="../packet_structure/">
<link rel="prev" href="../packet_format/">
<link rel="next" href="../qr_codes/">
@@ -27,7 +27,7 @@
<title>Meshcore payloads - MeshCore Docs</title>
<title>Payload Format - MeshCore Docs</title>
@@ -70,7 +70,7 @@
<div data-md-component="skip">
<a href="#meshcore-payloads" class="md-skip">
<a href="#payload-format" class="md-skip">
Skip to content
</a>
@@ -105,7 +105,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Meshcore payloads
Payload Format
</span>
</div>
@@ -360,6 +360,33 @@
<li class="md-nav__item">
<a href="../kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
MeshCore KISS Modem Protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../nrf52_power_management/" class="md-nav__link">
@@ -388,14 +415,14 @@
<li class="md-nav__item">
<a href="../packet_structure/" class="md-nav__link">
<a href="../packet_format/" class="md-nav__link">
<span class="md-ellipsis">
Packet Structure
Packet Format
@@ -431,7 +458,7 @@
<span class="md-ellipsis">
Meshcore payloads
Payload Format
@@ -449,7 +476,7 @@
<span class="md-ellipsis">
Meshcore payloads
Payload Format
@@ -636,8 +663,8 @@
<h1 id="meshcore-payloads">Meshcore payloads</h1>
<p>Inside of each <a href="../packet_structure/">meshcore packet</a> is a payload, identified by the payload type in the packet header. The types of payloads are:</p>
<h1 id="payload-format">Payload Format</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>
@@ -860,7 +887,7 @@
<tr>
<td>extra type</td>
<td>1</td>
<td>extra, bundled payload type, eg., acknowledgement or response. Same values as in <a href="../packet_structure/">packet structure</a></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>

View File

@@ -360,6 +360,33 @@
<li class="md-nav__item">
<a href="../kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
MeshCore KISS Modem Protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../nrf52_power_management/" class="md-nav__link">
@@ -388,14 +415,14 @@
<li class="md-nav__item">
<a href="../packet_structure/" class="md-nav__link">
<a href="../packet_format/" class="md-nav__link">
<span class="md-ellipsis">
Packet Structure
Packet Format
@@ -422,7 +449,7 @@
<span class="md-ellipsis">
Meshcore payloads
Payload Format

File diff suppressed because one or more lines are too long

View File

@@ -2,46 +2,50 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://meshcore-dev.github.io/meshcore/</loc>
<lastmod>2026-02-10</lastmod>
<lastmod>2026-02-15</lastmod>
</url>
<url>
<loc>https://meshcore-dev.github.io/meshcore/cli_commands/</loc>
<lastmod>2026-02-10</lastmod>
<lastmod>2026-02-15</lastmod>
</url>
<url>
<loc>https://meshcore-dev.github.io/meshcore/companion_protocol/</loc>
<lastmod>2026-02-10</lastmod>
<lastmod>2026-02-15</lastmod>
</url>
<url>
<loc>https://meshcore-dev.github.io/meshcore/docs/</loc>
<lastmod>2026-02-10</lastmod>
<lastmod>2026-02-15</lastmod>
</url>
<url>
<loc>https://meshcore-dev.github.io/meshcore/faq/</loc>
<lastmod>2026-02-10</lastmod>
<lastmod>2026-02-15</lastmod>
</url>
<url>
<loc>https://meshcore-dev.github.io/meshcore/kiss_modem_protocol/</loc>
<lastmod>2026-02-15</lastmod>
</url>
<url>
<loc>https://meshcore-dev.github.io/meshcore/nrf52_power_management/</loc>
<lastmod>2026-02-10</lastmod>
<lastmod>2026-02-15</lastmod>
</url>
<url>
<loc>https://meshcore-dev.github.io/meshcore/packet_structure/</loc>
<lastmod>2026-02-10</lastmod>
<loc>https://meshcore-dev.github.io/meshcore/packet_format/</loc>
<lastmod>2026-02-15</lastmod>
</url>
<url>
<loc>https://meshcore-dev.github.io/meshcore/payloads/</loc>
<lastmod>2026-02-10</lastmod>
<lastmod>2026-02-15</lastmod>
</url>
<url>
<loc>https://meshcore-dev.github.io/meshcore/qr_codes/</loc>
<lastmod>2026-02-10</lastmod>
<lastmod>2026-02-15</lastmod>
</url>
<url>
<loc>https://meshcore-dev.github.io/meshcore/stats_binary_frames/</loc>
<lastmod>2026-02-10</lastmod>
<lastmod>2026-02-15</lastmod>
</url>
<url>
<loc>https://meshcore-dev.github.io/meshcore/terminal_chat_cli/</loc>
<lastmod>2026-02-10</lastmod>
<lastmod>2026-02-15</lastmod>
</url>
</urlset>

Binary file not shown.

View File

@@ -360,6 +360,33 @@
<li class="md-nav__item">
<a href="../kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
MeshCore KISS Modem Protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../nrf52_power_management/" class="md-nav__link">
@@ -388,14 +415,14 @@
<li class="md-nav__item">
<a href="../packet_structure/" class="md-nav__link">
<a href="../packet_format/" class="md-nav__link">
<span class="md-ellipsis">
Packet Structure
Packet Format
@@ -422,7 +449,7 @@
<span class="md-ellipsis">
Meshcore payloads
Payload Format
@@ -1237,7 +1264,7 @@
</code></pre>
<hr />
<h2 id="resp_code_stats-stats_type_packets-24-2">RESP_CODE_STATS + STATS_TYPE_PACKETS (24, 2)</h2>
<p><strong>Total Frame Size:</strong> 26 bytes</p>
<p><strong>Total Frame Size:</strong> 26 bytes (legacy) or 30 bytes (includes <code>recv_errors</code>)</p>
<table>
<thead>
<tr>
@@ -1314,6 +1341,14 @@
<td>Packets received via direct routing</td>
<td>0 - 4,294,967,295</td>
</tr>
<tr>
<td>26</td>
<td>4</td>
<td>uint32_t</td>
<td>recv_errors</td>
<td>Receive/CRC errors (RadioLib); present only in 30-byte frame</td>
<td>0 - 4,294,967,295</td>
</tr>
</tbody>
</table>
<h3 id="notes">Notes</h3>
@@ -1321,6 +1356,7 @@
<li>Counters are cumulative from boot and may wrap.</li>
<li><code>recv = flood_rx + direct_rx</code></li>
<li><code>sent = flood_tx + direct_tx</code></li>
<li>Clients should accept frame length ≥ 26; if length ≥ 30, parse <code>recv_errors</code> at offset 26.</li>
</ul>
<h3 id="example-structure-cc_2">Example Structure (C/C++)</h3>
<pre><code class="language-c">struct StatsPackets {
@@ -1332,6 +1368,7 @@
uint32_t direct_tx;
uint32_t flood_rx;
uint32_t direct_rx;
uint32_t recv_errors; // present when frame size is 30
} __attribute__((packed));
</code></pre>
<hr />
@@ -1382,11 +1419,12 @@ def parse_stats_radio(frame):
}
def parse_stats_packets(frame):
&quot;&quot;&quot;Parse RESP_CODE_STATS + STATS_TYPE_PACKETS frame (26 bytes)&quot;&quot;&quot;
&quot;&quot;&quot;Parse RESP_CODE_STATS + STATS_TYPE_PACKETS frame (26 or 30 bytes)&quot;&quot;&quot;
assert len(frame) &gt;= 26, &quot;STATS_TYPE_PACKETS frame too short&quot;
response_code, stats_type, recv, sent, flood_tx, direct_tx, flood_rx, direct_rx = \
struct.unpack('&lt;B B I I I I I I', frame)
struct.unpack('&lt;B B I I I I I I', frame[:26])
assert response_code == 24 and stats_type == 2, &quot;Invalid response type&quot;
return {
result = {
'recv': recv,
'sent': sent,
'flood_tx': flood_tx,
@@ -1394,6 +1432,10 @@ def parse_stats_packets(frame):
'flood_rx': flood_rx,
'direct_rx': direct_rx
}
if len(frame) &gt;= 30:
(recv_errors,) = struct.unpack('&lt;I', frame[26:30])
result['recv_errors'] = recv_errors
return result
</code></pre>
<hr />
<h2 id="command-usage-example-javascripttypescript">Command Usage Example (JavaScript/TypeScript)</h2>
@@ -1442,6 +1484,7 @@ interface StatsPackets {
direct_tx: number;
flood_rx: number;
direct_rx: number;
recv_errors?: number; // present when frame is 30 bytes
}
function parseStatsCore(buffer: ArrayBuffer): StatsCore {
@@ -1477,12 +1520,15 @@ function parseStatsRadio(buffer: ArrayBuffer): StatsRadio {
function parseStatsPackets(buffer: ArrayBuffer): StatsPackets {
const view = new DataView(buffer);
if (buffer.byteLength &lt; 26) {
throw new Error('STATS_TYPE_PACKETS frame too short');
}
const response_code = view.getUint8(0);
const stats_type = view.getUint8(1);
if (response_code !== 24 || stats_type !== 2) {
throw new Error('Invalid response type');
}
return {
const result: StatsPackets = {
recv: view.getUint32(2, true),
sent: view.getUint32(6, true),
flood_tx: view.getUint32(10, true),
@@ -1490,6 +1536,10 @@ function parseStatsPackets(buffer: ArrayBuffer): StatsPackets {
flood_rx: view.getUint32(18, true),
direct_rx: view.getUint32(22, true)
};
if (buffer.byteLength &gt;= 30) {
result.recv_errors = view.getUint32(26, true);
}
return result;
}
</code></pre>
<hr />

View File

@@ -358,6 +358,33 @@
<li class="md-nav__item">
<a href="../kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
MeshCore KISS Modem Protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../nrf52_power_management/" class="md-nav__link">
@@ -386,14 +413,14 @@
<li class="md-nav__item">
<a href="../packet_structure/" class="md-nav__link">
<a href="../packet_format/" class="md-nav__link">
<span class="md-ellipsis">
Packet Structure
Packet Format
@@ -420,7 +447,7 @@
<span class="md-ellipsis">
Meshcore payloads
Payload Format