Skip to content

Commit dee3e26

Browse files
committed
Merge branch 'dev'
# Conflicts: # docs/faq.md
2 parents bfd4800 + 3751785 commit dee3e26

108 files changed

Lines changed: 4830 additions & 720 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "MeshCore",
33
"image": "mcr.microsoft.com/devcontainers/python:3-bookworm",
44
"features": {
5-
"ghcr.io/devcontainers-extra/features/bun:1": {},
5+
"ghcr.io/devcontainers/features/node:1": {},
66
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
77
"packages": [
88
"sudo"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ cmake-*
1616
compile_commands.json
1717
.venv/
1818
venv/
19+
platformio.local.ini

arch/esp32/AsyncElegantOTA/src/AsyncElegantOTA.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#include "WiFi.h"
1616
#include "AsyncTCP.h"
1717
#include "Update.h"
18-
#include "esp_int_wdt.h"
19-
#include "esp_task_wdt.h"
2018
#endif
2119

2220
#include "Hash.h"

boards/heltec_t096.json

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"ldscript": "nrf52840_s140_v6.ld"
5+
},
6+
"core": "nRF5",
7+
"cpu": "cortex-m4",
8+
"extra_flags": "-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA",
9+
"f_cpu": "64000000L",
10+
"hwids": [
11+
["0x239A","0x8029"],
12+
["0x239A","0x0029"],
13+
["0x239A","0x002A"],
14+
["0x239A","0x802A"]
15+
],
16+
"usb_product": "HT-n5262G",
17+
"mcu": "nrf52840",
18+
"variant": "Heltec_T096_Board",
19+
"bsp": {
20+
"name": "adafruit"
21+
},
22+
"softdevice": {
23+
"sd_flags": "-DS140",
24+
"sd_name": "s140",
25+
"sd_version": "6.1.1",
26+
"sd_fwid": "0x00B6"
27+
},
28+
"bootloader": {
29+
"settings_addr": "0xFF000"
30+
}
31+
},
32+
"connectivity": [
33+
"bluetooth"
34+
],
35+
"debug": {
36+
"jlink_device": "nRF52840_xxAA",
37+
"svd_path": "nrf52840.svd",
38+
"openocd_target": "nrf52.cfg"
39+
},
40+
"frameworks": [
41+
"arduino"
42+
],
43+
"name": "Heltec T096 Board",
44+
"upload": {
45+
"maximum_ram_size": 235520,
46+
"maximum_size": 815104,
47+
"speed": 115200,
48+
"protocol": "nrfutil",
49+
"protocols": [
50+
"jlink",
51+
"nrfjprog",
52+
"nrfutil",
53+
"stlink"
54+
],
55+
"use_1200bps_touch": true,
56+
"require_upload_port": true,
57+
"wait_for_upload_port": true
58+
},
59+
"url": "https://heltec.org/",
60+
"vendor": "Heltec"
61+
}

docs/cli_commands.md

Lines changed: 75 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ This document provides an overview of CLI commands that can be sent to MeshCore
108108

109109
---
110110

111+
### Discover zero hop neighbors
112+
113+
**Usage:**
114+
- `discover.neighbors`
115+
116+
---
117+
111118
## Statistics
112119

113120
### Clear Stats
@@ -212,6 +219,20 @@ This document provides an overview of CLI commands that can be sent to MeshCore
212219

213220
---
214221

222+
#### View or change the boosted receive gain mode
223+
**Usage:**
224+
- `get radio.rxgain`
225+
- `set radio.rxgain <state>`
226+
227+
**Parameters:**
228+
- `state`: `on`|`off`
229+
230+
**Default:** `off`
231+
232+
**Note:** Only available on SX1262 and SX1268 based boards.
233+
234+
---
235+
215236
#### Change the radio parameters for a set duration
216237
**Usage:**
217238
- `tempradio <freq>,<bw>,<sf>,<cr>,<timeout_mins>`
@@ -240,6 +261,22 @@ This document provides an overview of CLI commands that can be sent to MeshCore
240261
**Note:** Requires reboot to apply
241262
**Serial Only:** `set freq <frequency>`
242263

264+
---
265+
266+
#### View or change this node's rx boosted gain mode (SX12xx only, v1.14.1+)
267+
**Usage:**
268+
- `get radio.rxgain`
269+
- `set radio.rxgain <state>`
270+
271+
**Parameters:**
272+
- `state`: `on`|`off`
273+
274+
**Default:** `on`
275+
276+
**Temporary Note:** If you upgraded from an older version to 1.14.1 without erasing flash, this setting is `off` because of [#2118](https://github.com/meshcore-dev/MeshCore/issues/2118)
277+
278+
---
279+
243280
### System
244281

245282
#### View or change this node's name
@@ -479,7 +516,29 @@ This document provides an overview of CLI commands that can be sent to MeshCore
479516

480517
---
481518

519+
#### View or change the duty cycle limit
520+
**Usage:**
521+
- `get dutycycle`
522+
- `set dutycycle <value>`
523+
524+
**Parameters:**
525+
- `value`: Duty cycle percentage (1-100)
526+
527+
**Default:** `50%` (equivalent to airtime factor 1.0)
528+
529+
**Examples:**
530+
- `set dutycycle 100` — no duty cycle limit
531+
- `set dutycycle 50` — 50% duty cycle (default)
532+
- `set dutycycle 10` — 10% duty cycle
533+
- `set dutycycle 1` — 1% duty cycle (strictest EU requirement)
534+
535+
> **Note:** Added in firmware v1.15.0
536+
537+
---
538+
482539
#### View or change the airtime factor (duty cycle limit)
540+
> **Deprecated** as of firmware v1.15.0. Use [`get/set dutycycle`](#view-or-change-the-duty-cycle-limit) instead.
541+
483542
**Usage:**
484543
- `get af`
485544
- `set af <value>`
@@ -489,8 +548,8 @@ This document provides an overview of CLI commands that can be sent to MeshCore
489548
- `af = 1`~50% duty
490549
- `af = 2`~33% duty
491550
- `af = 3`~25% duty
492-
- `af = 9`~10% duty
493-
Yyou are responsible for choosing a value that is appropriate for your jurisdiction and channel plan (for example EU 868 Mhz 10% duty cycle regulation).
551+
- `af = 9`~10% duty
552+
You are responsible for choosing a value that is appropriate for your jurisdiction and channel plan (for example EU 868 Mhz 10% duty cycle regulation).
494553

495554
**Default:** `1.0`
496555

@@ -514,7 +573,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
514573
- `set agc.reset.interval <value>`
515574

516575
**Parameters:**
517-
- `value`: Interval in seconds rounded down to a multiple of 4 (17 becomes 16)
576+
- `value`: Interval in seconds rounded down to a multiple of 4 (17 becomes 16). 0 to disable.
518577

519578
**Default:** `0.0`
520579

@@ -671,6 +730,16 @@ This document provides an overview of CLI commands that can be sent to MeshCore
671730

672731
---
673732

733+
#### View or change the default scope region for this node
734+
**Usage:**
735+
- `region default`
736+
- `region default {name|<null>}`
737+
738+
**Parameters:**
739+
- `name`: Region name, or <null> to reset/clear
740+
741+
---
742+
674743
#### Create a new region
675744
**Usage:**
676745
- `region put <name> [parent_name]`
@@ -813,7 +882,9 @@ region save
813882

814883
**Default:** `off`
815884

816-
**Note:** Output format: `{status}, {fix}, {sat count}` (when enabled)
885+
**Note:** Output format:
886+
- `off` when the GPS hardware is disabled
887+
- `on, {active|deactivated}, {fix|no fix}, {sat count} sats` when the GPS hardware is enabled
817888

818889
---
819890

docs/companion_protocol.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,33 @@ Bytes 7+: Message Text (UTF-8, variable length)
281281

282282
---
283283

284+
### 6. Send Channel Data Datagram
285+
286+
**Purpose**: Send binary datagram data to a channel.
287+
288+
**Command Format**:
289+
```
290+
Byte 0: 0x3E
291+
Bytes 1-2: Data Type (`data_type`, 16-bit little-endian)
292+
Byte 3: Channel Index (0-7)
293+
Bytes 4+: Binary payload bytes (variable length)
294+
```
295+
296+
**Data Type / Transport Mapping**:
297+
- `0x0000` is invalid for this command.
298+
- `0xFFFF` (`DATA_TYPE_DEV`) is the developer namespace for experimenting and developing apps.
299+
- Other non-zero values can be used as assigned application/community namespaces.
300+
301+
**Note**: Applications that need a timestamp should encode it inside the binary payload.
302+
303+
**Limits**:
304+
- Maximum payload length is `163` bytes.
305+
- Larger payloads are rejected with `PACKET_ERROR`.
306+
307+
**Response**: `PACKET_OK` (0x00) on success
308+
309+
---
310+
284311
### 6. Get Message
285312

286313
**Purpose**: Request the next queued message from the device.

docs/faq.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ https://github.com/meshcore-dev/MeshCore/blob/main/src/Packet.h#L19
428428
#define PAYLOAD_TYPE_TXT_MSG 0x02 // a plain text message (prefixed with dest/src hashes, MAC) (enc data: timestamp, text)
429429
#define PAYLOAD_TYPE_ACK 0x03 // a simple ack #define PAYLOAD_TYPE_ADVERT 0x04 // a node advertising its Identity
430430
#define PAYLOAD_TYPE_GRP_TXT 0x05 // an (unverified) group text message (prefixed with channel hash, MAC) (enc data: timestamp, "name: msg")
431-
#define PAYLOAD_TYPE_GRP_DATA 0x06 // an (unverified) group datagram (prefixed with channel hash, MAC) (enc data: timestamp, blob)
431+
#define PAYLOAD_TYPE_GRP_DATA 0x06 // an (unverified) group datagram (prefixed with channel hash, MAC) (enc data: data_type, data_len, blob)
432432
#define PAYLOAD_TYPE_ANON_REQ 0x07 // generic request (prefixed with dest_hash, ephemeral pub_key, MAC) (enc data: ...)
433433
#define PAYLOAD_TYPE_PATH 0x08 // returned path (prefixed with dest/src hashes, MAC) (enc data: path, extra)
434434

@@ -740,7 +740,7 @@ Allow the browser user on it:
740740
---
741741
## 7. Other Questions:
742742

743-
### 7.1. Q: How to update nRF (RAK, T114, Seed XIAO) repeater and room server firmware over the air using the new simpler DFU app?
743+
### 7.1. Q: How to update nRF (RAK, T114, Seed XIAO) companion, repeater and room server firmware over the air using the new simpler DFU app?
744744

745745
**A:** The steps below work on both Android and iOS as nRF has made both apps' user interface the same on both platforms:
746746

@@ -755,8 +755,14 @@ Allow the browser user on it:
755755
10. Select the device you want to update. If the device you want to update is not on the list, try enabling`OTA` on the device again
756756
11. If the device is not found, enable `Force Scanning` in the DFU app
757757
12. Tab the `Upload` to begin OTA update
758-
13. If it fails, try turning off and on Bluetooth on your phone. If that doesn't work, try rebooting your phone.
759-
14. Wait for the update to complete. It can take a few minutes.
758+
13. If it fails, try turning off and on Bluetooth on your phone. If that doesn't work, try rebooting your phone. If you keep getting failures at the "Enabling Bootloader" step, try forgetting the NRF board in your IOS or Andriod device's bluetooth settings and re-pair it through the DFU app.
759+
14. Wait for the update to complete. It can take a few minutes.
760+
15. It is strongly recommended that you install and use the OTAFIX bootloader at https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX.
761+
16. To update a companion node over OTA, it must be running companion firmware v1.15 or greater.
762+
17. Please see the Meshcore Blog for additional information on OTA firmware flashing:
763+
- https://blog.meshcore.io/2026/04/06/otafix-bootloader
764+
- https://blog.meshcore.io/2026/04/02/nrf-ota-update
765+
760766

761767
#### 7.1.1 Q: Can I update Seeed Studio Wio Tracker L1 Pro using OTA?
762768
**A:** You can flash this safer bootloader to the Wio Tracker L1 Pro

docs/nrf52_power_management.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ Shutdown reason codes (stored in GPREGRET2):
3333

3434
## Supported Boards
3535

36+
3637
| Board | Implemented | LPCOMP wake | VBUS wake |
3738
|-------|-------------|-------------|-----------|
3839
| Seeed Studio XIAO nRF52840 (`xiao_nrf52`) | Yes | Yes | Yes |
3940
| RAK4631 (`rak4631`) | Yes | Yes | Yes |
4041
| Heltec T114 (`heltec_t114`) | Yes | Yes | Yes |
42+
| GAT562 Mesh Watch13 | Yes | Yes | Yes |
4143
| Promicro nRF52840 | No | No | No |
4244
| RAK WisMesh Tag | No | No | No |
4345
| Heltec Mesh Solar | No | No | No |

docs/number_allocations.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Number Allocations
2+
3+
This document lists unique numbers/identifiers used in various MeshCore protcol payloads.
4+
5+
# Group Data Types
6+
7+
The `PAYLOAD_TYPE_GRP_DATA` payloads have a 16-bit data-type field, which identifies which application the packet is for.
8+
9+
To make sure multiple applications can function without interfering with each other, the table below is for reserving various ranges of data-type values. Just modify this table, adding a row, then submit a PR to have it authorised/merged.
10+
11+
NOTE: the range FF00 - FFFF is for use while you're developing, doing POC, and for these you don't need to request to use/allocate.
12+
13+
Once you have a working app/project, you need to be able to demonstrate it exists/works, and THEN request type IDs. So, just use the testing/dev range while developing, then request IDs before you transition to publishing your project.
14+
15+
| Data-Type range | App name | Contact |
16+
|-----------------|-----------------------------|------------------------------------------------------|
17+
| 0000 - 00FF | -reserved for internal use- | |
18+
| FF00 - FFFF | -reserved for testing/dev- | |
19+
20+
(add rows, inside the range 0100 - FEFF for custom apps)

docs/payloads.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ txt_type
226226
| reply path | (variable) | reply path |
227227

228228

229-
# Group text message / datagram
229+
# Group text message
230230

231231
| Field | Size (bytes) | Description |
232232
|--------------|-----------------|--------------------------------------------|
@@ -236,6 +236,22 @@ txt_type
236236

237237
The plaintext contained in the ciphertext matches the format described in [plain text message](#plain-text-message). Specifically, it consists of a four byte timestamp, a flags byte, and the message. The flags byte will generally be `0x00` because it is a "plain text message". The message will be of the form `<sender name>: <message body>` (eg., `user123: I'm on my way`).
238238

239+
# Group datagram
240+
241+
| Field | Size (bytes) | Description |
242+
|--------------|-----------------|--------------------------------------------|
243+
| channel hash | 1 | first byte of SHA256 of channel's shared key |
244+
| cipher MAC | 2 | MAC for encrypted data in next field |
245+
| ciphertext | rest of payload | encrypted data, see below for details |
246+
247+
The data contained in the ciphertext uses the format below:
248+
249+
| Field | Size (bytes) | Description |
250+
|--------------|-----------------|--------------------------------------------|
251+
| data type | 2 | Identifier for type of data. (See number_allocations.md) |
252+
| data len | 1 | byte length of data |
253+
| data | rest of payload | (depends on data type) |
254+
239255

240256
# Control data
241257

0 commit comments

Comments
 (0)