From 569a4b3ac2977b0d9611a2bc0bccf970d6d07378 Mon Sep 17 00:00:00 2001 From: Kernel Panic Date: Tue, 7 Jul 2026 17:44:03 +0200 Subject: [PATCH] Add compact chunked client API payload --- meshtastic/mesh.options | 3 +-- meshtastic/mesh.proto | 31 ++++++++++++++++++------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 5a0f2bde8..7e8c11fa0 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -113,8 +113,7 @@ *MqttClientProxyMessage.data max_size:435 *MqttClientProxyMessage.text max_size:435 -*ChunkedPayload.chunk_count int_size:16 -*ChunkedPayload.chunk_index int_size:16 +*ChunkedPayload.payload_size int_size:16 *ChunkedPayload.payload_chunk max_size:228 # Longest documented value is "token_wrong_size" (16 chars); 32 leaves room diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 84879a260..f851e39bd 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -2409,6 +2409,13 @@ message FromRadio { * any group carries no constraint info and should not be restricted. */ LoRaRegionPresetMap region_presets = 19; + + /* + * Chunked client API payload. Only sent to clients that have opted in to + * chunked API transport support. + */ + ChunkedPayload chunked_payload = 20; + } } @@ -2615,6 +2622,13 @@ message ToRadio { * Heartbeat message (used to keep the device connection awake on serial) */ Heartbeat heartbeat = 7; + + /* + * Chunked client API payload. The reassembled payload is a serialized + * ToRadio message and is handled through the normal PhoneAPI path. + */ + ChunkedPayload chunked_payload = 8; + } } @@ -2932,24 +2946,15 @@ message NodeRemoteHardwarePin { message ChunkedPayload { /* - * The ID of the entire payload - */ - uint32 payload_id = 1; - - /* - * The total number of chunks in the payload - */ - uint32 chunk_count = 2; - - /* - * The current chunk index in the total + * The total size of the reassembled payload. This is sent only on the + * first chunk of an ordered transfer; later chunks omit it. */ - uint32 chunk_index = 3; + uint32 payload_size = 1; /* * The binary data of the current chunk */ - bytes payload_chunk = 4; + bytes payload_chunk = 2; } /*