From 515af35b13dbf47739962d4376ccdd62a79aa48a Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Sun, 29 Mar 2026 06:33:35 +1100 Subject: [PATCH] * docs changes for PAYLOAD_TYPE_GRP_DATA --- docs/cli_commands.md | 2 +- docs/number_allocations.md | 16 ++++++++++++++++ docs/payloads.md | 18 +++++++++++++++++- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 docs/number_allocations.md diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 792cf1f0..c6624950 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -557,7 +557,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore - `set agc.reset.interval ` **Parameters:** -- `value`: Interval in seconds rounded down to a multiple of 4 (17 becomes 16) +- `value`: Interval in seconds rounded down to a multiple of 4 (17 becomes 16). 0 to disable. **Default:** `0.0` diff --git a/docs/number_allocations.md b/docs/number_allocations.md new file mode 100644 index 00000000..ea36f830 --- /dev/null +++ b/docs/number_allocations.md @@ -0,0 +1,16 @@ +# Number Allocations + +This document lists unique numbers/identifiers used in various MeshCore protcol payloads. + +# Group Data Types + +The `PAYLOAD_TYPE_GRP_DATA` payloads have a 16-bit data-type field, which identifies which application the packet is for. + +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. + +The 16-bit types are allocated in blocks of 16, ie. the lower 4-bits is the range. + +| Data-Type range | App name | Contact | +|-----------------|--------------------------|------------------------------------------------------| +| 000x | -reserved- | | +| FFFx | -reserved- | | diff --git a/docs/payloads.md b/docs/payloads.md index 15fec757..7745ac61 100644 --- a/docs/payloads.md +++ b/docs/payloads.md @@ -226,7 +226,7 @@ txt_type | reply path | (variable) | reply path | -# Group text message / datagram +# Group text message | Field | Size (bytes) | Description | |--------------|-----------------|--------------------------------------------| @@ -236,6 +236,22 @@ txt_type 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 `: ` (eg., `user123: I'm on my way`). +# Group datagram + +| Field | Size (bytes) | Description | +|--------------|-----------------|--------------------------------------------| +| channel hash | 1 | first byte of SHA256 of channel's shared key | +| cipher MAC | 2 | MAC for encrypted data in next field | +| ciphertext | rest of payload | encrypted data, see below for details | + +The data contained in the ciphertext uses the format below: + +| Field | Size (bytes) | Description | +|--------------|-----------------|--------------------------------------------| +| data type | 2 | Identifier for type of data. (See number_allocations.md) | +| data len | 1 | byte length of data | +| data | rest of payload | (depends on data type) | + # Control data